@stigg/js-client-sdk 3.63.0 → 3.64.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/dist/models.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { BillingModel, BillingPeriod, Currency, PricingType, PromotionalEntitlementStatus, SubscriptionStatus, SubscriptionQueryFragment, TrialPeriodUnits, ExperimentGroupType, CustomerPortalEntitlementFragment, CustomerPortalPromotionalEntitlementFragment, CustomerPortalSubscriptionFragment, CustomerPortalSubscriptionAddonFragment, CustomerPortalBillingInformationFragment, PaywallConfigurationFragment, CustomerPortalConfigurationFragment, WidgetType, CustomerPortalSubscriptionScheduledUpdateDataFragment, DiscountType, DiscountDurationType, PackageEntitlementFragment, PageInfoFragment, PaywallCurrencyFragment, FeatureType, MeterType, EntitlementResetPeriod, AccessDeniedReason, PaywallCalculatedPricePointsFragment, SubscriptionInvoiceFragment, PaymentCollection, PlanFragment, BillingVendorIdentifier, TiersMode, SubscriptionFutureUpdateDataFragment, PriceTierFragment, TotalPriceFragment, CheckoutConfigurationFragment, TypographyConfigurationFragment, BillingAddress, ScheduleStrategy, PaymentCollectionMethod, BudgetConfigurationInput, SubscriptionProrationBehavior, PaymentSessionInput, CreditBalanceSummaryInput, StripeCheckoutCredentialsFragment, ZuoraCheckoutCredentialsFragment } from '@stigg/api-client-js/src/generated/sdk';
1
+ import { BillingModel, BillingPeriod, Currency, PricingType, PromotionalEntitlementStatus, SubscriptionStatus, SubscriptionQueryFragment, TrialPeriodUnits, ExperimentGroupType, CustomerPortalEntitlementFragment, CustomerPortalPromotionalEntitlementFragment, CustomerPortalSubscriptionFragment, CustomerPortalSubscriptionAddonFragment, CustomerPortalBillingInformationFragment, PaywallConfigurationFragment, CustomerPortalConfigurationFragment, WidgetType, CustomerPortalSubscriptionScheduledUpdateDataFragment, DiscountType, DiscountDurationType, PackageEntitlementFragment, PageInfoFragment, PaywallCurrencyFragment, FeatureType, MeterType, EntitlementResetPeriod, AccessDeniedReason, PaywallCalculatedPricePointsFragment, SubscriptionInvoiceFragment, PaymentCollection, PlanFragment, BillingVendorIdentifier, TiersMode, SubscriptionFutureUpdateDataFragment, PriceTierFragment, TotalPriceFragment, CheckoutConfigurationFragment, TypographyConfigurationFragment, BillingAddress, ScheduleStrategy, PaymentCollectionMethod, BudgetConfigurationInput, SubscriptionProrationBehavior, PaymentSessionInput, CreditBalanceSummaryInput, StripeCheckoutCredentialsFragment, ZuoraCheckoutCredentialsFragment, GetCreditGrantsInput as GetCreditGrantsInputGenerated, CreditLedgerInput } from '@stigg/api-client-js/src/generated/sdk';
2
2
  export * from '@stigg/api-client-js/src/generated/sdk';
