@stigg/typescript 0.1.0-alpha.3 → 0.1.0-alpha.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 (124) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs +1 -1
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/index.d.mts +1 -1
  11. package/resources/index.d.mts.map +1 -1
  12. package/resources/index.d.ts +1 -1
  13. package/resources/index.d.ts.map +1 -1
  14. package/resources/index.js.map +1 -1
  15. package/resources/index.mjs +1 -1
  16. package/resources/index.mjs.map +1 -1
  17. package/resources/v1/coupons.d.mts +6 -89
  18. package/resources/v1/coupons.d.mts.map +1 -1
  19. package/resources/v1/coupons.d.ts +6 -89
  20. package/resources/v1/coupons.d.ts.map +1 -1
  21. package/resources/v1/customers/customers.d.mts +106 -46
  22. package/resources/v1/customers/customers.d.mts.map +1 -1
  23. package/resources/v1/customers/customers.d.ts +106 -46
  24. package/resources/v1/customers/customers.d.ts.map +1 -1
  25. package/resources/v1/customers/customers.js +16 -10
  26. package/resources/v1/customers/customers.js.map +1 -1
  27. package/resources/v1/customers/customers.mjs +16 -10
  28. package/resources/v1/customers/customers.mjs.map +1 -1
  29. package/resources/v1/customers/index.d.mts +2 -2
  30. package/resources/v1/customers/index.d.mts.map +1 -1
  31. package/resources/v1/customers/index.d.ts +2 -2
  32. package/resources/v1/customers/index.d.ts.map +1 -1
  33. package/resources/v1/customers/index.js +3 -3
  34. package/resources/v1/customers/index.js.map +1 -1
  35. package/resources/v1/customers/index.mjs +1 -1
  36. package/resources/v1/customers/index.mjs.map +1 -1
  37. package/resources/v1/customers/promotional-entitlements.d.mts +350 -0
  38. package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -0
  39. package/resources/v1/customers/promotional-entitlements.d.ts +350 -0
  40. package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -0
  41. package/resources/v1/customers/promotional-entitlements.js +23 -0
  42. package/resources/v1/customers/promotional-entitlements.js.map +1 -0
  43. package/resources/v1/customers/promotional-entitlements.mjs +19 -0
  44. package/resources/v1/customers/promotional-entitlements.mjs.map +1 -0
  45. package/resources/v1/events.d.mts +62 -0
  46. package/resources/v1/events.d.mts.map +1 -0
  47. package/resources/v1/events.d.ts +62 -0
  48. package/resources/v1/events.d.ts.map +1 -0
  49. package/resources/v1/events.js +15 -0
  50. package/resources/v1/events.js.map +1 -0
  51. package/resources/v1/events.mjs +11 -0
  52. package/resources/v1/events.mjs.map +1 -0
  53. package/resources/v1/index.d.mts +6 -4
  54. package/resources/v1/index.d.mts.map +1 -1
  55. package/resources/v1/index.d.ts +6 -4
  56. package/resources/v1/index.d.ts.map +1 -1
  57. package/resources/v1/index.js +5 -1
  58. package/resources/v1/index.js.map +1 -1
  59. package/resources/v1/index.mjs +3 -1
  60. package/resources/v1/index.mjs.map +1 -1
  61. package/resources/v1/subscriptions/future-update.d.mts +6 -20
  62. package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
  63. package/resources/v1/subscriptions/future-update.d.ts +6 -20
  64. package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
  65. package/resources/v1/subscriptions/future-update.js.map +1 -1
  66. package/resources/v1/subscriptions/future-update.mjs.map +1 -1
  67. package/resources/v1/subscriptions/index.d.mts +2 -2
  68. package/resources/v1/subscriptions/index.d.mts.map +1 -1
  69. package/resources/v1/subscriptions/index.d.ts +2 -2
  70. package/resources/v1/subscriptions/index.d.ts.map +1 -1
  71. package/resources/v1/subscriptions/index.js.map +1 -1
  72. package/resources/v1/subscriptions/index.mjs +1 -1
  73. package/resources/v1/subscriptions/index.mjs.map +1 -1
  74. package/resources/v1/subscriptions/subscriptions.d.mts +963 -1049
  75. package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
  76. package/resources/v1/subscriptions/subscriptions.d.ts +963 -1049
  77. package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
  78. package/resources/v1/subscriptions/subscriptions.js +24 -6
  79. package/resources/v1/subscriptions/subscriptions.js.map +1 -1
  80. package/resources/v1/subscriptions/subscriptions.mjs +25 -7
  81. package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
  82. package/resources/v1/usage.d.mts +229 -0
  83. package/resources/v1/usage.d.mts.map +1 -0
  84. package/resources/v1/usage.d.ts +229 -0
  85. package/resources/v1/usage.d.ts.map +1 -0
  86. package/resources/v1/usage.js +23 -0
  87. package/resources/v1/usage.js.map +1 -0
  88. package/resources/v1/usage.mjs +19 -0
  89. package/resources/v1/usage.mjs.map +1 -0
  90. package/resources/v1/v1.d.mts +14 -172
  91. package/resources/v1/v1.d.mts.map +1 -1
  92. package/resources/v1/v1.d.ts +14 -172
  93. package/resources/v1/v1.d.ts.map +1 -1
  94. package/resources/v1/v1.js +8 -12
  95. package/resources/v1/v1.js.map +1 -1
  96. package/resources/v1/v1.mjs +8 -12
  97. package/resources/v1/v1.mjs.map +1 -1
  98. package/src/client.ts +2 -14
  99. package/src/resources/index.ts +1 -7
  100. package/src/resources/v1/coupons.ts +6 -222
  101. package/src/resources/v1/customers/customers.ts +142 -57
  102. package/src/resources/v1/customers/index.ts +10 -2
  103. package/src/resources/v1/customers/promotional-entitlements.ts +466 -0
  104. package/src/resources/v1/events.ts +73 -0
  105. package/src/resources/v1/index.ts +19 -15
  106. package/src/resources/v1/subscriptions/future-update.ts +6 -28
  107. package/src/resources/v1/subscriptions/index.ts +8 -11
  108. package/src/resources/v1/subscriptions/subscriptions.ts +2541 -2304
  109. package/src/resources/v1/usage.ts +283 -0
  110. package/src/resources/v1/v1.ts +50 -220
  111. package/src/version.ts +1 -1
  112. package/version.d.mts +1 -1
  113. package/version.d.ts +1 -1
  114. package/version.js +1 -1
  115. package/version.mjs +1 -1
  116. package/resources/v1/customers/usage.d.mts +0 -4
  117. package/resources/v1/customers/usage.d.mts.map +0 -1
  118. package/resources/v1/customers/usage.d.ts +0 -4
  119. package/resources/v1/customers/usage.d.ts.map +0 -1
  120. package/resources/v1/customers/usage.js +0 -9
  121. package/resources/v1/customers/usage.js.map +0 -1
  122. package/resources/v1/customers/usage.mjs +0 -5
  123. package/resources/v1/customers/usage.mjs.map +0 -1
  124. package/src/resources/v1/customers/usage.ts +0 -5
