@stigg/api-client-js 0.8.1 → 0.358.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stigg/api-client-js",
3
- "version": "0.8.1",
3
+ "version": "0.358.0",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./src/index.d.ts",
@@ -30,6 +30,7 @@ export declare type Scalars = {
30
30
  /** DenyReason of get access policy */
31
31
  export declare enum AccessDeniedReason {
32
32
  CustomerNotFound = "CustomerNotFound",
33
+ CustomerResourceNotFound = "CustomerResourceNotFound",
33
34
  FeatureNotFound = "FeatureNotFound",
34
35
  NoActiveSubscription = "NoActiveSubscription",
35
36
  NoFeatureEntitlementInSubscription = "NoFeatureEntitlementInSubscription",
@@ -793,6 +794,7 @@ export declare type EntitlementCheckRequested = {
793
794
  environmentId?: InputMaybe<Scalars['String']>;
794
795
  featureId: Scalars['String'];
795
796
  requestedUsage?: InputMaybe<Scalars['Float']>;
797
+ resourceId?: InputMaybe<Scalars['String']>;
796
798
  };
797
799
  export declare type EntitlementCheckResult = {
798
800
  accessDeniedReason?: InputMaybe<AccessDeniedReason>;
@@ -867,6 +869,7 @@ export declare enum ErrorCode {
867
869
  CustomerHasNoPaymentMethod = "CustomerHasNoPaymentMethod",
868
870
  CustomerNoBillingId = "CustomerNoBillingId",
869
871
  CustomerNotFound = "CustomerNotFound",
872
+ CustomerResourceNotFound = "CustomerResourceNotFound",
870
873
  DowngradeBillingPeriodNotSupportedError = "DowngradeBillingPeriodNotSupportedError",
871
874
  DraftPlanCantBeArchived = "DraftPlanCantBeArchived",
872
875
  DuplicatedEntityNotAllowed = "DuplicatedEntityNotAllowed",
@@ -1162,6 +1165,7 @@ export declare type FetchEntitlementQuery = {
1162
1165
  environmentId?: InputMaybe<Scalars['String']>;
1163
1166
  featureId: Scalars['String'];
1164
1167
  options?: InputMaybe<EntitlementOptions>;
1168
+ resourceId?: InputMaybe<Scalars['String']>;
1165
1169
  };
1166
1170
  export declare type FetchEntitlementsQuery = {
1167
1171
  customerId: Scalars['String'];
@@ -2836,12 +2840,12 @@ export declare type AddonFragment = {
2836
2840
  description?: string | null;
2837
2841
  additionalMetaData?: any | null;
2838
2842
  pricingType?: PricingType | null;
2839
- entitlements?: Array<({
2843
+ entitlements?: Array<{
2840
2844
  __typename?: 'PackageEntitlement';
2841
- } & PackageEntitlementFragment)> | null;
2842
- prices?: Array<({
2845
+ } & PackageEntitlementFragment> | null;
2846
+ prices?: Array<{
2843
2847
  __typename?: 'Price';
2844
- } & PriceFragment)> | null;
2848
+ } & PriceFragment> | null;
2845
2849
  };
2846
2850
  export declare type PlanFragment = {
2847
2851
  __typename?: 'Plan';
@@ -2872,18 +2876,18 @@ export declare type PlanFragment = {
2872
2876
  refId: string;
2873
2877
  displayName: string;
2874
2878
  } | null;
2875
- entitlements?: Array<({
2879
+ entitlements?: Array<{
2876
2880
  __typename?: 'PackageEntitlement';
2877
- } & PackageEntitlementFragment)> | null;
2878
- inheritedEntitlements?: Array<({
2881
+ } & PackageEntitlementFragment> | null;
2882
+ inheritedEntitlements?: Array<{
2879
2883
  __typename?: 'PackageEntitlement';
2880
- } & PackageEntitlementFragment)> | null;
2881
- compatibleAddons?: Array<({
2884
+ } & PackageEntitlementFragment> | null;
2885
+ compatibleAddons?: Array<{
2882
2886
  __typename?: 'Addon';
2883
- } & AddonFragment)> | null;
2884
- prices?: Array<({
2887
+ } & AddonFragment> | null;
2888
+ prices?: Array<{
2885
2889
  __typename?: 'Price';
2886
- } & PriceFragment)> | null;
2890
+ } & PriceFragment> | null;
2887
2891
  defaultTrialConfig?: {
2888
2892
  __typename?: 'DefaultTrialConfig';
2889
2893
  duration: number;
@@ -2994,20 +2998,20 @@ export declare type SubscriptionFragment = {
2994
2998
  totalPrice?: ({
2995
2999
  __typename?: 'CustomerSubscriptionTotalPrice';
2996
3000
  } & TotalPriceFragment) | null;
2997
- plan: ({
3001
+ plan: {
2998
3002
  __typename?: 'Plan';
2999
- } & PlanFragment);
3003
+ } & PlanFragment;
3000
3004
  addons?: Array<{
3001
3005
  __typename?: 'SubscriptionAddon';
3002
3006
  id: string;
3003
3007
  quantity: number;
3004
- addon: ({
3008
+ addon: {
3005
3009
  __typename?: 'Addon';
3006
- } & AddonFragment);
3010
+ } & AddonFragment;
3007
3011
  }> | null;
3008
- scheduledUpdates?: Array<({
3012
+ scheduledUpdates?: Array<{
3009
3013
  __typename?: 'SubscriptionScheduledUpdate';
3010
- } & SubscriptionScheduledUpdateDataFragment)> | null;
3014
+ } & SubscriptionScheduledUpdateDataFragment> | null;
3011
3015
  };
3012
3016
  export declare type PromotionalEntitlementFragment = {
3013
3017
  __typename?: 'PromotionalEntitlement';
@@ -3067,12 +3071,12 @@ export declare type CustomerFragment = {
3067
3071
  productRefId?: string | null;
3068
3072
  eligible: boolean;
3069
3073
  }> | null;
3070
- promotionalEntitlements: Array<({
3074
+ promotionalEntitlements: Array<{
3071
3075
  __typename?: 'PromotionalEntitlement';
3072
- } & PromotionalEntitlementFragment)>;
3073
- subscriptions?: Array<({
3076
+ } & PromotionalEntitlementFragment>;
3077
+ subscriptions?: Array<{
3074
3078
  __typename?: 'CustomerSubscription';
3075
- } & SubscriptionFragment)> | null;
3079
+ } & SubscriptionFragment> | null;
3076
3080
  };
3077
3081
  export declare type SubscriptionPreviewFragment = {
3078
3082
  __typename?: 'SubscriptionPreview';
@@ -3141,12 +3145,12 @@ export declare type FeatureFragment = {
3141
3145
  displayName: string;
3142
3146
  refId: string;
3143
3147
  };
3144
- declare type ResetPeriodConfigurationFragment_MonthlyResetPeriodConfig_ = ({
3148
+ declare type ResetPeriodConfigurationFragment_MonthlyResetPeriodConfig_ = {
3145
3149
  __typename: 'MonthlyResetPeriodConfig';
3146
- } & MonthlyResetPeriodConfigFragment);
3147
- declare type ResetPeriodConfigurationFragment_WeeklyResetPeriodConfig_ = ({
3150
+ } & MonthlyResetPeriodConfigFragment;
3151
+ declare type ResetPeriodConfigurationFragment_WeeklyResetPeriodConfig_ = {
3148
3152
  __typename: 'WeeklyResetPeriodConfig';
3149
- } & WeeklyResetPeriodConfigFragment);
3153
+ } & WeeklyResetPeriodConfigFragment;
3150
3154
  export declare type ResetPeriodConfigurationFragment = ResetPeriodConfigurationFragment_MonthlyResetPeriodConfig_ | ResetPeriodConfigurationFragment_WeeklyResetPeriodConfig_;
3151
3155
  export declare type MonthlyResetPeriodConfigFragment = {
3152
3156
  __typename?: 'MonthlyResetPeriodConfig';
@@ -3204,12 +3208,12 @@ export declare type PaywallAddonFragment = {
3204
3208
  description?: string | null;
3205
3209
  additionalMetaData?: any | null;
3206
3210
  pricingType?: PricingType | null;
3207
- entitlements?: Array<({
3211
+ entitlements?: Array<{
3208
3212
  __typename?: 'PackageEntitlement';
3209
- } & PaywallPackageEntitlementFragment)> | null;
3210
- prices?: Array<({
3213
+ } & PaywallPackageEntitlementFragment> | null;
3214
+ prices?: Array<{
3211
3215
  __typename?: 'Price';
3212
- } & PriceFragment)> | null;
3216
+ } & PriceFragment> | null;
3213
3217
  };
3214
3218
  export declare type PaywallPlanFragment = {
3215
3219
  __typename?: 'Plan';
@@ -3240,23 +3244,23 @@ export declare type PaywallPlanFragment = {
3240
3244
  refId: string;
3241
3245
  displayName: string;
3242
3246
  } | null;
3243
- entitlements?: Array<({
3247
+ entitlements?: Array<{
3244
3248
  __typename?: 'PackageEntitlement';
3245
- } & PaywallPackageEntitlementFragment)> | null;
3246
- inheritedEntitlements?: Array<({
3249
+ } & PaywallPackageEntitlementFragment> | null;
3250
+ inheritedEntitlements?: Array<{
3247
3251
  __typename?: 'PackageEntitlement';
3248
- } & PaywallPackageEntitlementFragment)> | null;
3249
- prices?: Array<({
3252
+ } & PaywallPackageEntitlementFragment> | null;
3253
+ prices?: Array<{
3250
3254
  __typename?: 'Price';
3251
- } & PriceFragment)> | null;
3255
+ } & PriceFragment> | null;
3252
3256
  defaultTrialConfig?: {
3253
3257
  __typename?: 'DefaultTrialConfig';
3254
3258
  duration: number;
3255
3259
  units: TrialPeriodUnits;
3256
3260
  } | null;
3257
- compatibleAddons?: Array<({
3261
+ compatibleAddons?: Array<{
3258
3262
  __typename?: 'Addon';
3259
- } & PaywallAddonFragment)> | null;
3263
+ } & PaywallAddonFragment> | null;
3260
3264
  };
3261
3265
  export declare type TypographyConfigurationFragment = {
3262
3266
  __typename?: 'TypographyConfiguration';
@@ -3311,9 +3315,9 @@ export declare type ProvisionCustomerMutation = {
3311
3315
  provisionCustomer: {
3312
3316
  __typename?: 'ProvisionedCustomer';
3313
3317
  subscriptionDecisionStrategy: SubscriptionDecisionStrategy;
3314
- customer: ({
3318
+ customer: {
3315
3319
  __typename?: 'Customer';
3316
- } & CustomerFragment);
3320
+ } & CustomerFragment;
3317
3321
  subscription?: ({
3318
3322
  __typename?: 'CustomerSubscription';
3319
3323
  } & SlimSubscriptionFragment) | null;
@@ -3324,18 +3328,18 @@ export declare type ImportCustomerMutationVariables = Exact<{
3324
3328
  }>;
3325
3329
  export declare type ImportCustomerMutation = {
3326
3330
  __typename?: 'Mutation';
3327
- importCustomer: ({
3331
+ importCustomer: {
3328
3332
  __typename?: 'Customer';
3329
- } & CustomerFragment);
3333
+ } & CustomerFragment;
3330
3334
  };
3331
3335
  export declare type UpdateCustomerMutationVariables = Exact<{
3332
3336
  input: UpdateCustomerInput;
3333
3337
  }>;
3334
3338
  export declare type UpdateCustomerMutation = {
3335
3339
  __typename?: 'Mutation';
3336
- updateCustomer: ({
3340
+ updateCustomer: {
3337
3341
  __typename?: 'Customer';
3338
- } & CustomerFragment);
3342
+ } & CustomerFragment;
3339
3343
  };
3340
3344
  export declare type ProvisionSubscriptionMutationVariables = Exact<{
3341
3345
  input: ProvisionSubscriptionInput;
@@ -3356,18 +3360,18 @@ export declare type UpdateSubscriptionMutationVariables = Exact<{
3356
3360
  }>;
3357
3361
  export declare type UpdateSubscriptionMutation = {
3358
3362
  __typename?: 'Mutation';
3359
- updateSubscription: ({
3363
+ updateSubscription: {
3360
3364
  __typename?: 'CustomerSubscription';
3361
- } & SlimSubscriptionFragment);
3365
+ } & SlimSubscriptionFragment;
3362
3366
  };
3363
3367
  export declare type CancelSubscriptionMutationVariables = Exact<{
3364
3368
  input: SubscriptionCancellationInput;
3365
3369
  }>;
3366
3370
  export declare type CancelSubscriptionMutation = {
3367
3371
  __typename?: 'Mutation';
3368
- cancelSubscription: ({
3372
+ cancelSubscription: {
3369
3373
  __typename?: 'CustomerSubscription';
3370
- } & SlimSubscriptionFragment);
3374
+ } & SlimSubscriptionFragment;
3371
3375
  };
3372
3376
  export declare type InitiateCheckoutMutationVariables = Exact<{
3373
3377
  input: InitiateCheckoutInput;
@@ -3385,18 +3389,18 @@ export declare type EstimateSubscriptionMutationVariables = Exact<{
3385
3389
  }>;
3386
3390
  export declare type EstimateSubscriptionMutation = {
3387
3391
  __typename?: 'Mutation';
3388
- estimateSubscription: ({
3392
+ estimateSubscription: {
3389
3393
  __typename?: 'SubscriptionPreview';
3390
- } & SubscriptionPreviewFragment);
3394
+ } & SubscriptionPreviewFragment;
3391
3395
  };
3392
3396
  export declare type EstimateSubscriptionUpdateMutationVariables = Exact<{
3393
3397
  input: EstimateSubscriptionUpdateInput;
3394
3398
  }>;
3395
3399
  export declare type EstimateSubscriptionUpdateMutation = {
3396
3400
  __typename?: 'Mutation';
3397
- estimateSubscriptionUpdate: ({
3401
+ estimateSubscriptionUpdate: {
3398
3402
  __typename?: 'SubscriptionPreview';
3399
- } & SubscriptionPreviewFragment);
3403
+ } & SubscriptionPreviewFragment;
3400
3404
  };
3401
3405
  export declare type ReportUsageMutationVariables = Exact<{
3402
3406
  input: UsageMeasurementCreateInput;
@@ -3426,9 +3430,9 @@ export declare type GetCouponsQuery = {
3426
3430
  __typename?: 'CouponConnection';
3427
3431
  edges: Array<{
3428
3432
  __typename?: 'CouponEdge';
3429
- node: ({
3433
+ node: {
3430
3434
  __typename?: 'Coupon';
3431
- } & CouponFragment);
3435
+ } & CouponFragment;
3432
3436
  }>;
3433
3437
  };
3434
3438
  };
@@ -3439,9 +3443,9 @@ export declare type GetPaywallQuery = {
3439
3443
  __typename?: 'Query';
3440
3444
  paywall: {
3441
3445
  __typename?: 'Paywall';
3442
- plans: Array<({
3446
+ plans: Array<{
3443
3447
  __typename?: 'Plan';
3444
- } & PlanFragment)>;
3448
+ } & PlanFragment>;
3445
3449
  configuration?: ({
3446
3450
  __typename?: 'PaywallConfiguration';
3447
3451
  } & PaywallConfigurationFragment) | null;
@@ -3455,18 +3459,18 @@ export declare type GetEntitlementsQueryVariables = Exact<{
3455
3459
  }>;
3456
3460
  export declare type GetEntitlementsQuery = {
3457
3461
  __typename?: 'Query';
3458
- entitlements: Array<({
3462
+ entitlements: Array<{
3459
3463
  __typename?: 'Entitlement';
3460
- } & EntitlementFragment)>;
3464
+ } & EntitlementFragment>;
3461
3465
  };
3462
3466
  export declare type GetEntitlementQueryVariables = Exact<{
3463
3467
  query: FetchEntitlementQuery;
3464
3468
  }>;
3465
3469
  export declare type GetEntitlementQuery = {
3466
3470
  __typename?: 'Query';
3467
- entitlement: ({
3471
+ entitlement: {
3468
3472
  __typename?: 'Entitlement';
3469
- } & EntitlementFragment);
3473
+ } & EntitlementFragment;
3470
3474
  };
3471
3475
  export declare const PriceFragmentDoc: import("graphql").DocumentNode;
3472
3476
  export declare const TotalPriceFragmentDoc: import("graphql").DocumentNode;
@@ -3509,21 +3513,21 @@ export declare const GetEntitlementsDocument: import("graphql").DocumentNode;
3509
3513
  export declare const GetEntitlementDocument: import("graphql").DocumentNode;
3510
3514
  export declare type SdkFunctionWrapper = <T>(action: (requestHeaders?: Record<string, string>) => Promise<T>, operationName: string, operationType?: string) => Promise<T>;
3511
3515
  export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionWrapper): {
3512
- provisionCustomer(variables: ProvisionCustomerMutationVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<ProvisionCustomerMutation>;
3513
- importCustomer(variables: ImportCustomerMutationVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<ImportCustomerMutation>;
3514
- updateCustomer(variables: UpdateCustomerMutationVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<UpdateCustomerMutation>;
3515
- provisionSubscription(variables: ProvisionSubscriptionMutationVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<ProvisionSubscriptionMutation>;
3516
- updateSubscription(variables: UpdateSubscriptionMutationVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<UpdateSubscriptionMutation>;
3517
- cancelSubscription(variables: CancelSubscriptionMutationVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<CancelSubscriptionMutation>;
3518
- initiateCheckout(variables: InitiateCheckoutMutationVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<InitiateCheckoutMutation>;
3519
- estimateSubscription(variables: EstimateSubscriptionMutationVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<EstimateSubscriptionMutation>;
3520
- estimateSubscriptionUpdate(variables: EstimateSubscriptionUpdateMutationVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<EstimateSubscriptionUpdateMutation>;
3521
- reportUsage(variables: ReportUsageMutationVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<ReportUsageMutation>;
3522
- getCustomerById(variables: GetCustomerByIdQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<GetCustomerByIdQuery>;
3523
- getCoupons(variables?: GetCouponsQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<GetCouponsQuery>;
3524
- getPaywall(variables: GetPaywallQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<GetPaywallQuery>;
3525
- getEntitlements(variables: GetEntitlementsQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<GetEntitlementsQuery>;
3526
- getEntitlement(variables: GetEntitlementQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<GetEntitlementQuery>;
3516
+ provisionCustomer(variables: ProvisionCustomerMutationVariables, requestHeaders?: Dom.RequestInit['headers']): Promise<ProvisionCustomerMutation>;
3517
+ importCustomer(variables: ImportCustomerMutationVariables, requestHeaders?: Dom.RequestInit['headers']): Promise<ImportCustomerMutation>;
3518
+ updateCustomer(variables: UpdateCustomerMutationVariables, requestHeaders?: Dom.RequestInit['headers']): Promise<UpdateCustomerMutation>;
3519
+ provisionSubscription(variables: ProvisionSubscriptionMutationVariables, requestHeaders?: Dom.RequestInit['headers']): Promise<ProvisionSubscriptionMutation>;
3520
+ updateSubscription(variables: UpdateSubscriptionMutationVariables, requestHeaders?: Dom.RequestInit['headers']): Promise<UpdateSubscriptionMutation>;
3521
+ cancelSubscription(variables: CancelSubscriptionMutationVariables, requestHeaders?: Dom.RequestInit['headers']): Promise<CancelSubscriptionMutation>;
3522
+ initiateCheckout(variables: InitiateCheckoutMutationVariables, requestHeaders?: Dom.RequestInit['headers']): Promise<InitiateCheckoutMutation>;
3523
+ estimateSubscription(variables: EstimateSubscriptionMutationVariables, requestHeaders?: Dom.RequestInit['headers']): Promise<EstimateSubscriptionMutation>;
3524
+ estimateSubscriptionUpdate(variables: EstimateSubscriptionUpdateMutationVariables, requestHeaders?: Dom.RequestInit['headers']): Promise<EstimateSubscriptionUpdateMutation>;
3525
+ reportUsage(variables: ReportUsageMutationVariables, requestHeaders?: Dom.RequestInit['headers']): Promise<ReportUsageMutation>;
3526
+ getCustomerById(variables: GetCustomerByIdQueryVariables, requestHeaders?: Dom.RequestInit['headers']): Promise<GetCustomerByIdQuery>;
3527
+ getCoupons(variables?: GetCouponsQueryVariables, requestHeaders?: Dom.RequestInit['headers']): Promise<GetCouponsQuery>;
3528
+ getPaywall(variables: GetPaywallQueryVariables, requestHeaders?: Dom.RequestInit['headers']): Promise<GetPaywallQuery>;
3529
+ getEntitlements(variables: GetEntitlementsQueryVariables, requestHeaders?: Dom.RequestInit['headers']): Promise<GetEntitlementsQuery>;
3530
+ getEntitlement(variables: GetEntitlementQueryVariables, requestHeaders?: Dom.RequestInit['headers']): Promise<GetEntitlementQuery>;
3527
3531
  };
3528
3532
  export declare type Sdk = ReturnType<typeof getSdk>;
3529
3533
  export {};