From d25e2e4b9ee74b6e32c87ee7d89fea54925c2779 Mon Sep 17 00:00:00 2001 From: B77Mills Date: Wed, 24 Sep 2025 14:53:38 -0500 Subject: [PATCH 1/3] Add requestedVersion to RapidCustomerIdentificationSubscriptionInput --- services/graphql/src/definitions/customer.js | 8 ++++++++ services/graphql/src/resolvers/customer.js | 15 ++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/services/graphql/src/definitions/customer.js b/services/graphql/src/definitions/customer.js index 87be62b..294e1d2 100644 --- a/services/graphql/src/definitions/customer.js +++ b/services/graphql/src/definitions/customer.js @@ -18,6 +18,12 @@ extend type Mutation { rapidCustomerIdentification(input: RapidCustomerIdentificationMutationInput!): RapidCustomerIdentification! } +enum RequestedVersionEnum { + B + D + P +} + type ChangedCustomer { id: Int! @apiValue dateChanged: DateTime! @apiValue @@ -271,6 +277,8 @@ input RapidCustomerIdentificationSubscriptionInput { id: Int! "Whether the customer should receive this subscription." receive: Boolean! + "Which print version is requirest B(both), D(digital) or P(print)" + requestedVersion: RequestedVersionEnum } input RapidCustomerIdentificationDemographicInput { diff --git a/services/graphql/src/resolvers/customer.js b/services/graphql/src/resolvers/customer.js index 27e24ed..048e39c 100644 --- a/services/graphql/src/resolvers/customer.js +++ b/services/graphql/src/resolvers/customer.js @@ -431,13 +431,18 @@ module.exports = { if (phoneNumber) phones.push({ Number: phoneNumber, PhoneContactType: 200 }); if (mobileNumber) phones.push({ Number: mobileNumber, PhoneContactType: 230 }); if (faxNumber) phones.push({ Number: faxNumber, PhoneContactType: 240 }); - const body = { RunProcessor: 1, - Products: [...productMap].map(([OmedaProductId, Receive]) => ({ - OmedaProductId, - Receive: Number(Receive), - })), + Products: [...productMap].map(([OmedaProductId, Receive]) => { + const product = subscriptions.find((obj) => obj.id === OmedaProductId); + return ({ + OmedaProductId, + Receive: Number(Receive), + ...(product && product.requestedVersion && { + RequestedVersion: product.requestedVersion, + }), + }); + }), Emails: [{ EmailAddress: email }], ...(phones.length && { Phones: phones }), ...(firstName && { FirstName: firstName }), From 9c1bb0dc3a0108f3be843d13f193e2562bcac3f9 Mon Sep 17 00:00:00 2001 From: B77Mills Date: Wed, 24 Sep 2025 15:44:08 -0500 Subject: [PATCH 2/3] update actions/cache: v2 to v4 --- .github/workflows/node-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 436348c..48a6bde 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -20,7 +20,7 @@ jobs: with: node-version: 16.x - - uses: actions/cache@v2 + - uses: actions/cache@v4 id: yarn-cache with: path: '**/node_modules' From 0e88602a1d78d7d80033d164e0905b0453074094 Mon Sep 17 00:00:00 2001 From: Brandon Krigbaum Date: Thu, 25 Sep 2025 06:42:24 -0500 Subject: [PATCH 3/3] Update customer.js --- services/graphql/src/definitions/customer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/graphql/src/definitions/customer.js b/services/graphql/src/definitions/customer.js index 294e1d2..cd5f0cd 100644 --- a/services/graphql/src/definitions/customer.js +++ b/services/graphql/src/definitions/customer.js @@ -277,7 +277,7 @@ input RapidCustomerIdentificationSubscriptionInput { id: Int! "Whether the customer should receive this subscription." receive: Boolean! - "Which print version is requirest B(both), D(digital) or P(print)" + "Which print version is requested - B (Both), D (Digital) or P (Print)" requestedVersion: RequestedVersionEnum }