diff --git a/.prettierignore b/.prettierignore
index 84a4d5d0b2..2e734decf3 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -4,5 +4,6 @@
# Autogenerated files
packages/fxa-admin-server/src/schema.gql
packages/fxa-admin-server/src/graphql.ts
+libs/shared/cms/src/__generated__/**/*
-/.nx/workspace-data
\ No newline at end of file
+/.nx/workspace-data
diff --git a/apps/payments/next/app/[locale]/[offeringId]/checkout/[interval]/[cartId]/layout.tsx b/apps/payments/next/app/[locale]/[offeringId]/checkout/[interval]/[cartId]/layout.tsx
index 3692a7359e..8f12d145f8 100644
--- a/apps/payments/next/app/[locale]/[offeringId]/checkout/[interval]/[cartId]/layout.tsx
+++ b/apps/payments/next/app/[locale]/[offeringId]/checkout/[interval]/[cartId]/layout.tsx
@@ -71,10 +71,8 @@ export default async function RootLayout({
/>
}
purchaseDetails={
- cms.defaultPurchase.data.attributes.purchaseDetails.data.attributes.localizations.data.at(
- 0
- )?.attributes ||
- cms.defaultPurchase.data.attributes.purchaseDetails.data.attributes
+ cms.defaultPurchase.purchaseDetails.localizations.at(0) ||
+ cms.defaultPurchase.purchaseDetails
}
>
@@ -103,13 +98,9 @@ export default async function RootLayout({
diff --git a/apps/payments/next/app/[locale]/[offeringId]/checkout/[interval]/[cartId]/success/page.tsx b/apps/payments/next/app/[locale]/[offeringId]/checkout/[interval]/[cartId]/success/page.tsx
index 0371c3fc78..807383d274 100644
--- a/apps/payments/next/app/[locale]/[offeringId]/checkout/[interval]/[cartId]/success/page.tsx
+++ b/apps/payments/next/app/[locale]/[offeringId]/checkout/[interval]/[cartId]/success/page.tsx
@@ -75,13 +75,10 @@ export default async function CheckoutSuccess({
]);
const { productName } =
- cms.defaultPurchase.data.attributes.purchaseDetails.data.attributes.localizations.data.at(
- 0
- )?.attributes ||
- cms.defaultPurchase.data.attributes.purchaseDetails.data.attributes;
+ cms.defaultPurchase.purchaseDetails.localizations.at(0) ||
+ cms.defaultPurchase.purchaseDetails;
const { successActionButtonUrl, successActionButtonLabel } =
- cms.commonContent.data.attributes.localizations.data.at(0)?.attributes ||
- cms.commonContent.data.attributes;
+ cms.commonContent.localizations.at(0) || cms.commonContent;
return (
<>
diff --git a/libs/payments/capability/src/lib/capability.manager.spec.ts b/libs/payments/capability/src/lib/capability.manager.spec.ts
index 06d4d412b3..2391e725a5 100644
--- a/libs/payments/capability/src/lib/capability.manager.spec.ts
+++ b/libs/payments/capability/src/lib/capability.manager.spec.ts
@@ -21,7 +21,6 @@ import {
ServicesWithCapabilitiesResult,
StrapiClient,
MockStrapiClientConfigProvider,
- StrapiEntityFactory,
} from '@fxa/shared/cms';
import { MockFirestoreProvider } from '@fxa/shared/db/firestore';
import { MockStatsDProvider } from '@fxa/shared/metrics/statsd';
@@ -53,39 +52,21 @@ describe('CapabilityManager', () => {
describe('getClients', () => {
it('should return services with capabilities', async () => {
const clientResults = [
- StrapiEntityFactory(
- ServiceResultFactory({
- oauthClientId: 'client1',
- capabilities: {
- data: [
- StrapiEntityFactory(
- CapabilitiesResultFactory({ slug: 'exampleCap8' })
- ),
- StrapiEntityFactory(
- CapabilitiesResultFactory({ slug: 'exampleCap0' })
- ),
- StrapiEntityFactory(
- CapabilitiesResultFactory({ slug: 'exampleCap2' })
- ),
- StrapiEntityFactory(
- CapabilitiesResultFactory({ slug: 'exampleCap4' })
- ),
- StrapiEntityFactory(
- CapabilitiesResultFactory({ slug: 'exampleCap5' })
- ),
- StrapiEntityFactory(
- CapabilitiesResultFactory({ slug: 'exampleCap6' })
- ),
- ],
- },
- })
- ),
+ ServiceResultFactory({
+ oauthClientId: 'client1',
+ capabilities: [
+ CapabilitiesResultFactory({ slug: 'exampleCap8' }),
+ CapabilitiesResultFactory({ slug: 'exampleCap0' }),
+ CapabilitiesResultFactory({ slug: 'exampleCap2' }),
+ CapabilitiesResultFactory({ slug: 'exampleCap4' }),
+ CapabilitiesResultFactory({ slug: 'exampleCap5' }),
+ CapabilitiesResultFactory({ slug: 'exampleCap6' }),
+ ],
+ }),
];
const mockServicesWithCapabilitiesQuery =
ServicesWithCapabilitiesQueryFactory({
- services: {
- data: clientResults,
- },
+ services: clientResults,
});
jest
.spyOn(productConfigurationManager, 'getServicesWithCapabilities')
@@ -99,8 +80,8 @@ describe('CapabilityManager', () => {
expect(result.length).toBe(1);
expect(result.at(0)?.clientId).toBe('client1');
- const actualCapabilities = clientResults[0].attributes.capabilities.data
- .map((capability) => capability.attributes.slug)
+ const actualCapabilities = clientResults[0].capabilities
+ .map((capability) => capability.slug)
.sort();
expect(result.at(0)?.capabilities).toHaveLength(6);
@@ -118,9 +99,9 @@ describe('CapabilityManager', () => {
'getPurchaseDetailsForCapabilityServiceByPlanIds'
)
.mockResolvedValue(
- new CapabilityServiceByPlanIdsResultUtil([
- mockCapabilityServiceByPlanIdsQuery,
- ] as CapabilityServiceByPlanIdsResult[])
+ new CapabilityServiceByPlanIdsResultUtil(
+ mockCapabilityServiceByPlanIdsQuery as CapabilityServiceByPlanIdsResult
+ )
);
const result = await capabilityManager.priceIdsToClientCapabilities([
'planId1',
@@ -129,30 +110,15 @@ describe('CapabilityManager', () => {
});
it('should return empty results when there are no capability collection items', async () => {
- const mockCapabilityOfferingResult = StrapiEntityFactory(
- CapabilityOfferingResultFactory({
- capabilities: {
- data: [],
- },
- })
- );
- const mockCapabilityPurchaseResult = StrapiEntityFactory(
- CapabilityPurchaseResultFactory({
- offering: {
- data: mockCapabilityOfferingResult,
- },
- })
- );
+ const mockCapabilityOfferingResult = CapabilityOfferingResultFactory({
+ capabilities: [],
+ });
+ const mockCapabilityPurchaseResult = CapabilityPurchaseResultFactory({
+ offering: mockCapabilityOfferingResult,
+ });
const mockCapabilityServiceByPlanIdsQuery =
CapabilityServiceByPlanIdsQueryFactory({
- purchases: {
- meta: {
- pagination: {
- total: 1,
- },
- },
- data: [mockCapabilityPurchaseResult],
- },
+ purchases: [mockCapabilityPurchaseResult],
});
jest
.spyOn(
@@ -160,9 +126,9 @@ describe('CapabilityManager', () => {
'getPurchaseDetailsForCapabilityServiceByPlanIds'
)
.mockResolvedValue(
- new CapabilityServiceByPlanIdsResultUtil([
- mockCapabilityServiceByPlanIdsQuery,
- ] as CapabilityServiceByPlanIdsResult[])
+ new CapabilityServiceByPlanIdsResultUtil(
+ mockCapabilityServiceByPlanIdsQuery as CapabilityServiceByPlanIdsResult
+ )
);
const result = await capabilityManager.priceIdsToClientCapabilities([
@@ -172,39 +138,20 @@ describe('CapabilityManager', () => {
});
it('should return empty results when there are no service collection items', async () => {
- const mockCapabilityOfferingResult = StrapiEntityFactory(
- CapabilityOfferingResultFactory({
- capabilities: {
- data: [
- StrapiEntityFactory(
- CapabilityCapabilitiesResultFactory({
- slug: 'slug1',
- services: {
- data: [],
- },
- })
- ),
- ],
- },
- })
- );
- const mockCapabilityPurchaseResult = StrapiEntityFactory(
- CapabilityPurchaseResultFactory({
- offering: {
- data: mockCapabilityOfferingResult,
- },
- })
- );
+ const mockCapabilityOfferingResult = CapabilityOfferingResultFactory({
+ capabilities: [
+ CapabilityCapabilitiesResultFactory({
+ slug: 'slug1',
+ services: [],
+ }),
+ ],
+ });
+ const mockCapabilityPurchaseResult = CapabilityPurchaseResultFactory({
+ offering: mockCapabilityOfferingResult,
+ });
const mockCapabilityServiceByPlanIdsQuery =
CapabilityServiceByPlanIdsQueryFactory({
- purchases: {
- meta: {
- pagination: {
- total: 1,
- },
- },
- data: [mockCapabilityPurchaseResult],
- },
+ purchases: [mockCapabilityPurchaseResult],
});
jest
.spyOn(
@@ -212,9 +159,9 @@ describe('CapabilityManager', () => {
'getPurchaseDetailsForCapabilityServiceByPlanIds'
)
.mockResolvedValue(
- new CapabilityServiceByPlanIdsResultUtil([
- mockCapabilityServiceByPlanIdsQuery,
- ] as CapabilityServiceByPlanIdsResult[])
+ new CapabilityServiceByPlanIdsResultUtil(
+ mockCapabilityServiceByPlanIdsQuery as CapabilityServiceByPlanIdsResult
+ )
);
const result = await capabilityManager.priceIdsToClientCapabilities([
@@ -224,74 +171,41 @@ describe('CapabilityManager', () => {
});
it('should return planIds to client capabilities', async () => {
- const mockCapabilityOfferingResult = StrapiEntityFactory(
- CapabilityOfferingResultFactory({
- capabilities: {
- data: [
- StrapiEntityFactory(
- CapabilityCapabilitiesResultFactory({
- slug: 'slug1',
- services: {
- data: [
- StrapiEntityFactory(
- CapabilityServicesResultFactory({
- oauthClientId: 'clientId1',
- })
- ),
- ],
- },
- })
- ),
- StrapiEntityFactory(
- CapabilityCapabilitiesResultFactory({
- slug: 'slug2a',
- services: {
- data: [
- StrapiEntityFactory(
- CapabilityServicesResultFactory({
- oauthClientId: 'clientId2',
- })
- ),
- ],
- },
- })
- ),
- StrapiEntityFactory(
- CapabilityCapabilitiesResultFactory({
- slug: 'slug2b',
- services: {
- data: [
- StrapiEntityFactory(
- CapabilityServicesResultFactory({
- oauthClientId: 'clientId2',
- })
- ),
- ],
- },
- })
- ),
+ const mockCapabilityOfferingResult = CapabilityOfferingResultFactory({
+ capabilities: [
+ CapabilityCapabilitiesResultFactory({
+ slug: 'slug1',
+ services: [
+ CapabilityServicesResultFactory({
+ oauthClientId: 'clientId1',
+ }),
],
- },
- })
- );
- const mockCapabilityPurchaseResult = StrapiEntityFactory(
- CapabilityPurchaseResultFactory({
- stripePlanChoices: [{ stripePlanChoice: 'planId1' }],
- offering: {
- data: mockCapabilityOfferingResult,
- },
- })
- );
+ }),
+ CapabilityCapabilitiesResultFactory({
+ slug: 'slug2a',
+ services: [
+ CapabilityServicesResultFactory({
+ oauthClientId: 'clientId2',
+ }),
+ ],
+ }),
+ CapabilityCapabilitiesResultFactory({
+ slug: 'slug2b',
+ services: [
+ CapabilityServicesResultFactory({
+ oauthClientId: 'clientId2',
+ }),
+ ],
+ }),
+ ],
+ });
+ const mockCapabilityPurchaseResult = CapabilityPurchaseResultFactory({
+ stripePlanChoices: [{ stripePlanChoice: 'planId1' }],
+ offering: mockCapabilityOfferingResult,
+ });
const mockCapabilityServiceByPlanIdsQuery =
CapabilityServiceByPlanIdsQueryFactory({
- purchases: {
- meta: {
- pagination: {
- total: 1,
- },
- },
- data: [mockCapabilityPurchaseResult],
- },
+ purchases: [mockCapabilityPurchaseResult],
});
jest
.spyOn(
@@ -299,9 +213,9 @@ describe('CapabilityManager', () => {
'getPurchaseDetailsForCapabilityServiceByPlanIds'
)
.mockResolvedValue(
- new CapabilityServiceByPlanIdsResultUtil([
- mockCapabilityServiceByPlanIdsQuery,
- ] as CapabilityServiceByPlanIdsResult[])
+ new CapabilityServiceByPlanIdsResultUtil(
+ mockCapabilityServiceByPlanIdsQuery as CapabilityServiceByPlanIdsResult
+ )
);
const result = await capabilityManager.priceIdsToClientCapabilities([
diff --git a/libs/payments/capability/src/lib/capability.manager.ts b/libs/payments/capability/src/lib/capability.manager.ts
index 752cbdccc2..abcb2d2771 100644
--- a/libs/payments/capability/src/lib/capability.manager.ts
+++ b/libs/payments/capability/src/lib/capability.manager.ts
@@ -17,8 +17,8 @@ export class CapabilityManager {
).getServices();
return clients.map((client: ServiceResult) => {
- const capabilities = client.capabilities.data.map(
- (capability) => capability.attributes.slug
+ const capabilities = client.capabilities.map(
+ (capability) => capability.slug
);
const sortedCapabilities = capabilities.sort();
return {
@@ -50,20 +50,16 @@ export class CapabilityManager {
purchaseDetails.capabilityOfferingForPlanId(subscribedPrice);
// continue if neither offering nor capabilities exist
- if (!capabilityOffering || !capabilityOffering?.capabilities?.data)
- continue;
+ if (!capabilityOffering || !capabilityOffering?.capabilities) continue;
- for (const capabilityCollection of capabilityOffering.capabilities.data) {
+ for (const capabilityCollection of capabilityOffering.capabilities) {
// continue if individual capability does not contain any services
- if (!capabilityCollection.attributes.services.data) continue;
+ if (!capabilityCollection.services) continue;
- for (const capability of capabilityCollection.attributes.services
- .data) {
- result[capability.attributes.oauthClientId] ||= [];
+ for (const capability of capabilityCollection.services) {
+ result[capability.oauthClientId] ||= [];
- result[capability.attributes.oauthClientId].push(
- capabilityCollection.attributes.slug
- );
+ result[capability.oauthClientId].push(capabilityCollection.slug);
}
}
}
diff --git a/libs/payments/eligibility/src/lib/eligibility.manager.spec.ts b/libs/payments/eligibility/src/lib/eligibility.manager.spec.ts
index 1c53bb328b..b9ebca82f9 100644
--- a/libs/payments/eligibility/src/lib/eligibility.manager.spec.ts
+++ b/libs/payments/eligibility/src/lib/eligibility.manager.spec.ts
@@ -24,7 +24,6 @@ import {
MockStrapiClientConfigProvider,
ProductConfigurationManager,
StrapiClient,
- StrapiEntityFactory,
} from '@fxa/shared/cms';
import { CartEligibilityStatus } from '@fxa/shared/db/mysql/account';
@@ -66,9 +65,9 @@ describe('EligibilityManager', () => {
jest
.spyOn(productConfigurationManager, 'getPurchaseDetailsForEligibility')
.mockResolvedValue(
- new EligibilityContentByPlanIdsResultUtil([
- EligibilityContentByPlanIdsResultFactory(),
- ])
+ new EligibilityContentByPlanIdsResultUtil(
+ EligibilityContentByPlanIdsResultFactory()
+ )
);
const result = await manager.getOfferingOverlap(['test'], [], 'test');
@@ -77,7 +76,7 @@ describe('EligibilityManager', () => {
it('should return same offeringStripeProductIds as same comparison', async () => {
const eligibilityContentByPlanIdsResultUtil =
- new EligibilityContentByPlanIdsResultUtil([]);
+ new EligibilityContentByPlanIdsResultUtil({ purchases: [] });
jest
.spyOn(productConfigurationManager, 'getPurchaseDetailsForEligibility')
.mockResolvedValue(eligibilityContentByPlanIdsResultUtil);
@@ -100,39 +99,27 @@ describe('EligibilityManager', () => {
it('should return subgroup upgrade target offeringStripeProductIds as upgrade comparison', async () => {
const mockOfferingResult = EligibilityOfferingResultFactory({
stripeProductId: 'prod_test3',
- subGroups: {
- data: [
- StrapiEntityFactory(
- EligibilitySubgroupResultFactory({
- offerings: {
- data: [
- StrapiEntityFactory(
- EligibilitySubgroupOfferingResultFactory({
- stripeProductId: 'prod_test',
- countries: ['usa'],
- })
- ),
- StrapiEntityFactory(
- EligibilitySubgroupOfferingResultFactory({
- stripeProductId: 'prod_test2',
- countries: ['usa'],
- })
- ),
- StrapiEntityFactory(
- EligibilitySubgroupOfferingResultFactory({
- stripeProductId: 'prod_test3',
- countries: ['usa'],
- })
- ),
- ],
- },
- })
- ),
- ],
- },
+ subGroups: [
+ EligibilitySubgroupResultFactory({
+ offerings: [
+ EligibilitySubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test',
+ countries: ['usa'],
+ }),
+ EligibilitySubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test2',
+ countries: ['usa'],
+ }),
+ EligibilitySubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test3',
+ countries: ['usa'],
+ }),
+ ],
+ }),
+ ],
});
const eligibilityContentByPlanIdsResultUtil =
- new EligibilityContentByPlanIdsResultUtil([]);
+ new EligibilityContentByPlanIdsResultUtil({ purchases: [] });
jest
.spyOn(productConfigurationManager, 'getPurchaseDetailsForEligibility')
.mockResolvedValue(eligibilityContentByPlanIdsResultUtil);
@@ -152,33 +139,23 @@ describe('EligibilityManager', () => {
it('should return subgroup downgrade target offeringStripeProductIds as downgrade comparison', async () => {
const mockOfferingResult = EligibilityOfferingResultFactory({
stripeProductId: 'prod_test',
- subGroups: {
- data: [
- StrapiEntityFactory(
- EligibilitySubgroupResultFactory({
- offerings: {
- data: [
- StrapiEntityFactory(
- EligibilitySubgroupOfferingResultFactory({
- stripeProductId: 'prod_test',
- countries: ['usa'],
- })
- ),
- StrapiEntityFactory(
- EligibilitySubgroupOfferingResultFactory({
- stripeProductId: 'prod_test2',
- countries: ['usa'],
- })
- ),
- ],
- },
- })
- ),
- ],
- },
+ subGroups: [
+ EligibilitySubgroupResultFactory({
+ offerings: [
+ EligibilitySubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test',
+ countries: ['usa'],
+ }),
+ EligibilitySubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test2',
+ countries: ['usa'],
+ }),
+ ],
+ }),
+ ],
});
const eligibilityContentByPlanIdsResultUtil =
- new EligibilityContentByPlanIdsResultUtil([]);
+ new EligibilityContentByPlanIdsResultUtil({ purchases: [] });
jest
.spyOn(productConfigurationManager, 'getPurchaseDetailsForEligibility')
.mockResolvedValue(eligibilityContentByPlanIdsResultUtil);
@@ -203,7 +180,7 @@ describe('EligibilityManager', () => {
stripeProductId: 'prod_test',
});
const eligibilityContentByPlanIdsResultUtil =
- new EligibilityContentByPlanIdsResultUtil([]);
+ new EligibilityContentByPlanIdsResultUtil({ purchases: [] });
jest
.spyOn(productConfigurationManager, 'getPurchaseDetailsForEligibility')
.mockResolvedValue(eligibilityContentByPlanIdsResultUtil);
@@ -224,36 +201,26 @@ describe('EligibilityManager', () => {
it('should return upgrade comparison for upgrade priceId', async () => {
const mockOfferingResult = EligibilityOfferingResultFactory({
stripeProductId: 'prod_test2',
- subGroups: {
- data: [
- StrapiEntityFactory(
- EligibilitySubgroupResultFactory({
- offerings: {
- data: [
- StrapiEntityFactory(
- EligibilitySubgroupOfferingResultFactory({
- stripeProductId: 'prod_test',
- countries: ['usa'],
- })
- ),
- StrapiEntityFactory(
- EligibilitySubgroupOfferingResultFactory({
- stripeProductId: 'prod_test2',
- countries: ['usa'],
- })
- ),
- ],
- },
- })
- ),
- ],
- },
+ subGroups: [
+ EligibilitySubgroupResultFactory({
+ offerings: [
+ EligibilitySubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test',
+ countries: ['usa'],
+ }),
+ EligibilitySubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test2',
+ countries: ['usa'],
+ }),
+ ],
+ }),
+ ],
});
const existingResult = EligibilityOfferingResultFactory({
stripeProductId: 'prod_test',
});
const eligibilityContentByPlanIdsResultUtil =
- new EligibilityContentByPlanIdsResultUtil([]);
+ new EligibilityContentByPlanIdsResultUtil({ purchases: [] });
jest
.spyOn(productConfigurationManager, 'getPurchaseDetailsForEligibility')
.mockResolvedValue(eligibilityContentByPlanIdsResultUtil);
@@ -274,62 +241,42 @@ describe('EligibilityManager', () => {
it('should return multiple comparisons in multiple subgroups', async () => {
const mockOfferingResult = EligibilityOfferingResultFactory({
stripeProductId: 'prod_test2',
- subGroups: {
- data: [
- StrapiEntityFactory(
- EligibilitySubgroupResultFactory({
- offerings: {
- data: [
- StrapiEntityFactory(
- EligibilitySubgroupOfferingResultFactory({
- stripeProductId: 'prod_test',
- countries: ['usa'],
- })
- ),
- StrapiEntityFactory(
- EligibilitySubgroupOfferingResultFactory({
- stripeProductId: 'prod_test2',
- countries: ['usa'],
- })
- ),
- StrapiEntityFactory(
- EligibilitySubgroupOfferingResultFactory({
- stripeProductId: 'prod_test3',
- countries: ['usa'],
- })
- ),
- ],
- },
- })
- ),
- StrapiEntityFactory(
- EligibilitySubgroupResultFactory({
- offerings: {
- data: [
- StrapiEntityFactory(
- EligibilitySubgroupOfferingResultFactory({
- stripeProductId: 'prod_test',
- countries: ['usa'],
- })
- ),
- StrapiEntityFactory(
- EligibilitySubgroupOfferingResultFactory({
- stripeProductId: 'prod_test2',
- countries: ['usa'],
- })
- ),
- ],
- },
- })
- ),
- ],
- },
+ subGroups: [
+ EligibilitySubgroupResultFactory({
+ offerings: [
+ EligibilitySubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test',
+ countries: ['usa'],
+ }),
+ EligibilitySubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test2',
+ countries: ['usa'],
+ }),
+ EligibilitySubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test3',
+ countries: ['usa'],
+ }),
+ ],
+ }),
+ EligibilitySubgroupResultFactory({
+ offerings: [
+ EligibilitySubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test',
+ countries: ['usa'],
+ }),
+ EligibilitySubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test2',
+ countries: ['usa'],
+ }),
+ ],
+ }),
+ ],
});
const existingResult = EligibilityOfferingResultFactory({
stripeProductId: 'prod_test',
});
const eligibilityContentByPlanIdsResultUtil =
- new EligibilityContentByPlanIdsResultUtil([]);
+ new EligibilityContentByPlanIdsResultUtil({ purchases: [] });
jest
.spyOn(productConfigurationManager, 'getPurchaseDetailsForEligibility')
.mockResolvedValue(eligibilityContentByPlanIdsResultUtil);
@@ -385,33 +332,21 @@ describe('EligibilityManager', () => {
it('should return subgroup upgrade target offeringStripeProductIds as upgrade comparison', async () => {
const mockTargetOfferingResult = EligibilityContentOfferingResultFactory({
stripeProductId: 'prod_test3',
- subGroups: {
- data: [
- StrapiEntityFactory(
- EligibilityContentSubgroupResultFactory({
- offerings: {
- data: [
- StrapiEntityFactory(
- EligibilityContentSubgroupOfferingResultFactory({
- stripeProductId: 'prod_test',
- })
- ),
- StrapiEntityFactory(
- EligibilityContentSubgroupOfferingResultFactory({
- stripeProductId: 'prod_test2',
- })
- ),
- StrapiEntityFactory(
- EligibilityContentSubgroupOfferingResultFactory({
- stripeProductId: 'prod_test3',
- })
- ),
- ],
- },
- })
- ),
- ],
- },
+ subGroups: [
+ EligibilityContentSubgroupResultFactory({
+ offerings: [
+ EligibilityContentSubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test',
+ }),
+ EligibilityContentSubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test2',
+ }),
+ EligibilityContentSubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test3',
+ }),
+ ],
+ }),
+ ],
});
const result = manager.getProductIdOverlap(
@@ -425,28 +360,18 @@ describe('EligibilityManager', () => {
it('should return subgroup downgrade target offeringStripeProductIds as downgrade comparison', async () => {
const mockTargetOfferingResult = EligibilityContentOfferingResultFactory({
stripeProductId: 'prod_test',
- subGroups: {
- data: [
- StrapiEntityFactory(
- EligibilityContentSubgroupResultFactory({
- offerings: {
- data: [
- StrapiEntityFactory(
- EligibilityContentSubgroupOfferingResultFactory({
- stripeProductId: 'prod_test',
- })
- ),
- StrapiEntityFactory(
- EligibilityContentSubgroupOfferingResultFactory({
- stripeProductId: 'prod_test2',
- })
- ),
- ],
- },
- })
- ),
- ],
- },
+ subGroups: [
+ EligibilityContentSubgroupResultFactory({
+ offerings: [
+ EligibilityContentSubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test',
+ }),
+ EligibilityContentSubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test2',
+ }),
+ ],
+ }),
+ ],
});
const result = manager.getProductIdOverlap(
@@ -473,28 +398,18 @@ describe('EligibilityManager', () => {
it('should return upgrade comparison for upgrade priceId', async () => {
const mockTargetOfferingResult = EligibilityContentOfferingResultFactory({
stripeProductId: 'prod_test2',
- subGroups: {
- data: [
- StrapiEntityFactory(
- EligibilityContentSubgroupResultFactory({
- offerings: {
- data: [
- StrapiEntityFactory(
- EligibilityContentSubgroupOfferingResultFactory({
- stripeProductId: 'prod_test',
- })
- ),
- StrapiEntityFactory(
- EligibilityContentSubgroupOfferingResultFactory({
- stripeProductId: 'prod_test2',
- })
- ),
- ],
- },
- })
- ),
- ],
- },
+ subGroups: [
+ EligibilityContentSubgroupResultFactory({
+ offerings: [
+ EligibilityContentSubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test',
+ }),
+ EligibilityContentSubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test2',
+ }),
+ ],
+ }),
+ ],
});
const result = manager.getProductIdOverlap(
['prod_test'],
@@ -507,51 +422,31 @@ describe('EligibilityManager', () => {
it('should return multiple comparisons in multiple subgroups', async () => {
const mockTargetOfferingResult = EligibilityContentOfferingResultFactory({
stripeProductId: 'prod_test2',
- subGroups: {
- data: [
- StrapiEntityFactory(
- EligibilityContentSubgroupResultFactory({
- offerings: {
- data: [
- StrapiEntityFactory(
- EligibilityContentSubgroupOfferingResultFactory({
- stripeProductId: 'prod_test',
- })
- ),
- StrapiEntityFactory(
- EligibilityContentSubgroupOfferingResultFactory({
- stripeProductId: 'prod_test2',
- })
- ),
- StrapiEntityFactory(
- EligibilityContentSubgroupOfferingResultFactory({
- stripeProductId: 'prod_test3',
- })
- ),
- ],
- },
- })
- ),
- StrapiEntityFactory(
- EligibilityContentSubgroupResultFactory({
- offerings: {
- data: [
- StrapiEntityFactory(
- EligibilityContentSubgroupOfferingResultFactory({
- stripeProductId: 'prod_test',
- })
- ),
- StrapiEntityFactory(
- EligibilityContentSubgroupOfferingResultFactory({
- stripeProductId: 'prod_test2',
- })
- ),
- ],
- },
- })
- ),
- ],
- },
+ subGroups: [
+ EligibilityContentSubgroupResultFactory({
+ offerings: [
+ EligibilityContentSubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test',
+ }),
+ EligibilityContentSubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test2',
+ }),
+ EligibilityContentSubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test3',
+ }),
+ ],
+ }),
+ EligibilityContentSubgroupResultFactory({
+ offerings: [
+ EligibilityContentSubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test',
+ }),
+ EligibilityContentSubgroupOfferingResultFactory({
+ stripeProductId: 'prod_test2',
+ }),
+ ],
+ }),
+ ],
});
const result = manager.getProductIdOverlap(
['prod_test2', 'prod_test3'],
diff --git a/libs/payments/eligibility/src/lib/eligibility.manager.ts b/libs/payments/eligibility/src/lib/eligibility.manager.ts
index 2f59e1e3b2..a003f4cb5b 100644
--- a/libs/payments/eligibility/src/lib/eligibility.manager.ts
+++ b/libs/payments/eligibility/src/lib/eligibility.manager.ts
@@ -112,8 +112,7 @@ export class EligibilityManager {
if (overlap.comparison === OfferingComparison.DOWNGRADE)
return EligibilityStatus.DOWNGRADE;
- const targetPriceIds =
- targetOffering.defaultPurchase.data.attributes.stripePlanChoices;
+ const targetPriceIds = targetOffering.defaultPurchase.stripePlanChoices;
const targetPrice = await this.priceManager.retrieveByInterval(
targetPriceIds.map((el) => el.stripePlanChoice),
interval
diff --git a/libs/payments/eligibility/src/lib/eligibility.service.spec.ts b/libs/payments/eligibility/src/lib/eligibility.service.spec.ts
index 2ddb658fc0..267f259e10 100644
--- a/libs/payments/eligibility/src/lib/eligibility.service.spec.ts
+++ b/libs/payments/eligibility/src/lib/eligibility.service.spec.ts
@@ -20,7 +20,6 @@ import {
MockStrapiClientConfigProvider,
ProductConfigurationManager,
StrapiClient,
- StrapiEntityFactory,
} from '@fxa/shared/cms';
import { MockFirestoreProvider } from '@fxa/shared/db/firestore';
import { MockStatsDProvider } from '@fxa/shared/metrics/statsd';
@@ -84,7 +83,7 @@ describe('EligibilityService', () => {
.mockResolvedValue(
new EligibilityContentByOfferingResultUtil(
EligibilityContentByOfferingResultFactory({
- offerings: { data: [] },
+ offerings: [],
})
)
);
@@ -115,9 +114,7 @@ describe('EligibilityService', () => {
.mockResolvedValue(
new EligibilityContentByOfferingResultUtil(
EligibilityContentByOfferingResultFactory({
- offerings: {
- data: [StrapiEntityFactory(mockOffering)],
- },
+ offerings: [mockOffering],
})
)
);
diff --git a/libs/payments/eligibility/src/lib/utils.ts b/libs/payments/eligibility/src/lib/utils.ts
index f67d00c95e..1102668dbe 100644
--- a/libs/payments/eligibility/src/lib/utils.ts
+++ b/libs/payments/eligibility/src/lib/utils.ts
@@ -24,15 +24,15 @@ export const offeringComparison = (
) => {
if (targetOffering.stripeProductId === fromOfferingProductId)
return OfferingComparison.SAME;
- const commonSubgroups = targetOffering.subGroups.data.filter(
+ const commonSubgroups = targetOffering.subGroups.filter(
(subgroup) =>
- !!subgroup.attributes.offerings.data.find(
- (oc) => oc.attributes.stripeProductId === fromOfferingProductId
+ !!subgroup.offerings.find(
+ (oc) => oc.stripeProductId === fromOfferingProductId
)
);
if (!commonSubgroups.length) return null;
- const subgroupProductIds = commonSubgroups[0].attributes.offerings.data.map(
- (o) => o.attributes.stripeProductId
+ const subgroupProductIds = commonSubgroups[0].offerings.map(
+ (o) => o.stripeProductId
);
const existingIndex = subgroupProductIds.indexOf(fromOfferingProductId);
const targetIndex = subgroupProductIds.indexOf(
diff --git a/libs/payments/legacy/src/lib/stripe-mapper.service.spec.ts b/libs/payments/legacy/src/lib/stripe-mapper.service.spec.ts
index be5f19f96f..c875399691 100644
--- a/libs/payments/legacy/src/lib/stripe-mapper.service.spec.ts
+++ b/libs/payments/legacy/src/lib/stripe-mapper.service.spec.ts
@@ -19,7 +19,6 @@ import {
PurchaseDetailsTransformedFactory,
StrapiClient,
MockStrapiClientConfigProvider,
- StrapiEntityFactory,
} from '@fxa/shared/cms';
import { MockFirestoreProvider } from '@fxa/shared/db/firestore';
import { MockStatsDProvider } from '@fxa/shared/metrics/statsd';
@@ -149,7 +148,7 @@ describe('StripeMapperService', () => {
it('should return data from cms default locale if no localization data is available', async () => {
const expected = PurchaseWithDetailsOfferingContentTransformedFactory();
- expected.purchaseDetails.data.attributes.localizations.data = [];
+ expected.purchaseDetails.localizations = [];
mockCMSConfigUtil.transformedPurchaseWithCommonContentForPlanId.mockReturnValueOnce(
expected
);
@@ -165,10 +164,10 @@ describe('StripeMapperService', () => {
await stripeMapper.mapCMSToStripePlans([stripePlan], 'en', false);
const actualProduct = mappedPlans[0].product as Stripe.Product;
expect(mappedPlans[0].metadata?.['webIconURL']).toBe(
- expected.purchaseDetails.data.attributes.webIcon
+ expected.purchaseDetails.webIcon
);
expect(actualProduct.metadata?.['webIconURL']).toBe(
- expected.purchaseDetails.data.attributes.webIcon
+ expected.purchaseDetails.webIcon
);
expect(actualProduct.metadata?.['productSet']).toBe(
productMetadata.productSet
@@ -196,12 +195,10 @@ describe('StripeMapperService', () => {
await stripeMapper.mapCMSToStripePlans([stripePlan], 'en', false);
const actualProduct = mappedPlans[0].product as Stripe.Product;
expect(mappedPlans[0].metadata?.['webIconURL']).toBe(
- expected.purchaseDetails.data.attributes.localizations.data[0]
- .attributes.webIcon
+ expected.purchaseDetails.localizations[0].webIcon
);
expect(actualProduct.metadata?.['webIconURL']).toBe(
- expected.purchaseDetails.data.attributes.localizations.data[0]
- .attributes.webIcon
+ expected.purchaseDetails.localizations[0].webIcon
);
expect(actualProduct.metadata?.['productSet']).toBe(
productMetadata.productSet
@@ -215,13 +212,9 @@ describe('StripeMapperService', () => {
it('should return data from CMS and not error on locale plan', async () => {
const expected = PurchaseWithDetailsOfferingContentTransformedFactory({
purchaseDetails: {
- data: StrapiEntityFactory({
- localizations: {
- data: [],
- },
- ...PurchaseDetailsTransformedFactory({
- details: ['Detail 1 in English'],
- }),
+ localizations: [],
+ ...PurchaseDetailsTransformedFactory({
+ details: ['Detail 1 in English'],
}),
},
});
@@ -260,10 +253,10 @@ describe('StripeMapperService', () => {
const actualProduct1 = mappedPlans[0].product as Stripe.Product;
const actualProduct2 = mappedPlans[1].product as Stripe.Product;
expect(mappedPlans[0].metadata?.['product:details:1']).toBe(
- expected.purchaseDetails.data.attributes.details[0]
+ expected.purchaseDetails.details[0]
);
expect(actualProduct1.metadata?.['product:details:1']).toBe(
- expected.purchaseDetails.data.attributes.details[0]
+ expected.purchaseDetails.details[0]
);
expect(mappedPlans[1].metadata?.['product:details:1']).toBe(
'Detail 1 in French'
@@ -276,13 +269,9 @@ describe('StripeMapperService', () => {
it('should return data from Stripe and concat errors for product', async () => {
const expected = PurchaseWithDetailsOfferingContentTransformedFactory({
purchaseDetails: {
- data: StrapiEntityFactory({
- localizations: {
- data: [],
- },
- ...PurchaseDetailsTransformedFactory({
- details: ['Detail 1 in English'],
- }),
+ localizations: [],
+ ...PurchaseDetailsTransformedFactory({
+ details: ['Detail 1 in English'],
}),
},
});
diff --git a/libs/payments/legacy/src/lib/stripe-mapper.service.ts b/libs/payments/legacy/src/lib/stripe-mapper.service.ts
index 5730a222c5..dbc19b3f70 100644
--- a/libs/payments/legacy/src/lib/stripe-mapper.service.ts
+++ b/libs/payments/legacy/src/lib/stripe-mapper.service.ts
@@ -95,18 +95,16 @@ export class StripeMapperService {
continue;
}
- const commonContentAttributes =
- cmsConfigData.offering.data.attributes.commonContent.data.attributes;
+ const commonContentAttributes = cmsConfigData.offering.commonContent;
const commonContentAttributesLocalized = commonContentAttributes
- .localizations.data.length
- ? commonContentAttributes.localizations.data[0].attributes
+ .localizations.length
+ ? commonContentAttributes.localizations[0]
: commonContentAttributes;
- const purchaseDetailsAttributes =
- cmsConfigData.purchaseDetails.data.attributes;
+ const purchaseDetailsAttributes = cmsConfigData.purchaseDetails;
const purchaseDetailsLocalizedAttributes = purchaseDetailsAttributes
- .localizations.data.length
- ? purchaseDetailsAttributes.localizations.data[0].attributes
+ .localizations.length
+ ? purchaseDetailsAttributes.localizations[0]
: purchaseDetailsAttributes;
const planMapper = new PlanMapperUtil(
diff --git a/libs/shared/cms/src/__generated__/fragment-masking.ts b/libs/shared/cms/src/__generated__/fragment-masking.ts
index e8015cefc2..aca71b1352 100644
--- a/libs/shared/cms/src/__generated__/fragment-masking.ts
+++ b/libs/shared/cms/src/__generated__/fragment-masking.ts
@@ -1,15 +1,13 @@
/* eslint-disable */
-import {
- ResultOf,
- DocumentTypeDecoration,
- TypedDocumentNode,
-} from '@graphql-typed-document-node/core';
+import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
import { FragmentDefinitionNode } from 'graphql';
import { Incremental } from './graphql';
-export type FragmentType<
- TDocumentType extends DocumentTypeDecoration
-> = TDocumentType extends DocumentTypeDecoration
+
+export type FragmentType> = TDocumentType extends DocumentTypeDecoration<
+ infer TType,
+ any
+>
? [TType] extends [{ ' $fragmentName'?: infer TKey }]
? TKey extends string
? { ' $fragmentRefs'?: { [key in TKey]: TType } }
@@ -35,10 +33,7 @@ export function useFragment(
// return nullable if `fragmentType` is nullable or undefined
export function useFragment(
_documentNode: DocumentTypeDecoration,
- fragmentType:
- | FragmentType>
- | null
- | undefined
+ fragmentType: FragmentType> | null | undefined
): TType | null | undefined;
// return array of non-nullable if `fragmentType` is array of non-nullable
export function useFragment(
@@ -48,10 +43,7 @@ export function useFragment(
// return array of nullable if `fragmentType` is array of nullable
export function useFragment(
_documentNode: DocumentTypeDecoration,
- fragmentType:
- | Array>>
- | null
- | undefined
+ fragmentType: Array>> | null | undefined
): Array | null | undefined;
// return readonly array of non-nullable if `fragmentType` is array of non-nullable
export function useFragment(
@@ -61,23 +53,16 @@ export function useFragment(
// return readonly array of nullable if `fragmentType` is array of nullable
export function useFragment(
_documentNode: DocumentTypeDecoration,
- fragmentType:
- | ReadonlyArray>>
- | null
- | undefined
+ fragmentType: ReadonlyArray>> | null | undefined
): ReadonlyArray | null | undefined;
export function useFragment(
_documentNode: DocumentTypeDecoration,
- fragmentType:
- | FragmentType>
- | Array>>
- | ReadonlyArray>>
- | null
- | undefined
+ fragmentType: FragmentType> | Array>> | ReadonlyArray>> | null | undefined
): TType | Array | ReadonlyArray | null | undefined {
return fragmentType as any;
}
+
export function makeFragmentData<
F extends DocumentTypeDecoration,
FT extends ResultOf
@@ -87,24 +72,16 @@ export function makeFragmentData<
export function isFragmentReady(
queryNode: DocumentTypeDecoration,
fragmentNode: TypedDocumentNode,
- data:
- | FragmentType, any>>
- | null
- | undefined
+ data: FragmentType, any>> | null | undefined
): data is FragmentType {
- const deferredFields = (
- queryNode as {
- __meta__?: { deferredFields: Record };
- }
- ).__meta__?.deferredFields;
+ const deferredFields = (queryNode as { __meta__?: { deferredFields: Record } }).__meta__
+ ?.deferredFields;
if (!deferredFields) return true;
- const fragDef = fragmentNode.definitions[0] as
- | FragmentDefinitionNode
- | undefined;
+ const fragDef = fragmentNode.definitions[0] as FragmentDefinitionNode | undefined;
const fragName = fragDef?.name?.value;
const fields = (fragName && deferredFields[fragName]) || [];
- return fields.length > 0 && fields.every((field) => data && field in data);
+ return fields.length > 0 && fields.every(field => data && field in data);
}
diff --git a/libs/shared/cms/src/__generated__/gql.ts b/libs/shared/cms/src/__generated__/gql.ts
index 93d2342a18..1a5a0b70ac 100644
--- a/libs/shared/cms/src/__generated__/gql.ts
+++ b/libs/shared/cms/src/__generated__/gql.ts
@@ -13,22 +13,14 @@ 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(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(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,
- '\n query Offering($id: ID!, $locale: String!) {\n offering(id: $id) {\n data {\n attributes {\n stripeProductId\n countries\n defaultPurchase {\n data {\n attributes {\n purchaseDetails {\n data {\n attributes {\n productName\n details\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n data {\n attributes {\n productName\n details\n subtitle\n webIcon\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n':
- 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(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,
+ "\n query CapabilityServiceByPlanIds($stripePlanIds: [String]!) {\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: { limit: 200 }\n ) {\n stripePlanChoices {\n stripePlanChoice\n }\n offering {\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n capabilities {\n slug\n services {\n oauthClientId\n }\n }\n }\n }\n }\n": types.CapabilityServiceByPlanIdsDocument,
+ "\n query EligibilityContentByOffering($apiIdentifier: String!) {\n offerings(\n filters: { apiIdentifier: { eq: $apiIdentifier } }\n pagination: { limit: 200 }\n ) {\n apiIdentifier\n stripeProductId\n defaultPurchase {\n stripePlanChoices {\n stripePlanChoice\n }\n }\n subGroups {\n groupName\n offerings {\n apiIdentifier\n stripeProductId\n defaultPurchase {\n stripePlanChoices {\n stripePlanChoice\n }\n }\n }\n }\n }\n }\n": types.EligibilityContentByOfferingDocument,
+ "\n query EligibilityContentByPlanIds($stripePlanIds: [String]!) {\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: { limit: 200 }\n ) {\n stripePlanChoices {\n stripePlanChoice\n }\n offering {\n stripeProductId\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n countries\n subGroups {\n groupName\n offerings {\n stripeProductId\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n countries\n }\n }\n }\n }\n }\n": types.EligibilityContentByPlanIdsDocument,
+ "\n query Locales {\n i18NLocales {\n code\n }\n }\n": types.LocalesDocument,
+ "\n query Offering($id: ID!, $locale: String!) {\n offering(documentId: $id) {\n stripeProductId\n countries\n defaultPurchase {\n purchaseDetails {\n productName\n details\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n productName\n details\n subtitle\n webIcon\n }\n }\n }\n }\n }\n": types.OfferingDocument,
+ "\n query PageContentForOffering($locale: String!, $apiIdentifier: String!) {\n offerings(\n filters: { apiIdentifier: { eq: $apiIdentifier } }\n pagination: { limit: 200 }\n ) {\n apiIdentifier\n stripeProductId\n defaultPurchase {\n purchaseDetails {\n details\n productName\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n details\n productName\n subtitle\n webIcon\n }\n }\n }\n commonContent {\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 privacyNoticeUrl\n privacyNoticeDownloadUrl\n termsOfServiceUrl\n termsOfServiceDownloadUrl\n cancellationUrl\n emailIcon\n successActionButtonUrl\n successActionButtonLabel\n newsletterLabelTextCode\n newsletterSlug\n }\n }\n }\n }\n": types.PageContentForOfferingDocument,
+ "\n query PurchaseWithDetailsOfferingContent(\n $locale: String!\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: { limit: 500 }\n ) {\n stripePlanChoices {\n stripePlanChoice\n }\n purchaseDetails {\n details\n productName\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n details\n productName\n subtitle\n webIcon\n }\n }\n offering {\n stripeProductId\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n commonContent {\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 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": types.PurchaseWithDetailsOfferingContentDocument,
+ "\n query ServicesWithCapabilities {\n services(pagination: { limit: 500 }) {\n oauthClientId\n capabilities {\n slug\n }\n }\n }\n": types.ServicesWithCapabilitiesDocument,
};
/**
@@ -48,55 +40,38 @@ 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(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'];
+export function graphql(source: "\n query CapabilityServiceByPlanIds($stripePlanIds: [String]!) {\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: { limit: 200 }\n ) {\n stripePlanChoices {\n stripePlanChoice\n }\n offering {\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n capabilities {\n slug\n services {\n oauthClientId\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query CapabilityServiceByPlanIds($stripePlanIds: [String]!) {\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: { limit: 200 }\n ) {\n stripePlanChoices {\n stripePlanChoice\n }\n offering {\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n capabilities {\n slug\n services {\n oauthClientId\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.
*/
-export function graphql(
- source: '\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'
-): (typeof documents)['\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'];
+export function graphql(source: "\n query EligibilityContentByOffering($apiIdentifier: String!) {\n offerings(\n filters: { apiIdentifier: { eq: $apiIdentifier } }\n pagination: { limit: 200 }\n ) {\n apiIdentifier\n stripeProductId\n defaultPurchase {\n stripePlanChoices {\n stripePlanChoice\n }\n }\n subGroups {\n groupName\n offerings {\n apiIdentifier\n stripeProductId\n defaultPurchase {\n stripePlanChoices {\n stripePlanChoice\n }\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query EligibilityContentByOffering($apiIdentifier: String!) {\n offerings(\n filters: { apiIdentifier: { eq: $apiIdentifier } }\n pagination: { limit: 200 }\n ) {\n apiIdentifier\n stripeProductId\n defaultPurchase {\n stripePlanChoices {\n stripePlanChoice\n }\n }\n subGroups {\n groupName\n offerings {\n apiIdentifier\n stripeProductId\n defaultPurchase {\n stripePlanChoices {\n stripePlanChoice\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.
*/
-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(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'];
+export function graphql(source: "\n query EligibilityContentByPlanIds($stripePlanIds: [String]!) {\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: { limit: 200 }\n ) {\n stripePlanChoices {\n stripePlanChoice\n }\n offering {\n stripeProductId\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n countries\n subGroups {\n groupName\n offerings {\n stripeProductId\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n countries\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query EligibilityContentByPlanIds($stripePlanIds: [String]!) {\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: { limit: 200 }\n ) {\n stripePlanChoices {\n stripePlanChoice\n }\n offering {\n stripeProductId\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n countries\n subGroups {\n groupName\n offerings {\n stripeProductId\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n countries\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.
*/
-export function graphql(
- source: '\n query Locales {\n i18NLocales {\n data {\n attributes {\n code\n }\n }\n }\n }\n'
-): (typeof documents)['\n query Locales {\n i18NLocales {\n data {\n attributes {\n code\n }\n }\n }\n }\n'];
+export function graphql(source: "\n query Locales {\n i18NLocales {\n code\n }\n }\n"): (typeof documents)["\n query Locales {\n i18NLocales {\n code\n }\n }\n"];
/**
* 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 Offering($id: ID!, $locale: String!) {\n offering(id: $id) {\n data {\n attributes {\n stripeProductId\n countries\n defaultPurchase {\n data {\n attributes {\n purchaseDetails {\n data {\n attributes {\n productName\n details\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n data {\n attributes {\n productName\n details\n subtitle\n webIcon\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n'
-): (typeof documents)['\n query Offering($id: ID!, $locale: String!) {\n offering(id: $id) {\n data {\n attributes {\n stripeProductId\n countries\n defaultPurchase {\n data {\n attributes {\n purchaseDetails {\n data {\n attributes {\n productName\n details\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n data {\n attributes {\n productName\n details\n subtitle\n webIcon\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n'];
+export function graphql(source: "\n query Offering($id: ID!, $locale: String!) {\n offering(documentId: $id) {\n stripeProductId\n countries\n defaultPurchase {\n purchaseDetails {\n productName\n details\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n productName\n details\n subtitle\n webIcon\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query Offering($id: ID!, $locale: String!) {\n offering(documentId: $id) {\n stripeProductId\n countries\n defaultPurchase {\n purchaseDetails {\n productName\n details\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n productName\n details\n subtitle\n webIcon\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.
*/
-export function graphql(
- source: '\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'
-): (typeof documents)['\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'];
+export function graphql(source: "\n query PageContentForOffering($locale: String!, $apiIdentifier: String!) {\n offerings(\n filters: { apiIdentifier: { eq: $apiIdentifier } }\n pagination: { limit: 200 }\n ) {\n apiIdentifier\n stripeProductId\n defaultPurchase {\n purchaseDetails {\n details\n productName\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n details\n productName\n subtitle\n webIcon\n }\n }\n }\n commonContent {\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 privacyNoticeUrl\n privacyNoticeDownloadUrl\n termsOfServiceUrl\n termsOfServiceDownloadUrl\n cancellationUrl\n emailIcon\n successActionButtonUrl\n successActionButtonLabel\n newsletterLabelTextCode\n newsletterSlug\n }\n }\n }\n }\n"): (typeof documents)["\n query PageContentForOffering($locale: String!, $apiIdentifier: String!) {\n offerings(\n filters: { apiIdentifier: { eq: $apiIdentifier } }\n pagination: { limit: 200 }\n ) {\n apiIdentifier\n stripeProductId\n defaultPurchase {\n purchaseDetails {\n details\n productName\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n details\n productName\n subtitle\n webIcon\n }\n }\n }\n commonContent {\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 privacyNoticeUrl\n privacyNoticeDownloadUrl\n termsOfServiceUrl\n termsOfServiceDownloadUrl\n cancellationUrl\n emailIcon\n successActionButtonUrl\n successActionButtonLabel\n newsletterLabelTextCode\n newsletterSlug\n }\n }\n }\n }\n"];
/**
* 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(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'];
+export function graphql(source: "\n query PurchaseWithDetailsOfferingContent(\n $locale: String!\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: { limit: 500 }\n ) {\n stripePlanChoices {\n stripePlanChoice\n }\n purchaseDetails {\n details\n productName\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n details\n productName\n subtitle\n webIcon\n }\n }\n offering {\n stripeProductId\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n commonContent {\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 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"): (typeof documents)["\n query PurchaseWithDetailsOfferingContent(\n $locale: String!\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: { limit: 500 }\n ) {\n stripePlanChoices {\n stripePlanChoice\n }\n purchaseDetails {\n details\n productName\n subtitle\n webIcon\n localizations(filters: { locale: { eq: $locale } }) {\n details\n productName\n subtitle\n webIcon\n }\n }\n offering {\n stripeProductId\n stripeLegacyPlans(pagination: { limit: 200 }) {\n stripeLegacyPlan\n }\n commonContent {\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 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"];
/**
* 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 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'
-): (typeof documents)['\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'];
+export function graphql(source: "\n query ServicesWithCapabilities {\n services(pagination: { limit: 500 }) {\n oauthClientId\n capabilities {\n slug\n }\n }\n }\n"): (typeof documents)["\n query ServicesWithCapabilities {\n services(pagination: { limit: 500 }) {\n oauthClientId\n capabilities {\n slug\n }\n }\n }\n"];
export function graphql(source: string) {
return (documents as any)[source] ?? {};
}
-export type DocumentType> =
- TDocumentNode extends DocumentNode ? TType : never;
+export type DocumentType> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;
\ No newline at end of file
diff --git a/libs/shared/cms/src/__generated__/graphql.ts b/libs/shared/cms/src/__generated__/graphql.ts
index 66c3dc56cc..a4e3d2958b 100644
--- a/libs/shared/cms/src/__generated__/graphql.ts
+++ b/libs/shared/cms/src/__generated__/graphql.ts
@@ -2,39 +2,24 @@
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type Maybe = T | null;
export type InputMaybe = Maybe;
-export type Exact = {
- [K in keyof T]: T[K];
-};
-export type MakeOptional = Omit & {
- [SubKey in K]?: Maybe;
-};
-export type MakeMaybe = Omit & {
- [SubKey in K]: Maybe;
-};
-export type MakeEmpty<
- T extends { [key: string]: unknown },
- K extends keyof T
-> = { [_ in K]?: never };
-export type Incremental =
- | T
- | {
- [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
- };
+export type Exact = { [K in keyof T]: T[K] };
+export type MakeOptional = Omit & { [SubKey in K]?: Maybe };
+export type MakeMaybe = Omit & { [SubKey in K]: Maybe };
+export type MakeEmpty = { [_ in K]?: never };
+export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
- ID: { input: string; output: string };
- String: { input: string; output: string };
- Boolean: { input: boolean; output: boolean };
- Int: { input: number; output: number };
- Float: { input: number; output: number };
+ ID: { input: string; output: string; }
+ String: { input: string; output: string; }
+ Boolean: { input: boolean; output: boolean; }
+ Int: { input: number; output: number; }
+ Float: { input: number; output: number; }
/** A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. */
- DateTime: { input: any; output: any };
+ DateTime: { input: any; output: any; }
/** A string used to identify an i18n locale */
- I18NLocaleCode: { input: any; output: any };
+ I18NLocaleCode: { input: any; output: any; }
/** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
- JSON: { input: any; output: any };
- /** The `Upload` scalar type represents a file upload. */
- Upload: { input: any; output: any };
+ JSON: { input: any; output: any; }
};
export type BooleanFilterInput = {
@@ -66,51 +51,76 @@ export type Capability = {
__typename?: 'Capability';
createdAt: Maybe;
description: Maybe;
+ documentId: Scalars['ID']['output'];
internalName: Scalars['String']['output'];
- offerings: Maybe;
+ locale: Maybe;
+ localizations: Array>;
+ localizations_connection: Maybe;
+ offerings: Array>;
+ offerings_connection: Maybe;
publishedAt: Maybe;
- services: Maybe;
+ services: Array>;
+ services_connection: Maybe;
slug: Scalars['String']['output'];
updatedAt: Maybe;
};
+
+export type CapabilityLocalizationsArgs = {
+ filters: InputMaybe;
+ pagination?: InputMaybe;
+ sort?: InputMaybe>>;
+};
+
+
+export type CapabilityLocalizations_ConnectionArgs = {
+ filters: InputMaybe;
+ pagination?: InputMaybe;
+ sort?: InputMaybe>>;
+};
+
+
export type CapabilityOfferingsArgs = {
filters: InputMaybe;
pagination?: InputMaybe;
- publicationState?: InputMaybe;
sort?: InputMaybe>>;
};
+
+export type CapabilityOfferings_ConnectionArgs = {
+ filters: InputMaybe;
+ pagination?: InputMaybe;
+ sort?: InputMaybe>>;
+};
+
+
export type CapabilityServicesArgs = {
filters: InputMaybe;
pagination?: InputMaybe;
- publicationState?: InputMaybe;
sort?: InputMaybe>>;
};
-export type CapabilityEntity = {
- __typename?: 'CapabilityEntity';
- attributes: Maybe;
- id: Maybe;
-};
-export type CapabilityEntityResponse = {
- __typename?: 'CapabilityEntityResponse';
- data: Maybe;
+export type CapabilityServices_ConnectionArgs = {
+ filters: InputMaybe;
+ pagination?: InputMaybe;
+ sort?: InputMaybe>>;
};
export type CapabilityEntityResponseCollection = {
__typename?: 'CapabilityEntityResponseCollection';
- data: Array;
- meta: ResponseCollectionMeta;
+ nodes: Array;
+ pageInfo: Pagination;
};
export type CapabilityFiltersInput = {
and: InputMaybe>>;
createdAt: InputMaybe;
description: InputMaybe;
- id: InputMaybe;
+ documentId: InputMaybe;
internalName: InputMaybe;
+ locale: InputMaybe;
+ localizations: InputMaybe;
not: InputMaybe;
offerings: InputMaybe;
or: InputMaybe>>;
@@ -123,6 +133,7 @@ export type CapabilityFiltersInput = {
export type CapabilityInput = {
description: InputMaybe;
internalName: InputMaybe;
+ locale: InputMaybe;
offerings: InputMaybe>>;
publishedAt: InputMaybe;
services: InputMaybe>>;
@@ -131,17 +142,19 @@ export type CapabilityInput = {
export type CapabilityRelationResponseCollection = {
__typename?: 'CapabilityRelationResponseCollection';
- data: Array;
+ nodes: Array;
};
export type CommonContent = {
__typename?: 'CommonContent';
cancellationUrl: Maybe;
createdAt: Maybe;
+ documentId: Scalars['ID']['output'];
emailIcon: Maybe;
internalName: Scalars['String']['output'];
locale: Maybe;
- localizations: Maybe;
+ localizations: Array>;
+ localizations_connection: Maybe;
newsletterLabelTextCode: Maybe;
newsletterSlug: Maybe;
privacyNoticeDownloadUrl: Scalars['String']['output'];
@@ -154,36 +167,32 @@ export type CommonContent = {
updatedAt: Maybe;
};
+
export type CommonContentLocalizationsArgs = {
filters: InputMaybe;
pagination?: InputMaybe;
- publicationState?: InputMaybe;
sort?: InputMaybe>>;
};
-export type CommonContentEntity = {
- __typename?: 'CommonContentEntity';
- attributes: Maybe;
- id: Maybe;
-};
-export type CommonContentEntityResponse = {
- __typename?: 'CommonContentEntityResponse';
- data: Maybe;
+export type CommonContentLocalizations_ConnectionArgs = {
+ filters: InputMaybe;
+ pagination?: InputMaybe;
+ sort?: InputMaybe>>;
};
export type CommonContentEntityResponseCollection = {
__typename?: 'CommonContentEntityResponseCollection';
- data: Array;
- meta: ResponseCollectionMeta;
+ nodes: Array;
+ pageInfo: Pagination;
};
export type CommonContentFiltersInput = {
and: InputMaybe>>;
cancellationUrl: InputMaybe;
createdAt: InputMaybe;
+ documentId: InputMaybe;
emailIcon: InputMaybe;
- id: InputMaybe;
internalName: InputMaybe;
locale: InputMaybe;
localizations: InputMaybe;
@@ -218,7 +227,7 @@ export type CommonContentInput = {
export type CommonContentRelationResponseCollection = {
__typename?: 'CommonContentRelationResponseCollection';
- data: Array;
+ nodes: Array;
};
export type ComponentIapAppleProductIDs = {
@@ -264,13 +273,9 @@ export type ComponentStripeStripeLegacyPlans = {
};
export type ComponentStripeStripeLegacyPlansFiltersInput = {
- and: InputMaybe<
- Array>
- >;
+ and: InputMaybe>>;
not: InputMaybe;
- or: InputMaybe<
- Array>
- >;
+ or: InputMaybe>>;
stripeLegacyPlan: InputMaybe;
};
@@ -286,13 +291,9 @@ export type ComponentStripeStripePlanChoices = {
};
export type ComponentStripeStripePlanChoicesFiltersInput = {
- and: InputMaybe<
- Array>
- >;
+ and: InputMaybe>>;
not: InputMaybe;
- or: InputMaybe<
- Array>
- >;
+ or: InputMaybe>>;
stripePlanChoice: InputMaybe;
};
@@ -309,13 +310,9 @@ export type ComponentStripeStripePromoCodes = {
export type ComponentStripeStripePromoCodesFiltersInput = {
PromoCode: InputMaybe;
- and: InputMaybe<
- Array>
- >;
+ and: InputMaybe>>;
not: InputMaybe;
- or: InputMaybe<
- Array>
- >;
+ or: InputMaybe>>;
};
export type ComponentStripeStripePromoCodesInput = {
@@ -323,154 +320,55 @@ export type ComponentStripeStripePromoCodesInput = {
id: InputMaybe;
};
-export type ContentReleasesRelease = {
- __typename?: 'ContentReleasesRelease';
- actions: Maybe;
- createdAt: Maybe;
- name: Scalars['String']['output'];
- releasedAt: Maybe;
- scheduledAt: Maybe;
- timezone: Maybe;
- updatedAt: Maybe;
-};
-
-export type ContentReleasesReleaseActionsArgs = {
- filters: InputMaybe;
- pagination?: InputMaybe;
- sort?: InputMaybe>>;
-};
-
-export type ContentReleasesReleaseAction = {
- __typename?: 'ContentReleasesReleaseAction';
- contentType: Scalars['String']['output'];
- createdAt: Maybe;
- entry: Maybe;
- locale: Maybe;
- release: Maybe;
- type: Enum_Contentreleasesreleaseaction_Type;
- updatedAt: Maybe;
-};
-
-export type ContentReleasesReleaseActionEntity = {
- __typename?: 'ContentReleasesReleaseActionEntity';
- attributes: Maybe;
- id: Maybe;
-};
-
-export type ContentReleasesReleaseActionEntityResponse = {
- __typename?: 'ContentReleasesReleaseActionEntityResponse';
- data: Maybe;
-};
-
-export type ContentReleasesReleaseActionEntityResponseCollection = {
- __typename?: 'ContentReleasesReleaseActionEntityResponseCollection';
- data: Array;
- meta: ResponseCollectionMeta;
-};
-
-export type ContentReleasesReleaseActionFiltersInput = {
- and: InputMaybe>>;
- contentType: InputMaybe;
- createdAt: InputMaybe;
- id: InputMaybe;
- locale: InputMaybe;
- not: InputMaybe;
- or: InputMaybe>>;
- release: InputMaybe;
- type: InputMaybe;
- updatedAt: InputMaybe;
-};
-
-export type ContentReleasesReleaseActionInput = {
- contentType: InputMaybe;
- locale: InputMaybe;
- release: InputMaybe;
- type: InputMaybe;
-};
-
-export type ContentReleasesReleaseActionRelationResponseCollection = {
- __typename?: 'ContentReleasesReleaseActionRelationResponseCollection';
- data: Array;
-};
-
-export type ContentReleasesReleaseEntity = {
- __typename?: 'ContentReleasesReleaseEntity';
- attributes: Maybe;
- id: Maybe;
-};
-
-export type ContentReleasesReleaseEntityResponse = {
- __typename?: 'ContentReleasesReleaseEntityResponse';
- data: Maybe;
-};
-
-export type ContentReleasesReleaseEntityResponseCollection = {
- __typename?: 'ContentReleasesReleaseEntityResponseCollection';
- data: Array;
- meta: ResponseCollectionMeta;
-};
-
-export type ContentReleasesReleaseFiltersInput = {
- actions: InputMaybe;
- and: InputMaybe>>;
- createdAt: InputMaybe;
- id: InputMaybe;
- name: InputMaybe;
- not: InputMaybe;
- or: InputMaybe>>;
- releasedAt: InputMaybe;
- scheduledAt: InputMaybe;
- timezone: InputMaybe;
- updatedAt: InputMaybe;
-};
-
-export type ContentReleasesReleaseInput = {
- actions: InputMaybe>>;
- name: InputMaybe;
- releasedAt: InputMaybe;
- scheduledAt: InputMaybe;
- timezone: InputMaybe;
-};
-
export type CouponConfig = {
__typename?: 'CouponConfig';
countries: Maybe;
createdAt: Maybe;
+ documentId: Scalars['ID']['output'];
internalName: Scalars['String']['output'];
+ locale: Maybe;
+ localizations: Array>;
+ localizations_connection: Maybe;
publishedAt: Maybe;
stripePromotionCodes: Maybe>>;
updatedAt: Maybe;
};
+
+export type CouponConfigLocalizationsArgs = {
+ filters: InputMaybe;
+ pagination?: InputMaybe;
+ sort?: InputMaybe>>;
+};
+
+
+export type CouponConfigLocalizations_ConnectionArgs = {
+ filters: InputMaybe;
+ pagination?: InputMaybe;
+ sort?: InputMaybe>>;
+};
+
+
export type CouponConfigStripePromotionCodesArgs = {
filters: InputMaybe;
pagination?: InputMaybe;
sort?: InputMaybe>>;
};
-export type CouponConfigEntity = {
- __typename?: 'CouponConfigEntity';
- attributes: Maybe;
- id: Maybe;
-};
-
-export type CouponConfigEntityResponse = {
- __typename?: 'CouponConfigEntityResponse';
- data: Maybe;
-};
-
export type CouponConfigEntityResponseCollection = {
__typename?: 'CouponConfigEntityResponseCollection';
- data: Array;
- meta: ResponseCollectionMeta;
+ nodes: Array;
+ pageInfo: Pagination;
};
export type CouponConfigFiltersInput = {
and: InputMaybe>>;
countries: InputMaybe;
createdAt: InputMaybe;
- id: InputMaybe;
+ documentId: InputMaybe;
internalName: InputMaybe