зеркало из https://github.com/mozilla/fxa.git
Merge pull request #17673 from mozilla/fxa-10429-config-no-cms
fix(cms): no cms config errors on data merge
This commit is contained in:
Коммит
9649619c56
|
@ -22,7 +22,17 @@ export function useFragment<TType>(
|
|||
_documentNode: DocumentTypeDecoration<TType, any>,
|
||||
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>
|
||||
): TType;
|
||||
// return nullable if `fragmentType` is undefined
|
||||
export function useFragment<TType>(
|
||||
_documentNode: DocumentTypeDecoration<TType, any>,
|
||||
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | undefined
|
||||
): TType | undefined;
|
||||
// return nullable if `fragmentType` is nullable
|
||||
export function useFragment<TType>(
|
||||
_documentNode: DocumentTypeDecoration<TType, any>,
|
||||
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null
|
||||
): TType | null;
|
||||
// return nullable if `fragmentType` is nullable or undefined
|
||||
export function useFragment<TType>(
|
||||
_documentNode: DocumentTypeDecoration<TType, any>,
|
||||
fragmentType:
|
||||
|
@ -31,11 +41,24 @@ export function useFragment<TType>(
|
|||
| undefined
|
||||
): TType | null | undefined;
|
||||
// return array of non-nullable if `fragmentType` is array of non-nullable
|
||||
export function useFragment<TType>(
|
||||
_documentNode: DocumentTypeDecoration<TType, any>,
|
||||
fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>>
|
||||
): Array<TType>;
|
||||
// return array of nullable if `fragmentType` is array of nullable
|
||||
export function useFragment<TType>(
|
||||
_documentNode: DocumentTypeDecoration<TType, any>,
|
||||
fragmentType:
|
||||
| Array<FragmentType<DocumentTypeDecoration<TType, any>>>
|
||||
| null
|
||||
| undefined
|
||||
): Array<TType> | null | undefined;
|
||||
// return readonly array of non-nullable if `fragmentType` is array of non-nullable
|
||||
export function useFragment<TType>(
|
||||
_documentNode: DocumentTypeDecoration<TType, any>,
|
||||
fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>
|
||||
): ReadonlyArray<TType>;
|
||||
// return array of nullable if `fragmentType` is array of nullable
|
||||
// return readonly array of nullable if `fragmentType` is array of nullable
|
||||
export function useFragment<TType>(
|
||||
_documentNode: DocumentTypeDecoration<TType, any>,
|
||||
fragmentType:
|
||||
|
@ -47,10 +70,11 @@ export function useFragment<TType>(
|
|||
_documentNode: DocumentTypeDecoration<TType, any>,
|
||||
fragmentType:
|
||||
| FragmentType<DocumentTypeDecoration<TType, any>>
|
||||
| Array<FragmentType<DocumentTypeDecoration<TType, any>>>
|
||||
| ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>
|
||||
| null
|
||||
| undefined
|
||||
): TType | ReadonlyArray<TType> | null | undefined {
|
||||
): TType | Array<TType> | ReadonlyArray<TType> | null | undefined {
|
||||
return fragmentType as any;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -67,13 +67,20 @@ export type Capability = {
|
|||
createdAt: Maybe<Scalars['DateTime']['output']>;
|
||||
description: Maybe<Scalars['String']['output']>;
|
||||
internalName: Scalars['String']['output'];
|
||||
offering: Maybe<OfferingEntityResponse>;
|
||||
offerings: Maybe<OfferingRelationResponseCollection>;
|
||||
publishedAt: Maybe<Scalars['DateTime']['output']>;
|
||||
services: Maybe<ServiceRelationResponseCollection>;
|
||||
slug: Scalars['String']['output'];
|
||||
updatedAt: Maybe<Scalars['DateTime']['output']>;
|
||||
};
|
||||
|
||||
export type CapabilityOfferingsArgs = {
|
||||
filters: InputMaybe<OfferingFiltersInput>;
|
||||
pagination?: InputMaybe<PaginationArg>;
|
||||
publicationState?: InputMaybe<PublicationState>;
|
||||
sort?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
|
||||
};
|
||||
|
||||
export type CapabilityServicesArgs = {
|
||||
filters: InputMaybe<ServiceFiltersInput>;
|
||||
pagination?: InputMaybe<PaginationArg>;
|
||||
|
@ -105,7 +112,7 @@ export type CapabilityFiltersInput = {
|
|||
id: InputMaybe<IdFilterInput>;
|
||||
internalName: InputMaybe<StringFilterInput>;
|
||||
not: InputMaybe<CapabilityFiltersInput>;
|
||||
offering: InputMaybe<OfferingFiltersInput>;
|
||||
offerings: InputMaybe<OfferingFiltersInput>;
|
||||
or: InputMaybe<Array<InputMaybe<CapabilityFiltersInput>>>;
|
||||
publishedAt: InputMaybe<DateTimeFilterInput>;
|
||||
services: InputMaybe<ServiceFiltersInput>;
|
||||
|
@ -116,7 +123,7 @@ export type CapabilityFiltersInput = {
|
|||
export type CapabilityInput = {
|
||||
description: InputMaybe<Scalars['String']['input']>;
|
||||
internalName: InputMaybe<Scalars['String']['input']>;
|
||||
offering: InputMaybe<Scalars['ID']['input']>;
|
||||
offerings: InputMaybe<Array<InputMaybe<Scalars['ID']['input']>>>;
|
||||
publishedAt: InputMaybe<Scalars['DateTime']['input']>;
|
||||
services: InputMaybe<Array<InputMaybe<Scalars['ID']['input']>>>;
|
||||
slug: InputMaybe<Scalars['String']['input']>;
|
||||
|
@ -135,7 +142,7 @@ export type CommonContent = {
|
|||
internalName: Scalars['String']['output'];
|
||||
locale: Maybe<Scalars['String']['output']>;
|
||||
localizations: Maybe<CommonContentRelationResponseCollection>;
|
||||
newsletterLabelTextCode: Maybe<Scalars['JSON']['output']>;
|
||||
newsletterLabelTextCode: Maybe<Scalars['String']['output']>;
|
||||
newsletterSlug: Maybe<Scalars['JSON']['output']>;
|
||||
privacyNoticeDownloadUrl: Scalars['String']['output'];
|
||||
privacyNoticeUrl: Scalars['String']['output'];
|
||||
|
@ -180,7 +187,7 @@ export type CommonContentFiltersInput = {
|
|||
internalName: InputMaybe<StringFilterInput>;
|
||||
locale: InputMaybe<StringFilterInput>;
|
||||
localizations: InputMaybe<CommonContentFiltersInput>;
|
||||
newsletterLabelTextCode: InputMaybe<JsonFilterInput>;
|
||||
newsletterLabelTextCode: InputMaybe<StringFilterInput>;
|
||||
newsletterSlug: InputMaybe<JsonFilterInput>;
|
||||
not: InputMaybe<CommonContentFiltersInput>;
|
||||
or: InputMaybe<Array<InputMaybe<CommonContentFiltersInput>>>;
|
||||
|
@ -198,7 +205,7 @@ export type CommonContentInput = {
|
|||
cancellationUrl: InputMaybe<Scalars['String']['input']>;
|
||||
emailIcon: InputMaybe<Scalars['String']['input']>;
|
||||
internalName: InputMaybe<Scalars['String']['input']>;
|
||||
newsletterLabelTextCode: InputMaybe<Scalars['JSON']['input']>;
|
||||
newsletterLabelTextCode: InputMaybe<Scalars['String']['input']>;
|
||||
newsletterSlug: InputMaybe<Scalars['JSON']['input']>;
|
||||
privacyNoticeDownloadUrl: InputMaybe<Scalars['String']['input']>;
|
||||
privacyNoticeUrl: InputMaybe<Scalars['String']['input']>;
|
||||
|
@ -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: [
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -36,7 +36,7 @@ export const capabilityServiceByPlanIdsQuery = graphql(`
|
|||
offering {
|
||||
data {
|
||||
attributes {
|
||||
stripeLegacyPlans {
|
||||
stripeLegacyPlans(pagination: { limit: 200 }) {
|
||||
stripeLegacyPlan
|
||||
}
|
||||
capabilities {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -13,7 +13,7 @@ export interface PageContentCommonContentResult {
|
|||
emailIcon: string | null;
|
||||
successActionButtonUrl: string;
|
||||
successActionButtonLabel: string;
|
||||
newsletterLabelTextCode: string[] | null;
|
||||
newsletterLabelTextCode: string | null;
|
||||
newsletterSlug: string[] | null;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ export const purchaseWithDetailsOfferingContentQuery = graphql(`
|
|||
data {
|
||||
attributes {
|
||||
stripeProductId
|
||||
stripeLegacyPlans {
|
||||
stripeLegacyPlans(pagination: { limit: 200 }) {
|
||||
stripeLegacyPlan
|
||||
}
|
||||
commonContent {
|
||||
|
|
Загрузка…
Ссылка в новой задаче