@openmeter/sdk 1.0.0-beta.223 → 1.0.0-beta.224
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/biome.json +67 -0
- package/dist/cjs/src/client/addons.d.cts +8 -8
- package/dist/cjs/src/client/addons.js.map +1 -1
- package/dist/cjs/src/client/apps.d.cts +10 -10
- package/dist/cjs/src/client/apps.js.map +1 -1
- package/dist/cjs/src/client/billing.d.cts +19 -19
- package/dist/cjs/src/client/billing.js.map +1 -1
- package/dist/cjs/src/client/common.d.cts +3 -3
- package/dist/cjs/src/client/common.js.map +1 -1
- package/dist/cjs/src/client/customers.d.cts +25 -24
- package/dist/cjs/src/client/customers.js.map +1 -1
- package/dist/cjs/src/client/debug.d.cts +2 -2
- package/dist/cjs/src/client/debug.js.map +1 -1
- package/dist/cjs/src/client/entitlements.d.cts +15 -13
- package/dist/cjs/src/client/entitlements.js.map +1 -1
- package/dist/cjs/src/client/events.d.cts +4 -4
- package/dist/cjs/src/client/events.js.map +1 -1
- package/dist/cjs/src/client/features.d.cts +3 -3
- package/dist/cjs/src/client/features.js.map +1 -1
- package/dist/cjs/src/client/index.cjs +1 -1
- package/dist/cjs/src/client/index.d.cts +2 -2
- package/dist/cjs/src/client/index.js.map +1 -1
- package/dist/cjs/src/client/info.d.cts +3 -3
- package/dist/cjs/src/client/info.js.map +1 -1
- package/dist/cjs/src/client/meters.d.cts +5 -5
- package/dist/cjs/src/client/meters.js.map +1 -1
- package/dist/cjs/src/client/notifications.d.cts +11 -11
- package/dist/cjs/src/client/notifications.js.map +1 -1
- package/dist/cjs/src/client/plans.d.cts +12 -12
- package/dist/cjs/src/client/plans.js.map +1 -1
- package/dist/cjs/src/client/portal.d.cts +4 -4
- package/dist/cjs/src/client/portal.js.map +1 -1
- package/dist/cjs/src/client/schemas.d.cts +299 -13
- package/dist/cjs/src/client/subjects.d.cts +4 -4
- package/dist/cjs/src/client/subjects.js.map +1 -1
- package/dist/cjs/src/client/subscription-addons.d.cts +5 -5
- package/dist/cjs/src/client/subscription-addons.js.map +1 -1
- package/dist/cjs/src/client/subscriptions.d.cts +8 -8
- package/dist/cjs/src/client/subscriptions.js.map +1 -1
- package/dist/cjs/src/client/utils.cjs +1 -3
- package/dist/cjs/src/client/utils.d.cts +1 -1
- package/dist/cjs/src/client/utils.js.map +1 -1
- package/dist/cjs/src/portal/index.d.cts +1 -1
- package/dist/cjs/src/portal/index.js.map +1 -1
- package/dist/cjs/src/zod/index.cjs +876 -615
- package/dist/cjs/src/zod/index.d.cts +906 -599
- package/dist/cjs/src/zod/index.js.map +1 -1
- package/dist/cjs/tsconfig.041f8f6a.tsbuildinfo +1 -0
- package/dist/cjs/tsconfig.c55e75d7.tsbuildinfo +1 -0
- package/dist/src/client/addons.d.ts +8 -8
- package/dist/src/client/addons.js.map +1 -1
- package/dist/src/client/apps.d.ts +10 -10
- package/dist/src/client/apps.js.map +1 -1
- package/dist/src/client/billing.d.ts +19 -19
- package/dist/src/client/billing.js.map +1 -1
- package/dist/src/client/common.d.ts +3 -3
- package/dist/src/client/common.js.map +1 -1
- package/dist/src/client/customers.d.ts +25 -24
- package/dist/src/client/customers.js.map +1 -1
- package/dist/src/client/debug.d.ts +2 -2
- package/dist/src/client/debug.js.map +1 -1
- package/dist/src/client/entitlements.d.ts +15 -13
- package/dist/src/client/entitlements.js.map +1 -1
- package/dist/src/client/events.d.ts +4 -4
- package/dist/src/client/events.js.map +1 -1
- package/dist/src/client/features.d.ts +3 -3
- package/dist/src/client/features.js.map +1 -1
- package/dist/src/client/index.d.ts +2 -2
- package/dist/src/client/index.js +1 -1
- package/dist/src/client/index.js.map +1 -1
- package/dist/src/client/info.d.ts +3 -3
- package/dist/src/client/info.js.map +1 -1
- package/dist/src/client/meters.d.ts +5 -5
- package/dist/src/client/meters.js.map +1 -1
- package/dist/src/client/notifications.d.ts +11 -11
- package/dist/src/client/notifications.js.map +1 -1
- package/dist/src/client/plans.d.ts +12 -12
- package/dist/src/client/plans.js.map +1 -1
- package/dist/src/client/portal.d.ts +4 -4
- package/dist/src/client/portal.js.map +1 -1
- package/dist/src/client/schemas.d.ts +299 -13
- package/dist/src/client/subjects.d.ts +4 -4
- package/dist/src/client/subjects.js.map +1 -1
- package/dist/src/client/subscription-addons.d.ts +5 -5
- package/dist/src/client/subscription-addons.js.map +1 -1
- package/dist/src/client/subscriptions.d.ts +8 -8
- package/dist/src/client/subscriptions.js.map +1 -1
- package/dist/src/client/utils.d.ts +1 -1
- package/dist/src/client/utils.js +1 -3
- package/dist/src/client/utils.js.map +1 -1
- package/dist/src/portal/index.d.ts +1 -1
- package/dist/src/portal/index.js.map +1 -1
- package/dist/src/zod/index.d.ts +906 -599
- package/dist/src/zod/index.js +795 -536
- package/dist/src/zod/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/orval.config.ts +2 -6
- package/package.json +21 -35
- package/dist/cjs/tsconfig.07c9b9a6.tsbuildinfo +0 -1
- package/dist/cjs/tsconfig.5c5dbdc6.tsbuildinfo +0 -1
|
@@ -2121,6 +2121,7 @@ export interface paths {
|
|
|
2121
2121
|
put?: never;
|
|
2122
2122
|
/**
|
|
2123
2123
|
* Restore subscription
|
|
2124
|
+
* @deprecated
|
|
2124
2125
|
* @description Restores a canceled subscription.
|
|
2125
2126
|
* Any subscription scheduled to start later will be deleted and this subscription will be continued indefinitely.
|
|
2126
2127
|
*/
|
|
@@ -4640,6 +4641,13 @@ export interface components {
|
|
|
4640
4641
|
voidedAt?: Date;
|
|
4641
4642
|
/** @description The recurrence period of the grant. */
|
|
4642
4643
|
recurrence?: components['schemas']['RecurringPeriod'];
|
|
4644
|
+
/**
|
|
4645
|
+
* @description Grant annotations
|
|
4646
|
+
* @example {
|
|
4647
|
+
* "issueAfterReset": true
|
|
4648
|
+
* }
|
|
4649
|
+
*/
|
|
4650
|
+
annotations?: components['schemas']['Annotations'];
|
|
4643
4651
|
};
|
|
4644
4652
|
/** @description The grant creation input. */
|
|
4645
4653
|
EntitlementGrantCreateInput: {
|
|
@@ -4694,6 +4702,173 @@ export interface components {
|
|
|
4694
4702
|
/** @description The subject of the grant. */
|
|
4695
4703
|
recurrence?: components['schemas']['RecurringPeriodCreateInput'];
|
|
4696
4704
|
};
|
|
4705
|
+
/** @description The grant creation input. */
|
|
4706
|
+
EntitlementGrantCreateInputV2: {
|
|
4707
|
+
/**
|
|
4708
|
+
* Format: double
|
|
4709
|
+
* @description The amount to grant. Should be a positive number.
|
|
4710
|
+
* @example 100
|
|
4711
|
+
*/
|
|
4712
|
+
amount: number;
|
|
4713
|
+
/**
|
|
4714
|
+
* Format: uint8
|
|
4715
|
+
* @description The priority of the grant. Grants with higher priority are applied first.
|
|
4716
|
+
* Priority is a positive decimal numbers. With lower numbers indicating higher importance.
|
|
4717
|
+
* For example, a priority of 1 is more urgent than a priority of 2.
|
|
4718
|
+
* When there are several grants available for the same subject, the system selects the grant with the highest priority.
|
|
4719
|
+
* In cases where grants share the same priority level, the grant closest to its expiration will be used first.
|
|
4720
|
+
* In the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first.
|
|
4721
|
+
* @example 1
|
|
4722
|
+
*/
|
|
4723
|
+
priority?: number;
|
|
4724
|
+
/**
|
|
4725
|
+
* Format: date-time
|
|
4726
|
+
* @description Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).
|
|
4727
|
+
* @example 2023-01-01T01:01:01.001Z
|
|
4728
|
+
*/
|
|
4729
|
+
effectiveAt: Date;
|
|
4730
|
+
/**
|
|
4731
|
+
* Format: double
|
|
4732
|
+
* @description Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.
|
|
4733
|
+
* Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))
|
|
4734
|
+
* @default 0
|
|
4735
|
+
* @example 100
|
|
4736
|
+
*/
|
|
4737
|
+
minRolloverAmount?: number;
|
|
4738
|
+
/**
|
|
4739
|
+
* @description The grant metadata.
|
|
4740
|
+
* @example {
|
|
4741
|
+
* "stripePaymentId": "pi_4OrAkhLvyihio9p51h9iiFnB"
|
|
4742
|
+
* }
|
|
4743
|
+
*/
|
|
4744
|
+
metadata?: components['schemas']['Metadata'];
|
|
4745
|
+
/** @description The subject of the grant. */
|
|
4746
|
+
recurrence?: components['schemas']['RecurringPeriodCreateInput'];
|
|
4747
|
+
/**
|
|
4748
|
+
* Format: double
|
|
4749
|
+
* @description Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. The default value equals grant amount.
|
|
4750
|
+
* Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))
|
|
4751
|
+
* @example 100
|
|
4752
|
+
*/
|
|
4753
|
+
maxRolloverAmount?: number;
|
|
4754
|
+
/** @description The grant expiration definition. If no expiration is provided, the grant can be active indefinitely. */
|
|
4755
|
+
expiration?: components['schemas']['ExpirationPeriod'];
|
|
4756
|
+
/**
|
|
4757
|
+
* @description Grant annotations
|
|
4758
|
+
* @example {
|
|
4759
|
+
* "internal_reference": "internal_reference"
|
|
4760
|
+
* }
|
|
4761
|
+
*/
|
|
4762
|
+
annotations?: components['schemas']['Annotations'];
|
|
4763
|
+
};
|
|
4764
|
+
/** @description The grant. */
|
|
4765
|
+
EntitlementGrantV2: {
|
|
4766
|
+
/**
|
|
4767
|
+
* Creation Time
|
|
4768
|
+
* Format: date-time
|
|
4769
|
+
* @description Timestamp of when the resource was created.
|
|
4770
|
+
* @example 2024-01-01T01:01:01.001Z
|
|
4771
|
+
*/
|
|
4772
|
+
readonly createdAt: Date;
|
|
4773
|
+
/**
|
|
4774
|
+
* Last Update Time
|
|
4775
|
+
* Format: date-time
|
|
4776
|
+
* @description Timestamp of when the resource was last updated.
|
|
4777
|
+
* @example 2024-01-01T01:01:01.001Z
|
|
4778
|
+
*/
|
|
4779
|
+
readonly updatedAt: Date;
|
|
4780
|
+
/**
|
|
4781
|
+
* Deletion Time
|
|
4782
|
+
* Format: date-time
|
|
4783
|
+
* @description Timestamp of when the resource was permanently deleted.
|
|
4784
|
+
* @example 2024-01-01T01:01:01.001Z
|
|
4785
|
+
*/
|
|
4786
|
+
readonly deletedAt?: Date;
|
|
4787
|
+
/**
|
|
4788
|
+
* Format: double
|
|
4789
|
+
* @description The amount to grant. Should be a positive number.
|
|
4790
|
+
* @example 100
|
|
4791
|
+
*/
|
|
4792
|
+
amount: number;
|
|
4793
|
+
/**
|
|
4794
|
+
* Format: uint8
|
|
4795
|
+
* @description The priority of the grant. Grants with higher priority are applied first.
|
|
4796
|
+
* Priority is a positive decimal numbers. With lower numbers indicating higher importance.
|
|
4797
|
+
* For example, a priority of 1 is more urgent than a priority of 2.
|
|
4798
|
+
* When there are several grants available for the same subject, the system selects the grant with the highest priority.
|
|
4799
|
+
* In cases where grants share the same priority level, the grant closest to its expiration will be used first.
|
|
4800
|
+
* In the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first.
|
|
4801
|
+
* @example 1
|
|
4802
|
+
*/
|
|
4803
|
+
priority?: number;
|
|
4804
|
+
/**
|
|
4805
|
+
* Format: date-time
|
|
4806
|
+
* @description Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).
|
|
4807
|
+
* @example 2023-01-01T01:01:01.001Z
|
|
4808
|
+
*/
|
|
4809
|
+
effectiveAt: Date;
|
|
4810
|
+
/**
|
|
4811
|
+
* Format: double
|
|
4812
|
+
* @description Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.
|
|
4813
|
+
* Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))
|
|
4814
|
+
* @default 0
|
|
4815
|
+
* @example 100
|
|
4816
|
+
*/
|
|
4817
|
+
minRolloverAmount?: number;
|
|
4818
|
+
/**
|
|
4819
|
+
* @description The grant metadata.
|
|
4820
|
+
* @example {
|
|
4821
|
+
* "stripePaymentId": "pi_4OrAkhLvyihio9p51h9iiFnB"
|
|
4822
|
+
* }
|
|
4823
|
+
*/
|
|
4824
|
+
metadata?: components['schemas']['Metadata'];
|
|
4825
|
+
/**
|
|
4826
|
+
* Format: double
|
|
4827
|
+
* @description Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. The default value equals grant amount.
|
|
4828
|
+
* Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))
|
|
4829
|
+
* @example 100
|
|
4830
|
+
*/
|
|
4831
|
+
maxRolloverAmount?: number;
|
|
4832
|
+
/** @description The grant expiration definition. If no expiration is provided, the grant can be active indefinitely. */
|
|
4833
|
+
expiration?: components['schemas']['ExpirationPeriod'];
|
|
4834
|
+
/**
|
|
4835
|
+
* @description Grant annotations
|
|
4836
|
+
* @example {
|
|
4837
|
+
* "internal_reference": "internal_reference"
|
|
4838
|
+
* }
|
|
4839
|
+
*/
|
|
4840
|
+
annotations?: components['schemas']['Annotations'];
|
|
4841
|
+
/**
|
|
4842
|
+
* @description Readonly unique ULID identifier.
|
|
4843
|
+
* @example 01ARZ3NDEKTSV4RRFFQ69G5FAV
|
|
4844
|
+
*/
|
|
4845
|
+
readonly id: string;
|
|
4846
|
+
/**
|
|
4847
|
+
* @description The unique entitlement ULID that the grant is associated with.
|
|
4848
|
+
* @example 01ARZ3NDEKTSV4RRFFQ69G5FAV
|
|
4849
|
+
*/
|
|
4850
|
+
readonly entitlementId: string;
|
|
4851
|
+
/**
|
|
4852
|
+
* Format: date-time
|
|
4853
|
+
* @description The next time the grant will recurr.
|
|
4854
|
+
* @example 2023-01-01T01:01:01.001Z
|
|
4855
|
+
*/
|
|
4856
|
+
nextRecurrence?: Date;
|
|
4857
|
+
/**
|
|
4858
|
+
* Format: date-time
|
|
4859
|
+
* @description The time the grant expires.
|
|
4860
|
+
* @example 2023-01-01T01:01:01.001Z
|
|
4861
|
+
*/
|
|
4862
|
+
readonly expiresAt?: Date;
|
|
4863
|
+
/**
|
|
4864
|
+
* Format: date-time
|
|
4865
|
+
* @description The time the grant was voided.
|
|
4866
|
+
* @example 2023-01-01T01:01:01.001Z
|
|
4867
|
+
*/
|
|
4868
|
+
voidedAt?: Date;
|
|
4869
|
+
/** @description The recurrence period of the grant. */
|
|
4870
|
+
recurrence?: components['schemas']['RecurringPeriod'];
|
|
4871
|
+
};
|
|
4697
4872
|
/** @description Metered entitlements are useful for many different use cases, from setting up usage based access to implementing complex credit systems.
|
|
4698
4873
|
* Access is determined based on feature usage using a balance calculation (the "usage allowance" provided by the issued grants is "burnt down" by the usage). */
|
|
4699
4874
|
EntitlementMetered: {
|
|
@@ -4891,14 +5066,15 @@ export interface components {
|
|
|
4891
5066
|
*/
|
|
4892
5067
|
isSoftLimit?: boolean;
|
|
4893
5068
|
/**
|
|
4894
|
-
*
|
|
4895
|
-
* @description
|
|
5069
|
+
* Preserve overage at reset
|
|
5070
|
+
* @description If true, the overage is preserved at reset. If false, the usage is reset to 0.
|
|
4896
5071
|
* @default false
|
|
4897
5072
|
*/
|
|
4898
|
-
|
|
5073
|
+
preserveOverageAtReset?: boolean;
|
|
4899
5074
|
/**
|
|
4900
5075
|
* Initial grant amount
|
|
4901
5076
|
* Format: double
|
|
5077
|
+
* @deprecated
|
|
4902
5078
|
* @description You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.
|
|
4903
5079
|
* If an amount is specified here, a grant will be created alongside the entitlement with the specified amount.
|
|
4904
5080
|
* That grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.
|
|
@@ -4908,16 +5084,16 @@ export interface components {
|
|
|
4908
5084
|
/**
|
|
4909
5085
|
* Issue grant after reset priority
|
|
4910
5086
|
* Format: uint8
|
|
5087
|
+
* @deprecated
|
|
4911
5088
|
* @description Defines the grant priority for the default grant.
|
|
4912
5089
|
* @default 1
|
|
4913
5090
|
*/
|
|
4914
5091
|
issueAfterResetPriority?: number;
|
|
4915
5092
|
/**
|
|
4916
|
-
*
|
|
4917
|
-
* @description
|
|
4918
|
-
* @default false
|
|
5093
|
+
* Issue after reset
|
|
5094
|
+
* @description Issue after reset
|
|
4919
5095
|
*/
|
|
4920
|
-
|
|
5096
|
+
issue?: components['schemas']['IssueAfterReset'];
|
|
4921
5097
|
/**
|
|
4922
5098
|
* Creation Time
|
|
4923
5099
|
* Format: date-time
|
|
@@ -5002,6 +5178,72 @@ export interface components {
|
|
|
5002
5178
|
*/
|
|
5003
5179
|
customerId: string;
|
|
5004
5180
|
};
|
|
5181
|
+
/** @description Create inputs for metered entitlement */
|
|
5182
|
+
EntitlementMeteredV2CreateInputs: {
|
|
5183
|
+
/**
|
|
5184
|
+
* @description The feature the subject is entitled to use.
|
|
5185
|
+
* Either featureKey or featureId is required.
|
|
5186
|
+
* @example example-feature-key
|
|
5187
|
+
*/
|
|
5188
|
+
featureKey?: string;
|
|
5189
|
+
/**
|
|
5190
|
+
* @description The feature the subject is entitled to use.
|
|
5191
|
+
* Either featureKey or featureId is required.
|
|
5192
|
+
* @example 01ARZ3NDEKTSV4RRFFQ69G5FAV
|
|
5193
|
+
*/
|
|
5194
|
+
featureId?: string;
|
|
5195
|
+
/** @description Additional metadata for the feature. */
|
|
5196
|
+
metadata?: components['schemas']['Metadata'];
|
|
5197
|
+
/**
|
|
5198
|
+
* @description discriminator enum property added by openapi-typescript
|
|
5199
|
+
* @enum {string}
|
|
5200
|
+
*/
|
|
5201
|
+
type: 'metered';
|
|
5202
|
+
/**
|
|
5203
|
+
* Soft limit
|
|
5204
|
+
* @description If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.
|
|
5205
|
+
* @default false
|
|
5206
|
+
*/
|
|
5207
|
+
isSoftLimit?: boolean;
|
|
5208
|
+
/** @description The usage period associated with the entitlement. */
|
|
5209
|
+
usagePeriod: components['schemas']['RecurringPeriodCreateInput'];
|
|
5210
|
+
/** @description Defines the time from which usage is measured. If not specified on creation, defaults to entitlement creation time. */
|
|
5211
|
+
measureUsageFrom?: components['schemas']['MeasureUsageFrom'];
|
|
5212
|
+
/**
|
|
5213
|
+
* Preserve overage at reset
|
|
5214
|
+
* @description If true, the overage is preserved at reset. If false, the usage is reset to 0.
|
|
5215
|
+
* @default false
|
|
5216
|
+
*/
|
|
5217
|
+
preserveOverageAtReset?: boolean;
|
|
5218
|
+
/**
|
|
5219
|
+
* Initial grant amount
|
|
5220
|
+
* Format: double
|
|
5221
|
+
* @deprecated
|
|
5222
|
+
* @description You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.
|
|
5223
|
+
* If an amount is specified here, a grant will be created alongside the entitlement with the specified amount.
|
|
5224
|
+
* That grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.
|
|
5225
|
+
* Manually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.
|
|
5226
|
+
*/
|
|
5227
|
+
issueAfterReset?: number;
|
|
5228
|
+
/**
|
|
5229
|
+
* Issue grant after reset priority
|
|
5230
|
+
* Format: uint8
|
|
5231
|
+
* @deprecated
|
|
5232
|
+
* @description Defines the grant priority for the default grant.
|
|
5233
|
+
* @default 1
|
|
5234
|
+
*/
|
|
5235
|
+
issueAfterResetPriority?: number;
|
|
5236
|
+
/**
|
|
5237
|
+
* Issue after reset
|
|
5238
|
+
* @description Issue after reset
|
|
5239
|
+
*/
|
|
5240
|
+
issue?: components['schemas']['IssueAfterReset'];
|
|
5241
|
+
/**
|
|
5242
|
+
* Grants
|
|
5243
|
+
* @description Grants
|
|
5244
|
+
*/
|
|
5245
|
+
grants?: components['schemas']['EntitlementGrantCreateInputV2'][];
|
|
5246
|
+
};
|
|
5005
5247
|
/**
|
|
5006
5248
|
* @description Order by options for entitlements.
|
|
5007
5249
|
* @enum {string}
|
|
@@ -5231,6 +5473,8 @@ export interface components {
|
|
|
5231
5473
|
/** @description Entitlement templates are used to define the entitlements of a plan.
|
|
5232
5474
|
* Features are omitted from the entitlement template, as they are defined in the rate card. */
|
|
5233
5475
|
EntitlementV2: components['schemas']['EntitlementMeteredV2'] | components['schemas']['EntitlementStaticV2'] | components['schemas']['EntitlementBooleanV2'];
|
|
5476
|
+
/** @description Create inputs for entitlement */
|
|
5477
|
+
EntitlementV2CreateInputs: components['schemas']['EntitlementMeteredV2CreateInputs'] | components['schemas']['EntitlementStaticCreateInputs'] | components['schemas']['EntitlementBooleanCreateInputs'];
|
|
5234
5478
|
/** @description Paginated response */
|
|
5235
5479
|
EntitlementV2PaginatedResponse: {
|
|
5236
5480
|
/**
|
|
@@ -5696,6 +5940,26 @@ export interface components {
|
|
|
5696
5940
|
*/
|
|
5697
5941
|
usage: number;
|
|
5698
5942
|
};
|
|
5943
|
+
/** @description Paginated response */
|
|
5944
|
+
GrantV2PaginatedResponse: {
|
|
5945
|
+
/**
|
|
5946
|
+
* @description The total number of items.
|
|
5947
|
+
* @example 500
|
|
5948
|
+
*/
|
|
5949
|
+
totalCount: number;
|
|
5950
|
+
/**
|
|
5951
|
+
* @description The page index.
|
|
5952
|
+
* @example 1
|
|
5953
|
+
*/
|
|
5954
|
+
page: number;
|
|
5955
|
+
/**
|
|
5956
|
+
* @description The maximum number of items per page.
|
|
5957
|
+
* @example 100
|
|
5958
|
+
*/
|
|
5959
|
+
pageSize: number;
|
|
5960
|
+
/** @description The items in the current page. */
|
|
5961
|
+
items: components['schemas']['EntitlementGrantV2'][];
|
|
5962
|
+
};
|
|
5699
5963
|
/** @description IDResource is a resouce with an ID. */
|
|
5700
5964
|
IDResource: {
|
|
5701
5965
|
/**
|
|
@@ -6804,6 +7068,22 @@ export interface components {
|
|
|
6804
7068
|
/** @description The payment settings for this workflow */
|
|
6805
7069
|
payment: components['schemas']['BillingWorkflowPaymentSettings'];
|
|
6806
7070
|
};
|
|
7071
|
+
/** @description Issue after reset */
|
|
7072
|
+
IssueAfterReset: {
|
|
7073
|
+
/**
|
|
7074
|
+
* Initial grant amount
|
|
7075
|
+
* Format: double
|
|
7076
|
+
* @description The initial grant amount
|
|
7077
|
+
*/
|
|
7078
|
+
amount: number;
|
|
7079
|
+
/**
|
|
7080
|
+
* Issue grant after reset priority
|
|
7081
|
+
* Format: uint8
|
|
7082
|
+
* @description The priority of the issue after reset
|
|
7083
|
+
* @default 1
|
|
7084
|
+
*/
|
|
7085
|
+
priority?: number;
|
|
7086
|
+
};
|
|
6807
7087
|
/** @description List entitlements result */
|
|
6808
7088
|
ListEntitlementsResult: components['schemas']['Entitlement'][] | components['schemas']['EntitlementPaginatedResponse'];
|
|
6809
7089
|
/** @description List features result */
|
|
@@ -11028,9 +11308,12 @@ export type EntitlementBooleanV2 = components['schemas']['EntitlementBooleanV2']
|
|
|
11028
11308
|
export type EntitlementCreateInputs = components['schemas']['EntitlementCreateInputs'];
|
|
11029
11309
|
export type EntitlementGrant = components['schemas']['EntitlementGrant'];
|
|
11030
11310
|
export type EntitlementGrantCreateInput = components['schemas']['EntitlementGrantCreateInput'];
|
|
11311
|
+
export type EntitlementGrantCreateInputV2 = components['schemas']['EntitlementGrantCreateInputV2'];
|
|
11312
|
+
export type EntitlementGrantV2 = components['schemas']['EntitlementGrantV2'];
|
|
11031
11313
|
export type EntitlementMetered = components['schemas']['EntitlementMetered'];
|
|
11032
11314
|
export type EntitlementMeteredCreateInputs = components['schemas']['EntitlementMeteredCreateInputs'];
|
|
11033
11315
|
export type EntitlementMeteredV2 = components['schemas']['EntitlementMeteredV2'];
|
|
11316
|
+
export type EntitlementMeteredV2CreateInputs = components['schemas']['EntitlementMeteredV2CreateInputs'];
|
|
11034
11317
|
export type EntitlementOrderBy = components['schemas']['EntitlementOrderBy'];
|
|
11035
11318
|
export type EntitlementPaginatedResponse = components['schemas']['EntitlementPaginatedResponse'];
|
|
11036
11319
|
export type EntitlementStatic = components['schemas']['EntitlementStatic'];
|
|
@@ -11038,6 +11321,7 @@ export type EntitlementStaticCreateInputs = components['schemas']['EntitlementSt
|
|
|
11038
11321
|
export type EntitlementStaticV2 = components['schemas']['EntitlementStaticV2'];
|
|
11039
11322
|
export type EntitlementType = components['schemas']['EntitlementType'];
|
|
11040
11323
|
export type EntitlementV2 = components['schemas']['EntitlementV2'];
|
|
11324
|
+
export type EntitlementV2CreateInputs = components['schemas']['EntitlementV2CreateInputs'];
|
|
11041
11325
|
export type EntitlementV2PaginatedResponse = components['schemas']['EntitlementV2PaginatedResponse'];
|
|
11042
11326
|
export type EntitlementValue = components['schemas']['EntitlementValue'];
|
|
11043
11327
|
export type Event = components['schemas']['Event'];
|
|
@@ -11059,6 +11343,7 @@ export type GrantBurnDownHistorySegment = components['schemas']['GrantBurnDownHi
|
|
|
11059
11343
|
export type GrantOrderBy = components['schemas']['GrantOrderBy'];
|
|
11060
11344
|
export type GrantPaginatedResponse = components['schemas']['GrantPaginatedResponse'];
|
|
11061
11345
|
export type GrantUsageRecord = components['schemas']['GrantUsageRecord'];
|
|
11346
|
+
export type GrantV2PaginatedResponse = components['schemas']['GrantV2PaginatedResponse'];
|
|
11062
11347
|
export type IdResource = components['schemas']['IDResource'];
|
|
11063
11348
|
export type IngestEventsBody = components['schemas']['IngestEventsBody'];
|
|
11064
11349
|
export type IngestedEvent = components['schemas']['IngestedEvent'];
|
|
@@ -11110,6 +11395,7 @@ export type InvoiceWorkflowInvoicingSettingsReplaceUpdate = components['schemas'
|
|
|
11110
11395
|
export type InvoiceWorkflowReplaceUpdate = components['schemas']['InvoiceWorkflowReplaceUpdate'];
|
|
11111
11396
|
export type InvoiceWorkflowSettings = components['schemas']['InvoiceWorkflowSettings'];
|
|
11112
11397
|
export type InvoiceWorkflowSettingsReplaceUpdate = components['schemas']['InvoiceWorkflowSettingsReplaceUpdate'];
|
|
11398
|
+
export type IssueAfterReset = components['schemas']['IssueAfterReset'];
|
|
11113
11399
|
export type ListEntitlementsResult = components['schemas']['ListEntitlementsResult'];
|
|
11114
11400
|
export type ListFeaturesResult = components['schemas']['ListFeaturesResult'];
|
|
11115
11401
|
export type MarketplaceInstallRequestPayload = components['schemas']['MarketplaceInstallRequestPayload'];
|
|
@@ -24740,7 +25026,7 @@ export interface operations {
|
|
|
24740
25026
|
};
|
|
24741
25027
|
requestBody: {
|
|
24742
25028
|
content: {
|
|
24743
|
-
'application/json': components['schemas']['
|
|
25029
|
+
'application/json': components['schemas']['EntitlementV2CreateInputs'];
|
|
24744
25030
|
};
|
|
24745
25031
|
};
|
|
24746
25032
|
responses: {
|
|
@@ -25055,7 +25341,7 @@ export interface operations {
|
|
|
25055
25341
|
[name: string]: unknown;
|
|
25056
25342
|
};
|
|
25057
25343
|
content: {
|
|
25058
|
-
'application/json': components['schemas']['
|
|
25344
|
+
'application/json': components['schemas']['GrantV2PaginatedResponse'];
|
|
25059
25345
|
};
|
|
25060
25346
|
};
|
|
25061
25347
|
/** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
|
|
@@ -25135,7 +25421,7 @@ export interface operations {
|
|
|
25135
25421
|
};
|
|
25136
25422
|
requestBody: {
|
|
25137
25423
|
content: {
|
|
25138
|
-
'application/json': components['schemas']['
|
|
25424
|
+
'application/json': components['schemas']['EntitlementGrantCreateInputV2'];
|
|
25139
25425
|
};
|
|
25140
25426
|
};
|
|
25141
25427
|
responses: {
|
|
@@ -25145,7 +25431,7 @@ export interface operations {
|
|
|
25145
25431
|
[name: string]: unknown;
|
|
25146
25432
|
};
|
|
25147
25433
|
content: {
|
|
25148
|
-
'application/json': components['schemas']['
|
|
25434
|
+
'application/json': components['schemas']['EntitlementGrantV2'];
|
|
25149
25435
|
};
|
|
25150
25436
|
};
|
|
25151
25437
|
/** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
|
|
@@ -25339,7 +25625,7 @@ export interface operations {
|
|
|
25339
25625
|
};
|
|
25340
25626
|
requestBody: {
|
|
25341
25627
|
content: {
|
|
25342
|
-
'application/json': components['schemas']['
|
|
25628
|
+
'application/json': components['schemas']['EntitlementV2CreateInputs'];
|
|
25343
25629
|
};
|
|
25344
25630
|
};
|
|
25345
25631
|
responses: {
|
|
@@ -25984,7 +26270,7 @@ export interface operations {
|
|
|
25984
26270
|
[name: string]: unknown;
|
|
25985
26271
|
};
|
|
25986
26272
|
content: {
|
|
25987
|
-
'application/json': components['schemas']['
|
|
26273
|
+
'application/json': components['schemas']['GrantV2PaginatedResponse'];
|
|
25988
26274
|
};
|
|
25989
26275
|
};
|
|
25990
26276
|
/** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { Client } from 'openapi-fetch';
|
|
1
2
|
import type { RequestOptions } from './common.cjs';
|
|
2
3
|
import type { operations, paths, SubjectUpsert } from './schemas.cjs';
|
|
3
|
-
import type { Client } from 'openapi-fetch';
|
|
4
4
|
/**
|
|
5
5
|
* Subjects
|
|
6
6
|
* @description Subjects are entities that consume resources you wish to meter. These can range from users, servers, and services to devices. The design of subjects is intentionally generic, enabling flexible application across various metering scenarios. Meters are aggregating events for each subject..
|
|
@@ -29,7 +29,7 @@ export declare class Subjects {
|
|
|
29
29
|
currentPeriodStart?: Date;
|
|
30
30
|
currentPeriodEnd?: Date;
|
|
31
31
|
stripeCustomerId?: string | null;
|
|
32
|
-
}[]>;
|
|
32
|
+
}[] | undefined>;
|
|
33
33
|
/**
|
|
34
34
|
* Get a subject by ID or key
|
|
35
35
|
* @param idOrKey - The ID or key of the subject
|
|
@@ -49,7 +49,7 @@ export declare class Subjects {
|
|
|
49
49
|
currentPeriodStart?: Date;
|
|
50
50
|
currentPeriodEnd?: Date;
|
|
51
51
|
stripeCustomerId?: string | null;
|
|
52
|
-
}>;
|
|
52
|
+
} | undefined>;
|
|
53
53
|
/**
|
|
54
54
|
* List subjects
|
|
55
55
|
* @param signal - An optional abort signal
|
|
@@ -68,7 +68,7 @@ export declare class Subjects {
|
|
|
68
68
|
currentPeriodStart?: Date;
|
|
69
69
|
currentPeriodEnd?: Date;
|
|
70
70
|
stripeCustomerId?: string | null;
|
|
71
|
-
}[]>;
|
|
71
|
+
}[] | undefined>;
|
|
72
72
|
/**
|
|
73
73
|
* Delete a subject by ID or key
|
|
74
74
|
* @param idOrKey - The ID or key of the subject
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subjects.js","sourceRoot":"","sources":["../../../../src/client/subjects.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"subjects.js","sourceRoot":"","sources":["../../../../src/client/subjects.ts"],"names":[],"mappings":";;;AAGA,yCAA8C;AAE9C;;;GAGG;AACH,MAAa,QAAQ;IACC;IAApB,YAAoB,MAA4C;QAA5C,WAAM,GAAN,MAAM,CAAsC;IAAG,CAAC;IAEpE;;;;;;;OAOG;IACI,KAAK,CAAC,MAAM,CACjB,QAAyC,EACzC,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE;YACtD,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;YACrD,GAAG,OAAO;SACX,CAAC,CAAA;QAEF,OAAO,IAAA,4BAAiB,EAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,GAAG,CACd,OAAyE,EACzE,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,mCAAmC,EAAE;YACtE,MAAM,EAAE;gBACN,IAAI,EAAE;oBACJ,cAAc,EAAE,OAAO;iBACxB;aACF;YACD,GAAG,OAAO;SACX,CAAC,CAAA;QAEF,OAAO,IAAA,4BAAiB,EAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,IAAI,CAAC,OAAwB;QACxC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,kBAAkB,EAAE;YACrD,GAAG,OAAO;SACX,CAAC,CAAA;QAEF,OAAO,IAAA,4BAAiB,EAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,MAAM,CACjB,OAA4E,EAC5E,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,mCAAmC,EAAE;YACzE,MAAM,EAAE;gBACN,IAAI,EAAE;oBACJ,cAAc,EAAE,OAAO;iBACxB;aACF;YACD,GAAG,OAAO;SACX,CAAC,CAAA;QAEF,OAAO,IAAA,4BAAiB,EAAC,IAAI,CAAC,CAAA;IAChC,CAAC;CACF;AA/ED,4BA+EC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { Client } from 'openapi-fetch';
|
|
1
2
|
import type { RequestOptions } from './common.cjs';
|
|
2
3
|
import type { operations, paths } from './schemas.cjs';
|
|
3
|
-
import type { Client } from 'openapi-fetch';
|
|
4
4
|
export declare class SubscriptionAddons {
|
|
5
5
|
private client;
|
|
6
6
|
constructor(client: Client<paths, `${string}/${string}`>);
|
|
@@ -32,7 +32,7 @@ export declare class SubscriptionAddons {
|
|
|
32
32
|
readonly timeline: import("./schemas.cjs").components["schemas"]["SubscriptionAddonTimelineSegment"][];
|
|
33
33
|
readonly subscriptionId: string;
|
|
34
34
|
readonly rateCards: import("./schemas.cjs").components["schemas"]["SubscriptionAddonRateCard"][];
|
|
35
|
-
}>;
|
|
35
|
+
} | undefined>;
|
|
36
36
|
/**
|
|
37
37
|
* List all addons of a subscription
|
|
38
38
|
* @param subscriptionId - The ID of the subscription
|
|
@@ -60,7 +60,7 @@ export declare class SubscriptionAddons {
|
|
|
60
60
|
readonly timeline: import("./schemas.cjs").components["schemas"]["SubscriptionAddonTimelineSegment"][];
|
|
61
61
|
readonly subscriptionId: string;
|
|
62
62
|
readonly rateCards: import("./schemas.cjs").components["schemas"]["SubscriptionAddonRateCard"][];
|
|
63
|
-
}[]>;
|
|
63
|
+
}[] | undefined>;
|
|
64
64
|
/**
|
|
65
65
|
* Get a subscription addon by id
|
|
66
66
|
* @param subscriptionId - The ID of the subscription
|
|
@@ -89,7 +89,7 @@ export declare class SubscriptionAddons {
|
|
|
89
89
|
readonly timeline: import("./schemas.cjs").components["schemas"]["SubscriptionAddonTimelineSegment"][];
|
|
90
90
|
readonly subscriptionId: string;
|
|
91
91
|
readonly rateCards: import("./schemas.cjs").components["schemas"]["SubscriptionAddonRateCard"][];
|
|
92
|
-
}>;
|
|
92
|
+
} | undefined>;
|
|
93
93
|
/**
|
|
94
94
|
* Updates a subscription addon
|
|
95
95
|
* @param subscriptionId - The ID of the subscription
|
|
@@ -119,5 +119,5 @@ export declare class SubscriptionAddons {
|
|
|
119
119
|
readonly timeline: import("./schemas.cjs").components["schemas"]["SubscriptionAddonTimelineSegment"][];
|
|
120
120
|
readonly subscriptionId: string;
|
|
121
121
|
readonly rateCards: import("./schemas.cjs").components["schemas"]["SubscriptionAddonRateCard"][];
|
|
122
|
-
}>;
|
|
122
|
+
} | undefined>;
|
|
123
123
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription-addons.js","sourceRoot":"","sources":["../../../../src/client/subscription-addons.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"subscription-addons.js","sourceRoot":"","sources":["../../../../src/client/subscription-addons.ts"],"names":[],"mappings":";;;AAGA,yCAA8C;AAE9C,MAAa,kBAAkB;IACT;IAApB,YAAoB,MAA4C;QAA5C,WAAM,GAAN,MAAM,CAAsC;IAAG,CAAC;IAEpE;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,CACjB,cAAsB,EACtB,KAA0F,EAC1F,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CACjC,+CAA+C,EAC/C;YACE,IAAI,EAAE,KAAK;YACX,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,cAAc,EAAE,EAAE;YACpC,GAAG,OAAO;SACX,CACF,CAAA;QAED,OAAO,IAAA,4BAAiB,EAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,IAAI,CAAC,cAAsB,EAAE,OAAwB;QAChE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAChC,+CAA+C,EAC/C;YACE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,cAAc,EAAE,EAAE;YACpC,GAAG,OAAO;SACX,CACF,CAAA;QAED,OAAO,IAAA,4BAAiB,EAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,GAAG,CACd,cAAsB,EACtB,mBAA2B,EAC3B,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAChC,qEAAqE,EACrE;YACE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,mBAAmB,EAAE,cAAc,EAAE,EAAE;YACzD,GAAG,OAAO;SACX,CACF,CAAA;QAED,OAAO,IAAA,4BAAiB,EAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,MAAM,CACjB,cAAsB,EACtB,mBAA2B,EAC3B,KAA0F,EAC1F,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAClC,qEAAqE,EACrE;YACE,IAAI,EAAE,KAAK;YACX,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,mBAAmB,EAAE,cAAc,EAAE,EAAE;YACzD,GAAG,OAAO;SACX,CACF,CAAA;QAED,OAAO,IAAA,4BAAiB,EAAC,IAAI,CAAC,CAAA;IAChC,CAAC;CACF;AA7FD,gDA6FC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { Client } from 'openapi-fetch';
|
|
1
2
|
import type { RequestOptions } from './common.cjs';
|
|
2
3
|
import type { operations, paths, SubscriptionChange, SubscriptionCreate, SubscriptionEdit } from './schemas.cjs';
|
|
3
|
-
import type { Client } from 'openapi-fetch';
|
|
4
4
|
/**
|
|
5
5
|
* Subscriptions
|
|
6
6
|
*/
|
|
@@ -31,7 +31,7 @@ export declare class Subscriptions {
|
|
|
31
31
|
readonly billingCadence: string;
|
|
32
32
|
readonly proRatingConfig?: import("./schemas.cjs").components["schemas"]["ProRatingConfig"];
|
|
33
33
|
readonly billingAnchor: Date;
|
|
34
|
-
}>;
|
|
34
|
+
} | undefined>;
|
|
35
35
|
/**
|
|
36
36
|
* Get a subscription
|
|
37
37
|
* @param id - The subscription ID
|
|
@@ -57,7 +57,7 @@ export declare class Subscriptions {
|
|
|
57
57
|
readonly billingAnchor: Date;
|
|
58
58
|
alignment?: import("./schemas.cjs").components["schemas"]["SubscriptionAlignment"];
|
|
59
59
|
phases: import("./schemas.cjs").components["schemas"]["SubscriptionPhaseExpanded"][];
|
|
60
|
-
}>;
|
|
60
|
+
} | undefined>;
|
|
61
61
|
/**
|
|
62
62
|
* Edit a subscription
|
|
63
63
|
* @param id - The subscription ID
|
|
@@ -83,7 +83,7 @@ export declare class Subscriptions {
|
|
|
83
83
|
readonly billingCadence: string;
|
|
84
84
|
readonly proRatingConfig?: import("./schemas.cjs").components["schemas"]["ProRatingConfig"];
|
|
85
85
|
readonly billingAnchor: Date;
|
|
86
|
-
}>;
|
|
86
|
+
} | undefined>;
|
|
87
87
|
/**
|
|
88
88
|
* Cancel a subscription
|
|
89
89
|
* @param id - The subscription ID
|
|
@@ -109,7 +109,7 @@ export declare class Subscriptions {
|
|
|
109
109
|
readonly billingCadence: string;
|
|
110
110
|
readonly proRatingConfig?: import("./schemas.cjs").components["schemas"]["ProRatingConfig"];
|
|
111
111
|
readonly billingAnchor: Date;
|
|
112
|
-
}>;
|
|
112
|
+
} | undefined>;
|
|
113
113
|
/**
|
|
114
114
|
* Change a subscription
|
|
115
115
|
* @description Closes a running subscription and starts a new one according to the specification. Can be used for upgrades, downgrades, and plan changes.
|
|
@@ -121,7 +121,7 @@ export declare class Subscriptions {
|
|
|
121
121
|
change(id: operations['changeSubscription']['parameters']['path']['subscriptionId'], body: SubscriptionChange, options?: RequestOptions): Promise<{
|
|
122
122
|
current: import("./schemas.cjs").components["schemas"]["Subscription"];
|
|
123
123
|
next: import("./schemas.cjs").components["schemas"]["SubscriptionExpanded"];
|
|
124
|
-
}>;
|
|
124
|
+
} | undefined>;
|
|
125
125
|
/**
|
|
126
126
|
* Migrate a subscription
|
|
127
127
|
* @description Migrates the subscripiton to the provided version of the current plan.
|
|
@@ -133,7 +133,7 @@ export declare class Subscriptions {
|
|
|
133
133
|
migrate(id: operations['migrateSubscription']['parameters']['path']['subscriptionId'], body: operations['migrateSubscription']['requestBody']['content']['application/json'], options?: RequestOptions): Promise<{
|
|
134
134
|
current: import("./schemas.cjs").components["schemas"]["Subscription"];
|
|
135
135
|
next: import("./schemas.cjs").components["schemas"]["SubscriptionExpanded"];
|
|
136
|
-
}>;
|
|
136
|
+
} | undefined>;
|
|
137
137
|
/**
|
|
138
138
|
* Unschedule a cancelation
|
|
139
139
|
* @param id - The subscription ID
|
|
@@ -158,7 +158,7 @@ export declare class Subscriptions {
|
|
|
158
158
|
readonly billingCadence: string;
|
|
159
159
|
readonly proRatingConfig?: import("./schemas.cjs").components["schemas"]["ProRatingConfig"];
|
|
160
160
|
readonly billingAnchor: Date;
|
|
161
|
-
}>;
|
|
161
|
+
} | undefined>;
|
|
162
162
|
/**
|
|
163
163
|
* Delete subscription
|
|
164
164
|
* @description Deletes a subscription. Only scheduled subscriptions can be deleted.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../../../../src/client/subscriptions.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../../../../src/client/subscriptions.ts"],"names":[],"mappings":"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"}
|
|
@@ -17,9 +17,7 @@ function transformResponse(resp) {
|
|
|
17
17
|
throw common_js_1.HTTPError.fromResponse(resp);
|
|
18
18
|
}
|
|
19
19
|
// Decode dates
|
|
20
|
-
|
|
21
|
-
resp.data = decodeDates(resp.data);
|
|
22
|
-
}
|
|
20
|
+
resp.data = decodeDates(resp.data);
|
|
23
21
|
return resp.data;
|
|
24
22
|
}
|
|
25
23
|
const ISODateFormat = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d*)?(?:[-+]\d{2}:?\d{2}|Z)?$/;
|
|
@@ -6,7 +6,7 @@ import type { MediaType, ResponseObjectMap, SuccessResponse } from 'openapi-type
|
|
|
6
6
|
* @throws HTTPError if the response is an error
|
|
7
7
|
* @returns The transformed response
|
|
8
8
|
*/
|
|
9
|
-
export declare function transformResponse<T extends Record<string | number,
|
|
9
|
+
export declare function transformResponse<T extends Record<string | number, unknown>, Options, Media extends MediaType>(resp: FetchResponse<T, Options, Media>): ParseAsResponse<SuccessResponse<ResponseObjectMap<T>, Media>, Options> | undefined | never;
|
|
10
10
|
export declare function isIsoDateString(value: unknown): value is string;
|
|
11
11
|
export declare function decodeDates<T>(data: T): T;
|
|
12
12
|
export declare function encodeDates<T>(data: T): T;
|