@@ -1,184 +1,26 @@
1
1
  import { APIResource } from "../../core/resource.js";
2
2
  import * as CouponsAPI from "./coupons.js";
3
- import { CouponCreateParams, CouponCreateResponse, CouponListParams, CouponListResponse, CouponListResponsesMyCursorIDPage, CouponRetrieveResponse, Coupons } from "./coupons.js";
3
+ import { Coupon, CouponCreateParams, CouponListParams, CouponListResponse, CouponListResponsesMyCursorIDPage, Coupons } from "./coupons.js";
4
+ import * as EventsAPI from "./events.js";
5
+ import { EventReportParams, EventReportResponse, Events } from "./events.js";
6
+ import * as UsageAPI from "./usage.js";
7
+ import { Usage, UsageHistoryParams, UsageHistoryResponse, UsageReportParams, UsageReportResponse } from "./usage.js";
4
8
  import * as CustomersAPI from "./customers/customers.js";
5
- import { CustomerCreateParams, CustomerListParams, CustomerListResponse, CustomerListResponsesMyCursorIDPage, CustomerResponse, CustomerUpdateParams, Customers } from "./customers/customers.js";
9
+ import { CustomerImportParams, CustomerImportResponse, CustomerListParams, CustomerListResponse, CustomerListResponsesMyCursorIDPage, CustomerProvisionParams, CustomerResponse, CustomerUpdateParams, Customers } from "./customers/customers.js";
6
10
  import * as SubscriptionsAPI from "./subscriptions/subscriptions.js";
