@stigg/node-server-sdk 4.3.1 → 4.6.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.
Files changed (31) hide show
  1. package/dist/api/apollo/TimeoutLink.d.ts +0 -1
  2. package/dist/api/apollo/WebSocketLink.d.ts +0 -1
  3. package/dist/api/apollo/WebSocketLink.js +2 -2
  4. package/dist/api/apollo/initApolloClient.js +5 -3
  5. package/dist/api/apollo/types.d.ts +1 -1
  6. package/dist/api/entitlements/entitlementsApi.d.ts +7 -8
  7. package/dist/api/managementApi.d.ts +45 -45
  8. package/dist/client.d.ts +5 -5
  9. package/dist/client.js +9 -8
  10. package/dist/configuration.d.ts +3 -3
  11. package/dist/index.js +6 -2
  12. package/dist/models.d.ts +104 -103
  13. package/dist/models.js +6 -2
  14. package/dist/services/EdgeApiClient.d.ts +1 -1
  15. package/dist/services/EdgeApiClient.js +6 -2
  16. package/dist/services/cache/RedisSingleExecutionService/RedisSingleExecution.js +1 -1
  17. package/dist/services/cache/RedisSingleExecutionService/RedisSingleExecution.utils.d.ts +4 -4
  18. package/dist/services/cache/cacheService.d.ts +2 -2
  19. package/dist/services/cache/inMemoryCacheService.d.ts +1 -1
  20. package/dist/services/cache/redis/distributedLocks.js +6 -2
  21. package/dist/services/entitlementsService.utils.d.ts +10 -10
  22. package/dist/services/eventEmitter.d.ts +2 -2
  23. package/dist/services/inMemoryEntitlementsService.js +1 -1
  24. package/dist/services/loggerService.d.ts +1 -1
  25. package/dist/services/redisEntitlementsService.js +1 -1
  26. package/dist/types.d.ts +1 -1
  27. package/dist/utils/apiErrorHandling.d.ts +1 -1
  28. package/dist/utils/dateUtils.d.ts +1 -1
  29. package/dist/utils/decorators/ReuseOngoingExecution.d.ts +1 -1
  30. package/dist/utils/featureTypes.d.ts +1 -1
  31. package/package.json +4 -4
package/dist/models.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { PackageEntitlementFragment, PaymentCollection, PaywallConfigurationFragment, SubscriptionQueryFragment, PaywallCurrencyFragment, PageInfoFragment, SubscriptionCancellationAction, SubscriptionFutureUpdateDataFragment, SubscriptionInvoiceFragment, SubscriptionMigrationTime, SubscriptionScheduleStatus, BillingPeriod, SubscriptionCancellationTime, PromotionalEntitlementStatus, SubscriptionStatus, TrialPeriodUnits, BillingModel, PricingType, SubscriptionDecisionStrategy, ExperimentGroupType, Currency, DiscountType, DiscountDurationType, UsageUpdateBehavior, EntitlementResetPeriod, AccessDeniedReason, FeatureType, MeterType, ProvisionSubscriptionStatus, TiersMode, PriceTierFragment, TotalPriceFragment, BillingAddress, MonthlyAccordingTo, WeeklyAccordingTo, CustomerStatisticsFragment, TrialOverrideConfigurationInput, ScheduleStrategy, BillingCadence, ImportSubscriptionInput, PaymentCollectionMethod, BudgetConfigurationInput, SubscriptionCouponInput, PriceOverrideInput, SubscriptionProrationBehavior, CreditGrantFragment } from '@stigg/api-client-js/src/generated/sdk';
1
+ import { PackageEntitlementFragment, PaymentCollection, PaywallConfigurationFragment, SubscriptionQueryFragment, PaywallCurrencyFragment, PageInfoFragment, SubscriptionCancellationAction, SubscriptionFutureUpdateDataFragment, SubscriptionInvoiceFragment, SubscriptionMigrationTime, SubscriptionScheduleStatus, BillingPeriod, SubscriptionCancellationTime, PromotionalEntitlementStatus, SubscriptionStatus, TrialPeriodUnits, BillingModel, PricingType, SubscriptionDecisionStrategy, ExperimentGroupType, Currency, DiscountType, DiscountDurationType, UsageUpdateBehavior, EntitlementResetPeriod, AccessDeniedReason, FeatureType, MeterType, ProvisionSubscriptionStatus, TiersMode, PriceTierFragment, TotalPriceFragment, BillingAddress, MonthlyAccordingTo, WeeklyAccordingTo, CustomerStatisticsFragment, TrialOverrideConfigurationInput, ScheduleStrategy, BillingCadence, ImportSubscriptionInput, PaymentCollectionMethod, BudgetConfigurationInput, SubscriptionCouponInput, PriceOverrideInput, SubscriptionProrationBehavior, CreditGrantFragment, CreditLedgerFragment } from '@stigg/api-client-js/src/generated/sdk';
2
2
  export * from '@stigg/api-client-js/src/generated/sdk';
