diff --git a/libs/shared/cms/src/__generated__/fragment-masking.ts b/libs/shared/cms/src/__generated__/fragment-masking.ts index ee8ef6cbf1..e8015cefc2 100644 --- a/libs/shared/cms/src/__generated__/fragment-masking.ts +++ b/libs/shared/cms/src/__generated__/fragment-masking.ts @@ -22,7 +22,17 @@ export function useFragment( _documentNode: DocumentTypeDecoration, fragmentType: FragmentType> ): TType; +// return nullable if `fragmentType` is undefined +export function useFragment( + _documentNode: DocumentTypeDecoration, + fragmentType: FragmentType> | undefined +): TType | undefined; // return nullable if `fragmentType` is nullable +export function useFragment( + _documentNode: DocumentTypeDecoration, + fragmentType: FragmentType> | null +): TType | null; +// return nullable if `fragmentType` is nullable or undefined export function useFragment( _documentNode: DocumentTypeDecoration, fragmentType: @@ -31,11 +41,24 @@ export function useFragment( | undefined ): TType | null | undefined; // return array of non-nullable if `fragmentType` is array of non-nullable +export function useFragment( + _documentNode: DocumentTypeDecoration, + fragmentType: Array>> +): Array; +// return array of nullable if `fragmentType` is array of nullable +export function useFragment( + _documentNode: DocumentTypeDecoration, + fragmentType: + | Array>> + | null + | undefined +): Array | null | undefined; +// return readonly array of non-nullable if `fragmentType` is array of non-nullable export function useFragment( _documentNode: DocumentTypeDecoration, fragmentType: ReadonlyArray>> ): ReadonlyArray; -// return array of nullable if `fragmentType` is array of nullable +// return readonly array of nullable if `fragmentType` is array of nullable export function useFragment( _documentNode: DocumentTypeDecoration, fragmentType: @@ -47,10 +70,11 @@ export function useFragment( _documentNode: DocumentTypeDecoration, fragmentType: | FragmentType> + | Array>> | ReadonlyArray>> | null | undefined -): TType | ReadonlyArray | null | undefined { +): TType | Array | ReadonlyArray | null | undefined { return fragmentType as any; } diff --git a/libs/shared/cms/src/__generated__/gql.ts b/libs/shared/cms/src/__generated__/gql.ts index bc856478b0..93d2342a18 100644 --- a/libs/shared/cms/src/__generated__/gql.ts +++ b/libs/shared/cms/src/__generated__/gql.ts @@ -13,11 +13,11 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/ * Therefore it is highly recommended to use the babel or swc plugin for production. */ const documents = { - '\n query CapabilityServiceByPlanIds(\n $skip: Int!\n $limit: Int!\n $stripePlanIds: [String]!\n ) {\n purchases(\n filters: {\n or: [\n { stripePlanChoices: { stripePlanChoice: { in: $stripePlanIds } } }\n {\n offering: {\n stripeLegacyPlans: { stripeLegacyPlan: { in: $stripePlanIds } }\n }\n }\n ]\n }\n pagination: { start: $skip, limit: $limit }\n ) {\n meta {\n pagination {\n total\n }\n }\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n offering {\n data {\n attributes {\n stripeLegacyPlans {\n stripeLegacyPlan\n }\n capabilities {\n data {\n attributes {\n slug\n services {\n data {\n attributes {\n oauthClientId\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n': + '\n query CapabilityServiceByPlanIds(\n $skip: Int!\n $limit: Int!\n $stripePlanIds: [String]!\n ) {\n purchases(\n filters: {\n or: [\n { stripePlanChoices: { stripePlanChoice: { in: $stripePlanIds } } }\n {\n offering: {\n stripeLegacyPlans: { stripeLegacyPlan: { in: $stripePlanIds } }\n }\n }\n ]\n }\n pagination: { start: $skip, limit: $limit }\n ) {\n meta {\n pagination {\n total\n }\n }\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n offering {\n data {\n attributes {\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n capabilities {\n data {\n attributes {\n slug\n services {\n data {\n attributes {\n oauthClientId\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n': types.CapabilityServiceByPlanIdsDocument, '\n query EligibilityContentByOffering($apiIdentifier: String!) {\n offerings(\n pagination: { start: 0, limit: 2 }\n filters: { apiIdentifier: { eq: $apiIdentifier } }\n ) {\n data {\n attributes {\n apiIdentifier\n stripeProductId\n defaultPurchase {\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n }\n }\n }\n subGroups {\n data {\n attributes {\n groupName\n offerings {\n data {\n attributes {\n apiIdentifier\n stripeProductId\n defaultPurchase {\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n': types.EligibilityContentByOfferingDocument, - '\n query EligibilityContentByPlanIds(\n $skip: Int!\n $limit: Int!\n $stripePlanIds: [String]!\n ) {\n purchases(\n pagination: { start: $skip, limit: $limit }\n filters: {\n or: [\n { stripePlanChoices: { stripePlanChoice: { in: $stripePlanIds } } }\n {\n offering: {\n stripeLegacyPlans: { stripeLegacyPlan: { in: $stripePlanIds } }\n }\n }\n ]\n }\n ) {\n meta {\n pagination {\n total\n }\n }\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n offering {\n data {\n attributes {\n stripeProductId\n stripeLegacyPlans {\n stripeLegacyPlan\n }\n countries\n subGroups {\n data {\n attributes {\n groupName\n offerings {\n data {\n attributes {\n stripeProductId\n stripeLegacyPlans {\n stripeLegacyPlan\n }\n countries\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n': + '\n query EligibilityContentByPlanIds(\n $skip: Int!\n $limit: Int!\n $stripePlanIds: [String]!\n ) {\n purchases(\n pagination: { start: $skip, limit: $limit }\n filters: {\n or: [\n { stripePlanChoices: { stripePlanChoice: { in: $stripePlanIds } } }\n {\n offering: {\n stripeLegacyPlans: { stripeLegacyPlan: { in: $stripePlanIds } }\n }\n }\n ]\n }\n ) {\n meta {\n pagination {\n total\n }\n }\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n offering {\n data {\n attributes {\n stripeProductId\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n countries\n subGroups {\n data {\n attributes {\n groupName\n offerings {\n data {\n attributes {\n stripeProductId\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n countries\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n': types.EligibilityContentByPlanIdsDocument, '\n query Locales {\n i18NLocales {\n data {\n attributes {\n code\n }\n }\n }\n }\n': types.LocalesDocument, @@ -25,7 +25,7 @@ const documents = { types.OfferingDocument, '\n query PageContentForOffering($locale: String!, $apiIdentifier: String!) {\n offerings(\n pagination: { start: 0, limit: 2 }\n filters: { apiIdentifier: { eq: $apiIdentifier } }\n ) {\n meta {\n pagination {\n total\n }\n }\n data {\n attributes {\n apiIdentifier\n stripeProductId\n defaultPurchase {\n data {\n attributes {\n purchaseDetails {\n data {\n attributes {\n details\n productName\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n data {\n attributes {\n details\n productName\n subtitle\n webIcon\n }\n }\n }\n }\n }\n }\n }\n }\n }\n commonContent {\n data {\n attributes {\n privacyNoticeUrl\n privacyNoticeDownloadUrl\n termsOfServiceUrl\n termsOfServiceDownloadUrl\n cancellationUrl\n emailIcon\n successActionButtonUrl\n successActionButtonLabel\n newsletterLabelTextCode\n newsletterSlug\n localizations(filters: { locale: { eq: $locale } }) {\n data {\n attributes {\n privacyNoticeUrl\n privacyNoticeDownloadUrl\n termsOfServiceUrl\n termsOfServiceDownloadUrl\n cancellationUrl\n emailIcon\n successActionButtonUrl\n successActionButtonLabel\n newsletterLabelTextCode\n newsletterSlug\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n': types.PageContentForOfferingDocument, - '\n query PurchaseWithDetailsOfferingContent(\n $skip: Int!\n $limit: Int!\n $locale: String!\n $stripePlanIds: [String]!\n ) {\n purchases(\n pagination: { start: $skip, limit: $limit }\n filters: {\n or: [\n { stripePlanChoices: { stripePlanChoice: { in: $stripePlanIds } } }\n {\n offering: {\n stripeLegacyPlans: { stripeLegacyPlan: { in: $stripePlanIds } }\n }\n }\n ]\n }\n ) {\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n purchaseDetails {\n data {\n attributes {\n details\n productName\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n data {\n attributes {\n details\n productName\n subtitle\n webIcon\n }\n }\n }\n }\n }\n }\n offering {\n data {\n attributes {\n stripeProductId\n stripeLegacyPlans {\n stripeLegacyPlan\n }\n commonContent {\n data {\n attributes {\n privacyNoticeUrl\n privacyNoticeDownloadUrl\n termsOfServiceUrl\n termsOfServiceDownloadUrl\n cancellationUrl\n emailIcon\n successActionButtonUrl\n successActionButtonLabel\n newsletterLabelTextCode\n newsletterSlug\n localizations(filters: { locale: { eq: $locale } }) {\n data {\n attributes {\n privacyNoticeUrl\n privacyNoticeDownloadUrl\n termsOfServiceUrl\n termsOfServiceDownloadUrl\n cancellationUrl\n emailIcon\n successActionButtonUrl\n successActionButtonLabel\n newsletterLabelTextCode\n newsletterSlug\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n': + '\n query PurchaseWithDetailsOfferingContent(\n $skip: Int!\n $limit: Int!\n $locale: String!\n $stripePlanIds: [String]!\n ) {\n purchases(\n pagination: { start: $skip, limit: $limit }\n filters: {\n or: [\n { stripePlanChoices: { stripePlanChoice: { in: $stripePlanIds } } }\n {\n offering: {\n stripeLegacyPlans: { stripeLegacyPlan: { in: $stripePlanIds } }\n }\n }\n ]\n }\n ) {\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n purchaseDetails {\n data {\n attributes {\n details\n productName\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n data {\n attributes {\n details\n productName\n subtitle\n webIcon\n }\n }\n }\n }\n }\n }\n offering {\n data {\n attributes {\n stripeProductId\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n commonContent {\n data {\n attributes {\n privacyNoticeUrl\n privacyNoticeDownloadUrl\n termsOfServiceUrl\n termsOfServiceDownloadUrl\n cancellationUrl\n emailIcon\n successActionButtonUrl\n successActionButtonLabel\n newsletterLabelTextCode\n newsletterSlug\n localizations(filters: { locale: { eq: $locale } }) {\n data {\n attributes {\n privacyNoticeUrl\n privacyNoticeDownloadUrl\n termsOfServiceUrl\n termsOfServiceDownloadUrl\n cancellationUrl\n emailIcon\n successActionButtonUrl\n successActionButtonLabel\n newsletterLabelTextCode\n newsletterSlug\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n': types.PurchaseWithDetailsOfferingContentDocument, '\n query ServicesWithCapabilities($skip: Int!, $limit: Int!) {\n services(pagination: { start: $skip, limit: $limit }) {\n data {\n attributes {\n oauthClientId\n capabilities {\n data {\n attributes {\n slug\n }\n }\n }\n }\n }\n }\n }\n': types.ServicesWithCapabilitiesDocument, @@ -49,8 +49,8 @@ export function graphql(source: string): unknown; * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function graphql( - source: '\n query CapabilityServiceByPlanIds(\n $skip: Int!\n $limit: Int!\n $stripePlanIds: [String]!\n ) {\n purchases(\n filters: {\n or: [\n { stripePlanChoices: { stripePlanChoice: { in: $stripePlanIds } } }\n {\n offering: {\n stripeLegacyPlans: { stripeLegacyPlan: { in: $stripePlanIds } }\n }\n }\n ]\n }\n pagination: { start: $skip, limit: $limit }\n ) {\n meta {\n pagination {\n total\n }\n }\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n offering {\n data {\n attributes {\n stripeLegacyPlans {\n stripeLegacyPlan\n }\n capabilities {\n data {\n attributes {\n slug\n services {\n data {\n attributes {\n oauthClientId\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n' -): (typeof documents)['\n query CapabilityServiceByPlanIds(\n $skip: Int!\n $limit: Int!\n $stripePlanIds: [String]!\n ) {\n purchases(\n filters: {\n or: [\n { stripePlanChoices: { stripePlanChoice: { in: $stripePlanIds } } }\n {\n offering: {\n stripeLegacyPlans: { stripeLegacyPlan: { in: $stripePlanIds } }\n }\n }\n ]\n }\n pagination: { start: $skip, limit: $limit }\n ) {\n meta {\n pagination {\n total\n }\n }\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n offering {\n data {\n attributes {\n stripeLegacyPlans {\n stripeLegacyPlan\n }\n capabilities {\n data {\n attributes {\n slug\n services {\n data {\n attributes {\n oauthClientId\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n']; + source: '\n query CapabilityServiceByPlanIds(\n $skip: Int!\n $limit: Int!\n $stripePlanIds: [String]!\n ) {\n purchases(\n filters: {\n or: [\n { stripePlanChoices: { stripePlanChoice: { in: $stripePlanIds } } }\n {\n offering: {\n stripeLegacyPlans: { stripeLegacyPlan: { in: $stripePlanIds } }\n }\n }\n ]\n }\n pagination: { start: $skip, limit: $limit }\n ) {\n meta {\n pagination {\n total\n }\n }\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n offering {\n data {\n attributes {\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n capabilities {\n data {\n attributes {\n slug\n services {\n data {\n attributes {\n oauthClientId\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n' +): (typeof documents)['\n query CapabilityServiceByPlanIds(\n $skip: Int!\n $limit: Int!\n $stripePlanIds: [String]!\n ) {\n purchases(\n filters: {\n or: [\n { stripePlanChoices: { stripePlanChoice: { in: $stripePlanIds } } }\n {\n offering: {\n stripeLegacyPlans: { stripeLegacyPlan: { in: $stripePlanIds } }\n }\n }\n ]\n }\n pagination: { start: $skip, limit: $limit }\n ) {\n meta {\n pagination {\n total\n }\n }\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n offering {\n data {\n attributes {\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n capabilities {\n data {\n attributes {\n slug\n services {\n data {\n attributes {\n oauthClientId\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n']; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -61,8 +61,8 @@ export function graphql( * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function graphql( - source: '\n query EligibilityContentByPlanIds(\n $skip: Int!\n $limit: Int!\n $stripePlanIds: [String]!\n ) {\n purchases(\n pagination: { start: $skip, limit: $limit }\n filters: {\n or: [\n { stripePlanChoices: { stripePlanChoice: { in: $stripePlanIds } } }\n {\n offering: {\n stripeLegacyPlans: { stripeLegacyPlan: { in: $stripePlanIds } }\n }\n }\n ]\n }\n ) {\n meta {\n pagination {\n total\n }\n }\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n offering {\n data {\n attributes {\n stripeProductId\n stripeLegacyPlans {\n stripeLegacyPlan\n }\n countries\n subGroups {\n data {\n attributes {\n groupName\n offerings {\n data {\n attributes {\n stripeProductId\n stripeLegacyPlans {\n stripeLegacyPlan\n }\n countries\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n' -): (typeof documents)['\n query EligibilityContentByPlanIds(\n $skip: Int!\n $limit: Int!\n $stripePlanIds: [String]!\n ) {\n purchases(\n pagination: { start: $skip, limit: $limit }\n filters: {\n or: [\n { stripePlanChoices: { stripePlanChoice: { in: $stripePlanIds } } }\n {\n offering: {\n stripeLegacyPlans: { stripeLegacyPlan: { in: $stripePlanIds } }\n }\n }\n ]\n }\n ) {\n meta {\n pagination {\n total\n }\n }\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n offering {\n data {\n attributes {\n stripeProductId\n stripeLegacyPlans {\n stripeLegacyPlan\n }\n countries\n subGroups {\n data {\n attributes {\n groupName\n offerings {\n data {\n attributes {\n stripeProductId\n stripeLegacyPlans {\n stripeLegacyPlan\n }\n countries\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n']; + source: '\n query EligibilityContentByPlanIds(\n $skip: Int!\n $limit: Int!\n $stripePlanIds: [String]!\n ) {\n purchases(\n pagination: { start: $skip, limit: $limit }\n filters: {\n or: [\n { stripePlanChoices: { stripePlanChoice: { in: $stripePlanIds } } }\n {\n offering: {\n stripeLegacyPlans: { stripeLegacyPlan: { in: $stripePlanIds } }\n }\n }\n ]\n }\n ) {\n meta {\n pagination {\n total\n }\n }\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n offering {\n data {\n attributes {\n stripeProductId\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n countries\n subGroups {\n data {\n attributes {\n groupName\n offerings {\n data {\n attributes {\n stripeProductId\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n countries\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n' +): (typeof documents)['\n query EligibilityContentByPlanIds(\n $skip: Int!\n $limit: Int!\n $stripePlanIds: [String]!\n ) {\n purchases(\n pagination: { start: $skip, limit: $limit }\n filters: {\n or: [\n { stripePlanChoices: { stripePlanChoice: { in: $stripePlanIds } } }\n {\n offering: {\n stripeLegacyPlans: { stripeLegacyPlan: { in: $stripePlanIds } }\n }\n }\n ]\n }\n ) {\n meta {\n pagination {\n total\n }\n }\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n offering {\n data {\n attributes {\n stripeProductId\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n countries\n subGroups {\n data {\n attributes {\n groupName\n offerings {\n data {\n attributes {\n stripeProductId\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n countries\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n']; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -85,8 +85,8 @@ export function graphql( * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function graphql( - source: '\n query PurchaseWithDetailsOfferingContent(\n $skip: Int!\n $limit: Int!\n $locale: String!\n $stripePlanIds: [String]!\n ) {\n purchases(\n pagination: { start: $skip, limit: $limit }\n filters: {\n or: [\n { stripePlanChoices: { stripePlanChoice: { in: $stripePlanIds } } }\n {\n offering: {\n stripeLegacyPlans: { stripeLegacyPlan: { in: $stripePlanIds } }\n }\n }\n ]\n }\n ) {\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n purchaseDetails {\n data {\n attributes {\n details\n productName\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n data {\n attributes {\n details\n productName\n subtitle\n webIcon\n }\n }\n }\n }\n }\n }\n offering {\n data {\n attributes {\n stripeProductId\n stripeLegacyPlans {\n stripeLegacyPlan\n }\n commonContent {\n data {\n attributes {\n privacyNoticeUrl\n privacyNoticeDownloadUrl\n termsOfServiceUrl\n termsOfServiceDownloadUrl\n cancellationUrl\n emailIcon\n successActionButtonUrl\n successActionButtonLabel\n newsletterLabelTextCode\n newsletterSlug\n localizations(filters: { locale: { eq: $locale } }) {\n data {\n attributes {\n privacyNoticeUrl\n privacyNoticeDownloadUrl\n termsOfServiceUrl\n termsOfServiceDownloadUrl\n cancellationUrl\n emailIcon\n successActionButtonUrl\n successActionButtonLabel\n newsletterLabelTextCode\n newsletterSlug\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n' -): (typeof documents)['\n query PurchaseWithDetailsOfferingContent(\n $skip: Int!\n $limit: Int!\n $locale: String!\n $stripePlanIds: [String]!\n ) {\n purchases(\n pagination: { start: $skip, limit: $limit }\n filters: {\n or: [\n { stripePlanChoices: { stripePlanChoice: { in: $stripePlanIds } } }\n {\n offering: {\n stripeLegacyPlans: { stripeLegacyPlan: { in: $stripePlanIds } }\n }\n }\n ]\n }\n ) {\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n purchaseDetails {\n data {\n attributes {\n details\n productName\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n data {\n attributes {\n details\n productName\n subtitle\n webIcon\n }\n }\n }\n }\n }\n }\n offering {\n data {\n attributes {\n stripeProductId\n stripeLegacyPlans {\n stripeLegacyPlan\n }\n commonContent {\n data {\n attributes {\n privacyNoticeUrl\n privacyNoticeDownloadUrl\n termsOfServiceUrl\n termsOfServiceDownloadUrl\n cancellationUrl\n emailIcon\n successActionButtonUrl\n successActionButtonLabel\n newsletterLabelTextCode\n newsletterSlug\n localizations(filters: { locale: { eq: $locale } }) {\n data {\n attributes {\n privacyNoticeUrl\n privacyNoticeDownloadUrl\n termsOfServiceUrl\n termsOfServiceDownloadUrl\n cancellationUrl\n emailIcon\n successActionButtonUrl\n successActionButtonLabel\n newsletterLabelTextCode\n newsletterSlug\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n']; + source: '\n query PurchaseWithDetailsOfferingContent(\n $skip: Int!\n $limit: Int!\n $locale: String!\n $stripePlanIds: [String]!\n ) {\n purchases(\n pagination: { start: $skip, limit: $limit }\n filters: {\n or: [\n { stripePlanChoices: { stripePlanChoice: { in: $stripePlanIds } } }\n {\n offering: {\n stripeLegacyPlans: { stripeLegacyPlan: { in: $stripePlanIds } }\n }\n }\n ]\n }\n ) {\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n purchaseDetails {\n data {\n attributes {\n details\n productName\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n data {\n attributes {\n details\n productName\n subtitle\n webIcon\n }\n }\n }\n }\n }\n }\n offering {\n data {\n attributes {\n stripeProductId\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n commonContent {\n data {\n attributes {\n privacyNoticeUrl\n privacyNoticeDownloadUrl\n termsOfServiceUrl\n termsOfServiceDownloadUrl\n cancellationUrl\n emailIcon\n successActionButtonUrl\n successActionButtonLabel\n newsletterLabelTextCode\n newsletterSlug\n localizations(filters: { locale: { eq: $locale } }) {\n data {\n attributes {\n privacyNoticeUrl\n privacyNoticeDownloadUrl\n termsOfServiceUrl\n termsOfServiceDownloadUrl\n cancellationUrl\n emailIcon\n successActionButtonUrl\n successActionButtonLabel\n newsletterLabelTextCode\n newsletterSlug\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n' +): (typeof documents)['\n query PurchaseWithDetailsOfferingContent(\n $skip: Int!\n $limit: Int!\n $locale: String!\n $stripePlanIds: [String]!\n ) {\n purchases(\n pagination: { start: $skip, limit: $limit }\n filters: {\n or: [\n { stripePlanChoices: { stripePlanChoice: { in: $stripePlanIds } } }\n {\n offering: {\n stripeLegacyPlans: { stripeLegacyPlan: { in: $stripePlanIds } }\n }\n }\n ]\n }\n ) {\n data {\n attributes {\n stripePlanChoices {\n stripePlanChoice\n }\n purchaseDetails {\n data {\n attributes {\n details\n productName\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n data {\n attributes {\n details\n productName\n subtitle\n webIcon\n }\n }\n }\n }\n }\n }\n offering {\n data {\n attributes {\n stripeProductId\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n commonContent {\n data {\n attributes {\n privacyNoticeUrl\n privacyNoticeDownloadUrl\n termsOfServiceUrl\n termsOfServiceDownloadUrl\n cancellationUrl\n emailIcon\n successActionButtonUrl\n successActionButtonLabel\n newsletterLabelTextCode\n newsletterSlug\n localizations(filters: { locale: { eq: $locale } }) {\n data {\n attributes {\n privacyNoticeUrl\n privacyNoticeDownloadUrl\n termsOfServiceUrl\n termsOfServiceDownloadUrl\n cancellationUrl\n emailIcon\n successActionButtonUrl\n successActionButtonLabel\n newsletterLabelTextCode\n newsletterSlug\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n']; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/libs/shared/cms/src/__generated__/graphql.ts b/libs/shared/cms/src/__generated__/graphql.ts index ece04f1515..66c3dc56cc 100644 --- a/libs/shared/cms/src/__generated__/graphql.ts +++ b/libs/shared/cms/src/__generated__/graphql.ts @@ -67,13 +67,20 @@ export type Capability = { createdAt: Maybe; description: Maybe; internalName: Scalars['String']['output']; - offering: Maybe; + offerings: Maybe; publishedAt: Maybe; services: Maybe; slug: Scalars['String']['output']; updatedAt: Maybe; }; +export type CapabilityOfferingsArgs = { + filters: InputMaybe; + pagination?: InputMaybe; + publicationState?: InputMaybe; + sort?: InputMaybe>>; +}; + export type CapabilityServicesArgs = { filters: InputMaybe; pagination?: InputMaybe; @@ -105,7 +112,7 @@ export type CapabilityFiltersInput = { id: InputMaybe; internalName: InputMaybe; not: InputMaybe; - offering: InputMaybe; + offerings: InputMaybe; or: InputMaybe>>; publishedAt: InputMaybe; services: InputMaybe; @@ -116,7 +123,7 @@ export type CapabilityFiltersInput = { export type CapabilityInput = { description: InputMaybe; internalName: InputMaybe; - offering: InputMaybe; + offerings: InputMaybe>>; publishedAt: InputMaybe; services: InputMaybe>>; slug: InputMaybe; @@ -135,7 +142,7 @@ export type CommonContent = { internalName: Scalars['String']['output']; locale: Maybe; localizations: Maybe; - newsletterLabelTextCode: Maybe; + newsletterLabelTextCode: Maybe; newsletterSlug: Maybe; privacyNoticeDownloadUrl: Scalars['String']['output']; privacyNoticeUrl: Scalars['String']['output']; @@ -180,7 +187,7 @@ export type CommonContentFiltersInput = { internalName: InputMaybe; locale: InputMaybe; localizations: InputMaybe; - newsletterLabelTextCode: InputMaybe; + newsletterLabelTextCode: InputMaybe; newsletterSlug: InputMaybe; not: InputMaybe; or: InputMaybe>>; @@ -198,7 +205,7 @@ export type CommonContentInput = { cancellationUrl: InputMaybe; emailIcon: InputMaybe; internalName: InputMaybe; - newsletterLabelTextCode: InputMaybe; + newsletterLabelTextCode: InputMaybe; newsletterSlug: InputMaybe; privacyNoticeDownloadUrl: InputMaybe; privacyNoticeUrl: InputMaybe; @@ -2391,7 +2398,7 @@ export type PageContentForOfferingQuery = { emailIcon: string | null; successActionButtonUrl: string; successActionButtonLabel: string | null; - newsletterLabelTextCode: any | null; + newsletterLabelTextCode: string | null; newsletterSlug: any | null; localizations: { __typename?: 'CommonContentRelationResponseCollection'; @@ -2407,7 +2414,7 @@ export type PageContentForOfferingQuery = { emailIcon: string | null; successActionButtonUrl: string; successActionButtonLabel: string | null; - newsletterLabelTextCode: any | null; + newsletterLabelTextCode: string | null; newsletterSlug: any | null; } | null; }>; @@ -2492,7 +2499,7 @@ export type PurchaseWithDetailsOfferingContentQuery = { emailIcon: string | null; successActionButtonUrl: string; successActionButtonLabel: string | null; - newsletterLabelTextCode: any | null; + newsletterLabelTextCode: string | null; newsletterSlug: any | null; localizations: { __typename?: 'CommonContentRelationResponseCollection'; @@ -2508,7 +2515,7 @@ export type PurchaseWithDetailsOfferingContentQuery = { emailIcon: string | null; successActionButtonUrl: string; successActionButtonLabel: string | null; - newsletterLabelTextCode: any | null; + newsletterLabelTextCode: string | null; newsletterSlug: any | null; } | null; }>; @@ -2821,6 +2828,31 @@ export const CapabilityServiceByPlanIdsDocument = { kind: 'Name', value: 'stripeLegacyPlans', }, + arguments: [ + { + kind: 'Argument', + name: { + kind: 'Name', + value: 'pagination', + }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { + kind: 'Name', + value: 'limit', + }, + value: { + kind: 'IntValue', + value: '200', + }, + }, + ], + }, + }, + ], selectionSet: { kind: 'SelectionSet', selections: [ @@ -3561,6 +3593,31 @@ export const EligibilityContentByPlanIdsDocument = { kind: 'Name', value: 'stripeLegacyPlans', }, + arguments: [ + { + kind: 'Argument', + name: { + kind: 'Name', + value: 'pagination', + }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { + kind: 'Name', + value: 'limit', + }, + value: { + kind: 'IntValue', + value: '200', + }, + }, + ], + }, + }, + ], selectionSet: { kind: 'SelectionSet', selections: [ @@ -3669,6 +3726,38 @@ export const EligibilityContentByPlanIdsDocument = { value: 'stripeLegacyPlans', }, + arguments: + [ + { + kind: 'Argument', + name: { + kind: 'Name', + value: + 'pagination', + }, + value: + { + kind: 'ObjectValue', + fields: + [ + { + kind: 'ObjectField', + name: { + kind: 'Name', + value: + 'limit', + }, + value: + { + kind: 'IntValue', + value: + '200', + }, + }, + ], + }, + }, + ], selectionSet: { kind: 'SelectionSet', @@ -5168,6 +5257,31 @@ export const PurchaseWithDetailsOfferingContentDocument = { kind: 'Name', value: 'stripeLegacyPlans', }, + arguments: [ + { + kind: 'Argument', + name: { + kind: 'Name', + value: 'pagination', + }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { + kind: 'Name', + value: 'limit', + }, + value: { + kind: 'IntValue', + value: '200', + }, + }, + ], + }, + }, + ], selectionSet: { kind: 'SelectionSet', selections: [ diff --git a/libs/shared/cms/src/lib/product-configuration.manager.ts b/libs/shared/cms/src/lib/product-configuration.manager.ts index 202a89c8f4..79327b24a0 100644 --- a/libs/shared/cms/src/lib/product-configuration.manager.ts +++ b/libs/shared/cms/src/lib/product-configuration.manager.ts @@ -189,8 +189,8 @@ export class ProductConfigurationManager { const stripePlans: string[][] = []; // reduce query size by making multiple calls to CMS - for (let i = 0; i < stripePlanIds.length; i += 150) { - stripePlans.push(stripePlanIds.slice(i, i + 150)); + for (let i = 0; i < stripePlanIds.length; i += 100) { + stripePlans.push(stripePlanIds.slice(i, i + 100)); } while (stripePlans.length > 0) { diff --git a/libs/shared/cms/src/lib/queries/capability-service-by-plan-ids/query.ts b/libs/shared/cms/src/lib/queries/capability-service-by-plan-ids/query.ts index 4b888dbb0c..6a3cdec52e 100644 --- a/libs/shared/cms/src/lib/queries/capability-service-by-plan-ids/query.ts +++ b/libs/shared/cms/src/lib/queries/capability-service-by-plan-ids/query.ts @@ -36,7 +36,7 @@ export const capabilityServiceByPlanIdsQuery = graphql(` offering { data { attributes { - stripeLegacyPlans { + stripeLegacyPlans(pagination: { limit: 200 }) { stripeLegacyPlan } capabilities { diff --git a/libs/shared/cms/src/lib/queries/eligibility-content-by-plan-ids/query.ts b/libs/shared/cms/src/lib/queries/eligibility-content-by-plan-ids/query.ts index 835c507f8b..bc276f21de 100644 --- a/libs/shared/cms/src/lib/queries/eligibility-content-by-plan-ids/query.ts +++ b/libs/shared/cms/src/lib/queries/eligibility-content-by-plan-ids/query.ts @@ -37,7 +37,7 @@ export const eligibilityContentByPlanIdsQuery = graphql(` data { attributes { stripeProductId - stripeLegacyPlans { + stripeLegacyPlans(pagination: { limit: 200 }) { stripeLegacyPlan } countries @@ -49,7 +49,7 @@ export const eligibilityContentByPlanIdsQuery = graphql(` data { attributes { stripeProductId - stripeLegacyPlans { + stripeLegacyPlans(pagination: { limit: 200 }) { stripeLegacyPlan } countries diff --git a/libs/shared/cms/src/lib/queries/page-content-for-offering/factories.ts b/libs/shared/cms/src/lib/queries/page-content-for-offering/factories.ts index 349fb61286..eb9f372475 100644 --- a/libs/shared/cms/src/lib/queries/page-content-for-offering/factories.ts +++ b/libs/shared/cms/src/lib/queries/page-content-for-offering/factories.ts @@ -139,7 +139,7 @@ export const PageContentCommonContentResultFactory = ( emailIcon: faker.internet.url(), successActionButtonUrl: faker.internet.url(), successActionButtonLabel: faker.string.alpha(10), - newsletterLabelTextCode: faker.helpers.arrayElements([ + newsletterLabelTextCode: faker.helpers.arrayElement([ 'snp', 'hubs', 'mdnplus', diff --git a/libs/shared/cms/src/lib/queries/page-content-for-offering/types.ts b/libs/shared/cms/src/lib/queries/page-content-for-offering/types.ts index 5a4d252eed..4a7ea3d130 100644 --- a/libs/shared/cms/src/lib/queries/page-content-for-offering/types.ts +++ b/libs/shared/cms/src/lib/queries/page-content-for-offering/types.ts @@ -13,7 +13,7 @@ export interface PageContentCommonContentResult { emailIcon: string | null; successActionButtonUrl: string; successActionButtonLabel: string; - newsletterLabelTextCode: string[] | null; + newsletterLabelTextCode: string | null; newsletterSlug: string[] | null; } diff --git a/libs/shared/cms/src/lib/queries/purchase-with-details-offering-content/query.ts b/libs/shared/cms/src/lib/queries/purchase-with-details-offering-content/query.ts index 0f54780352..091f2c14ff 100644 --- a/libs/shared/cms/src/lib/queries/purchase-with-details-offering-content/query.ts +++ b/libs/shared/cms/src/lib/queries/purchase-with-details-offering-content/query.ts @@ -52,7 +52,7 @@ export const purchaseWithDetailsOfferingContentQuery = graphql(` data { attributes { stripeProductId - stripeLegacyPlans { + stripeLegacyPlans(pagination: { limit: 200 }) { stripeLegacyPlan } commonContent {