7
- import { SubscriptionCreateParams, SubscriptionCreateResponse, SubscriptionDelegateParams, SubscriptionDelegateResponse, SubscriptionListParams, SubscriptionListResponse, SubscriptionListResponsesMyCursorIDPage, SubscriptionMigrateParams, SubscriptionMigrateResponse, SubscriptionPreviewParams, SubscriptionPreviewResponse, SubscriptionRetrieveResponse, SubscriptionTransferParams, SubscriptionTransferResponse, Subscriptions } from "./subscriptions/subscriptions.js";
8
- import { APIPromise } from "../../core/api-promise.js";
9
- import { RequestOptions } from "../../internal/request-options.js";
11
+ import { Subscription, SubscriptionCancelParams, SubscriptionDelegateParams, SubscriptionImportParams, SubscriptionImportResponse, SubscriptionListParams, SubscriptionListResponse, SubscriptionListResponsesMyCursorIDPage, SubscriptionMigrateParams, SubscriptionPreviewParams, SubscriptionPreviewResponse, SubscriptionProvisionParams, SubscriptionProvisionResponse, SubscriptionTransferParams, SubscriptionUpdateParams, Subscriptions } from "./subscriptions/subscriptions.js";
10
12
  export declare class V1 extends APIResource {
11
13
  customers: CustomersAPI.Customers;
12
14
  subscriptions: SubscriptionsAPI.Subscriptions;
13
15
  coupons: CouponsAPI.Coupons;
14
- /**
15
- * Report usage events
16
- */
17
- createEvent(body: V1CreateEventParams, options?: RequestOptions): APIPromise<V1CreateEventResponse>;
18
- /**
19
- * Report usage measurements
20
- */
21
- createUsage(body: V1CreateUsageParams, options?: RequestOptions): APIPromise<V1CreateUsageResponse>;
22
- }
23
- /**
24
- * Response object
25
- */
26
- export interface V1CreateEventResponse {
27
- /**
28
- * Empty success response confirming that events were successfully ingested and
29
- * queued for processing by Stigg's metering system.
30
- */
31
- data: unknown;
32
- }
33
- /**
34
- * Response containing reported usage measurements with current usage values,
35
- * period information, and reset dates for each measurement.
36
- */
37
- export interface V1CreateUsageResponse {
38
- /**
39
- * Array of usage measurements with current values and period info
40
- */
41
- data: Array<V1CreateUsageResponse.Data>;
42
- }
43
- export declare namespace V1CreateUsageResponse {
44
- /**
45
- * Recorded usage with period info
46
- */
47
- interface Data {
48
- /**
49
- * Unique identifier for the entity
50
- */
51
- id: string;
52
- /**
53
- * Timestamp of when the record was created
54
- */
55
- createdAt: string;
56
- /**
57
- * Customer id
58
- */
59
- customerId: string;
60
- /**
61
- * Feature id
62
- */
63
- featureId: string;
64
- /**
65
- * Timestamp
66
- */
67
- timestamp: string;
68
- /**
69
- * The usage measurement record
70
- */
71
- value: number;
72
- /**
73
- * The current measured usage value
74
- */
75
- currentUsage?: number | null;
76
- /**
77
- * The date when the next usage reset will occur
78
- */
79
- nextResetDate?: string | null;
80
- /**
81
- * Resource id
82
- */
83
- resourceId?: string | null;
84
- /**
85
- * The end date of the usage period in which this measurement resides (for
86
- * entitlements with a reset period)
87
- */
88
- usagePeriodEnd?: string | null;
89
- /**
90
- * The start date of the usage period in which this measurement resides (for
91
- * entitlements with a reset period)
92
- */
93
- usagePeriodStart?: string | null;
94
- }
95
- }
96
- export interface V1CreateEventParams {
97
- /**
98
- * A list of usage events to report
99
- */
100
- events: Array<V1CreateEventParams.Event>;
101
- }
102
- export declare namespace V1CreateEventParams {
103
- /**
104
- * Raw usage event
105
- */
106
- interface Event {
107
- /**
108
- * Customer id
109
- */
110
- customerId: string;
111
- /**
112
- * The name of the usage event
113
- */
114
- eventName: string;
115
- /**
116
- * Idempotency key
117
- */
118
- idempotencyKey: string;
119
- /**
120
- * Dimensions associated with the usage event
121
- */
122
- dimensions?: {
123
- [key: string]: string | number | boolean;
124
- };
125
- /**
126
- * Resource id
127
- */
128
- resourceId?: string | null;
129
- /**
130
- * Timestamp
131
- */
132
- timestamp?: string;
133
- }
134
- }
135
- export interface V1CreateUsageParams {
136
- /**
137
- * A list of usage reports to be submitted in bulk
138
- */
139
- usages: Array<V1CreateUsageParams.Usage>;
140
- }
141
- export declare namespace V1CreateUsageParams {
142
- /**
143
- * Single usage measurement
144
- */
145
- interface Usage {
146
- /**
147
- * Customer id
148
- */
149
- customerId: string;
150
- /**
151
- * Feature id
152
- */
153
- featureId: string;
154
- /**
155
- * The value to report for usage
156
- */
157
- value: number;
158
- /**
159
- * Timestamp of when the record was created
160
- */
161
- createdAt?: string;
162
- /**
163
- * Additional dimensions for the usage report
164
- */
165
- dimensions?: {
166
- [key: string]: string | number | boolean;
167
- };
168
- /**
169
- * Resource id
170
- */
171
- resourceId?: string | null;
172
- /**
173
- * The method by which the usage value should be updated
174
- */
175
- updateBehavior?: 'DELTA' | 'SET';
176
- }
16
+ events: EventsAPI.Events;
17
+ usage: UsageAPI.Usage;
177
18
  }