3
3
  interface Metadata {
4
4
  [key: string]: string;
@@ -596,6 +596,8 @@ export declare type BillableFeature = {
596
596
  quantity: number;
597
597
  };
598
598
  export declare type GetCreditBalanceInput = Omit<CreditBalanceSummaryInput, 'customerId' | 'resourceId'>;
599
+ export declare type GetCreditGrantsInput = Omit<GetCreditGrantsInputGenerated, 'customerId' | 'resourceId'>;
600
+ export declare type GetCreditLedgerInput = Omit<CreditLedgerInput, 'customerId' | 'resourceId'>;
599
601
  /** @hidden */
600
602
  export declare class CustomerModel implements Customer {
601
603
  id: string;
@@ -1,5 +1,5 @@
1
1
  import { Stigg, StiggClient } from './clients';
2
- import { ApplySubscriptionResults, BooleanEntitlement, Coupon, CreditGrantFragment, CreditsBalanceSummaryFragment, Customer, CustomerPortal, Entitlement, EnumEntitlement, GetBooleanEntitlement, GetCheckoutStateResults, GetEnumEntitlement, GetMeteredEntitlement, GetNumericEntitlement, GetSubscriptionsResult, MeteredEntitlement, NumericEntitlement, PaymentSessionFragment, Paywall, SlimSubscriptionFragmentV2Fragment, Subscription, SubscriptionInvoicePreviewFragment, SubscriptionPreview, SubscriptionPreviewV2, UsageHistoryPoint, UsageHistoryV2Fragment } from './models';
2
+ import { ApplySubscriptionResults, BooleanEntitlement, Coupon, CreditGrantFragment, CreditLedgerFragment, CreditsBalanceSummaryFragment, Customer, CustomerPortal, Entitlement, EnumEntitlement, GetBooleanEntitlement, GetCheckoutStateResults, GetEnumEntitlement, GetMeteredEntitlement, GetNumericEntitlement, GetSubscriptionsResult, MeteredEntitlement, NumericEntitlement, PaymentSessionFragment, Paywall, SlimSubscriptionFragmentV2Fragment, Subscription, SubscriptionInvoicePreviewFragment, SubscriptionPreview, SubscriptionPreviewV2, UsageHistoryPoint, UsageHistoryV2Fragment } from './models';
3
3
  export declare class OfflineStigg extends Stigg {
4
4
  getBooleanEntitlement({ featureId, options }: GetBooleanEntitlement): BooleanEntitlement;
5
5
  getMeteredEntitlement({ featureId, options }: GetMeteredEntitlement): MeteredEntitlement;
@@ -36,5 +36,6 @@ export declare class OfflineStigg extends Stigg {
36
36
  getCustomer(): Promise<Customer>;
37
37
  getCreditBalance(): Promise<CreditsBalanceSummaryFragment>;
38
38
  getCreditGrants(): Promise<CreditGrantFragment[]>;
39
+ getCreditLedger(): Promise<CreditLedgerFragment[]>;
39
40
  createPaymentSession(): Promise<PaymentSessionFragment>;
40
41
  }
@@ -1,9 +1,10 @@
1
1
  import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
2
- import { CreditBalanceSummaryInput, GetCreditBalanceQuery, GetCreditGrantsInput, GetCreditGrantsQuery } from '@stigg/api-client-js/src/generated/sdk';
2
+ import { CreditBalanceSummaryInput, CreditLedgerInput, GetCreditBalanceQuery, GetCreditGrantsInput, GetCreditGrantsQuery, GetCreditLedgerQuery } from '@stigg/api-client-js/src/generated/sdk';
3
3
  declare class CreditsApi {
4
4
  private readonly client;
5
5
  constructor(client: ApolloClient<NormalizedCacheObject>);
6
6
  getCreditBalance(input: CreditBalanceSummaryInput): Promise<import("@apollo/client/core").ApolloQueryResult<GetCreditBalanceQuery>>;
7
7
  getCreditGrants(input: GetCreditGrantsInput): Promise<import("@apollo/client/core").ApolloQueryResult<GetCreditGrantsQuery>>;
8
+ getCreditLedger(input: CreditLedgerInput): Promise<import("@apollo/client/core").ApolloQueryResult<GetCreditLedgerQuery>>;
8
9
  }
9
10
  export default CreditsApi;
@@ -1,6 +1,6 @@
1
- import { CreditGrantFragment, CreditsBalanceSummaryFragment, GetCreditGrantsInput, PaymentSessionFragment, SlimSubscriptionFragmentV2Fragment, SubscriptionInvoicePreviewFragment, UsageHistoryV2Fragment, UsageHistoryV2Input } from '@stigg/api-client-js/src/generated/sdk';
1
+ import { CreditGrantFragment, CreditLedgerFragment, CreditsBalanceSummaryFragment, PaymentSessionFragment, SlimSubscriptionFragmentV2Fragment, SubscriptionInvoicePreviewFragment, UsageHistoryV2Fragment, UsageHistoryV2Input } from '@stigg/api-client-js/src/generated/sdk';
2
2
  import { ClientConfiguration } from './configuration';
3
- import { ApplySubscription, ApplySubscriptionResults, BooleanEntitlement, Coupon, Customer, CustomerPortal, Entitlement, EstimateSubscription, EstimateSubscriptionUpdate, FetchUsageHistory, GetActiveSubscriptions, GetBooleanEntitlement, GetCheckoutStateResults, GetCheckoutState, GetCustomerPortal, GetMeteredEntitlement, GetNumericEntitlement, GetPaywall, GetSubscription, MeteredEntitlement, NumericEntitlement, Paywall, PreviewSubscription, Subscription, SubscriptionPreview, SubscriptionPreviewV2, UsageHistoryPoint, WaitForCheckoutCompleted, PreviewNextInvoice, GetSubscriptionsParams, GetSubscriptionsResult, EnumEntitlement, GetEnumEntitlement, CreatePaymentSessionInput, GetCreditBalanceInput } from './models';
3
+ import { ApplySubscription, ApplySubscriptionResults, BooleanEntitlement, Coupon, Customer, CustomerPortal, Entitlement, EstimateSubscription, EstimateSubscriptionUpdate, FetchUsageHistory, GetActiveSubscriptions, GetBooleanEntitlement, GetCheckoutStateResults, GetCheckoutState, GetCustomerPortal, GetMeteredEntitlement, GetNumericEntitlement, GetPaywall, GetSubscription, MeteredEntitlement, NumericEntitlement, Paywall, PreviewSubscription, Subscription, SubscriptionPreview, SubscriptionPreviewV2, UsageHistoryPoint, WaitForCheckoutCompleted, PreviewNextInvoice, GetSubscriptionsParams, GetSubscriptionsResult, EnumEntitlement, GetEnumEntitlement, CreatePaymentSessionInput, GetCreditBalanceInput, GetCreditGrantsInput, GetCreditLedgerInput } from './models';
4
4
  import { EventNames, Events } from './services/eventEmitter';
5
5
  import { LoggerService } from './services/loggerService';
6
6
  export interface StiggClient {
@@ -39,6 +39,7 @@ export interface StiggClient {
39
39
  getUsageHistoryV2(input: UsageHistoryV2Input): Promise<UsageHistoryV2Fragment>;
40
40
  getCreditBalance(input?: GetCreditBalanceInput): Promise<CreditsBalanceSummaryFragment>;
41
41
  getCreditGrants(input: GetCreditGrantsInput): Promise<CreditGrantFragment[]>;
42
+ getCreditLedger(input?: GetCreditLedgerInput): Promise<CreditLedgerFragment[]>;
42
43
  createPaymentSession(input: CreatePaymentSessionInput): Promise<PaymentSessionFragment>;
43
44
  }
44
45
  export declare class Stigg implements StiggClient {
@@ -256,6 +257,12 @@ export declare class Stigg implements StiggClient {
256
257
  * @param input - the input for the credit grants
257
258
  */
258
259
  getCreditGrants(input: GetCreditGrantsInput): Promise<CreditGrantFragment[]>;
260
+ /**
261
+ * Get credit ledger
262
+ * @return {Promise<CreditLedgerFragment[]>} the credit ledger data
263
+ * @param input - the input for the credit ledger
264
+ */
265
+ getCreditLedger(input?: GetCreditLedgerInput): Promise<CreditLedgerFragment[]>;
259
266
  /**
260
267
  * Create payment session
261
268
  * @return {Promise<PaymentSessionFragment>} the payment session data
@@ -1,4 +1,4 @@
1
- import { BillingModel, BillingPeriod, Currency, PricingType, PromotionalEntitlementStatus, SubscriptionStatus, SubscriptionQueryFragment, TrialPeriodUnits, ExperimentGroupType, CustomerPortalEntitlementFragment, CustomerPortalPromotionalEntitlementFragment, CustomerPortalSubscriptionFragment, CustomerPortalSubscriptionAddonFragment, CustomerPortalBillingInformationFragment, PaywallConfigurationFragment, CustomerPortalConfigurationFragment, WidgetType, CustomerPortalSubscriptionScheduledUpdateDataFragment, DiscountType, DiscountDurationType, PackageEntitlementFragment, PageInfoFragment, PaywallCurrencyFragment, FeatureType, MeterType, EntitlementResetPeriod, AccessDeniedReason, PaywallCalculatedPricePointsFragment, SubscriptionInvoiceFragment, PaymentCollection, PlanFragment, BillingVendorIdentifier, TiersMode, SubscriptionFutureUpdateDataFragment, PriceTierFragment, TotalPriceFragment, CheckoutConfigurationFragment, TypographyConfigurationFragment, BillingAddress, ScheduleStrategy, PaymentCollectionMethod, BudgetConfigurationInput, SubscriptionProrationBehavior, PaymentSessionInput, CreditBalanceSummaryInput, StripeCheckoutCredentialsFragment, ZuoraCheckoutCredentialsFragment } from '@stigg/api-client-js/src/generated/sdk';
1
+ import { BillingModel, BillingPeriod, Currency, PricingType, PromotionalEntitlementStatus, SubscriptionStatus, SubscriptionQueryFragment, TrialPeriodUnits, ExperimentGroupType, CustomerPortalEntitlementFragment, CustomerPortalPromotionalEntitlementFragment, CustomerPortalSubscriptionFragment, CustomerPortalSubscriptionAddonFragment, CustomerPortalBillingInformationFragment, PaywallConfigurationFragment, CustomerPortalConfigurationFragment, WidgetType, CustomerPortalSubscriptionScheduledUpdateDataFragment, DiscountType, DiscountDurationType, PackageEntitlementFragment, PageInfoFragment, PaywallCurrencyFragment, FeatureType, MeterType, EntitlementResetPeriod, AccessDeniedReason, PaywallCalculatedPricePointsFragment, SubscriptionInvoiceFragment, PaymentCollection, PlanFragment, BillingVendorIdentifier, TiersMode, SubscriptionFutureUpdateDataFragment, PriceTierFragment, TotalPriceFragment, CheckoutConfigurationFragment, TypographyConfigurationFragment, BillingAddress, ScheduleStrategy, PaymentCollectionMethod, BudgetConfigurationInput, SubscriptionProrationBehavior, PaymentSessionInput, CreditBalanceSummaryInput, StripeCheckoutCredentialsFragment, ZuoraCheckoutCredentialsFragment, GetCreditGrantsInput as GetCreditGrantsInputGenerated, CreditLedgerInput } from '@stigg/api-client-js/src/generated/sdk';
2
2
  export * from '@stigg/api-client-js/src/generated/sdk';
3
3
  interface Metadata {
4
4
  [key: string]: string;
@@ -596,6 +596,8 @@ export declare type BillableFeature = {
596
596
  quantity: number;
597
597
  };
598
598
  export declare type GetCreditBalanceInput = Omit<CreditBalanceSummaryInput, 'customerId' | 'resourceId'>;
599
+ export declare type GetCreditGrantsInput = Omit<GetCreditGrantsInputGenerated, 'customerId' | 'resourceId'>;
600
+ export declare type GetCreditLedgerInput = Omit<CreditLedgerInput, 'customerId' | 'resourceId'>;
599
601
  /** @hidden */
600
602
  export declare class CustomerModel implements Customer {
601
603
  id: string;
@@ -1,5 +1,5 @@
1
1
  import { Stigg, StiggClient } from './clients';
2
- import { ApplySubscriptionResults, BooleanEntitlement, Coupon, CreditGrantFragment, CreditsBalanceSummaryFragment, Customer, CustomerPortal, Entitlement, EnumEntitlement, GetBooleanEntitlement, GetCheckoutStateResults, GetEnumEntitlement, GetMeteredEntitlement, GetNumericEntitlement, GetSubscriptionsResult, MeteredEntitlement, NumericEntitlement, PaymentSessionFragment, Paywall, SlimSubscriptionFragmentV2Fragment, Subscription, SubscriptionInvoicePreviewFragment, SubscriptionPreview, SubscriptionPreviewV2, UsageHistoryPoint, UsageHistoryV2Fragment } from './models';
2
+ import { ApplySubscriptionResults, BooleanEntitlement, Coupon, CreditGrantFragment, CreditLedgerFragment, CreditsBalanceSummaryFragment, Customer, CustomerPortal, Entitlement, EnumEntitlement, GetBooleanEntitlement, GetCheckoutStateResults, GetEnumEntitlement, GetMeteredEntitlement, GetNumericEntitlement, GetSubscriptionsResult, MeteredEntitlement, NumericEntitlement, PaymentSessionFragment, Paywall, SlimSubscriptionFragmentV2Fragment, Subscription, SubscriptionInvoicePreviewFragment, SubscriptionPreview, SubscriptionPreviewV2, UsageHistoryPoint, UsageHistoryV2Fragment } from './models';
3
3
  export declare class OfflineStigg extends Stigg {
4
4
  getBooleanEntitlement({ featureId, options }: GetBooleanEntitlement): BooleanEntitlement;
5
5
  getMeteredEntitlement({ featureId, options }: GetMeteredEntitlement): MeteredEntitlement;
@@ -36,5 +36,6 @@ export declare class OfflineStigg extends Stigg {
36
36
  getCustomer(): Promise<Customer>;
37
37
  getCreditBalance(): Promise<CreditsBalanceSummaryFragment>;
38
38
  getCreditGrants(): Promise<CreditGrantFragment[]>;
39
+ getCreditLedger(): Promise<CreditLedgerFragment[]>;
39
40
  createPaymentSession(): Promise<PaymentSessionFragment>;
40
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stigg/js-client-sdk",
3
- "version": "3.63.0",
3
+ "version": "3.64.0",
4
4
  "description": "Stigg client-side SDK for Browser",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -36,7 +36,7 @@
36
36
  "dependencies": {
37
37
  "@apollo/client": "^3.4.17",
38
38
  "@sentry/browser": "^7.11.1",
39
- "@stigg/api-client-js": "3.84.1",
39
+ "@stigg/api-client-js": "3.88.0",
40
40
  "cross-fetch": "^3.1.6",
41
41
  "dayjs": "^1.11.13",
42
42
  "fetch-retry": "^5.0.6",