@stigg/typescript 0.1.0-beta.2 → 0.1.0-beta.4

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 (92) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.json +1 -1
  3. package/resources/v1/addons/addons.d.mts +172 -1
  4. package/resources/v1/addons/addons.d.mts.map +1 -1
  5. package/resources/v1/addons/addons.d.ts +172 -1
  6. package/resources/v1/addons/addons.d.ts.map +1 -1
  7. package/resources/v1/addons/addons.js +6 -0
  8. package/resources/v1/addons/addons.js.map +1 -1
  9. package/resources/v1/addons/addons.mjs +6 -0
  10. package/resources/v1/addons/addons.mjs.map +1 -1
  11. package/resources/v1/addons/index.d.mts +1 -1
  12. package/resources/v1/addons/index.d.mts.map +1 -1
  13. package/resources/v1/addons/index.d.ts +1 -1
  14. package/resources/v1/addons/index.d.ts.map +1 -1
  15. package/resources/v1/addons/index.js.map +1 -1
  16. package/resources/v1/addons/index.mjs.map +1 -1
  17. package/resources/v1/credits/credits.d.mts +78 -7
  18. package/resources/v1/credits/credits.d.mts.map +1 -1
  19. package/resources/v1/credits/credits.d.ts +78 -7
  20. package/resources/v1/credits/credits.d.ts.map +1 -1
  21. package/resources/v1/credits/credits.js +7 -4
  22. package/resources/v1/credits/credits.js.map +1 -1
  23. package/resources/v1/credits/credits.mjs +7 -4
  24. package/resources/v1/credits/credits.mjs.map +1 -1
  25. package/resources/v1/credits/custom-currencies.d.mts +8 -8
  26. package/resources/v1/credits/custom-currencies.d.mts.map +1 -1
  27. package/resources/v1/credits/custom-currencies.d.ts +8 -8
  28. package/resources/v1/credits/custom-currencies.d.ts.map +1 -1
  29. package/resources/v1/credits/index.d.mts +2 -3
  30. package/resources/v1/credits/index.d.mts.map +1 -1
  31. package/resources/v1/credits/index.d.ts +2 -3
  32. package/resources/v1/credits/index.d.ts.map +1 -1
  33. package/resources/v1/credits/index.js +1 -3
  34. package/resources/v1/credits/index.js.map +1 -1
  35. package/resources/v1/credits/index.mjs +0 -1
  36. package/resources/v1/credits/index.mjs.map +1 -1
  37. package/resources/v1/index.d.mts +3 -3
  38. package/resources/v1/index.d.mts.map +1 -1
  39. package/resources/v1/index.d.ts +3 -3
  40. package/resources/v1/index.d.ts.map +1 -1
  41. package/resources/v1/index.js.map +1 -1
  42. package/resources/v1/index.mjs.map +1 -1
  43. package/resources/v1/plans/index.d.mts +1 -1
  44. package/resources/v1/plans/index.d.mts.map +1 -1
  45. package/resources/v1/plans/index.d.ts +1 -1
  46. package/resources/v1/plans/index.d.ts.map +1 -1
  47. package/resources/v1/plans/index.js.map +1 -1
  48. package/resources/v1/plans/index.mjs.map +1 -1
  49. package/resources/v1/plans/plans.d.mts +343 -1
  50. package/resources/v1/plans/plans.d.mts.map +1 -1
  51. package/resources/v1/plans/plans.d.ts +343 -1
  52. package/resources/v1/plans/plans.d.ts.map +1 -1
  53. package/resources/v1/plans/plans.js +12 -0
  54. package/resources/v1/plans/plans.js.map +1 -1
  55. package/resources/v1/plans/plans.mjs +12 -0
  56. package/resources/v1/plans/plans.mjs.map +1 -1
  57. package/resources/v1/subscriptions/subscriptions.d.mts +12 -9
  58. package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
  59. package/resources/v1/subscriptions/subscriptions.d.ts +12 -9
  60. package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
  61. package/resources/v1/subscriptions/subscriptions.js.map +1 -1
  62. package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
  63. package/resources/v1/v1.d.mts +6 -6
  64. package/resources/v1/v1.d.mts.map +1 -1
  65. package/resources/v1/v1.d.ts +6 -6
  66. package/resources/v1/v1.d.ts.map +1 -1
  67. package/resources/v1/v1.js.map +1 -1
  68. package/resources/v1/v1.mjs.map +1 -1
  69. package/src/resources/v1/addons/addons.ts +566 -0
  70. package/src/resources/v1/addons/index.ts +3 -0
  71. package/src/resources/v1/credits/credits.ts +99 -16
  72. package/src/resources/v1/credits/custom-currencies.ts +8 -8
  73. package/src/resources/v1/credits/index.ts +3 -6
  74. package/src/resources/v1/index.ts +11 -0
  75. package/src/resources/v1/plans/index.ts +6 -0
  76. package/src/resources/v1/plans/plans.ts +1132 -0
  77. package/src/resources/v1/subscriptions/subscriptions.ts +12 -9
  78. package/src/resources/v1/v1.ts +22 -0
  79. package/src/version.ts +1 -1
  80. package/version.d.mts +1 -1
  81. package/version.d.ts +1 -1
  82. package/version.js +1 -1
  83. package/version.mjs +1 -1
  84. package/resources/v1/credits/auto-recharge.d.mts +0 -84
  85. package/resources/v1/credits/auto-recharge.d.mts.map +0 -1
  86. package/resources/v1/credits/auto-recharge.d.ts +0 -84
  87. package/resources/v1/credits/auto-recharge.d.ts.map +0 -1
  88. package/resources/v1/credits/auto-recharge.js +0 -16
  89. package/resources/v1/credits/auto-recharge.js.map +0 -1
  90. package/resources/v1/credits/auto-recharge.mjs +0 -12
  91. package/resources/v1/credits/auto-recharge.mjs.map +0 -1
  92. package/src/resources/v1/credits/auto-recharge.ts +0 -109