178
19
  export declare namespace V1 {
179
- export { type V1CreateEventResponse as V1CreateEventResponse, type V1CreateUsageResponse as V1CreateUsageResponse, type V1CreateEventParams as V1CreateEventParams, type V1CreateUsageParams as V1CreateUsageParams, };
180
- export { Customers as Customers, type CustomerResponse as CustomerResponse, type CustomerListResponse as CustomerListResponse, type CustomerListResponsesMyCursorIDPage as CustomerListResponsesMyCursorIDPage, type CustomerCreateParams as CustomerCreateParams, type CustomerUpdateParams as CustomerUpdateParams, type CustomerListParams as CustomerListParams, };
181
- export { Subscriptions as Subscriptions, type SubscriptionCreateResponse as SubscriptionCreateResponse, type SubscriptionRetrieveResponse as SubscriptionRetrieveResponse, type SubscriptionListResponse as SubscriptionListResponse, type SubscriptionDelegateResponse as SubscriptionDelegateResponse, type SubscriptionMigrateResponse as SubscriptionMigrateResponse, type SubscriptionPreviewResponse as SubscriptionPreviewResponse, type SubscriptionTransferResponse as SubscriptionTransferResponse, type SubscriptionListResponsesMyCursorIDPage as SubscriptionListResponsesMyCursorIDPage, type SubscriptionCreateParams as SubscriptionCreateParams, type SubscriptionListParams as SubscriptionListParams, type SubscriptionDelegateParams as SubscriptionDelegateParams, type SubscriptionMigrateParams as SubscriptionMigrateParams, type SubscriptionPreviewParams as SubscriptionPreviewParams, type SubscriptionTransferParams as SubscriptionTransferParams, };
182
- export { Coupons as Coupons, type CouponCreateResponse as CouponCreateResponse, type CouponRetrieveResponse as CouponRetrieveResponse, type CouponListResponse as CouponListResponse, type CouponListResponsesMyCursorIDPage as CouponListResponsesMyCursorIDPage, type CouponCreateParams as CouponCreateParams, type CouponListParams as CouponListParams, };
20
+ export { Customers as Customers, type CustomerResponse as CustomerResponse, type CustomerListResponse as CustomerListResponse, type CustomerImportResponse as CustomerImportResponse, type CustomerListResponsesMyCursorIDPage as CustomerListResponsesMyCursorIDPage, type CustomerUpdateParams as CustomerUpdateParams, type CustomerListParams as CustomerListParams, type CustomerImportParams as CustomerImportParams, type CustomerProvisionParams as CustomerProvisionParams, };
21
+ export { Subscriptions as Subscriptions, type Subscription as Subscription, type SubscriptionListResponse as SubscriptionListResponse, type SubscriptionImportResponse as SubscriptionImportResponse, type SubscriptionPreviewResponse as SubscriptionPreviewResponse, type SubscriptionProvisionResponse as SubscriptionProvisionResponse, type SubscriptionListResponsesMyCursorIDPage as SubscriptionListResponsesMyCursorIDPage, type SubscriptionUpdateParams as SubscriptionUpdateParams, type SubscriptionListParams as SubscriptionListParams, type SubscriptionCancelParams as SubscriptionCancelParams, type SubscriptionDelegateParams as SubscriptionDelegateParams, type SubscriptionImportParams as SubscriptionImportParams, type SubscriptionMigrateParams as SubscriptionMigrateParams, type SubscriptionPreviewParams as SubscriptionPreviewParams, type SubscriptionProvisionParams as SubscriptionProvisionParams, type SubscriptionTransferParams as SubscriptionTransferParams, };
22
+ export { Coupons as Coupons, type Coupon as Coupon, type CouponListResponse as CouponListResponse, type CouponListResponsesMyCursorIDPage as CouponListResponsesMyCursorIDPage, type CouponCreateParams as CouponCreateParams, type CouponListParams as CouponListParams, };
23
+ export { Events as Events, type EventReportResponse as EventReportResponse, type EventReportParams as EventReportParams, };
24
+ export { Usage as Usage, type UsageHistoryResponse as UsageHistoryResponse, type UsageReportResponse as UsageReportResponse, type UsageHistoryParams as UsageHistoryParams, type UsageReportParams as UsageReportParams, };
183
25
  }
