@stigg/typescript 0.1.0-beta.1 → 0.1.0-beta.2
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/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/resources/v1/credits/auto-recharge.d.mts +84 -0
- package/resources/v1/credits/auto-recharge.d.mts.map +1 -0
- package/resources/v1/credits/auto-recharge.d.ts +84 -0
- package/resources/v1/credits/auto-recharge.d.ts.map +1 -0
- package/resources/v1/credits/auto-recharge.js +16 -0
- package/resources/v1/credits/auto-recharge.js.map +1 -0
- package/resources/v1/credits/auto-recharge.mjs +12 -0
- package/resources/v1/credits/auto-recharge.mjs.map +1 -0
- package/resources/v1/{events/credits → credits}/credits.d.mts +11 -82
- package/resources/v1/credits/credits.d.mts.map +1 -0
- package/resources/v1/{events/credits → credits}/credits.d.ts +11 -82
- package/resources/v1/credits/credits.d.ts.map +1 -0
- package/resources/v1/{events/credits → credits}/credits.js +7 -10
- package/resources/v1/credits/credits.js.map +1 -0
- package/resources/v1/{events/credits → credits}/credits.mjs +6 -9
- package/resources/v1/credits/credits.mjs.map +1 -0
- package/resources/v1/{events/credits → credits}/custom-currencies.d.mts +12 -219
- package/resources/v1/credits/custom-currencies.d.mts.map +1 -0
- package/resources/v1/{events/credits → credits}/custom-currencies.d.ts +12 -219
- package/resources/v1/credits/custom-currencies.d.ts.map +1 -0
- package/resources/v1/{events/credits → credits}/custom-currencies.js +3 -3
- package/resources/v1/credits/custom-currencies.js.map +1 -0
- package/resources/v1/{events/credits → credits}/custom-currencies.mjs +3 -3
- package/resources/v1/credits/custom-currencies.mjs.map +1 -0
- package/resources/v1/{events/credits → credits}/grants.d.mts +4 -4
- package/resources/v1/credits/grants.d.mts.map +1 -0
- package/resources/v1/{events/credits → credits}/grants.d.ts +4 -4
- package/resources/v1/credits/grants.d.ts.map +1 -0
- package/resources/v1/{events/credits → credits}/grants.js +3 -3
- package/resources/v1/credits/grants.js.map +1 -0
- package/resources/v1/{events/credits → credits}/grants.mjs +3 -3
- package/resources/v1/credits/grants.mjs.map +1 -0
- package/resources/v1/credits/index.d.mts +5 -0
- package/resources/v1/credits/index.d.mts.map +1 -0
- package/resources/v1/credits/index.d.ts +5 -0
- package/resources/v1/credits/index.d.ts.map +1 -0
- package/resources/v1/{events/credits → credits}/index.js +3 -1
- package/resources/v1/credits/index.js.map +1 -0
- package/resources/v1/{events/credits → credits}/index.mjs +1 -0
- package/resources/v1/credits/index.mjs.map +1 -0
- package/resources/v1/credits.d.mts.map +1 -0
- package/resources/v1/credits.d.ts.map +1 -0
- package/resources/v1/{events/credits.js → credits.js} +1 -1
- package/resources/v1/credits.js.map +1 -0
- package/resources/v1/credits.mjs.map +1 -0
- package/resources/v1/events.d.mts +65 -1
- package/resources/v1/events.d.mts.map +1 -1
- package/resources/v1/events.d.ts +65 -1
- package/resources/v1/events.d.ts.map +1 -1
- package/resources/v1/events.js +15 -2
- package/resources/v1/events.js.map +1 -1
- package/resources/v1/events.mjs +13 -1
- package/resources/v1/events.mjs.map +1 -1
- package/resources/v1/index.d.mts +2 -1
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +2 -1
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +7 -5
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +2 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/v1.d.mts +6 -2
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +6 -2
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +6 -2
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +6 -2
- package/resources/v1/v1.mjs.map +1 -1
- package/src/resources/v1/credits/auto-recharge.ts +109 -0
- package/src/resources/v1/{events/credits → credits}/credits.ts +20 -109
- package/src/resources/v1/{events/credits → credits}/custom-currencies.ts +13 -256
- package/src/resources/v1/{events/credits → credits}/grants.ts +5 -5
- package/src/resources/v1/{events/credits → credits}/index.ts +6 -6
- package/src/resources/v1/events.ts +75 -1
- package/src/resources/v1/index.ts +9 -1
- package/src/resources/v1/v1.ts +22 -2
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/v1/events/credits/credits.d.mts.map +0 -1
- package/resources/v1/events/credits/credits.d.ts.map +0 -1
- package/resources/v1/events/credits/credits.js.map +0 -1
- package/resources/v1/events/credits/credits.mjs.map +0 -1
- package/resources/v1/events/credits/custom-currencies.d.mts.map +0 -1
- package/resources/v1/events/credits/custom-currencies.d.ts.map +0 -1
- package/resources/v1/events/credits/custom-currencies.js.map +0 -1
- package/resources/v1/events/credits/custom-currencies.mjs.map +0 -1
- package/resources/v1/events/credits/grants.d.mts.map +0 -1
- package/resources/v1/events/credits/grants.d.ts.map +0 -1
- package/resources/v1/events/credits/grants.js.map +0 -1
- package/resources/v1/events/credits/grants.mjs.map +0 -1
- package/resources/v1/events/credits/index.d.mts +0 -4
- package/resources/v1/events/credits/index.d.mts.map +0 -1
- package/resources/v1/events/credits/index.d.ts +0 -4
- package/resources/v1/events/credits/index.d.ts.map +0 -1
- package/resources/v1/events/credits/index.js.map +0 -1
- package/resources/v1/events/credits/index.mjs.map +0 -1
- package/resources/v1/events/credits.d.mts.map +0 -1
- package/resources/v1/events/credits.d.ts.map +0 -1
- package/resources/v1/events/credits.js.map +0 -1
- package/resources/v1/events/credits.mjs.map +0 -1
- package/resources/v1/events/events.d.mts +0 -70
- package/resources/v1/events/events.d.mts.map +0 -1
- package/resources/v1/events/events.d.ts +0 -70
- package/resources/v1/events/events.d.ts.map +0 -1
- package/resources/v1/events/events.js +0 -27
- package/resources/v1/events/events.js.map +0 -1
- package/resources/v1/events/events.mjs +0 -22
- package/resources/v1/events/events.mjs.map +0 -1
- package/resources/v1/events/index.d.mts +0 -3
- package/resources/v1/events/index.d.mts.map +0 -1
- package/resources/v1/events/index.d.ts +0 -3
- package/resources/v1/events/index.d.ts.map +0 -1
- package/resources/v1/events/index.js +0 -9
- package/resources/v1/events/index.js.map +0 -1
- package/resources/v1/events/index.mjs +0 -4
- package/resources/v1/events/index.mjs.map +0 -1
- package/src/resources/v1/events/events.ts +0 -103
- package/src/resources/v1/events/index.ts +0 -13
- /package/resources/v1/{events/credits.d.mts → credits.d.mts} +0 -0
- /package/resources/v1/{events/credits.d.ts → credits.d.ts} +0 -0
- /package/resources/v1/{events/credits.mjs → credits.mjs} +0 -0
- /package/src/resources/v1/{events/credits.ts → credits.ts} +0 -0
package/resources/v1/v1.js
CHANGED
|
@@ -6,6 +6,8 @@ const tslib_1 = require("../../internal/tslib.js");
|
|
|
6
6
|
const resource_1 = require("../../core/resource.js");
|
|
7
7
|
const CouponsAPI = tslib_1.__importStar(require("./coupons.js"));
|
|
8
8
|
const coupons_1 = require("./coupons.js");
|
|
9
|
+
const EventsAPI = tslib_1.__importStar(require("./events.js"));
|
|
10
|
+
const events_1 = require("./events.js");
|
|
9
11
|
const FeaturesAPI = tslib_1.__importStar(require("./features.js"));
|
|
10
12
|
const features_1 = require("./features.js");
|
|
11
13
|
const ProductsAPI = tslib_1.__importStar(require("./products.js"));
|
|
@@ -14,10 +16,10 @@ const UsageAPI = tslib_1.__importStar(require("./usage.js"));
|
|
|
14
16
|
const usage_1 = require("./usage.js");
|
|
15
17
|
const AddonsAPI = tslib_1.__importStar(require("./addons/addons.js"));
|
|
16
18
|
const addons_1 = require("./addons/addons.js");
|
|
19
|
+
const CreditsAPI = tslib_1.__importStar(require("./credits/credits.js"));
|
|
20
|
+
const credits_1 = require("./credits/credits.js");
|
|
17
21
|
const CustomersAPI = tslib_1.__importStar(require("./customers/customers.js"));
|
|
18
22
|
const customers_1 = require("./customers/customers.js");
|
|
19
|
-
const EventsAPI = tslib_1.__importStar(require("./events/events.js"));
|
|
20
|
-
const events_1 = require("./events/events.js");
|
|
21
23
|
const PlansAPI = tslib_1.__importStar(require("./plans/plans.js"));
|
|
22
24
|
const plans_1 = require("./plans/plans.js");
|
|
23
25
|
const SubscriptionsAPI = tslib_1.__importStar(require("./subscriptions/subscriptions.js"));
|
|
@@ -29,6 +31,7 @@ class V1 extends resource_1.APIResource {
|
|
|
29
31
|
this.subscriptions = new SubscriptionsAPI.Subscriptions(this._client);
|
|
30
32
|
this.coupons = new CouponsAPI.Coupons(this._client);
|
|
31
33
|
this.events = new EventsAPI.Events(this._client);
|
|
34
|
+
this.credits = new CreditsAPI.Credits(this._client);
|
|
32
35
|
this.features = new FeaturesAPI.Features(this._client);
|
|
33
36
|
this.addons = new AddonsAPI.Addons(this._client);
|
|
34
37
|
this.plans = new PlansAPI.Plans(this._client);
|
|
@@ -41,6 +44,7 @@ V1.Customers = customers_1.Customers;
|
|
|
41
44
|
V1.Subscriptions = subscriptions_1.Subscriptions;
|
|
42
45
|
V1.Coupons = coupons_1.Coupons;
|
|
43
46
|
V1.Events = events_1.Events;
|
|
47
|
+
V1.Credits = credits_1.Credits;
|
|
44
48
|
V1.Features = features_1.Features;
|
|
45
49
|
V1.Addons = addons_1.Addons;
|
|
46
50
|
V1.Plans = plans_1.Plans;
|
package/resources/v1/v1.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,iEAAwC;AACxC,0CAQmB;AACnB,mEAA0C;AAC1C,4CAQoB;AACpB,mEAA0C;AAC1C,4CASoB;AACpB,6DAAoC;AACpC,sCAMiB;AACjB,sEAA6C;AAC7C,+CAWyB;AACzB,+EAAsD;AACtD,wDAkB+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,iEAAwC;AACxC,0CAQmB;AACnB,+DAAsC;AACtC,wCAA0E;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GAAG,iBAAO,CAAC;AACrB,EAAE,CAAC,MAAM,GAAG,eAAM,CAAC;AACnB,EAAE,CAAC,OAAO,GAAG,iBAAO,CAAC;AACrB,EAAE,CAAC,QAAQ,GAAG,mBAAQ,CAAC;AACvB,EAAE,CAAC,MAAM,GAAG,eAAM,CAAC;AACnB,EAAE,CAAC,KAAK,GAAG,aAAK,CAAC;AACjB,EAAE,CAAC,KAAK,GAAG,aAAK,CAAC;AACjB,EAAE,CAAC,QAAQ,GAAG,mBAAQ,CAAC"}
|
package/resources/v1/v1.mjs
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
3
|
import * as CouponsAPI from "./coupons.mjs";
|
|
4
4
|
import { Coupons, } from "./coupons.mjs";
|
|
5
|
+
import * as EventsAPI from "./events.mjs";
|
|
6
|
+
import { Events } from "./events.mjs";
|
|
5
7
|
import * as FeaturesAPI from "./features.mjs";
|
|
6
8
|
import { Features, } from "./features.mjs";
|
|
7
9
|
import * as ProductsAPI from "./products.mjs";
|
|
@@ -10,10 +12,10 @@ import * as UsageAPI from "./usage.mjs";
|
|
|
10
12
|
import { Usage, } from "./usage.mjs";
|
|
11
13
|
import * as AddonsAPI from "./addons/addons.mjs";
|
|
12
14
|
import { Addons, } from "./addons/addons.mjs";
|
|
15
|
+
import * as CreditsAPI from "./credits/credits.mjs";
|
|
16
|
+
import { Credits, } from "./credits/credits.mjs";
|
|
13
17
|
import * as CustomersAPI from "./customers/customers.mjs";
|
|
14
18
|
import { Customers, } from "./customers/customers.mjs";
|
|
15
|
-
import * as EventsAPI from "./events/events.mjs";
|
|
16
|
-
import { Events } from "./events/events.mjs";
|
|
17
19
|
import * as PlansAPI from "./plans/plans.mjs";
|
|
18
20
|
import { Plans, } from "./plans/plans.mjs";
|
|
19
21
|
import * as SubscriptionsAPI from "./subscriptions/subscriptions.mjs";
|
|
@@ -25,6 +27,7 @@ export class V1 extends APIResource {
|
|
|
25
27
|
this.subscriptions = new SubscriptionsAPI.Subscriptions(this._client);
|
|
26
28
|
this.coupons = new CouponsAPI.Coupons(this._client);
|
|
27
29
|
this.events = new EventsAPI.Events(this._client);
|
|
30
|
+
this.credits = new CreditsAPI.Credits(this._client);
|
|
28
31
|
this.features = new FeaturesAPI.Features(this._client);
|
|
29
32
|
this.addons = new AddonsAPI.Addons(this._client);
|
|
30
33
|
this.plans = new PlansAPI.Plans(this._client);
|
|
@@ -36,6 +39,7 @@ V1.Customers = Customers;
|
|
|
36
39
|
V1.Subscriptions = Subscriptions;
|
|
37
40
|
V1.Coupons = Coupons;
|
|
38
41
|
V1.Events = Events;
|
|
42
|
+
V1.Credits = Credits;
|
|
39
43
|
V1.Features = Features;
|
|
40
44
|
V1.Addons = Addons;
|
|
41
45
|
V1.Plans = Plans;
|
package/resources/v1/v1.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.mjs","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EAOL,OAAO,GACR;OACM,KAAK,WAAW;OAChB,EAOL,QAAQ,GACT;OACM,KAAK,WAAW;OAChB,EAQL,QAAQ,GACT;OACM,KAAK,QAAQ;OACb,EACL,KAAK,GAKN;OACM,KAAK,SAAS;OACd,EAUL,MAAM,GACP;OACM,KAAK,
|
|
1
|
+
{"version":3,"file":"v1.mjs","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EAOL,OAAO,GACR;OACM,KAAK,SAAS;OACd,EAA0C,MAAM,EAAE;OAClD,KAAK,WAAW;OAChB,EAOL,QAAQ,GACT;OACM,KAAK,WAAW;OAChB,EAQL,QAAQ,GACT;OACM,KAAK,QAAQ;OACb,EACL,KAAK,GAKN;OACM,KAAK,SAAS;OACd,EAU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AAO,GAAG,OAAO,CAAC;AACrB,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACvB,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC;AACnB,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC;AACjB,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC;AACjB,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
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
|
+
}
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as AutoRechargeAPI from './auto-recharge';
|
|
5
|
+
import {
|
|
6
|
+
AutoRecharge,
|
|
7
|
+
AutoRechargeGetAutoRechargeParams,
|
|
8
|
+
AutoRechargeGetAutoRechargeResponse,
|
|
9
|
+
} from './auto-recharge';
|
|
4
10
|
import * as CustomCurrenciesAPI from './custom-currencies';
|
|
5
11
|
import {
|
|
6
12
|
CustomCurrencies,
|
|
7
|
-
|
|
13
|
+
CustomCurrency,
|
|
8
14
|
CustomCurrencyCreateParams,
|
|
9
|
-
CustomCurrencyCreateResponse,
|
|
10
15
|
CustomCurrencyListAssociatedEntitiesResponse,
|
|
11
16
|
CustomCurrencyListParams,
|
|
12
17
|
CustomCurrencyListResponse,
|
|
13
18
|
CustomCurrencyListResponsesMyCursorIDPage,
|
|
14
|
-
CustomCurrencyUnarchiveResponse,
|
|
15
19
|
CustomCurrencyUpdateParams,
|
|
16
|
-
CustomCurrencyUpdateResponse,
|
|
17
20
|
} from './custom-currencies';
|
|
18
21
|
import * as GrantsAPI from './grants';
|
|
19
22
|
import {
|
|
@@ -24,26 +27,16 @@ import {
|
|
|
24
27
|
GrantListResponsesMyCursorIDPage,
|
|
25
28
|
Grants,
|
|
26
29
|
} from './grants';
|
|
27
|
-
import { APIPromise } from '
|
|
28
|
-
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '
|
|
29
|
-
import { RequestOptions } from '
|
|
30
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
31
|
+
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../core/pagination';
|
|
32
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
30
33
|
|
|
31
34
|
export class Credits extends APIResource {
|
|
32
35
|
grants: GrantsAPI.Grants = new GrantsAPI.Grants(this._client);
|
|
33
36
|
customCurrencies: CustomCurrenciesAPI.CustomCurrencies = new CustomCurrenciesAPI.CustomCurrencies(
|
|
34
37
|
this._client,
|
|
35
38
|
);
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Retrieves the automatic recharge configuration for a customer and currency.
|
|
39
|
-
* Returns default settings if no configuration exists.
|
|
40
|
-
*/
|
|
41
|
-
getAutoRecharge(
|
|
42
|
-
query: CreditGetAutoRechargeParams,
|
|
43
|
-
options?: RequestOptions,
|
|
44
|
-
): APIPromise<CreditGetAutoRechargeResponse> {
|
|
45
|
-
return this._client.get('/api/v1/credits/auto-recharge', { query, ...options });
|
|
46
|
-
}
|
|
39
|
+
autoRecharge: AutoRechargeAPI.AutoRecharge = new AutoRechargeAPI.AutoRecharge(this._client);
|
|
47
40
|
|
|
48
41
|
/**
|
|
49
42
|
* Retrieves credit usage time-series data for a customer, grouped by feature, over
|
|
@@ -69,78 +62,6 @@ export class Credits extends APIResource {
|
|
|
69
62
|
|
|
70
63
|
export type CreditListLedgerResponsesMyCursorIDPage = MyCursorIDPage<CreditListLedgerResponse>;
|
|
71
64
|
|
|
72
|
-
/**
|
|
73
|
-
* Response object
|
|
74
|
-
*/
|
|
75
|
-
export interface CreditGetAutoRechargeResponse {
|
|
76
|
-
/**
|
|
77
|
-
* Automatic recharge configuration for a customer and currency
|
|
78
|
-
*/
|
|
79
|
-
data: CreditGetAutoRechargeResponse.Data;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export namespace CreditGetAutoRechargeResponse {
|
|
83
|
-
/**
|
|
84
|
-
* Automatic recharge configuration for a customer and currency
|
|
85
|
-
*/
|
|
86
|
-
export interface Data {
|
|
87
|
-
/**
|
|
88
|
-
* The unique configuration ID
|
|
89
|
-
*/
|
|
90
|
-
id: string | null;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Timestamp of when the record was created
|
|
94
|
-
*/
|
|
95
|
-
createdAt: string | null;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* The currency ID for this configuration
|
|
99
|
-
*/
|
|
100
|
-
currencyId: string;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* The customer ID this configuration belongs to
|
|
104
|
-
*/
|
|
105
|
-
customerId: string;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Expiration period for auto-recharge grants (1_MONTH or 1_YEAR)
|
|
109
|
-
*/
|
|
110
|
-
grantExpirationPeriod: '1_MONTH' | '1_YEAR';
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Whether automatic recharge is enabled
|
|
114
|
-
*/
|
|
115
|
-
isEnabled: boolean;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Maximum monthly spend limit for automatic recharges
|
|
119
|
-
*/
|
|
120
|
-
maxSpendLimit: number | null;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* The target credit balance to recharge to
|
|
124
|
-
*/
|
|
125
|
-
targetBalance: number;
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* The threshold type (CREDIT_AMOUNT or DOLLAR_AMOUNT)
|
|
129
|
-
*/
|
|
130
|
-
thresholdType: 'CREDIT_AMOUNT' | 'DOLLAR_AMOUNT';
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* The threshold value that triggers a recharge
|
|
134
|
-
*/
|
|
135
|
-
thresholdValue: number;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Timestamp of when the record was last updated
|
|
139
|
-
*/
|
|
140
|
-
updatedAt: string | null;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
65
|
/**
|
|
145
66
|
* Response object
|
|
146
67
|
*/
|
|
@@ -299,18 +220,6 @@ export interface CreditListLedgerResponse {
|
|
|
299
220
|
timestamp: string;
|
|
300
221
|
}
|
|
301
222
|
|
|
302
|
-
export interface CreditGetAutoRechargeParams {
|
|
303
|
-
/**
|
|
304
|
-
* Filter by currency ID (required)
|
|
305
|
-
*/
|
|
306
|
-
currencyId: string;
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* Filter by customer ID (required)
|
|
310
|
-
*/
|
|
311
|
-
customerId: string;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
223
|
export interface CreditGetUsageParams {
|
|
315
224
|
/**
|
|
316
225
|
* Filter by customer ID (required)
|
|
@@ -365,14 +274,13 @@ export interface CreditListLedgerParams extends MyCursorIDPageParams {
|
|
|
365
274
|
|
|
366
275
|
Credits.Grants = Grants;
|
|
367
276
|
Credits.CustomCurrencies = CustomCurrencies;
|
|
277
|
+
Credits.AutoRecharge = AutoRecharge;
|
|
368
278
|
|
|
369
279
|
export declare namespace Credits {
|
|
370
280
|
export {
|
|
371
|
-
type CreditGetAutoRechargeResponse as CreditGetAutoRechargeResponse,
|
|
372
281
|
type CreditGetUsageResponse as CreditGetUsageResponse,
|
|
373
282
|
type CreditListLedgerResponse as CreditListLedgerResponse,
|
|
374
283
|
type CreditListLedgerResponsesMyCursorIDPage as CreditListLedgerResponsesMyCursorIDPage,
|
|
375
|
-
type CreditGetAutoRechargeParams as CreditGetAutoRechargeParams,
|
|
376
284
|
type CreditGetUsageParams as CreditGetUsageParams,
|
|
377
285
|
type CreditListLedgerParams as CreditListLedgerParams,
|
|
378
286
|
};
|
|
@@ -388,15 +296,18 @@ export declare namespace Credits {
|
|
|
388
296
|
|
|
389
297
|
export {
|
|
390
298
|
CustomCurrencies as CustomCurrencies,
|
|
391
|
-
type
|
|
392
|
-
type CustomCurrencyUpdateResponse as CustomCurrencyUpdateResponse,
|
|
299
|
+
type CustomCurrency as CustomCurrency,
|
|
393
300
|
type CustomCurrencyListResponse as CustomCurrencyListResponse,
|
|
394
|
-
type CustomCurrencyArchiveResponse as CustomCurrencyArchiveResponse,
|
|
395
301
|
type CustomCurrencyListAssociatedEntitiesResponse as CustomCurrencyListAssociatedEntitiesResponse,
|
|
396
|
-
type CustomCurrencyUnarchiveResponse as CustomCurrencyUnarchiveResponse,
|
|
397
302
|
type CustomCurrencyListResponsesMyCursorIDPage as CustomCurrencyListResponsesMyCursorIDPage,
|
|
398
303
|
type CustomCurrencyCreateParams as CustomCurrencyCreateParams,
|
|
399
304
|
type CustomCurrencyUpdateParams as CustomCurrencyUpdateParams,
|
|
400
305
|
type CustomCurrencyListParams as CustomCurrencyListParams,
|
|
401
306
|
};
|
|
307
|
+
|
|
308
|
+
export {
|
|
309
|
+
AutoRecharge as AutoRecharge,
|
|
310
|
+
type AutoRechargeGetAutoRechargeResponse as AutoRechargeGetAutoRechargeResponse,
|
|
311
|
+
type AutoRechargeGetAutoRechargeParams as AutoRechargeGetAutoRechargeParams,
|
|
312
|
+
};
|
|
402
313
|
}
|