@@ -4780,7 +4780,8 @@ export namespace SubscriptionImportParams {
4780
4780
  }
4781
4781
 
4782
4782
  /**
4783
- * Charge item
4783
+ * A charge selection for a subscription (references a catalog charge with a
4784
+ * quantity).
4784
4785
  */
4785
4786
  export interface Charge {
4786
4787
  /**
@@ -4789,7 +4790,7 @@ export namespace SubscriptionImportParams {
4789
4790
  id: string;
4790
4791
 
4791
4792
  /**
4792
- * Charge quantity
4793
+ * Charge quantity. Minimum is 0 (zero is allowed).
4793
4794
  */
4794
4795
  quantity: number;
4795
4796
 
@@ -4885,7 +4886,7 @@ export interface SubscriptionPreviewParams {
4885
4886
  trialOverrideConfiguration?: SubscriptionPreviewParams.TrialOverrideConfiguration;
4886
4887
 
4887
4888
  /**
4888
- * Unit quantity for per-unit pricing
4889
+ * Unit quantity for per-unit pricing. Minimum is 0 (zero is allowed).
4889
4890
  */
4890
4891
  unitQuantity?: number;
4891
4892
  }
@@ -5118,7 +5119,7 @@ export namespace SubscriptionPreviewParams {
5118
5119
  featureId: string;
5119
5120
 
5120
5121
  /**
5121
- * Quantity of feature units
5122
+ * Quantity of feature units. Minimum is 0 (zero is allowed).
5122
5123
  */
5123
5124
  quantity: number;
5124
5125
  }
@@ -5218,7 +5219,8 @@ export namespace SubscriptionPreviewParams {
5218
5219
  }
5219
5220
 
5220
5221
  /**
5221
- * Charge item
5222
+ * A charge selection for a subscription (references a catalog charge with a
5223
+ * quantity).
5222
5224
  */
5223
5225
  export interface Charge {
5224
5226
  /**
@@ -5227,7 +5229,7 @@ export namespace SubscriptionPreviewParams {
5227
5229
  id: string;
5228
5230
 
5229
5231
  /**
5230
- * Charge quantity
5232
+ * Charge quantity. Minimum is 0 (zero is allowed).
5231
5233
  */
5232
5234
  quantity: number;
5233
5235
 
@@ -5367,7 +5369,7 @@ export interface SubscriptionProvisionParams {
5367
5369
  trialOverrideConfiguration?: SubscriptionProvisionParams.TrialOverrideConfiguration;
5368
5370
 
5369
5371
  /**
5370
- * Unit quantity
5372
+ * Unit quantity for per-unit pricing. Minimum is 0 (zero is allowed).
5371
5373
  */
5372
5374
  unitQuantity?: number;
5373
5375
  }
@@ -5694,7 +5696,8 @@ export namespace SubscriptionProvisionParams {
5694
5696
  }
5695
5697
 
5696
5698
  /**
5697
- * Charge item
5699
+ * A charge selection for a subscription (references a catalog charge with a
5700
+ * quantity).
5698
5701
  */
5699
5702
  export interface Charge {
5700
5703
  /**
@@ -5703,7 +5706,7 @@ export namespace SubscriptionProvisionParams {
5703
5706
  id: string;
5704
5707
 
5705
5708
  /**
5706
- * Charge quantity
5709
+ * Charge quantity. Minimum is 0 (zero is allowed).
5707
5710
  */
5708
5711
  quantity: number;
5709
5712
 
@@ -46,6 +46,9 @@ import * as AddonsAPI from './addons/addons';
46
46
  import {
47
47
  Addon,
48
48
  AddonCreateParams,
49
+ AddonListChargesParams,
50
+ AddonListChargesResponse,
51
+ AddonListChargesResponsesMyCursorIDPage,
49
52
  AddonListParams,
50
53
  AddonListResponse,
51
54
  AddonListResponsesMyCursorIDPage,
@@ -57,6 +60,8 @@ import {
57
60
  } from './addons/addons';
58
61
  import * as CreditsAPI from './credits/credits';
59
62
  import {
63
+ CreditGetAutoRechargeParams,
64
+ CreditGetAutoRechargeResponse,
60
65
  CreditGetUsageParams,
61
66
  CreditGetUsageResponse,
62
67
  CreditListLedgerParams,
@@ -88,6 +93,12 @@ import * as PlansAPI from './plans/plans';
88
93
  import {
89
94
  Plan,
90
95
  PlanCreateParams,
96
+ PlanListChargesParams,
97
+ PlanListChargesResponse,
98
+ PlanListChargesResponsesMyCursorIDPage,
99
+ PlanListOverageChargesParams,
100
+ PlanListOverageChargesResponse,
101
+ PlanListOverageChargesResponsesMyCursorIDPage,
91
102
  PlanListParams,
92
103
  PlanListResponse,
93
104
  PlanListResponsesMyCursorIDPage,
@@ -199,9 +210,11 @@ export declare namespace V1 {
199
210
 
200
211
  export {
201
212
  Credits as Credits,
213
+ type CreditGetAutoRechargeResponse as CreditGetAutoRechargeResponse,
202
214
  type CreditGetUsageResponse as CreditGetUsageResponse,
203
215
  type CreditListLedgerResponse as CreditListLedgerResponse,
204
216
  type CreditListLedgerResponsesMyCursorIDPage as CreditListLedgerResponsesMyCursorIDPage,
217
+ type CreditGetAutoRechargeParams as CreditGetAutoRechargeParams,
205
218
  type CreditGetUsageParams as CreditGetUsageParams,
206
219
  type CreditListLedgerParams as CreditListLedgerParams,
207
220
  };
@@ -220,12 +233,15 @@ export declare namespace V1 {
220
233
  Addons as Addons,
221
234
  type Addon as Addon,
222
235
  type AddonListResponse as AddonListResponse,
236
+ type AddonListChargesResponse as AddonListChargesResponse,
223
237
  type AddonPublishResponse as AddonPublishResponse,
224
238
  type AddonRemoveDraftResponse as AddonRemoveDraftResponse,
225
239
  type AddonListResponsesMyCursorIDPage as AddonListResponsesMyCursorIDPage,
240
+ type AddonListChargesResponsesMyCursorIDPage as AddonListChargesResponsesMyCursorIDPage,
226
241
  type AddonCreateParams as AddonCreateParams,
227
242
  type AddonUpdateParams as AddonUpdateParams,
228
243
  type AddonListParams as AddonListParams,
244
+ type AddonListChargesParams as AddonListChargesParams,
229
245
  type AddonPublishParams as AddonPublishParams,
230
246
  };
231
247
 
@@ -233,12 +249,18 @@ export declare namespace V1 {
233
249
  Plans as Plans,
234
250
  type Plan as Plan,
235
251
  type PlanListResponse as PlanListResponse,
252
+ type PlanListChargesResponse as PlanListChargesResponse,
253
+ type PlanListOverageChargesResponse as PlanListOverageChargesResponse,
236
254
  type PlanPublishResponse as PlanPublishResponse,
237
255
  type PlanRemoveDraftResponse as PlanRemoveDraftResponse,
238
256
  type PlanListResponsesMyCursorIDPage as PlanListResponsesMyCursorIDPage,
257
+ type PlanListChargesResponsesMyCursorIDPage as PlanListChargesResponsesMyCursorIDPage,
258
+ type PlanListOverageChargesResponsesMyCursorIDPage as PlanListOverageChargesResponsesMyCursorIDPage,
239
259
  type PlanCreateParams as PlanCreateParams,
240
260
  type PlanUpdateParams as PlanUpdateParams,
241
261
  type PlanListParams as PlanListParams,
262
+ type PlanListChargesParams as PlanListChargesParams,
263
+ type PlanListOverageChargesParams as PlanListOverageChargesParams,
242
264
  type PlanPublishParams as PlanPublishParams,
243
265
  };
244
266
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0-beta.2'; // x-release-please-version
1
+ export const VERSION = '0.1.0-beta.4'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-beta.2";
1
+ export declare const VERSION = "0.1.0-beta.4";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-beta.2";
1
+ export declare const VERSION = "0.1.0-beta.4";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.1.0-beta.2'; // x-release-please-version
4
+ exports.VERSION = '0.1.0-beta.4'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.1.0-beta.2'; // x-release-please-version
1
+ export const VERSION = '0.1.0-beta.4'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1,84 +0,0 @@
1
- import { APIResource } from "../../../core/resource.mjs";
2
- import { APIPromise } from "../../../core/api-promise.mjs";
3
- import { RequestOptions } from "../../../internal/request-options.mjs";
4
- export declare class AutoRecharge extends APIResource {
5
- /**
6
- * Retrieves the automatic recharge configuration for a customer and currency.
7
- * Returns default settings if no configuration exists.
8
- */
9
- getAutoRecharge(query: AutoRechargeGetAutoRechargeParams, options?: RequestOptions): APIPromise<AutoRechargeGetAutoRechargeResponse>;
10
- }
11
- /**
12
- * Response object
13
- */
14
- export interface AutoRechargeGetAutoRechargeResponse {
15
- /**
16
- * Automatic recharge configuration for a customer and currency
17
- */
18
- data: AutoRechargeGetAutoRechargeResponse.Data;
19
- }
20
- export declare namespace AutoRechargeGetAutoRechargeResponse {
21
- /**
22
- * Automatic recharge configuration for a customer and currency
23
- */
24
- interface Data {
25
- /**
26
- * The unique configuration ID
27
- */
28
- id: string | null;
29
- /**
30
- * Timestamp of when the record was created
31
- */
32
- createdAt: string | null;
33
- /**
34
- * The currency ID for this configuration
35
- */
36
- currencyId: string;
37
- /**
38
- * The customer ID this configuration belongs to
39
- */
40
- customerId: string;
41
- /**
42
- * Expiration period for auto-recharge grants (1_MONTH or 1_YEAR)
43
- */
44
- grantExpirationPeriod: '1_MONTH' | '1_YEAR';
45
- /**
46
- * Whether automatic recharge is enabled
47
- */
48
- isEnabled: boolean;
49
- /**
50
- * Maximum monthly spend limit for automatic recharges
51
- */
52
- maxSpendLimit: number | null;
53
- /**
54
- * The target credit balance to recharge to
55
- */
56
- targetBalance: number;
57
- /**
58
- * The threshold type (CREDIT_AMOUNT or DOLLAR_AMOUNT)
59
- */
60
- thresholdType: 'CREDIT_AMOUNT' | 'DOLLAR_AMOUNT';
61
- /**
62
- * The threshold value that triggers a recharge
63
- */
64
- thresholdValue: number;
65
- /**
66
- * Timestamp of when the record was last updated
67
- */
68
- updatedAt: string | null;
69
- }
70
- }
71
- export interface AutoRechargeGetAutoRechargeParams {
72
- /**
73
- * Filter by currency ID (required)
74
- */
75
- currencyId: string;
76
- /**
77
- * Filter by customer ID (required)
78
- */
79
- customerId: string;
80
- }
81
- export declare namespace AutoRecharge {
82
- export { type AutoRechargeGetAutoRechargeResponse as AutoRechargeGetAutoRechargeResponse, type AutoRechargeGetAutoRechargeParams as AutoRechargeGetAutoRechargeParams, };
83
- }
84
- //# sourceMappingURL=auto-recharge.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auto-recharge.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/credits/auto-recharge.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IACH,eAAe,CACb,KAAK,EAAE,iCAAiC,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mCAAmC,CAAC;CAGnD;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD;;OAEG;IACH,IAAI,EAAE,mCAAmC,CAAC,IAAI,CAAC;CAChD;AAED,yBAAiB,mCAAmC,CAAC;IACnD;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;QAElB;;WAEG;QACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QAEzB;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,qBAAqB,EAAE,SAAS,GAAG,QAAQ,CAAC;QAE5C;;WAEG;QACH,SAAS,EAAE,OAAO,CAAC;QAEnB;;WAEG;QACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAE7B;;WAEG;QACH,aAAa,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,aAAa,EAAE,eAAe,GAAG,eAAe,CAAC;QAEjD;;WAEG;QACH,cAAc,EAAE,MAAM,CAAC;QAEvB;;WAEG;QACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;KAC1B;CACF;AAED,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,iCAAiC,IAAI,iCAAiC,GAC5E,CAAC;CACH"}
@@ -1,84 +0,0 @@
1
- import { APIResource } from "../../../core/resource.js";
2
- import { APIPromise } from "../../../core/api-promise.js";
3
- import { RequestOptions } from "../../../internal/request-options.js";
4
- export declare class AutoRecharge extends APIResource {
5
- /**
6
- * Retrieves the automatic recharge configuration for a customer and currency.
7
- * Returns default settings if no configuration exists.
8
- */
9
- getAutoRecharge(query: AutoRechargeGetAutoRechargeParams, options?: RequestOptions): APIPromise<AutoRechargeGetAutoRechargeResponse>;
10
- }
11
- /**
12
- * Response object
13
- */
14
- export interface AutoRechargeGetAutoRechargeResponse {
15
- /**
16
- * Automatic recharge configuration for a customer and currency
17
- */
18
- data: AutoRechargeGetAutoRechargeResponse.Data;
19
- }
20
- export declare namespace AutoRechargeGetAutoRechargeResponse {
21
- /**
22
- * Automatic recharge configuration for a customer and currency
23
- */
24
- interface Data {
25
- /**
26
- * The unique configuration ID
27
- */
28
- id: string | null;
29
- /**
30
- * Timestamp of when the record was created
31
- */
32
- createdAt: string | null;
33
- /**
34
- * The currency ID for this configuration
35
- */
36
- currencyId: string;
37
- /**
38
- * The customer ID this configuration belongs to
39
- */
40
- customerId: string;
41
- /**
42
- * Expiration period for auto-recharge grants (1_MONTH or 1_YEAR)
43
- */
44
- grantExpirationPeriod: '1_MONTH' | '1_YEAR';
45
- /**
46
- * Whether automatic recharge is enabled
47
- */
48
- isEnabled: boolean;
49
- /**
50
- * Maximum monthly spend limit for automatic recharges
51
- */
52
- maxSpendLimit: number | null;
53
- /**
54
- * The target credit balance to recharge to
55
- */
56
- targetBalance: number;
57
- /**
58
- * The threshold type (CREDIT_AMOUNT or DOLLAR_AMOUNT)
59
- */
60
- thresholdType: 'CREDIT_AMOUNT' | 'DOLLAR_AMOUNT';
61
- /**
62
- * The threshold value that triggers a recharge
63
- */
64
- thresholdValue: number;
65
- /**
66
- * Timestamp of when the record was last updated
67
- */
68
- updatedAt: string | null;
69
- }
70
- }
71
- export interface AutoRechargeGetAutoRechargeParams {
72
- /**
73
- * Filter by currency ID (required)
74
- */
75
- currencyId: string;
76
- /**
77
- * Filter by customer ID (required)
78
- */
79
- customerId: string;
80
- }
81
- export declare namespace AutoRecharge {
82
- export { type AutoRechargeGetAutoRechargeResponse as AutoRechargeGetAutoRechargeResponse, type AutoRechargeGetAutoRechargeParams as AutoRechargeGetAutoRechargeParams, };
83
- }
84
- //# sourceMappingURL=auto-recharge.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auto-recharge.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/credits/auto-recharge.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IACH,eAAe,CACb,KAAK,EAAE,iCAAiC,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mCAAmC,CAAC;CAGnD;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD;;OAEG;IACH,IAAI,EAAE,mCAAmC,CAAC,IAAI,CAAC;CAChD;AAED,yBAAiB,mCAAmC,CAAC;IACnD;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;QAElB;;WAEG;QACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QAEzB;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,qBAAqB,EAAE,SAAS,GAAG,QAAQ,CAAC;QAE5C;;WAEG;QACH,SAAS,EAAE,OAAO,CAAC;QAEnB;;WAEG;QACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAE7B;;WAEG;QACH,aAAa,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,aAAa,EAAE,eAAe,GAAG,eAAe,CAAC;QAEjD;;WAEG;QACH,cAAc,EAAE,MAAM,CAAC;QAEvB;;WAEG;QACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;KAC1B;CACF;AAED,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,iCAAiC,IAAI,iCAAiC,GAC5E,CAAC;CACH"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.AutoRecharge = void 0;
5
- const resource_1 = require("../../../core/resource.js");
6
- class AutoRecharge extends resource_1.APIResource {
7
- /**
8
- * Retrieves the automatic recharge configuration for a customer and currency.
9
- * Returns default settings if no configuration exists.
10
- */
11
- getAutoRecharge(query, options) {
12
- return this._client.get('/api/v1/credits/auto-recharge', { query, ...options });
13
- }
14
- }
15
- exports.AutoRecharge = AutoRecharge;
16
- //# sourceMappingURL=auto-recharge.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auto-recharge.js","sourceRoot":"","sources":["../../../src/resources/v1/credits/auto-recharge.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;OAGG;IACH,eAAe,CACb,KAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;CACF;AAXD,oCAWC"}
@@ -1,12 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../../../core/resource.mjs";
3
- export class AutoRecharge extends APIResource {
4
- /**
5
- * Retrieves the automatic recharge configuration for a customer and currency.
6
- * Returns default settings if no configuration exists.
7
- */
8
- getAutoRecharge(query, options) {
9
- return this._client.get('/api/v1/credits/auto-recharge', { query, ...options });
10
- }
11
- }
12
- //# sourceMappingURL=auto-recharge.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auto-recharge.mjs","sourceRoot":"","sources":["../../../src/resources/v1/credits/auto-recharge.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IACH,eAAe,CACb,KAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;CACF"}
@@ -1,109 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../../../core/resource';
4
- import { APIPromise } from '../../../core/api-promise';
5
- import { RequestOptions } from '../../../internal/request-options';
6
-
7
- export class AutoRecharge extends APIResource {
8
- /**
9
- * Retrieves the automatic recharge configuration for a customer and currency.
10
- * Returns default settings if no configuration exists.
11
- */
12
- getAutoRecharge(
13
- query: AutoRechargeGetAutoRechargeParams,
14
- options?: RequestOptions,
15
- ): APIPromise<AutoRechargeGetAutoRechargeResponse> {
16
- return this._client.get('/api/v1/credits/auto-recharge', { query, ...options });
17
- }
18
- }
19
-
20
- /**
21
- * Response object
22
- */
23
- export interface AutoRechargeGetAutoRechargeResponse {
24
- /**
25
- * Automatic recharge configuration for a customer and currency
26
- */
27
- data: AutoRechargeGetAutoRechargeResponse.Data;
28
- }
29
-
30
- export namespace AutoRechargeGetAutoRechargeResponse {
31
- /**
32
- * Automatic recharge configuration for a customer and currency
33
- */
34
- export interface Data {
35
- /**
36
- * The unique configuration ID
37
- */
38
- id: string | null;
39
-
40
- /**
41
- * Timestamp of when the record was created
42
- */
43
- createdAt: string | null;
44
-
45
- /**
46
- * The currency ID for this configuration
47
- */
48
- currencyId: string;
49
-
50
- /**
51
- * The customer ID this configuration belongs to
52
- */
53
- customerId: string;
54
-
55
- /**
56
- * Expiration period for auto-recharge grants (1_MONTH or 1_YEAR)
57
- */
58
- grantExpirationPeriod: '1_MONTH' | '1_YEAR';
59
-
60
- /**
61
- * Whether automatic recharge is enabled
62
- */
63
- isEnabled: boolean;
64
-
65
- /**
66
- * Maximum monthly spend limit for automatic recharges
67
- */
68
- maxSpendLimit: number | null;
69
-
70
- /**
71
- * The target credit balance to recharge to
72
- */
73
- targetBalance: number;
74
-
75
- /**
76
- * The threshold type (CREDIT_AMOUNT or DOLLAR_AMOUNT)
77
- */
78
- thresholdType: 'CREDIT_AMOUNT' | 'DOLLAR_AMOUNT';
79
-
80
- /**
81
- * The threshold value that triggers a recharge
82
- */
83
- thresholdValue: number;
84
-
85
- /**
86
- * Timestamp of when the record was last updated
87
- */
88
- updatedAt: string | null;
89
- }
90
- }
91
-
92
- export interface AutoRechargeGetAutoRechargeParams {
93
- /**
94
- * Filter by currency ID (required)
95
- */
96
- currencyId: string;
97
-
98
- /**
99
- * Filter by customer ID (required)
100
- */
101
- customerId: string;
102
- }
103
-
104
- export declare namespace AutoRecharge {
105
- export {
106
- type AutoRechargeGetAutoRechargeResponse as AutoRechargeGetAutoRechargeResponse,
107
- type AutoRechargeGetAutoRechargeParams as AutoRechargeGetAutoRechargeParams,
108
- };
109
- }