3
3
  export interface Metadata {
4
4
  [key: string]: string;
5
5
  }
6
- export declare type EntitlementFeature = {
6
+ export type EntitlementFeature = {
7
7
  id: string;
8
8
  featureType: FeatureType;
9
9
  units?: string;
@@ -11,7 +11,7 @@ export declare type EntitlementFeature = {
11
11
  meterType?: MeterType.Fluctuating | MeterType.Incremental | MeterType.None;
12
12
  isMetered?: boolean;
13
13
  };
14
- export declare type FullEntitlementFeature = {
14
+ export type FullEntitlementFeature = {
15
15
  id: string;
16
16
  featureType: FeatureType;
17
17
  displayName: string;
@@ -22,7 +22,7 @@ export declare type FullEntitlementFeature = {
22
22
  isMetered?: boolean;
23
23
  metadata?: Record<string, string>;
24
24
  };
25
- export declare type BaseEntitlement = {
25
+ export type BaseEntitlement = {
26
26
  hasAccess: boolean;
27
27
  isFallback: boolean;
28
28
  accessDeniedReason?: AccessDeniedReason;
@@ -58,7 +58,7 @@ export interface MeteredEntitlement extends BaseEntitlement {
58
58
  /** @deprecated renamed to {@link usagePeriodEnd} */
59
59
  nextResetDate?: Date;
60
60
  }
61
- export declare type Entitlement = BooleanEntitlement | NumericEntitlement | MeteredEntitlement | EnumEntitlement;
61
+ export type Entitlement = BooleanEntitlement | NumericEntitlement | MeteredEntitlement | EnumEntitlement;
62
62
  /** @internal */
63
63
  export declare const BOOLEAN_DEFAULT_FALLBACK_ENTITLEMENT: BooleanEntitlement;
64
64
  /** @internal */
@@ -67,12 +67,12 @@ export declare const NUMERIC_DEFAULT_FALLBACK_ENTITLEMENT: NumericEntitlement;
67
67
  export declare const METERED_DEFAULT_FALLBACK_ENTITLEMENT: MeteredEntitlement;
68
68
  /** @internal */
69
69
  export declare const ENUM_DEFAULT_FALLBACK_ENTITLEMENT: EnumEntitlement;
70
- export declare type DependencyAddon = {
70
+ export type DependencyAddon = {
71
71
  refId: string;
72
72
  displayName: string;
73
73
  description?: string;
74
74
  };
75
- export declare type Addon = {
75
+ export type Addon = {
76
76
  id: string;
77
77
  displayName: string;
78
78
  billingId?: string | null;
@@ -84,11 +84,11 @@ export declare type Addon = {
84
84
  maxQuantity?: number;
85
85
  dependencies?: DependencyAddon[];
86
86
  };
87
- export declare type FullSubscriptionAddon = {
87
+ export type FullSubscriptionAddon = {
88
88
  quantity: number;
89
89
  addon: Addon;
90
90
  };
91
- export declare type FullSubscription = {
91
+ export type FullSubscription = {
92
92
  id: string;
93
93
  resource: CustomerResource | null;
94
94
  payingCustomer: SlimCustomer | null;
@@ -121,7 +121,7 @@ export declare type FullSubscription = {
121
121
  /** Future updates can be of 2 types {@link SubscriptionScheduleStatus.Scheduled} or {@link SubscriptionScheduleStatus.PendingPayment} */
122
122
  futureUpdates: SubscriptionFutureUpdateDataFragment[];
123
123
  };
124
- export declare type Subscription = {
124
+ export type Subscription = {
125
125
  id: string;
126
126
  resource: CustomerResource | null;
127
127
  status: SubscriptionStatus;
@@ -143,11 +143,11 @@ export declare type Subscription = {
143
143
  paymentCollection: PaymentCollection;
144
144
  billingSyncError?: string;
145
145
  };
146
- export declare type SubscriptionAddon = {
146
+ export type SubscriptionAddon = {
147
147
  addonId: string;
148
148
  quantity?: number;
149
149
  };
150
- export declare type UpdateSubscription = {
150
+ export type UpdateSubscription = {
151
151
  subscriptionId: string;
152
152
  unitQuantity?: number;
153
153
  billableFeatures?: BillableFeature[];
@@ -162,10 +162,10 @@ export declare type UpdateSubscription = {
162
162
  appliedCoupon?: SubscriptionCouponInput;
163
163
  priceOverrides?: PriceOverrideInput[];
164
164
  };
165
- export declare type CreateSubscription = CreateSubscriptionParams & {
165
+ export type CreateSubscription = CreateSubscriptionParams & {
166
166
  customerId: string;
167
167
  };
168
- export declare type CreateSubscriptionParams = {
168
+ export type CreateSubscriptionParams = {
169
169
  resourceId?: string;
170
170
  planId: string;
171
171
  addons?: SubscriptionAddon[];
@@ -183,22 +183,22 @@ export declare type CreateSubscriptionParams = {
183
183
  trialOverrideConfiguration?: TrialOverrideConfigurationInput;
184
184
  priceOverrides?: PriceOverrideInput[];
185
185
  };
186
- export declare type Money = {
186
+ export type Money = {
187
187
  amount: number;
188
188
  currency: string;
189
189
  };
190
- export declare type DateRange = {
190
+ export type DateRange = {
191
191
  start?: Date;
192
192
  end?: Date;
193
193
  };
194
- export declare type SubscriptionPreviewProration = {
194
+ export type SubscriptionPreviewProration = {
195
195
  prorationDate: Date;
196
196
  credit: Money;
197
197
  debit: Money;
198
198
  netAmount: Money;
199
199
  hasProrations?: boolean;
200
200
  };
201
- export declare type SubscriptionPreviewInvoice = {
201
+ export type SubscriptionPreviewInvoice = {
202
202
  total: Money;
203
203
  subTotal: Money;
204
204
  totalExcludingTax: Money;
@@ -207,28 +207,28 @@ export declare type SubscriptionPreviewInvoice = {
207
207
  taxDetails?: SubscriptionPreviewTaxDetails;
208
208
  discountDetails?: SubscriptionPreviewDiscount;
209
209
  };
210
- export declare type ImmediateSubscriptionPreviewInvoice = SubscriptionPreviewInvoice & {
210
+ export type ImmediateSubscriptionPreviewInvoice = SubscriptionPreviewInvoice & {
211
211
  proration?: SubscriptionPreviewProration;
212
212
  credits?: SubscriptionPreviewCredits;
213
213
  };
214
- export declare type SubscriptionPreviewCredits = {
214
+ export type SubscriptionPreviewCredits = {
215
215
  initial: Money;
216
216
  used: Money;
217
217
  remaining: Money;
218
218
  };
219
- export declare type SubscriptionPricePreview = {
219
+ export type SubscriptionPricePreview = {
220
220
  subTotal: Money;
221
221
  totalExcludingTax: Money;
222
222
  total: Money;
223
223
  tax: Money;
224
224
  };
225
- export declare type SubscriptionPreviewDiscount = {
225
+ export type SubscriptionPreviewDiscount = {
226
226
  type: DiscountType;
227
227
  value: number;
228
228
  durationType: DiscountDurationType;
229
229
  durationInMonths?: number;
230
230
  };
231
- export declare type SubscriptionPreviewTaxDetails = {
231
+ export type SubscriptionPreviewTaxDetails = {
232
232
  displayName: string;
233
233
  percentage: number;
234
234
  inclusive: boolean;
@@ -259,7 +259,7 @@ export interface SubscriptionPreviewV2 {
259
259
  isPlanDowngrade?: boolean;
260
260
  hasScheduledUpdates?: boolean;
261
261
  }
262
- export declare type EstimateSubscription = {
262
+ export type EstimateSubscription = {
263
263
  customerId: string;
264
264
  payingCustomerId?: string;
265
265
  resourceId?: string;
@@ -275,7 +275,7 @@ export declare type EstimateSubscription = {
275
275
  appliedCoupon?: SubscriptionCouponInput;
276
276
  skipTrial?: boolean;
277
277
  };
278
- export declare type EstimateSubscriptionUpdate = {
278
+ export type EstimateSubscriptionUpdate = {
279
279
  subscriptionId: string;
280
280
  unitQuantity?: number;
281
281
  billableFeatures?: BillableFeature[];
@@ -283,7 +283,7 @@ export declare type EstimateSubscriptionUpdate = {
283
283
  promotionCode?: string;
284
284
  appliedCoupon?: SubscriptionCouponInput;
285
285
  };
286
- export declare type PreviewSubscription = {
286
+ export type PreviewSubscription = {
287
287
  customerId: string;
288
288
  payingCustomerId?: string;
289
289
  planId: string;
@@ -299,31 +299,31 @@ export declare type PreviewSubscription = {
299
299
  appliedCoupon?: SubscriptionCouponInput;
300
300
  scheduleStrategy?: ScheduleStrategy;
301
301
  };
302
- export declare type PreviewNextInvoice = {
302
+ export type PreviewNextInvoice = {
303
303
  subscriptionId: string;
304
304
  };
305
- export declare type CancelSubscriptionScheduledUpdates = {
305
+ export type CancelSubscriptionScheduledUpdates = {
306
306
  subscriptionId: string;
307
307
  status?: SubscriptionScheduleStatus.Scheduled | SubscriptionScheduleStatus.PendingPayment;
308
308
  };
309
- export declare type MigrateSubscriptionToLatest = {
309
+ export type MigrateSubscriptionToLatest = {
310
310
  subscriptionId: string;
311
311
  subscriptionMigrationTime?: SubscriptionMigrationTime;
312
312
  };
313
- export declare type ProvisionedCustomer = {
313
+ export type ProvisionedCustomer = {
314
314
  customer: Customer;
315
315
  subscriptionDecisionStrategy: SubscriptionDecisionStrategy;
316
316
  subscription?: Subscription;
317
317
  };
318
- export declare type ProvisionCustomer = CreateCustomer & {
318
+ export type ProvisionCustomer = CreateCustomer & {
319
319
  subscriptionParams: CreateSubscriptionParams | null;
320
320
  };
321
- export declare type ProvisionSubscriptionResult = {
321
+ export type ProvisionSubscriptionResult = {
322
322
  provisionStatus: ProvisionSubscriptionStatus;
323
323
  subscription?: Subscription;
324
324
  checkoutUrl?: string | null;
325
325
  };
326
- export declare type CheckoutOptions = {
326
+ export type CheckoutOptions = {
327
327
  successUrl: string;
328
328
  cancelUrl: string;
329
329
  allowPromoCodes?: boolean;
@@ -332,7 +332,7 @@ export declare type CheckoutOptions = {
332
332
  referenceId?: string;
333
333
  collectPhoneNumber?: boolean;
334
334
  };
335
- export declare type ApplySubscription = {
335
+ export type ApplySubscription = {
336
336
  customerId: string;
337
337
  planId: string;
338
338
  paymentMethodId?: string;
@@ -355,20 +355,20 @@ export declare type ApplySubscription = {
355
355
  paymentCollectionMethod?: PaymentCollectionMethod;
356
356
  priceOverrides?: PriceOverrideInput[];
357
357
  };
358
- export declare type ApplySubscriptionResults = {
358
+ export type ApplySubscriptionResults = {
359
359
  subscription?: Subscription;
360
360
  };
361
- export declare type ImportSubscriptionBulk = {
361
+ export type ImportSubscriptionBulk = {
362
362
  subscriptions: ImportSubscription[];
363
363
  };
364
- export declare type ImportSubscription = Omit<ImportSubscriptionInput, 'additionalMetaData'> & {
364
+ export type ImportSubscription = Omit<ImportSubscriptionInput, 'additionalMetaData'> & {
365
365
  metadata?: Metadata;
366
366
  };
367
- export declare type BillableFeature = {
367
+ export type BillableFeature = {
368
368
  featureId: string;
369
369
  quantity: number;
370
370
  };
371
- export declare type SubscriptionEntitlement = {
371
+ export type SubscriptionEntitlement = {
372
372
  featureId: string;
373
373
  hasUnlimitedUsage?: boolean;
374
374
  hasSoftLimit?: boolean;
@@ -381,7 +381,7 @@ export declare type SubscriptionEntitlement = {
381
381
  accordingTo: WeeklyAccordingTo;
382
382
  };
383
383
  };
384
- export declare type ProvisionSubscription = {
384
+ export type ProvisionSubscription = {
385
385
  customerId: string;
386
386
  payingCustomerId?: string;
387
387
  resourceId?: string;
@@ -408,7 +408,7 @@ export declare type ProvisionSubscription = {
408
408
  paymentCollectionMethod?: PaymentCollectionMethod;
409
409
  priceOverrides?: PriceOverrideInput[];
410
410
  };
411
- export declare type SubscriptionBillingInfo = {
411
+ export type SubscriptionBillingInfo = {
412
412
  taxRateIds?: string[];
413
413
  taxPercentage?: number;
414
414
  billingAddress?: BillingAddress;
@@ -420,7 +420,7 @@ export declare type SubscriptionBillingInfo = {
420
420
  integrationId?: string;
421
421
  prorationBehavior?: SubscriptionProrationBehavior;
422
422
  };
423
- export declare type CancelSubscription = {
423
+ export type CancelSubscription = {
424
424
  subscriptionId: string;
425
425
  endDate?: Date;
426
426
  subscriptionCancellationTime?: SubscriptionCancellationTime;
@@ -428,38 +428,38 @@ export declare type CancelSubscription = {
428
428
  prorate?: boolean;
429
429
  awaitSubscriptionCancellation?: boolean;
430
430
  };
431
- export declare type GetBooleanEntitlement = {
431
+ export type GetBooleanEntitlement = {
432
432
  customerId: string;
433
433
  featureId: string;
434
434
  resourceId?: string;
435
435
  options?: BooleanEntitlementOptions;
436
436
  };
437
- export declare type GetNumericEntitlement = {
437
+ export type GetNumericEntitlement = {
438
438
  customerId: string;
439
439
  featureId: string;
440
440
  resourceId?: string;
441
441
  options?: NumericEntitlementOptions;
442
442
  };
443
- export declare type GetMeteredEntitlement = {
443
+ export type GetMeteredEntitlement = {
444
444
  customerId: string;
445
445
  featureId: string;
446
446
  resourceId?: string;
447
447
  options?: MeteredEntitlementOptions;
448
448
  };
449
- export declare type GetEnumEntitlement = {
449
+ export type GetEnumEntitlement = {
450
450
  customerId: string;
451
451
  featureId: string;
452
452
  resourceId?: string;
453
453
  options?: EnumEntitlementOptions;
454
454
  };
455
- export declare type GetEntitlement = {
455
+ export type GetEntitlement = {
456
456
  customerId: string;
457
457
  featureId: string;
458
458
  resourceId?: string;
459
459
  options?: EntitlementOptions;
460
460
  };
461
- export declare type EntitlementOptions = BooleanEntitlementOptions | NumericEntitlementOptions | MeteredEntitlementOptions | EnumEntitlementOptions;
462
- export declare type ReportUsage = {
461
+ export type EntitlementOptions = BooleanEntitlementOptions | NumericEntitlementOptions | MeteredEntitlementOptions | EnumEntitlementOptions;
462
+ export type ReportUsage = {
463
463
  customerId: string;
464
464
  resourceId?: string;
465
465
  featureId: string;
@@ -468,11 +468,11 @@ export declare type ReportUsage = {
468
468
  createdAt?: Date;
469
469
  dimensions?: Record<string, EventDimensionValue>;
470
470
  };
471
- export declare type ReportUsageBulk = {
471
+ export type ReportUsageBulk = {
472
472
  usages: ReportUsage[];
473
473
  };
474
- export declare type EventDimensionValue = string | number | boolean;
475
- export declare type ReportEvent = {
474
+ export type EventDimensionValue = string | number | boolean;
475
+ export type ReportEvent = {
476
476
  eventName: string;
477
477
  customerId: string;
478
478
  idempotencyKey: string;
@@ -480,7 +480,7 @@ export declare type ReportEvent = {
480
480
  dimensions?: Record<string, EventDimensionValue>;
481
481
  timestamp?: Date;
482
482
  };
483
- export declare type ReportUsageAck = {
483
+ export type ReportUsageAck = {
484
484
  measurementId: string;
485
485
  featureId: string;
486
486
  customerId: string;
@@ -491,10 +491,10 @@ export declare type ReportUsageAck = {
491
491
  /** @deprecated renamed to {@link usagePeriodEnd} */
492
492
  nextResetDate?: Date;
493
493
  };
494
- export declare type ImportCustomerBulk = {
494
+ export type ImportCustomerBulk = {
495
495
  customers: ImportCustomer[];
496
496
  };
497
- export declare type ImportCustomer = {
497
+ export type ImportCustomer = {
498
498
  billingId?: string;
499
499
  customerId?: string;
500
500
  name?: string;
@@ -503,7 +503,7 @@ export declare type ImportCustomer = {
503
503
  metadata?: Metadata | null;
504
504
  updatedAt?: Date;
505
505
  };
506
- export declare type CreateCustomer = {
506
+ export type CreateCustomer = {
507
507
  customerId?: string;
508
508
  name?: string;
509
509
  email?: string;
@@ -517,21 +517,22 @@ export declare type CreateCustomer = {
517
517
  excludeFromExperiment?: boolean;
518
518
  awsMarketplaceCustomerId?: string;
519
519
  };
520
- export declare type GetSubscription = {
520
+ export type GetSubscription = {
521
521
  subscriptionId: string;
522
522
  };
523
- export declare type GetActiveSubscriptions = {
523
+ export type GetActiveSubscriptions = {
524
524
  customerId: string;
525
525
  resourceId?: string | string[];
526
526
  };
527
- export declare type PaginatedResult<T> = {
527
+ export type PaginatedResult<T> = {
528
528
  data: T[];
529
529
  pageInfo: PageInfoFragment;
530
530
  totalCount?: number;
531
531
  };
532
- export declare type GetSubscriptionsResult = PaginatedResult<SubscriptionQueryFragment>;
533
- export declare type GetCreditGrantsResult = PaginatedResult<CreditGrantFragment>;
534
- export declare type GetSubscriptionsParams = {
532
+ export type GetSubscriptionsResult = PaginatedResult<SubscriptionQueryFragment>;
533
+ export type GetCreditGrantsResult = PaginatedResult<CreditGrantFragment>;
534
+ export type GetCreditLedgerResult = PaginatedResult<CreditLedgerFragment>;
535
+ export type GetSubscriptionsParams = {
535
536
  customerId?: string;
536
537
  resourceId?: string | string[];
537
538
  status?: SubscriptionStatus | SubscriptionStatus[];
@@ -542,7 +543,7 @@ export declare type GetSubscriptionsParams = {
542
543
  endingBefore?: string;
543
544
  };
544
545
  };
545
- export declare type UpdateCustomer = {
546
+ export type UpdateCustomer = {
546
547
  customerId: string;
547
548
  name?: string;
548
549
  email?: string;
@@ -555,7 +556,7 @@ export declare type UpdateCustomer = {
555
556
  integrationId?: string;
556
557
  awsMarketplaceCustomerId?: string;
557
558
  };
558
- export declare type BillingInfo = {
559
+ export type BillingInfo = {
559
560
  billingAddress?: Address;
560
561
  shippingAddress?: Address;
561
562
  currency?: Currency;
@@ -571,7 +572,7 @@ export declare type BillingInfo = {
571
572
  /**
572
573
  * @param country - optional country of the address - in a valid ISO 3166-1 alpha-2 format
573
574
  */
574
- export declare type Address = {
575
+ export type Address = {
575
576
  country?: string;
576
577
  state?: string;
577
578
  addressLine1?: string;
@@ -580,52 +581,52 @@ export declare type Address = {
580
581
  postalCode?: string;
581
582
  phoneNumber?: string;
582
583
  };
583
- export declare type TaxExempt = {
584
+ export type TaxExempt = {
584
585
  type: string;
585
586
  value: string;
586
587
  };
587
- export declare type EntitlementsFallback = {
588
+ export type EntitlementsFallback = {
588
589
  [featureId: string]: BooleanEntitlementFallback | NumericEntitlementFallback | MeteredEntitlementFallback | EnumEntitlementFallback;
589
590
  };
590
- export declare type BooleanEntitlementFallback = {
591
+ export type BooleanEntitlementFallback = {
591
592
  hasAccess: boolean;
592
593
  };
593
- export declare type BooleanEntitlementOptions = {
594
+ export type BooleanEntitlementOptions = {
594
595
  /** @deprecated not in use anymore */
595
596
  shouldTrack?: boolean;
596
597
  fallback?: BooleanEntitlementFallback;
597
598
  };
598
- export declare type NumericEntitlementFallback = {
599
+ export type NumericEntitlementFallback = {
599
600
  hasAccess: boolean;
600
601
  value?: number;
601
602
  isUnlimited?: boolean;
602
603
  };
603
- export declare type NumericEntitlementOptions = {
604
+ export type NumericEntitlementOptions = {
604
605
  /** @deprecated not in use anymore */
605
606
  shouldTrack?: boolean;
606
607
  fallback?: NumericEntitlementFallback;
607
608
  };
608
- export declare type MeteredEntitlementFallback = {
609
+ export type MeteredEntitlementFallback = {
609
610
  hasAccess: boolean;
610
611
  usageLimit?: number;
611
612
  isUnlimited?: boolean;
612
613
  };
613
- export declare type MeteredEntitlementOptions = {
614
+ export type MeteredEntitlementOptions = {
614
615
  requestedUsage?: number;
615
616
  /** @deprecated not in use anymore */
616
617
  shouldTrack?: boolean;
617
618
  fallback?: MeteredEntitlementFallback;
618
619
  };
619
- export declare type EnumEntitlementFallback = {
620
+ export type EnumEntitlementFallback = {
620
621
  hasAccess: boolean;
621
622
  enumValues?: string[];
622
623
  };
623
- export declare type EnumEntitlementOptions = {
624
+ export type EnumEntitlementOptions = {
624
625
  requestedValues?: string[];
625
626
  shouldTrack?: boolean;
626
627
  fallback?: EnumEntitlementFallback;
627
628
  };
628
- export declare type CreateUsageMeasurement = {
629
+ export type CreateUsageMeasurement = {
629
630
  customerId: string;
630
631
  resourceId?: string;
631
632
  featureId: string;
@@ -634,7 +635,7 @@ export declare type CreateUsageMeasurement = {
634
635
  createdAt?: Date;
635
636
  dimensions?: Record<string, EventDimensionValue>;
636
637
  };
637
- export declare type FullPromotionalEntitlement = {
638
+ export type FullPromotionalEntitlement = {
638
639
  usageLimit: number;
639
640
  feature: EntitlementFeature;
640
641
  hasUnlimitedUsage?: boolean | null;
@@ -644,15 +645,15 @@ export declare type FullPromotionalEntitlement = {
644
645
  hasExpirationDate: boolean;
645
646
  isVisible: boolean;
646
647
  };
647
- export declare type PaymentMethodDetails = {
648
+ export type PaymentMethodDetails = {
648
649
  expirationMonth?: number | null;
649
650
  expirationYear?: number | null;
650
651
  last4Digits?: string | null;
651
652
  };
652
- export declare type CustomerResource = {
653
+ export type CustomerResource = {
653
654
  id: string;
654
655
  };
655
- export declare type SlimCustomer = {
656
+ export type SlimCustomer = {
656
657
  id: string;
657
658
  name?: string;
658
659
  email?: string;
@@ -662,8 +663,8 @@ export declare type SlimCustomer = {
662
663
  metadata?: Metadata | null;
663
664
  awsMarketplaceCustomerId?: string | null;
664
665
  };
665
- export declare type Customer = SlimCustomer;
666
- export declare type FullCustomer = SlimCustomer & {
666
+ export type Customer = SlimCustomer;
667
+ export type FullCustomer = SlimCustomer & {
667
668
  hasPaymentMethod: boolean;
668
669
  paymentMethodDetails?: PaymentMethodDetails;
669
670
  subscriptions: FullSubscription[];
@@ -677,11 +678,11 @@ export declare type FullCustomer = SlimCustomer & {
677
678
  /** @deprecated use {@link StiggManagementAPI.getActiveSubscriptions} instead with filter for {@link SubscriptionStatus.InTrial} */
678
679
  getActiveTrials(): FullSubscription[];
679
680
  };
680
- export declare type CustomerState = Omit<FullCustomer, 'getActiveSubscriptions' | 'getActivePromotionalEntitlements' | 'getActiveTrials'>;
681
- export declare type CustomerStatisticsModel = {
681
+ export type CustomerState = Omit<FullCustomer, 'getActiveSubscriptions' | 'getActivePromotionalEntitlements' | 'getActiveTrials'>;
682
+ export type CustomerStatisticsModel = {
682
683
  statistics: CustomerStatisticsFragment['statistics'];
683
684
  };
684
- export declare type PackageEntitlement = {
685
+ export type PackageEntitlement = {
685
686
  usageLimit: number;
686
687
  feature: FullEntitlementFeature;
687
688
  hasUnlimitedUsage?: boolean | null;
@@ -691,7 +692,7 @@ export declare type PackageEntitlement = {
691
692
  displayNameOverride?: PackageEntitlementFragment['displayNameOverride'];
692
693
  isGranted: PackageEntitlementFragment['isGranted'];
693
694
  };
694
- export declare type PromotionalEntitlement = {
695
+ export type PromotionalEntitlement = {
695
696
  usageLimit: number;
696
697
  feature: FullEntitlementFeature;
697
698
  hasUnlimitedUsage?: boolean | null;
@@ -701,7 +702,7 @@ export declare type PromotionalEntitlement = {
701
702
  hasExpirationDate: boolean;
702
703
  isVisible: boolean;
703
704
  };
704
- export declare type Price = {
705
+ export type Price = {
705
706
  pricingModel: BillingModel;
706
707
  billingPeriod: BillingPeriod;
707
708
  billingCadence?: BillingCadence;
@@ -726,24 +727,24 @@ export declare type Price = {
726
727
  } | null;
727
728
  blockSize?: number | null;
728
729
  };
729
- export declare type SubscriptionPrice = Price & {
730
+ export type SubscriptionPrice = Price & {
730
731
  grossAmount: number;
731
732
  };
732
- export declare type BasePlan = {
733
+ export type BasePlan = {
733
734
  displayName: string;
734
735
  id: string;
735
736
  };
736
- export declare type CompatiblePackageGroupOptions = {
737
+ export type CompatiblePackageGroupOptions = {
737
738
  minItems?: number;
738
739
  freeItems?: number;
739
740
  };
740
- export declare type CompatiblePackageGroup = {
741
+ export type CompatiblePackageGroup = {
741
742
  packageGroupId: string;
742
743
  displayName: string;
743
744
  addons: Addon[];
744
745
  options?: CompatiblePackageGroupOptions;
745
746
  };
746
- export declare type Plan = {
747
+ export type Plan = {
747
748
  id: string;
748
749
  displayName: string;
749
750
  billingId?: string | null;
@@ -761,7 +762,7 @@ export declare type Plan = {
761
762
  metadata?: Metadata | null;
762
763
  awsMarketplacePlanDimension?: string | null;
763
764
  };
764
- export declare type Coupon = {
765
+ export type Coupon = {
765
766
  id: string;
766
767
  name: string;
767
768
  description?: string | null;
@@ -770,7 +771,7 @@ export declare type Coupon = {
770
771
  amountsOff?: Money[] | null;
771
772
  metadata?: Metadata | null;
772
773
  };
773
- export declare type Product = {
774
+ export type Product = {
774
775
  id: string;
775
776
  displayName?: string | null;
776
777
  description?: string | null;
@@ -778,14 +779,14 @@ export declare type Product = {
778
779
  awsMarketplaceProductId?: string | null;
779
780
  downgradePlan?: Pick<Plan, 'id' | 'displayName'>;
780
781
  };
781
- export declare type DefaultTrialConfig = {
782
+ export type DefaultTrialConfig = {
782
783
  duration: number;
783
784
  units: TrialPeriodUnits;
784
785
  budget?: {
785
786
  limit: BudgetConfigurationInput['limit'];
786
787
  };
787
788
  };
788
- export declare type GetPaywall = {
789
+ export type GetPaywall = {
789
790
  productId?: string;
790
791
  customerId?: string;
791
792
  resourceId?: string;
@@ -793,9 +794,9 @@ export declare type GetPaywall = {
793
794
  fetchAllCountriesPrices?: boolean;
794
795
  includeHiddenPlans?: boolean;
795
796
  };
796
- export declare type PaywallConfiguration = Omit<PaywallConfigurationFragment, '__typename'>;
797
- export declare type PaywallCurrency = Omit<PaywallCurrencyFragment, '__typename'>;
798
- export declare type Paywall = {
797
+ export type PaywallConfiguration = Omit<PaywallConfigurationFragment, '__typename'>;
798
+ export type PaywallCurrency = Omit<PaywallCurrencyFragment, '__typename'>;
799
+ export type Paywall = {
799
800
  plans: Plan[];
800
801
  configuration?: PaywallConfiguration | null;
801
802
  customer: Customer | null;
@@ -803,24 +804,24 @@ export declare type Paywall = {
803
804
  activeSubscriptions: FullSubscription[] | null;
804
805
  currency: PaywallCurrency;
805
806
  };
806
- export declare type ExperimentInfo = {
807
+ export type ExperimentInfo = {
807
808
  id: string;
808
809
  name: string;
809
810
  groupName: string;
810
811
  groupType?: ExperimentGroupType | null;
811
812
  };
812
- export declare type TrialedPlan = {
813
+ export type TrialedPlan = {
813
814
  planId: string;
814
815
  productId: string;
815
816
  };
816
- export declare type FetchUsageHistory = {
817
+ export type FetchUsageHistory = {
817
818
  customerId: string;
818
819
  resourceId?: string;
819
820
  featureId: string;
820
821
  startDate: Date;
821
822
  endDate?: Date;
822
823
  };
823
- export declare type UsageHistoryPoint = {
824
+ export type UsageHistoryPoint = {
824
825
  date: Date;
825
826
  value: number;
826
827
  isResetPoint: boolean;