@stigg/js-client-sdk 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
1
  import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
2
2
  import { GetPaywallQuery } from './generated/types';
3
+ export declare const TYPOGRAPHY_CONFIGURATION: import("graphql/language/ast").DocumentNode;
3
4
  export declare const PAYWALL_CONFIGURATION: import("graphql/language/ast").DocumentNode;
4
5
  declare class PaywallApi {
5
6
  private readonly client;
@@ -104,6 +104,12 @@ export declare type Address = {
104
104
  postalCode?: InputMaybe<Scalars['String']>;
105
105
  state?: InputMaybe<Scalars['String']>;
106
106
  };
107
+ /** Alignment */
108
+ export declare enum Alignment {
109
+ Center = "CENTER",
110
+ Left = "LEFT",
111
+ Right = "RIGHT"
112
+ }
107
113
  export declare type ApiKeyFilter = {
108
114
  and?: InputMaybe<Array<ApiKeyFilter>>;
109
115
  id?: InputMaybe<StringFieldComparison>;
@@ -461,6 +467,7 @@ export declare type CustomerPortalColorsPaletteInput = {
461
467
  };
462
468
  export declare type CustomerPortalConfigurationInput = {
463
469
  palette?: InputMaybe<CustomerPortalColorsPaletteInput>;
470
+ typography?: InputMaybe<TypographyConfigurationInput>;
464
471
  };
465
472
  export declare type CustomerPortalInput = {
466
473
  customerId: Scalars['String'];
@@ -984,6 +991,15 @@ export declare type FetchEntitlementsQuery = {
984
991
  customerId: Scalars['String'];
985
992
  environmentId?: InputMaybe<Scalars['String']>;
986
993
  };
994
+ export declare type FontVariantInput = {
995
+ fontSize?: InputMaybe<Scalars['Float']>;
996
+ fontWeight?: InputMaybe<FontWeight>;
997
+ };
998
+ /** Font weight */
999
+ export declare enum FontWeight {
1000
+ Bold = "BOLD",
1001
+ Normal = "NORMAL"
1002
+ }
987
1003
  export declare type GetPackageByRefIdInput = {
988
1004
  environmentId: Scalars['String'];
989
1005
  refId: Scalars['String'];
@@ -1374,7 +1390,15 @@ export declare type PaywallColorsPaletteInput = {
1374
1390
  textColor?: InputMaybe<Scalars['String']>;
1375
1391
  };
1376
1392
  export declare type PaywallConfigurationInput = {
1393
+ layout?: InputMaybe<PaywallLayoutConfigurationInput>;
1377
1394
  palette?: InputMaybe<PaywallColorsPaletteInput>;
1395
+ typography?: InputMaybe<TypographyConfigurationInput>;
1396
+ };
1397
+ export declare type PaywallLayoutConfigurationInput = {
1398
+ alignment?: InputMaybe<Alignment>;
1399
+ planMargin?: InputMaybe<Scalars['Float']>;
1400
+ planPadding?: InputMaybe<Scalars['Float']>;
1401
+ planWidth?: InputMaybe<Scalars['Float']>;
1378
1402
  };
1379
1403
  export declare type PlanCreateInput = {
1380
1404
  additionalMetaData?: InputMaybe<Scalars['JSON']>;
@@ -2158,6 +2182,13 @@ export declare enum TrialPeriodUnits {
2158
2182
  Day = "DAY",
2159
2183
  Month = "MONTH"
2160
2184
  }
2185
+ export declare type TypographyConfigurationInput = {
2186
+ body?: InputMaybe<FontVariantInput>;
2187
+ fontFamily?: InputMaybe<Scalars['String']>;
2188
+ h1?: InputMaybe<FontVariantInput>;
2189
+ h2?: InputMaybe<FontVariantInput>;
2190
+ h3?: InputMaybe<FontVariantInput>;
2191
+ };
2161
2192
  export declare type UpdateAccountInput = {
2162
2193
  displayName: Scalars['String'];
2163
2194
  id: Scalars['String'];
@@ -2616,6 +2647,9 @@ export declare type CustomerFragment = {
2616
2647
  hasPaymentMethod: boolean;
2617
2648
  refId: string;
2618
2649
  additionalMetaData?: any | null | undefined;
2650
+ defaultPaymentExpirationMonth?: number | null | undefined;
2651
+ defaultPaymentExpirationYear?: number | null | undefined;
2652
+ defaultPaymentMethodLast4Digits?: string | null | undefined;
2619
2653
  experimentInfo?: {
2620
2654
  __typename?: 'experimentInfo';
2621
2655
  name: string;
@@ -2729,16 +2763,19 @@ export declare type CustomerPortalSubscriptionFragment = {
2729
2763
  };
2730
2764
  export declare type CustomerPortalConfigurationFragment = {
2731
2765
  __typename?: 'CustomerPortalConfiguration';
2732
- palette: {
2766
+ palette?: {
2733
2767
  __typename?: 'CustomerPortalColorsPalette';
2734
- primary: string;
2735
- textColor: string;
2736
- backgroundColor: string;
2737
- borderColor: string;
2738
- currentPlanBackground: string;
2739
- iconsColor: string;
2740
- paywallBackgroundColor: string;
2741
- };
2768
+ primary?: string | null | undefined;
2769
+ textColor?: string | null | undefined;
2770
+ backgroundColor?: string | null | undefined;
2771
+ borderColor?: string | null | undefined;
2772
+ currentPlanBackground?: string | null | undefined;
2773
+ iconsColor?: string | null | undefined;
2774
+ paywallBackgroundColor?: string | null | undefined;
2775
+ } | null | undefined;
2776
+ typography?: ({
2777
+ __typename?: 'TypographyConfiguration';
2778
+ } & TypographyConfigurationFragment) | null | undefined;
2742
2779
  };
2743
2780
  export declare type CustomerPortalFragment = {
2744
2781
  __typename?: 'CustomerPortal';
@@ -2757,9 +2794,9 @@ export declare type CustomerPortalFragment = {
2757
2794
  billingInformation: {
2758
2795
  __typename?: 'CustomerPortalBillingInformation';
2759
2796
  } & CustomerPortalBillingInformationFragment;
2760
- configuration: {
2797
+ configuration?: ({
2761
2798
  __typename?: 'CustomerPortalConfiguration';
2762
- } & CustomerPortalConfigurationFragment;
2799
+ } & CustomerPortalConfigurationFragment) | null | undefined;
2763
2800
  };
2764
2801
  export declare type GetCustomerByRefIdQueryVariables = Exact<{
2765
2802
  filter?: Maybe<CustomerFilter>;
@@ -2943,9 +2980,9 @@ export declare type GetMockPaywallQuery = {
2943
2980
  plans: Array<{
2944
2981
  __typename?: 'PaywallPlan';
2945
2982
  } & PayWallPlanFragment>;
2946
- configuration: {
2983
+ configuration?: ({
2947
2984
  __typename?: 'PaywallConfiguration';
2948
- } & PaywallConfigurationFragment;
2985
+ } & PaywallConfigurationFragment) | null | undefined;
2949
2986
  };
2950
2987
  };
2951
2988
  export declare type PackageEntitlementFragment = {
@@ -3018,16 +3055,50 @@ export declare type PlanFragment = {
3018
3055
  __typename?: 'Addon';
3019
3056
  } & AddonFragment> | null | undefined;
3020
3057
  };
3058
+ export declare type TypographyConfigurationFragment = {
3059
+ __typename?: 'TypographyConfiguration';
3060
+ fontFamily?: string | null | undefined;
3061
+ h1?: ({
3062
+ __typename?: 'FontVariant';
3063
+ } & FontVariantFragment) | null | undefined;
3064
+ h2?: ({
3065
+ __typename?: 'FontVariant';
3066
+ } & FontVariantFragment) | null | undefined;
3067
+ h3?: ({
3068
+ __typename?: 'FontVariant';
3069
+ } & FontVariantFragment) | null | undefined;
3070
+ body?: ({
3071
+ __typename?: 'FontVariant';
3072
+ } & FontVariantFragment) | null | undefined;
3073
+ };
3074
+ export declare type FontVariantFragment = {
3075
+ __typename?: 'FontVariant';
3076
+ fontSize?: number | null | undefined;
3077
+ fontWeight?: FontWeight | null | undefined;
3078
+ };
3079
+ export declare type LayoutConfigurationFragment = {
3080
+ __typename?: 'PaywallLayoutConfiguration';
3081
+ alignment?: Alignment | null | undefined;
3082
+ planWidth?: number | null | undefined;
3083
+ planMargin?: number | null | undefined;
3084
+ planPadding?: number | null | undefined;
3085
+ };
3021
3086
  export declare type PaywallConfigurationFragment = {
3022
3087
  __typename?: 'PaywallConfiguration';
3023
- palette: {
3088
+ palette?: {
3024
3089
  __typename?: 'PaywallColorsPalette';
3025
- primary: string;
3026
- textColor: string;
3027
- backgroundColor: string;
3028
- borderColor: string;
3029
- currentPlanBackground: string;
3030
- };
3090
+ primary?: string | null | undefined;
3091
+ textColor?: string | null | undefined;
3092
+ backgroundColor?: string | null | undefined;
3093
+ borderColor?: string | null | undefined;
3094
+ currentPlanBackground?: string | null | undefined;
3095
+ } | null | undefined;
3096
+ typography?: ({
3097
+ __typename?: 'TypographyConfiguration';
3098
+ } & TypographyConfigurationFragment) | null | undefined;
3099
+ layout?: ({
3100
+ __typename?: 'PaywallLayoutConfiguration';
3101
+ } & LayoutConfigurationFragment) | null | undefined;
3031
3102
  };
3032
3103
  export declare type GetPaywallQueryVariables = Exact<{
3033
3104
  input: GetPaywallInput;
@@ -3039,9 +3110,9 @@ export declare type GetPaywallQuery = {
3039
3110
  plans: Array<{
3040
3111
  __typename?: 'Plan';
3041
3112
  } & PlanFragment>;
3042
- configuration: {
3113
+ configuration?: ({
3043
3114
  __typename?: 'PaywallConfiguration';
3044
- } & PaywallConfigurationFragment;
3115
+ } & PaywallConfigurationFragment) | null | undefined;
3045
3116
  };
3046
3117
  };
3047
3118
  export declare type SdkConfigurationQueryVariables = Exact<{