Skip to content

Commit

Permalink
Update schema and query for SubscriptionPlans
Browse files Browse the repository at this point in the history
  • Loading branch information
Campalo committed Sep 11, 2023
1 parent 97d7c38 commit b7e975d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 69 deletions.
24 changes: 1 addition & 23 deletions lib/graphql/schema.flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -1122,11 +1122,6 @@ export const GrantTypeValues = Object.freeze({

export type GrantType = $Values<typeof GrantTypeValues>;

export type Icon = {|
__typename?: 'Icon',
uri: $ElementType<Scalars, 'String'>,
|};

export type IdentificationDetails = {|
__typename?: 'IdentificationDetails',
/** The number of identifications attempted by the user */
Expand Down Expand Up @@ -3085,27 +3080,10 @@ export type Subscription = {|
newTransaction: Transaction,
|};

export type SubscriptionFeature = {|
__typename?: 'SubscriptionFeature',
icon?: ?Icon,
title: $ElementType<Scalars, 'String'>,
|};

export type SubscriptionFeatureGroup = {|
__typename?: 'SubscriptionFeatureGroup',
features: Array<SubscriptionFeature>,
icon?: ?Icon,
title?: ?$ElementType<Scalars, 'String'>,
|};

export type SubscriptionPlan = {|
__typename?: 'SubscriptionPlan',
button: $ElementType<Scalars, 'String'>,
featureGroups: Array<SubscriptionFeatureGroup>,
featuresToggleLabel?: ?$ElementType<Scalars, 'String'>,
discountSubtitle?: ?$ElementType<Scalars, 'String'>,
fee: Money,
subtitle?: ?$ElementType<Scalars, 'String'>,
title: $ElementType<Scalars, 'String'>,
type: PurchaseType,
|};

Expand Down
24 changes: 1 addition & 23 deletions lib/graphql/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1043,11 +1043,6 @@ export enum GrantType {
RefreshToken = 'REFRESH_TOKEN'
}

export type Icon = {
__typename?: 'Icon';
uri: Scalars['String'];
};

export type IdentificationDetails = {
__typename?: 'IdentificationDetails';
/** The number of identifications attempted by the user */
Expand Down Expand Up @@ -2908,27 +2903,10 @@ export type Subscription = {
newTransaction: Transaction;
};

export type SubscriptionFeature = {
__typename?: 'SubscriptionFeature';
icon?: Maybe<Icon>;
title: Scalars['String'];
};

export type SubscriptionFeatureGroup = {
__typename?: 'SubscriptionFeatureGroup';
features: Array<SubscriptionFeature>;
icon?: Maybe<Icon>;
title?: Maybe<Scalars['String']>;
};

export type SubscriptionPlan = {
__typename?: 'SubscriptionPlan';
button: Scalars['String'];
featureGroups: Array<SubscriptionFeatureGroup>;
featuresToggleLabel?: Maybe<Scalars['String']>;
discountSubtitle?: Maybe<Scalars['String']>;
fee: Money;
subtitle?: Maybe<Scalars['String']>;
title: Scalars['String'];
type: PurchaseType;
};

Expand Down
11 changes: 1 addition & 10 deletions lib/graphql/subscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,7 @@ const FETCH_PLANS = `query fetchPlans ($couponCode: String) {
couponValidFor
plans {
type
title
subtitle
button
featuresToggleLabel
featureGroups {
title
features {
title
}
}
discountSubtitle
fee {
amount
discountAmount
Expand Down
14 changes: 1 addition & 13 deletions tests/graphql/subscription.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,7 @@ describe("Subscription", () => {
const plans = [
{
type: "BASIC",
title: "Free",
subtitle: "/ month plus VAT for the first year, then much more expensive",
button: "Open Free",
featuresToggleLabel: "All Kontist Free features",
featureGroups: [
{
title: null,
features: [
{ title: "Unlimited SEPA transfers" },
{ title: "Virtual Card" },
],
},
],
discountSubtitle: "/ month plus VAT for the first year, then much more expensive",
fee: {
amount: 0,
fullAmount: null,
Expand Down

0 comments on commit b7e975d

Please sign in to comment.