@stigg/typescript 0.1.0-alpha.1 → 0.1.0-alpha.3
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 +20 -0
- package/README.md +31 -0
- package/core/pagination.d.mts +11 -5
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +11 -5
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js +9 -9
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +9 -9
- package/core/pagination.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/v1/coupons.d.mts +100 -86
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +100 -86
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.js +8 -4
- package/resources/v1/coupons.js.map +1 -1
- package/resources/v1/coupons.mjs +8 -4
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +101 -96
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +101 -96
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +11 -7
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +11 -7
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +2 -2
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts +2 -2
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/payment-method.d.mts +5 -2
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +5 -2
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.js +2 -2
- package/resources/v1/customers/payment-method.mjs +2 -2
- package/resources/v1/customers/usage.d.mts +0 -94
- package/resources/v1/customers/usage.d.mts.map +1 -1
- package/resources/v1/customers/usage.d.ts +0 -94
- package/resources/v1/customers/usage.d.ts.map +1 -1
- package/resources/v1/customers/usage.js +0 -11
- package/resources/v1/customers/usage.js.map +1 -1
- package/resources/v1/customers/usage.mjs +0 -11
- package/resources/v1/customers/usage.mjs.map +1 -1
- package/resources/v1/index.d.mts +3 -3
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +3 -3
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/subscriptions/future-update.d.mts +8 -2
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +8 -2
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js +2 -2
- package/resources/v1/subscriptions/future-update.mjs +2 -2
- package/resources/v1/subscriptions/index.d.mts +1 -1
- package/resources/v1/subscriptions/index.d.mts.map +1 -1
- package/resources/v1/subscriptions/index.d.ts +1 -1
- package/resources/v1/subscriptions/index.d.ts.map +1 -1
- package/resources/v1/subscriptions/index.js.map +1 -1
- package/resources/v1/subscriptions/index.mjs.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +1092 -111
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +1092 -111
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +12 -8
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +12 -8
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/v1.d.mts +32 -9
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +32 -9
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +2 -2
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +2 -2
- package/resources/v1/v1.mjs.map +1 -1
- package/src/core/pagination.ts +24 -18
- package/src/resources/v1/coupons.ts +223 -212
- package/src/resources/v1/customers/customers.ts +121 -120
- package/src/resources/v1/customers/index.ts +2 -1
- package/src/resources/v1/customers/payment-method.ts +5 -2
- package/src/resources/v1/customers/usage.ts +1 -128
- package/src/resources/v1/index.ts +3 -0
- package/src/resources/v1/subscriptions/future-update.ts +8 -2
- package/src/resources/v1/subscriptions/index.ts +1 -0
- package/src/resources/v1/subscriptions/subscriptions.ts +2201 -153
- package/src/resources/v1/v1.ts +32 -3
- 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/src/resources/v1/v1.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
CouponCreateResponse,
|
|
8
8
|
CouponListParams,
|
|
9
9
|
CouponListResponse,
|
|
10
|
+
CouponListResponsesMyCursorIDPage,
|
|
10
11
|
CouponRetrieveResponse,
|
|
11
12
|
Coupons,
|
|
12
13
|
} from './coupons';
|
|
@@ -15,6 +16,7 @@ import {
|
|
|
15
16
|
CustomerCreateParams,
|
|
16
17
|
CustomerListParams,
|
|
17
18
|
CustomerListResponse,
|
|
19
|
+
CustomerListResponsesMyCursorIDPage,
|
|
18
20
|
CustomerResponse,
|
|
19
21
|
CustomerUpdateParams,
|
|
20
22
|
Customers,
|
|
@@ -27,6 +29,7 @@ import {
|
|
|
27
29
|
SubscriptionDelegateResponse,
|
|
28
30
|
SubscriptionListParams,
|
|
29
31
|
SubscriptionListResponse,
|
|
32
|
+
SubscriptionListResponsesMyCursorIDPage,
|
|
30
33
|
SubscriptionMigrateParams,
|
|
31
34
|
SubscriptionMigrateResponse,
|
|
32
35
|
SubscriptionPreviewParams,
|
|
@@ -45,29 +48,46 @@ export class V1 extends APIResource {
|
|
|
45
48
|
coupons: CouponsAPI.Coupons = new CouponsAPI.Coupons(this._client);
|
|
46
49
|
|
|
47
50
|
/**
|
|
48
|
-
*
|
|
51
|
+
* Report usage events
|
|
49
52
|
*/
|
|
50
53
|
createEvent(body: V1CreateEventParams, options?: RequestOptions): APIPromise<V1CreateEventResponse> {
|
|
51
54
|
return this._client.post('/api/v1/events', { body, ...options });
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
/**
|
|
55
|
-
*
|
|
58
|
+
* Report usage measurements
|
|
56
59
|
*/
|
|
57
60
|
createUsage(body: V1CreateUsageParams, options?: RequestOptions): APIPromise<V1CreateUsageResponse> {
|
|
58
61
|
return this._client.post('/api/v1/usage', { body, ...options });
|
|
59
62
|
}
|
|
60
63
|
}
|
|
61
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Response object
|
|
67
|
+
*/
|
|
62
68
|
export interface V1CreateEventResponse {
|
|
69
|
+
/**
|
|
70
|
+
* Empty success response confirming that events were successfully ingested and
|
|
71
|
+
* queued for processing by Stigg's metering system.
|
|
72
|
+
*/
|
|
63
73
|
data: unknown;
|
|
64
74
|
}
|
|
65
75
|
|
|
76
|
+
/**
|
|
77
|
+
* Response containing reported usage measurements with current usage values,
|
|
78
|
+
* period information, and reset dates for each measurement.
|
|
79
|
+
*/
|
|
66
80
|
export interface V1CreateUsageResponse {
|
|
81
|
+
/**
|
|
82
|
+
* Array of usage measurements with current values and period info
|
|
83
|
+
*/
|
|
67
84
|
data: Array<V1CreateUsageResponse.Data>;
|
|
68
85
|
}
|
|
69
86
|
|
|
70
87
|
export namespace V1CreateUsageResponse {
|
|
88
|
+
/**
|
|
89
|
+
* Recorded usage with period info
|
|
90
|
+
*/
|
|
71
91
|
export interface Data {
|
|
72
92
|
/**
|
|
73
93
|
* Unique identifier for the entity
|
|
@@ -136,6 +156,9 @@ export interface V1CreateEventParams {
|
|
|
136
156
|
}
|
|
137
157
|
|
|
138
158
|
export namespace V1CreateEventParams {
|
|
159
|
+
/**
|
|
160
|
+
* Raw usage event
|
|
161
|
+
*/
|
|
139
162
|
export interface Event {
|
|
140
163
|
/**
|
|
141
164
|
* Customer id
|
|
@@ -177,6 +200,9 @@ export interface V1CreateUsageParams {
|
|
|
177
200
|
}
|
|
178
201
|
|
|
179
202
|
export namespace V1CreateUsageParams {
|
|
203
|
+
/**
|
|
204
|
+
* Single usage measurement
|
|
205
|
+
*/
|
|
180
206
|
export interface Usage {
|
|
181
207
|
/**
|
|
182
208
|
* Customer id
|
|
@@ -201,7 +227,7 @@ export namespace V1CreateUsageParams {
|
|
|
201
227
|
/**
|
|
202
228
|
* Additional dimensions for the usage report
|
|
203
229
|
*/
|
|
204
|
-
dimensions?: { [key: string]: string };
|
|
230
|
+
dimensions?: { [key: string]: string | number | boolean };
|
|
205
231
|
|
|
206
232
|
/**
|
|
207
233
|
* Resource id
|
|
@@ -231,6 +257,7 @@ export declare namespace V1 {
|
|
|
231
257
|
Customers as Customers,
|
|
232
258
|
type CustomerResponse as CustomerResponse,
|
|
233
259
|
type CustomerListResponse as CustomerListResponse,
|
|
260
|
+
type CustomerListResponsesMyCursorIDPage as CustomerListResponsesMyCursorIDPage,
|
|
234
261
|
type CustomerCreateParams as CustomerCreateParams,
|
|
235
262
|
type CustomerUpdateParams as CustomerUpdateParams,
|
|
236
263
|
type CustomerListParams as CustomerListParams,
|
|
@@ -245,6 +272,7 @@ export declare namespace V1 {
|
|
|
245
272
|
type SubscriptionMigrateResponse as SubscriptionMigrateResponse,
|
|
246
273
|
type SubscriptionPreviewResponse as SubscriptionPreviewResponse,
|
|
247
274
|
type SubscriptionTransferResponse as SubscriptionTransferResponse,
|
|
275
|
+
type SubscriptionListResponsesMyCursorIDPage as SubscriptionListResponsesMyCursorIDPage,
|
|
248
276
|
type SubscriptionCreateParams as SubscriptionCreateParams,
|
|
249
277
|
type SubscriptionListParams as SubscriptionListParams,
|
|
250
278
|
type SubscriptionDelegateParams as SubscriptionDelegateParams,
|
|
@@ -258,6 +286,7 @@ export declare namespace V1 {
|
|
|
258
286
|
type CouponCreateResponse as CouponCreateResponse,
|
|
259
287
|
type CouponRetrieveResponse as CouponRetrieveResponse,
|
|
260
288
|
type CouponListResponse as CouponListResponse,
|
|
289
|
+
type CouponListResponsesMyCursorIDPage as CouponListResponsesMyCursorIDPage,
|
|
261
290
|
type CouponCreateParams as CouponCreateParams,
|
|
262
291
|
type CouponListParams as CouponListParams,
|
|
263
292
|
};
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.3'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.1.0-alpha.3";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.1.0-alpha.3";
|
|
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-alpha.
|
|
4
|
+
exports.VERSION = '0.1.0-alpha.3'; // 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-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.3'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|