184
26
  //# sourceMappingURL=v1.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EACL,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,iCAAiC,EACjC,sBAAsB,EACtB,OAAO,EACR;OACM,KAAK,YAAY;OACjB,EACL,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,mCAAmC,EACnC,gBAAgB,EAChB,oB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gB,IAAI,gBAAgB,GAC1C,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
@@ -6,6 +6,10 @@ 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");
11
+ const UsageAPI = tslib_1.__importStar(require("./usage.js"));
12
+ const usage_1 = require("./usage.js");
9
13
  const CustomersAPI = tslib_1.__importStar(require("./customers/customers.js"));
10
14
  const customers_1 = require("./customers/customers.js");
11
15
  const SubscriptionsAPI = tslib_1.__importStar(require("./subscriptions/subscriptions.js"));
@@ -16,22 +20,14 @@ class V1 extends resource_1.APIResource {
16
20
  this.customers = new CustomersAPI.Customers(this._client);
17
21
  this.subscriptions = new SubscriptionsAPI.Subscriptions(this._client);
18
22
  this.coupons = new CouponsAPI.Coupons(this._client);
19
- }
20
- /**
21
- * Report usage events
22
- */
23
- createEvent(body, options) {
24
- return this._client.post('/api/v1/events', { body, ...options });
25
- }
26
- /**
27
- * Report usage measurements
28
- */
29
- createUsage(body, options) {
30
- return this._client.post('/api/v1/usage', { body, ...options });
23
+ this.events = new EventsAPI.Events(this._client);
24
+ this.usage = new UsageAPI.Usage(this._client);
31
25
  }
32
26
  }
33
27
  exports.V1 = V1;
34
28
  V1.Customers = customers_1.Customers;
35
29
  V1.Subscriptions = subscriptions_1.Subscriptions;
36
30
  V1.Coupons = coupons_1.Coupons;
31
+ V1.Events = events_1.Events;
32
+ V1.Usage = usage_1.Usage;
37
33
  //# sourceMappingURL=v1.js.map
@@ -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,+EAAsD;AACtD,wDAQ+B;AAC/B,2FAAkE;AAClE,oEAgBuC;AAIvC,MAAa,EAAG,SAAQ,sBAAW;IAAnC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7E,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjG,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAerE,CAAC;IAbC;;OAEG;IACH,WAAW,CAAC,IAAyB,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,IAAyB,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;CACF;AAlBD,gBAkBC;AAqLD,EAAE,CAAC,SAAS,GAAG,qBAAS,CAAC;AACzB,EAAE,CAAC,aAAa,GAAG,6BAAa,CAAC;AACjC,EAAE,CAAC,OAAO,GAAG,iBAAO,CAAC"}
1
+ {"version":3,"file":"v1.js","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,iEAAwC;AACxC,0CAOmB;AACnB,+DAAsC;AACtC,wCAA0E;AAC1E,6DAAoC;AACpC,sCAMiB;AACjB,+EAAsD;AACtD,wDAU+B;AAC/B,2FAAkE;AAClE,oEAiBuC;AAEvC,MAAa,EAAG,SAAQ,sBAAW;IAAnC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7E,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjG,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;CAAA;AAND,gBAMC;AAED,EAAE,CAAC,SAAS,GAAG,qBAAS,CAAC;AACzB,EAAE,CAAC,aAAa,GAAG,6BAAa,CAAC;AACjC,EAAE,CAAC,OAAO,GAAG,iBAAO,CAAC;AACrB,EAAE,CAAC,MAAM,GAAG,eAAM,CAAC;AACnB,EAAE,CAAC,KAAK,GAAG,aAAK,CAAC"}
@@ -2,6 +2,10 @@
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";
7
+ import * as UsageAPI from "./usage.mjs";
8
+ import { Usage, } from "./usage.mjs";
5
9
  import * as CustomersAPI from "./customers/customers.mjs";
6
10
  import { Customers, } from "./customers/customers.mjs";
7
11
  import * as SubscriptionsAPI from "./subscriptions/subscriptions.mjs";
@@ -12,21 +16,13 @@ export class V1 extends APIResource {
12
16
  this.customers = new CustomersAPI.Customers(this._client);
13
17
  this.subscriptions = new SubscriptionsAPI.Subscriptions(this._client);
14
18
  this.coupons = new CouponsAPI.Coupons(this._client);
15
- }
16
- /**
17
- * Report usage events
18
- */
19
- createEvent(body, options) {
20
- return this._client.post('/api/v1/events', { body, ...options });
21
- }
22
- /**
23
- * Report usage measurements
24
- */
25
- createUsage(body, options) {
26
- return this._client.post('/api/v1/usage', { body, ...options });
19
+ this.events = new EventsAPI.Events(this._client);
20
+ this.usage = new UsageAPI.Usage(this._client);
27
21
  }
28
22
  }
29
23
  V1.Customers = Customers;
30
24
  V1.Subscriptions = Subscriptions;
31
25
  V1.Coupons = Coupons;
26
+ V1.Events = Events;
27
+ V1.Usage = Usage;
32
28
  //# sourceMappingURL=v1.mjs.map
@@ -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,YAAY;OACjB,EAOL,SAAS,GACV;OACM,KAAK,gBAAgB;OACrB,EAeL,aAAa,GACd;AAID,MAAM,OAAO,EAAG,SAAQ,WAAW;IAAnC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7E,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjG,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAerE,CAAC;IAbC;;OAEG;IACH,WAAW,CAAC,IAAyB,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,IAAyB,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAA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client.ts CHANGED
@@ -18,13 +18,7 @@ import { AbstractPage, type MyCursorIDPageParams, MyCursorIDPageResponse } from
18
18
  import * as Uploads from './core/uploads';
19
19
  import * as API from './resources/index';
20
20
  import { APIPromise } from './core/api-promise';
21
- import {
22
- V1,
23
- V1CreateEventParams,
24
- V1CreateEventResponse,
25
- V1CreateUsageParams,
26
- V1CreateUsageResponse,
27
- } from './resources/v1/v1';
21
+ import { V1 } from './resources/v1/v1';
28
22
  import { type Fetch } from './internal/builtin-types';
29
23
  import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
30
24
  import { FinalRequestOptions, RequestOptions } from './internal/request-options';
@@ -755,11 +749,5 @@ export declare namespace Stigg {
755
749
  type MyCursorIDPageResponse as MyCursorIDPageResponse,
756
750
  };
757
751
 
758
- export {
759
- V1 as V1,
760
- type V1CreateEventResponse as V1CreateEventResponse,
761
- type V1CreateUsageResponse as V1CreateUsageResponse,
762
- type V1CreateEventParams as V1CreateEventParams,
763
- type V1CreateUsageParams as V1CreateUsageParams,
764
- };
752
+ export { V1 as V1 };
765
753
  }
@@ -1,9 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export {
4
- V1,
5
- type V1CreateEventResponse,
6
- type V1CreateUsageResponse,
7
- type V1CreateEventParams,
8
- type V1CreateUsageParams,
9
- } from './v1/v1';
3
+ export { V1 } from './v1/v1';
@@ -10,14 +10,14 @@ export class Coupons extends APIResource {
10
10
  /**
11
11
  * Create coupon
12
12
  */
13
- create(body: CouponCreateParams, options?: RequestOptions): APIPromise<CouponCreateResponse> {
13
+ create(body: CouponCreateParams, options?: RequestOptions): APIPromise<Coupon> {
14
14
  return this._client.post('/api/v1/coupons', { body, ...options });
15
15
  }
16
16
 
17
17
  /**
18
18
  * Get a single coupon by ID
19
19
  */
20
- retrieve(id: string, options?: RequestOptions): APIPromise<CouponRetrieveResponse> {
20
+ retrieve(id: string, options?: RequestOptions): APIPromise<Coupon> {
21
21
  return this._client.get(path`/api/v1/coupons/${id}`, options);
22
22
  }
23
23
 
@@ -40,229 +40,14 @@ export type CouponListResponsesMyCursorIDPage = MyCursorIDPage<CouponListRespons
40
40
  /**
41
41
  * Response object
42
42
  */
43
- export interface CouponCreateResponse {
43
+ export interface Coupon {
44
44
  /**
45
45
  * Discount instrument with percentage or fixed amount
46
46
  */
47
- data: CouponCreateResponse.Data;
47
+ data: Coupon.Data;
48
48
  }
49
49
 
50
- export namespace CouponCreateResponse {
51
- /**
52
- * Discount instrument with percentage or fixed amount
53
- */
54
- export interface Data {
55
- /**
56
- * The unique identifier for the entity
57
- */
58
- id: string;
59
-
60
- /**
61
- * Fixed amount discounts in different currencies
62
- */
63
- amountsOff: Array<Data.AmountsOff> | null;
64
-
65
- /**
66
- * The unique identifier for the entity in the billing provider
67
- */
68
- billingId: string | null;
69
-
70
- /**
71
- * The URL to the entity in the billing provider
72
- */
73
- billingLinkUrl: string | null;
74
-
75
- /**
76
- * Timestamp of when the record was created
77
- */
78
- createdAt: string;
79
-
80
- /**
81
- * Description of the coupon
82
- */
83
- description: string | null;
84
-
85
- /**
86
- * Duration of the coupon validity in months
87
- */
88
- durationInMonths: number | null;
89
-
90
- /**
91
- * Name of the coupon
92
- */
93
- name: string;
94
-
95
- /**
96
- * Percentage discount off the original price
97
- */
98
- percentOff: number | null;
99
-
100
- /**
101
- * The source of the coupon
102
- */
103
- source: 'STIGG' | 'STIGG_ADHOC' | 'STRIPE' | null;
104
-
105
- /**
106
- * Current status of the coupon
107
- */
108
- status: 'ACTIVE' | 'ARCHIVED';
109
-
110
- /**
111
- * Type of the coupon (percentage or fixed amount)
112
- */
113
- type: 'FIXED' | 'PERCENTAGE';
114
-
115
- /**
116
- * Timestamp of when the record was last updated
117
- */
118
- updatedAt: string;
119
- }
120
-
121
- export namespace Data {
122
- /**
123
- * Monetary amount with currency
124
- */
125
- export interface AmountsOff {
126
- /**
127
- * The price amount
128
- */
129
- amount: number;
130
-
131
- /**
132
- * The price currency
133
- */
134
- currency:
135
- | 'usd'
136
- | 'aed'
137
- | 'all'
138
- | 'amd'
139
- | 'ang'
140
- | 'aud'
141
- | 'awg'
142
- | 'azn'
143
- | 'bam'
144
- | 'bbd'
145
- | 'bdt'
146
- | 'bgn'
147
- | 'bif'
148
- | 'bmd'
149
- | 'bnd'
150
- | 'bsd'
151
- | 'bwp'
152
- | 'byn'
153
- | 'bzd'
154
- | 'brl'
155
- | 'cad'
156
- | 'cdf'
157
- | 'chf'
158
- | 'cny'
159
- | 'czk'
160
- | 'dkk'
161
- | 'dop'
162
- | 'dzd'
163
- | 'egp'
164
- | 'etb'
165
- | 'eur'
166
- | 'fjd'
167
- | 'gbp'
168
- | 'gel'
169
- | 'gip'
170
- | 'gmd'
171
- | 'gyd'
172
- | 'hkd'
173
- | 'hrk'
174
- | 'htg'
175
- | 'idr'
176
- | 'ils'
177
- | 'inr'
178
- | 'isk'
179
- | 'jmd'
180
- | 'jpy'
181
- | 'kes'
182
- | 'kgs'
183
- | 'khr'
184
- | 'kmf'
185
- | 'krw'
186
- | 'kyd'
187
- | 'kzt'
188
- | 'lbp'
189
- | 'lkr'
190
- | 'lrd'
191
- | 'lsl'
192
- | 'mad'
193
- | 'mdl'
194
- | 'mga'
195
- | 'mkd'
196
- | 'mmk'
197
- | 'mnt'
198
- | 'mop'
199
- | 'mro'
200
- | 'mvr'
201
- | 'mwk'
202
- | 'mxn'
203
- | 'myr'
204
- | 'mzn'
205
- | 'nad'
206
- | 'ngn'
207
- | 'nok'
208
- | 'npr'
209
- | 'nzd'
210
- | 'pgk'
211
- | 'php'
212
- | 'pkr'
213
- | 'pln'
214
- | 'qar'
215
- | 'ron'
216
- | 'rsd'
217
- | 'rub'
218
- | 'rwf'
219
- | 'sar'
220
- | 'sbd'
221
- | 'scr'
222
- | 'sek'
223
- | 'sgd'
224
- | 'sle'
225
- | 'sll'
226
- | 'sos'
227
- | 'szl'
228
- | 'thb'
229
- | 'tjs'
230
- | 'top'
231
- | 'try'
232
- | 'ttd'
233
- | 'tzs'
234
- | 'uah'
235
- | 'uzs'
236
- | 'vnd'
237
- | 'vuv'
238
- | 'wst'
239
- | 'xaf'
240
- | 'xcd'
241
- | 'yer'
242
- | 'zar'
243
- | 'zmw'
244
- | 'clp'
245
- | 'djf'
246
- | 'gnf'
247
- | 'ugx'
248
- | 'pyg'
249
- | 'xof'
250
- | 'xpf';
251
- }
252
- }
253
- }
254
-
255
- /**
256
- * Response object
257
- */
258
- export interface CouponRetrieveResponse {
259
- /**
260
- * Discount instrument with percentage or fixed amount
261
- */
262
- data: CouponRetrieveResponse.Data;
263
- }
264
-
265
- export namespace CouponRetrieveResponse {
50
+ export namespace Coupon {
266
51
  /**
267
52
  * Discount instrument with percentage or fixed amount
268
53
  */
@@ -844,8 +629,7 @@ export interface CouponListParams extends MyCursorIDPageParams {}
844
629
 
845
630
  export declare namespace Coupons {
846
631
  export {
847
- type CouponCreateResponse as CouponCreateResponse,
848
- type CouponRetrieveResponse as CouponRetrieveResponse,
632
+ type Coupon as Coupon,
849
633
  type CouponListResponse as CouponListResponse,
850
634
  type CouponListResponsesMyCursorIDPage as CouponListResponsesMyCursorIDPage,
851
635
  type CouponCreateParams as CouponCreateParams,