@tolt/api 0.2.0 → 0.3.0
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/dist/api/errors/TooManyRequestsError.d.ts +7 -0
- package/dist/api/errors/TooManyRequestsError.js +17 -0
- package/dist/api/errors/index.d.ts +1 -0
- package/dist/api/errors/index.js +1 -0
- package/dist/api/resources/clicks/client/Client.d.ts +10 -4
- package/dist/api/resources/clicks/client/Client.js +22 -24
- package/dist/api/resources/clicks/client/requests/index.d.ts +0 -1
- package/dist/api/resources/clicks/types/CreateClickRequest.d.ts +1 -0
- package/dist/api/resources/clicks/types/{ListClicksResponse.d.ts → CreateClickResponse.d.ts} +2 -3
- package/dist/api/resources/clicks/types/index.d.ts +2 -2
- package/dist/api/resources/clicks/types/index.js +2 -2
- package/dist/api/resources/commissions/client/Client.d.ts +45 -0
- package/dist/api/resources/commissions/client/Client.js +154 -1
- package/dist/api/resources/commissions/client/requests/BulkApproveCommissionsRequest.d.ts +10 -0
- package/dist/api/resources/commissions/client/requests/BulkApproveCommissionsRequest.js +2 -0
- package/dist/api/resources/commissions/client/requests/BulkDeclineCommissionsRequest.d.ts +10 -0
- package/dist/api/resources/commissions/client/requests/BulkDeclineCommissionsRequest.js +2 -0
- package/dist/api/resources/commissions/client/requests/ListCommissionsRequest.d.ts +13 -0
- package/dist/api/resources/commissions/client/requests/UpdateCommissionRequest.d.ts +3 -3
- package/dist/api/resources/commissions/client/requests/index.d.ts +2 -0
- package/dist/api/resources/commissions/types/BulkApproveCommissionsResponse.d.ts +6 -0
- package/dist/api/resources/commissions/types/BulkApproveCommissionsResponse.js +2 -0
- package/dist/api/resources/commissions/types/BulkDeclineCommissionsResponse.d.ts +6 -0
- package/dist/api/resources/commissions/types/BulkDeclineCommissionsResponse.js +2 -0
- package/dist/api/resources/commissions/types/ListCommissionsRequestSort.d.ts +6 -0
- package/dist/api/resources/commissions/types/ListCommissionsRequestSort.js +6 -0
- package/dist/api/resources/commissions/types/ListCommissionsResponse.d.ts +4 -0
- package/dist/api/resources/commissions/types/index.d.ts +3 -0
- package/dist/api/resources/commissions/types/index.js +3 -0
- package/dist/api/resources/customers/client/Client.d.ts +5 -1
- package/dist/api/resources/customers/client/Client.js +22 -4
- package/dist/api/resources/customers/client/requests/CreateCustomerRequest.d.ts +5 -5
- package/dist/api/resources/customers/client/requests/ListCustomersRequest.d.ts +13 -0
- package/dist/api/resources/customers/client/requests/UpdateCustomerRequest.d.ts +6 -6
- package/dist/api/resources/customers/types/ListCustomersRequestSort.d.ts +6 -0
- package/dist/api/resources/customers/types/ListCustomersRequestSort.js +6 -0
- package/dist/api/resources/customers/types/ListCustomersResponse.d.ts +4 -0
- package/dist/api/resources/customers/types/index.d.ts +1 -0
- package/dist/api/resources/customers/types/index.js +1 -0
- package/dist/api/resources/embed/client/Client.d.ts +1 -0
- package/dist/api/resources/embed/client/Client.js +3 -0
- package/dist/api/resources/embed/client/requests/CreateEmbedTokenRequest.d.ts +2 -2
- package/dist/api/resources/flows/client/Client.d.ts +2 -0
- package/dist/api/resources/flows/client/Client.js +13 -1
- package/dist/api/resources/flows/client/requests/ListFlowsRequest.d.ts +13 -0
- package/dist/api/resources/flows/types/ListFlowsRequestSort.d.ts +6 -0
- package/dist/api/resources/flows/types/ListFlowsRequestSort.js +6 -0
- package/dist/api/resources/flows/types/ListFlowsResponse.d.ts +4 -0
- package/dist/api/resources/flows/types/index.d.ts +1 -0
- package/dist/api/resources/flows/types/index.js +1 -0
- package/dist/api/resources/groups/client/Client.d.ts +2 -0
- package/dist/api/resources/groups/client/Client.js +13 -1
- package/dist/api/resources/groups/client/requests/ListGroupsRequest.d.ts +13 -0
- package/dist/api/resources/groups/types/ListGroupsRequestSort.d.ts +6 -0
- package/dist/api/resources/groups/types/ListGroupsRequestSort.js +6 -0
- package/dist/api/resources/groups/types/ListGroupsResponse.d.ts +4 -0
- package/dist/api/resources/groups/types/index.d.ts +1 -0
- package/dist/api/resources/groups/types/index.js +1 -0
- package/dist/api/resources/links/client/Client.d.ts +6 -1
- package/dist/api/resources/links/client/Client.js +23 -2
- package/dist/api/resources/links/client/requests/CreateLinkRequest.d.ts +2 -2
- package/dist/api/resources/links/client/requests/ListLinksRequest.d.ts +13 -0
- package/dist/api/resources/links/types/ListLinksRequestSort.d.ts +6 -0
- package/dist/api/resources/links/types/ListLinksRequestSort.js +6 -0
- package/dist/api/resources/links/types/ListLinksResponse.d.ts +4 -0
- package/dist/api/resources/links/types/index.d.ts +1 -0
- package/dist/api/resources/links/types/index.js +1 -0
- package/dist/api/resources/partners/client/Client.d.ts +85 -0
- package/dist/api/resources/partners/client/Client.js +273 -1
- package/dist/api/resources/partners/client/requests/BulkApprovePartnersRequest.d.ts +10 -0
- package/dist/api/resources/partners/client/requests/BulkApprovePartnersRequest.js +2 -0
- package/dist/api/resources/partners/client/requests/BulkRejectPartnersRequest.d.ts +11 -0
- package/dist/api/resources/partners/client/requests/BulkRejectPartnersRequest.js +2 -0
- package/dist/api/resources/partners/client/requests/CreatePartnerRequest.d.ts +41 -0
- package/dist/api/resources/partners/client/requests/CreatePartnerRequest.js +8 -0
- package/dist/api/resources/partners/client/requests/ListPartnersRequest.d.ts +13 -0
- package/dist/api/resources/partners/client/requests/RejectPartnerRequest.d.ts +1 -1
- package/dist/api/resources/partners/client/requests/SuspendPartnerRequest.d.ts +1 -1
- package/dist/api/resources/partners/client/requests/UpdatePartnerRequest.d.ts +16 -0
- package/dist/api/resources/partners/client/requests/UpdatePartnerRequest.js +2 -0
- package/dist/api/resources/partners/client/requests/index.d.ts +4 -0
- package/dist/api/resources/partners/client/requests/index.js +1 -1
- package/dist/api/resources/partners/types/BulkApprovePartnersResponse.d.ts +6 -0
- package/dist/api/resources/partners/types/BulkApprovePartnersResponse.js +2 -0
- package/dist/api/resources/partners/types/BulkRejectPartnersResponse.d.ts +6 -0
- package/dist/api/resources/partners/types/BulkRejectPartnersResponse.js +2 -0
- package/dist/api/resources/partners/types/CreatePartnerResponse.d.ts +6 -0
- package/dist/api/resources/partners/types/CreatePartnerResponse.js +2 -0
- package/dist/api/resources/partners/types/ListPartnersRequestSort.d.ts +6 -0
- package/dist/api/resources/partners/types/ListPartnersRequestSort.js +6 -0
- package/dist/api/resources/partners/types/ListPartnersResponse.d.ts +4 -0
- package/dist/api/resources/partners/types/UpdatePartnerResponse.d.ts +6 -0
- package/dist/api/resources/partners/types/UpdatePartnerResponse.js +2 -0
- package/dist/api/resources/partners/types/index.d.ts +5 -0
- package/dist/api/resources/partners/types/index.js +5 -0
- package/dist/api/resources/programs/client/Client.d.ts +2 -0
- package/dist/api/resources/programs/client/Client.js +13 -1
- package/dist/api/resources/programs/client/requests/ListProgramsRequest.d.ts +13 -0
- package/dist/api/resources/programs/types/ListProgramsRequestSort.d.ts +6 -0
- package/dist/api/resources/programs/types/ListProgramsRequestSort.js +6 -0
- package/dist/api/resources/programs/types/ListProgramsResponse.d.ts +4 -0
- package/dist/api/resources/programs/types/index.d.ts +1 -0
- package/dist/api/resources/programs/types/index.js +1 -0
- package/dist/api/resources/promotionCodes/client/Client.d.ts +6 -1
- package/dist/api/resources/promotionCodes/client/Client.js +23 -2
- package/dist/api/resources/promotionCodes/client/requests/CreatePromotionCodeRequest.d.ts +2 -2
- package/dist/api/resources/promotionCodes/client/requests/ListPromotionCodesRequest.d.ts +13 -0
- package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestSort.d.ts +6 -0
- package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestSort.js +6 -0
- package/dist/api/resources/promotionCodes/types/ListPromotionCodesResponse.d.ts +4 -0
- package/dist/api/resources/promotionCodes/types/index.d.ts +1 -0
- package/dist/api/resources/promotionCodes/types/index.js +1 -0
- package/dist/api/resources/reports/client/Client.d.ts +5 -0
- package/dist/api/resources/reports/client/Client.js +15 -0
- package/dist/api/resources/transactions/client/Client.d.ts +8 -1
- package/dist/api/resources/transactions/client/Client.js +29 -2
- package/dist/api/resources/transactions/client/requests/CreateTransactionRequest.d.ts +5 -5
- package/dist/api/resources/transactions/client/requests/ListTransactionsRequest.d.ts +13 -0
- package/dist/api/resources/transactions/client/requests/UpdateTransactionRequest.d.ts +4 -4
- package/dist/api/resources/transactions/types/ListTransactionsRequestSort.d.ts +6 -0
- package/dist/api/resources/transactions/types/ListTransactionsRequestSort.js +6 -0
- package/dist/api/resources/transactions/types/ListTransactionsResponse.d.ts +4 -0
- package/dist/api/resources/transactions/types/index.d.ts +1 -0
- package/dist/api/resources/transactions/types/index.js +1 -0
- package/dist/api/types/BulkResult.d.ts +24 -0
- package/dist/api/types/BulkResult.js +14 -0
- package/dist/api/types/Click.d.ts +5 -5
- package/dist/api/types/Commission.d.ts +13 -13
- package/dist/api/types/CreatedPartner.d.ts +19 -0
- package/dist/api/types/CreatedPartner.js +2 -0
- package/dist/api/types/Customer.d.ts +11 -11
- package/dist/api/types/EmbedToken.d.ts +1 -1
- package/dist/api/types/Error_.d.ts +34 -0
- package/dist/api/types/Error_.js +21 -1
- package/dist/api/types/Flow.d.ts +8 -8
- package/dist/api/types/Group.d.ts +9 -9
- package/dist/api/types/Link.d.ts +5 -5
- package/dist/api/types/Partner.d.ts +12 -8
- package/dist/api/types/Program.d.ts +8 -8
- package/dist/api/types/PromotionCode.d.ts +8 -8
- package/dist/api/types/ReportsLinkRow.d.ts +2 -2
- package/dist/api/types/ReportsOverview.d.ts +3 -3
- package/dist/api/types/ReportsPartnerRow.d.ts +4 -4
- package/dist/api/types/Transaction.d.ts +17 -17
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- package/package.json +1 -1
- package/dist/api/resources/clicks/client/requests/ListClicksRequest.d.ts +0 -16
- package/dist/api/resources/clicks/types/ListClicksRequestOrder.d.ts +0 -5
- package/dist/api/resources/clicks/types/ListClicksRequestOrder.js +0 -5
- /package/dist/api/resources/clicks/{client/requests/ListClicksRequest.js → types/CreateClickRequest.js} +0 -0
- /package/dist/api/resources/clicks/types/{ListClicksResponse.js → CreateClickResponse.js} +0 -0
|
@@ -17,6 +17,7 @@ export class TransactionsClient {
|
|
|
17
17
|
*
|
|
18
18
|
* @throws {@link ToltApi.BadRequestError}
|
|
19
19
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
20
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
20
21
|
* @throws {@link errors.ToltApiError}
|
|
21
22
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
22
23
|
*
|
|
@@ -27,11 +28,17 @@ export class TransactionsClient {
|
|
|
27
28
|
return core.HttpResponsePromise.fromPromise(this.__listTransactions(request, requestOptions));
|
|
28
29
|
}
|
|
29
30
|
async __listTransactions(request = {}, requestOptions) {
|
|
30
|
-
const { limit, order, starting_after: startingAfter, program_id: programId, partner_id: partnerId, customer_id: customerId, status, search, } = request;
|
|
31
|
+
const { limit, order, sort, starting_after: startingAfter, ending_before: endingBefore, created_after: createdAfter, created_before: createdBefore, updated_after: updatedAfter, updated_before: updatedBefore, program_id: programId, partner_id: partnerId, customer_id: customerId, status, search, } = request;
|
|
31
32
|
const _queryParams = {
|
|
32
33
|
limit,
|
|
33
34
|
order: order != null ? order : undefined,
|
|
35
|
+
sort: sort != null ? sort : undefined,
|
|
34
36
|
starting_after: startingAfter,
|
|
37
|
+
ending_before: endingBefore,
|
|
38
|
+
created_after: createdAfter != null ? createdAfter : undefined,
|
|
39
|
+
created_before: createdBefore != null ? createdBefore : undefined,
|
|
40
|
+
updated_after: updatedAfter != null ? updatedAfter : undefined,
|
|
41
|
+
updated_before: updatedBefore != null ? updatedBefore : undefined,
|
|
35
42
|
program_id: programId,
|
|
36
43
|
partner_id: partnerId,
|
|
37
44
|
customer_id: customerId,
|
|
@@ -66,6 +73,8 @@ export class TransactionsClient {
|
|
|
66
73
|
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
67
74
|
case 401:
|
|
68
75
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
76
|
+
case 429:
|
|
77
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
69
78
|
default:
|
|
70
79
|
throw new errors.ToltApiError({
|
|
71
80
|
statusCode: _response.error.statusCode,
|
|
@@ -82,13 +91,14 @@ export class TransactionsClient {
|
|
|
82
91
|
*
|
|
83
92
|
* @throws {@link ToltApi.BadRequestError}
|
|
84
93
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
94
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
85
95
|
* @throws {@link errors.ToltApiError}
|
|
86
96
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
87
97
|
*
|
|
88
98
|
* @example
|
|
89
99
|
* await client.transactions.createTransaction({
|
|
90
100
|
* amount: 1,
|
|
91
|
-
*
|
|
101
|
+
* customer_id: "customer_id"
|
|
92
102
|
* })
|
|
93
103
|
*/
|
|
94
104
|
createTransaction(request, requestOptions) {
|
|
@@ -122,6 +132,8 @@ export class TransactionsClient {
|
|
|
122
132
|
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
123
133
|
case 401:
|
|
124
134
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
135
|
+
case 429:
|
|
136
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
125
137
|
default:
|
|
126
138
|
throw new errors.ToltApiError({
|
|
127
139
|
statusCode: _response.error.statusCode,
|
|
@@ -138,6 +150,7 @@ export class TransactionsClient {
|
|
|
138
150
|
*
|
|
139
151
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
140
152
|
* @throws {@link ToltApi.NotFoundError}
|
|
153
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
141
154
|
* @throws {@link errors.ToltApiError}
|
|
142
155
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
143
156
|
*
|
|
@@ -175,6 +188,8 @@ export class TransactionsClient {
|
|
|
175
188
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
176
189
|
case 404:
|
|
177
190
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
191
|
+
case 429:
|
|
192
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
178
193
|
default:
|
|
179
194
|
throw new errors.ToltApiError({
|
|
180
195
|
statusCode: _response.error.statusCode,
|
|
@@ -193,6 +208,7 @@ export class TransactionsClient {
|
|
|
193
208
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
194
209
|
* @throws {@link ToltApi.NotFoundError}
|
|
195
210
|
* @throws {@link ToltApi.ConflictError}
|
|
211
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
196
212
|
* @throws {@link errors.ToltApiError}
|
|
197
213
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
198
214
|
*
|
|
@@ -237,6 +253,8 @@ export class TransactionsClient {
|
|
|
237
253
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
238
254
|
case 409:
|
|
239
255
|
throw new ToltApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
256
|
+
case 429:
|
|
257
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
240
258
|
default:
|
|
241
259
|
throw new errors.ToltApiError({
|
|
242
260
|
statusCode: _response.error.statusCode,
|
|
@@ -254,6 +272,7 @@ export class TransactionsClient {
|
|
|
254
272
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
255
273
|
* @throws {@link ToltApi.NotFoundError}
|
|
256
274
|
* @throws {@link ToltApi.ConflictError}
|
|
275
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
257
276
|
* @throws {@link errors.ToltApiError}
|
|
258
277
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
259
278
|
*
|
|
@@ -293,6 +312,8 @@ export class TransactionsClient {
|
|
|
293
312
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
294
313
|
case 409:
|
|
295
314
|
throw new ToltApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
315
|
+
case 429:
|
|
316
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
296
317
|
default:
|
|
297
318
|
throw new errors.ToltApiError({
|
|
298
319
|
statusCode: _response.error.statusCode,
|
|
@@ -310,6 +331,7 @@ export class TransactionsClient {
|
|
|
310
331
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
311
332
|
* @throws {@link ToltApi.NotFoundError}
|
|
312
333
|
* @throws {@link ToltApi.ConflictError}
|
|
334
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
313
335
|
* @throws {@link errors.ToltApiError}
|
|
314
336
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
315
337
|
*
|
|
@@ -349,6 +371,8 @@ export class TransactionsClient {
|
|
|
349
371
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
350
372
|
case 409:
|
|
351
373
|
throw new ToltApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
374
|
+
case 429:
|
|
375
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
352
376
|
default:
|
|
353
377
|
throw new errors.ToltApiError({
|
|
354
378
|
statusCode: _response.error.statusCode,
|
|
@@ -368,6 +392,7 @@ export class TransactionsClient {
|
|
|
368
392
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
369
393
|
* @throws {@link ToltApi.NotFoundError}
|
|
370
394
|
* @throws {@link ToltApi.ConflictError}
|
|
395
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
371
396
|
* @throws {@link errors.ToltApiError}
|
|
372
397
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
373
398
|
*
|
|
@@ -410,6 +435,8 @@ export class TransactionsClient {
|
|
|
410
435
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
411
436
|
case 409:
|
|
412
437
|
throw new ToltApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
438
|
+
case 429:
|
|
439
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
413
440
|
default:
|
|
414
441
|
throw new errors.ToltApiError({
|
|
415
442
|
statusCode: _response.error.statusCode,
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
4
|
* amount: 1,
|
|
5
|
-
*
|
|
5
|
+
* customer_id: "customer_id"
|
|
6
6
|
* }
|
|
7
7
|
*/
|
|
8
8
|
export interface CreateTransactionRequest {
|
|
9
9
|
/** Monetary amount as an integer in the smallest currency unit (cents), e.g. 500 = 5.00 */
|
|
10
10
|
amount: number;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
customer_id: string;
|
|
12
|
+
billing_type?: string;
|
|
13
|
+
charge_id?: string;
|
|
14
|
+
click_id?: string;
|
|
15
15
|
interval?: string;
|
|
16
16
|
source?: string;
|
|
17
17
|
}
|
|
@@ -6,7 +6,20 @@ import type * as ToltApi from "../../../../index.js";
|
|
|
6
6
|
export interface ListTransactionsRequest {
|
|
7
7
|
limit?: number;
|
|
8
8
|
order?: ToltApi.ListTransactionsRequestOrder;
|
|
9
|
+
/** Column the list is ordered and paged by. */
|
|
10
|
+
sort?: ToltApi.ListTransactionsRequestSort;
|
|
11
|
+
/** Continue after a position: the next_cursor of a previous page, or an item id when sorting by created_at. Cannot be combined with ending_before. */
|
|
9
12
|
starting_after?: string;
|
|
13
|
+
/** Page backward from a position: the prev_cursor of a previous page, or an item id when sorting by created_at. Cannot be combined with starting_after. */
|
|
14
|
+
ending_before?: string;
|
|
15
|
+
/** Only items created at or after this ISO 8601 time. */
|
|
16
|
+
created_after?: string;
|
|
17
|
+
/** Only items created before this ISO 8601 time. */
|
|
18
|
+
created_before?: string;
|
|
19
|
+
/** Only items updated at or after this ISO 8601 time. Combine with sort=updated_at to sync changes. */
|
|
20
|
+
updated_after?: string;
|
|
21
|
+
/** Only items updated before this ISO 8601 time. */
|
|
22
|
+
updated_before?: string;
|
|
10
23
|
program_id?: string;
|
|
11
24
|
partner_id?: string;
|
|
12
25
|
customer_id?: string;
|
|
@@ -10,9 +10,9 @@ export interface UpdateTransactionRequest {
|
|
|
10
10
|
amount?: number;
|
|
11
11
|
status?: string | null;
|
|
12
12
|
source?: string | null;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
billing_type?: string | null;
|
|
14
|
+
charge_id?: string | null;
|
|
15
|
+
click_id?: string | null;
|
|
16
16
|
interval?: string | null;
|
|
17
|
-
|
|
17
|
+
created_at?: string;
|
|
18
18
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Column the list is ordered and paged by. */
|
|
2
|
+
export declare const ListTransactionsRequestSort: {
|
|
3
|
+
readonly CreatedAt: "created_at";
|
|
4
|
+
readonly UpdatedAt: "updated_at";
|
|
5
|
+
};
|
|
6
|
+
export type ListTransactionsRequestSort = (typeof ListTransactionsRequestSort)[keyof typeof ListTransactionsRequestSort];
|
|
@@ -4,4 +4,8 @@ export interface ListTransactionsResponse {
|
|
|
4
4
|
message: string;
|
|
5
5
|
data: ToltApi.Transaction[];
|
|
6
6
|
has_more: boolean;
|
|
7
|
+
/** Opaque cursor marking the last item on this page. Pass it as starting_after to continue. Null when the page is empty. */
|
|
8
|
+
next_cursor: string | null;
|
|
9
|
+
/** Opaque cursor marking the first item on this page. Pass it as ending_before to page backward. Null when the page is empty. */
|
|
10
|
+
prev_cursor: string | null;
|
|
7
11
|
}
|
|
@@ -2,6 +2,7 @@ export * from "./CreateTransactionResponse.js";
|
|
|
2
2
|
export * from "./DeleteTransactionResponse.js";
|
|
3
3
|
export * from "./GetTransactionResponse.js";
|
|
4
4
|
export * from "./ListTransactionsRequestOrder.js";
|
|
5
|
+
export * from "./ListTransactionsRequestSort.js";
|
|
5
6
|
export * from "./ListTransactionsResponse.js";
|
|
6
7
|
export * from "./RefundTransactionResponse.js";
|
|
7
8
|
export * from "./RerunTransactionFlowsResponse.js";
|
|
@@ -2,6 +2,7 @@ export * from "./CreateTransactionResponse.js";
|
|
|
2
2
|
export * from "./DeleteTransactionResponse.js";
|
|
3
3
|
export * from "./GetTransactionResponse.js";
|
|
4
4
|
export * from "./ListTransactionsRequestOrder.js";
|
|
5
|
+
export * from "./ListTransactionsRequestSort.js";
|
|
5
6
|
export * from "./ListTransactionsResponse.js";
|
|
6
7
|
export * from "./RefundTransactionResponse.js";
|
|
7
8
|
export * from "./RerunTransactionFlowsResponse.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface BulkResult {
|
|
2
|
+
succeeded: number;
|
|
3
|
+
failed: number;
|
|
4
|
+
results: BulkResult.Results.Item[];
|
|
5
|
+
}
|
|
6
|
+
export declare namespace BulkResult {
|
|
7
|
+
type Results = Results.Item[];
|
|
8
|
+
namespace Results {
|
|
9
|
+
interface Item {
|
|
10
|
+
id: string;
|
|
11
|
+
status: Item.Status;
|
|
12
|
+
/** Error code when status is error. */
|
|
13
|
+
code?: string | undefined;
|
|
14
|
+
message?: string | undefined;
|
|
15
|
+
}
|
|
16
|
+
namespace Item {
|
|
17
|
+
const Status: {
|
|
18
|
+
readonly Ok: "ok";
|
|
19
|
+
readonly Error: "error";
|
|
20
|
+
};
|
|
21
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var BulkResult;
|
|
3
|
+
(function (BulkResult) {
|
|
4
|
+
let Results;
|
|
5
|
+
(function (Results) {
|
|
6
|
+
let Item;
|
|
7
|
+
(function (Item) {
|
|
8
|
+
Item.Status = {
|
|
9
|
+
Ok: "ok",
|
|
10
|
+
Error: "error",
|
|
11
|
+
};
|
|
12
|
+
})(Item = Results.Item || (Results.Item = {}));
|
|
13
|
+
})(Results = BulkResult.Results || (BulkResult.Results = {}));
|
|
14
|
+
})(BulkResult || (BulkResult = {}));
|
|
@@ -6,9 +6,9 @@ export interface Click {
|
|
|
6
6
|
browser: string | null;
|
|
7
7
|
country: string | null;
|
|
8
8
|
state: string | null;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
link_id: string | null;
|
|
10
|
+
program_id: string | null;
|
|
11
|
+
partner_id: string | null;
|
|
12
|
+
created_at: string;
|
|
13
|
+
updated_at: string;
|
|
14
14
|
}
|
|
@@ -8,17 +8,17 @@ export interface Commission {
|
|
|
8
8
|
status: string | null;
|
|
9
9
|
type: string | null;
|
|
10
10
|
source: string | null;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
11
|
+
partner_id: string | null;
|
|
12
|
+
customer_id: string | null;
|
|
13
|
+
program_id: string | null;
|
|
14
|
+
transaction_id: string | null;
|
|
15
|
+
payout_id: string | null;
|
|
16
|
+
charge_id: string | null;
|
|
17
|
+
charge_status: string | null;
|
|
18
|
+
is_ad_click: boolean | null;
|
|
19
|
+
is_self_referral: boolean | null;
|
|
20
|
+
approval_type: string | null;
|
|
21
|
+
scheduled_approval_date: string;
|
|
22
|
+
created_at: string;
|
|
23
|
+
updated_at: string;
|
|
24
24
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type * as ToltApi from "../index.js";
|
|
2
|
+
export interface CreatedPartner {
|
|
3
|
+
id: string;
|
|
4
|
+
email: string;
|
|
5
|
+
first_name: string | null;
|
|
6
|
+
last_name: string | null;
|
|
7
|
+
company_name: string | null;
|
|
8
|
+
status: string;
|
|
9
|
+
group_id: string | null;
|
|
10
|
+
program_id: string | null;
|
|
11
|
+
country_code: string | null;
|
|
12
|
+
website_url: string | null;
|
|
13
|
+
/** Name shown for the partner in the dashboard. */
|
|
14
|
+
display_name: string | null;
|
|
15
|
+
completed_onboarding: boolean | null;
|
|
16
|
+
created_at: string;
|
|
17
|
+
updated_at: string;
|
|
18
|
+
link: ToltApi.Link;
|
|
19
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
export interface Customer {
|
|
2
2
|
id: string;
|
|
3
|
-
|
|
3
|
+
customer_id: string | null;
|
|
4
4
|
identifier: string | null;
|
|
5
5
|
email: string | null;
|
|
6
6
|
name: string | null;
|
|
7
7
|
status: string | null;
|
|
8
8
|
plan: string | null;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
subscription_id: string | null;
|
|
10
|
+
partner_id: string | null;
|
|
11
|
+
program_id: string | null;
|
|
12
|
+
link_id: string | null;
|
|
13
|
+
promotion_code_id: string | null;
|
|
14
|
+
click_id: string | null;
|
|
15
|
+
lead_at: string;
|
|
16
|
+
active_at: string;
|
|
17
|
+
created_at: string;
|
|
18
|
+
updated_at: string;
|
|
19
19
|
}
|
|
@@ -1,4 +1,38 @@
|
|
|
1
1
|
export interface Error_ {
|
|
2
2
|
success: boolean;
|
|
3
|
+
/** Human-readable explanation. May change; branch on code instead. */
|
|
3
4
|
message: string;
|
|
5
|
+
/** Stable machine-readable error code. */
|
|
6
|
+
code: Error_.Code;
|
|
7
|
+
doc_url: string;
|
|
8
|
+
/** One entry per offending field. Present on validation_error and invalid_reference. */
|
|
9
|
+
errors?: Error_.Errors.Item[] | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare namespace Error_ {
|
|
12
|
+
/** Stable machine-readable error code. */
|
|
13
|
+
const Code: {
|
|
14
|
+
readonly BadRequest: "bad_request";
|
|
15
|
+
readonly ValidationError: "validation_error";
|
|
16
|
+
readonly InvalidReference: "invalid_reference";
|
|
17
|
+
readonly InvalidCursor: "invalid_cursor";
|
|
18
|
+
readonly Unauthorized: "unauthorized";
|
|
19
|
+
readonly Forbidden: "forbidden";
|
|
20
|
+
readonly NotFound: "not_found";
|
|
21
|
+
readonly Conflict: "conflict";
|
|
22
|
+
readonly AlreadyExists: "already_exists";
|
|
23
|
+
readonly CommissionPaid: "commission_paid";
|
|
24
|
+
readonly CommissionFrozen: "commission_frozen";
|
|
25
|
+
readonly TransactionRefunded: "transaction_refunded";
|
|
26
|
+
readonly CommissionExists: "commission_exists";
|
|
27
|
+
readonly RateLimited: "rate_limited";
|
|
28
|
+
readonly InternalError: "internal_error";
|
|
29
|
+
};
|
|
30
|
+
type Code = (typeof Code)[keyof typeof Code];
|
|
31
|
+
type Errors = Errors.Item[];
|
|
32
|
+
namespace Errors {
|
|
33
|
+
interface Item {
|
|
34
|
+
field: string;
|
|
35
|
+
message: string;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
4
38
|
}
|
package/dist/api/types/Error_.js
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
export
|
|
2
|
+
export var Error_;
|
|
3
|
+
(function (Error_) {
|
|
4
|
+
/** Stable machine-readable error code. */
|
|
5
|
+
Error_.Code = {
|
|
6
|
+
BadRequest: "bad_request",
|
|
7
|
+
ValidationError: "validation_error",
|
|
8
|
+
InvalidReference: "invalid_reference",
|
|
9
|
+
InvalidCursor: "invalid_cursor",
|
|
10
|
+
Unauthorized: "unauthorized",
|
|
11
|
+
Forbidden: "forbidden",
|
|
12
|
+
NotFound: "not_found",
|
|
13
|
+
Conflict: "conflict",
|
|
14
|
+
AlreadyExists: "already_exists",
|
|
15
|
+
CommissionPaid: "commission_paid",
|
|
16
|
+
CommissionFrozen: "commission_frozen",
|
|
17
|
+
TransactionRefunded: "transaction_refunded",
|
|
18
|
+
CommissionExists: "commission_exists",
|
|
19
|
+
RateLimited: "rate_limited",
|
|
20
|
+
InternalError: "internal_error",
|
|
21
|
+
};
|
|
22
|
+
})(Error_ || (Error_ = {}));
|
package/dist/api/types/Flow.d.ts
CHANGED
|
@@ -3,16 +3,16 @@ export interface Flow {
|
|
|
3
3
|
name: string | null;
|
|
4
4
|
description: string | null;
|
|
5
5
|
event: string | null;
|
|
6
|
-
|
|
6
|
+
action_type: string | null;
|
|
7
7
|
action?: unknown | undefined;
|
|
8
8
|
conditions?: unknown | undefined;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
program_id: string | null;
|
|
10
|
+
group_id: string | null;
|
|
11
|
+
campaign_id: string | null;
|
|
12
12
|
active: boolean | null;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
partner_overrides?: unknown | undefined;
|
|
14
|
+
link_overrides?: unknown | undefined;
|
|
15
15
|
options?: unknown | undefined;
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
created_at: string;
|
|
17
|
+
updated_at: string;
|
|
18
18
|
}
|
|
@@ -2,13 +2,13 @@ export interface Group {
|
|
|
2
2
|
id: string;
|
|
3
3
|
name: string | null;
|
|
4
4
|
description: string | null;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
program_id: string | null;
|
|
6
|
+
is_default: boolean | null;
|
|
7
|
+
public_key: string | null;
|
|
8
|
+
website_url: string | null;
|
|
9
|
+
is_private: boolean | null;
|
|
10
|
+
allow_manual_lead_submission: boolean | null;
|
|
11
|
+
minimum_payout: number | null;
|
|
12
|
+
created_at: string;
|
|
13
|
+
updated_at: string;
|
|
14
14
|
}
|
package/dist/api/types/Link.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ export interface Link {
|
|
|
3
3
|
value: string | null;
|
|
4
4
|
param: string | null;
|
|
5
5
|
status: string | null;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
partner_id: string | null;
|
|
7
|
+
program_id: string | null;
|
|
8
|
+
campaign_id: string | null;
|
|
9
|
+
created_at: string;
|
|
10
|
+
updated_at: string;
|
|
11
11
|
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
export interface Partner {
|
|
2
2
|
id: string;
|
|
3
3
|
email: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
first_name: string | null;
|
|
5
|
+
last_name: string | null;
|
|
6
|
+
company_name: string | null;
|
|
7
7
|
status: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
group_id: string | null;
|
|
9
|
+
program_id: string | null;
|
|
10
|
+
country_code: string | null;
|
|
11
|
+
website_url: string | null;
|
|
12
|
+
/** Name shown for the partner in the dashboard. */
|
|
13
|
+
display_name: string | null;
|
|
14
|
+
completed_onboarding: boolean | null;
|
|
15
|
+
created_at: string;
|
|
16
|
+
updated_at: string;
|
|
13
17
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export interface Program {
|
|
2
2
|
id: string;
|
|
3
3
|
name: string | null;
|
|
4
|
-
|
|
4
|
+
product_name: string | null;
|
|
5
5
|
type: string | null;
|
|
6
6
|
status: string | null;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
currency_code: string | null;
|
|
8
|
+
cookie_duration: number | null;
|
|
9
|
+
payout_term: string | null;
|
|
10
|
+
minimum_payout: number | null;
|
|
11
|
+
website_url: string | null;
|
|
12
12
|
subdomain: string | null;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
created_at: string;
|
|
14
|
+
updated_at: string;
|
|
15
15
|
}
|
|
@@ -4,13 +4,13 @@ export interface PromotionCode {
|
|
|
4
4
|
type: string | null;
|
|
5
5
|
value: string | null;
|
|
6
6
|
duration: string;
|
|
7
|
-
|
|
7
|
+
duration_in_months: string | null;
|
|
8
8
|
active: boolean | null;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
entity_type: string | null;
|
|
10
|
+
external_id: string | null;
|
|
11
|
+
partner_id: string | null;
|
|
12
|
+
program_id: string | null;
|
|
13
|
+
group_id: string | null;
|
|
14
|
+
created_at: string;
|
|
15
|
+
updated_at: string;
|
|
16
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface ReportsLinkRow {
|
|
2
|
-
|
|
2
|
+
link_id: string;
|
|
3
3
|
param: string | null;
|
|
4
4
|
value: string | null;
|
|
5
5
|
clicks: number;
|
|
@@ -8,5 +8,5 @@ export interface ReportsLinkRow {
|
|
|
8
8
|
revenue: string;
|
|
9
9
|
/** Integer amount in the smallest currency unit (cents), serialized as a string. Summed across the row's currencies; scope to a single-currency program with program_id, or use /reports/overview for the per-currency split. */
|
|
10
10
|
commissions: string;
|
|
11
|
-
|
|
11
|
+
conversion_rate: number;
|
|
12
12
|
}
|
|
@@ -4,9 +4,9 @@ export interface ReportsOverview {
|
|
|
4
4
|
/** Approved and paid commission totals, one entry per currency. */
|
|
5
5
|
commissions: ReportsOverview.Commissions.Item[];
|
|
6
6
|
/** Number of approved and paid commissions. */
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
commission_count: number;
|
|
8
|
+
customer_count: number;
|
|
9
|
+
partner_count: number;
|
|
10
10
|
}
|
|
11
11
|
export declare namespace ReportsOverview {
|
|
12
12
|
type Revenue = Revenue.Item[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface ReportsPartnerRow {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
partner_id: string;
|
|
3
|
+
first_name: string | null;
|
|
4
|
+
last_name: string | null;
|
|
5
5
|
email: string | null;
|
|
6
6
|
clicks: number;
|
|
7
7
|
/** Converted (non-lead) customers. */
|
|
@@ -11,5 +11,5 @@ export interface ReportsPartnerRow {
|
|
|
11
11
|
/** Integer amount in the smallest currency unit (cents), serialized as a string. Summed across the row's currencies; scope to a single-currency program with program_id, or use /reports/overview for the per-currency split. */
|
|
12
12
|
commissions: string;
|
|
13
13
|
/** Customers / clicks as a percentage. */
|
|
14
|
-
|
|
14
|
+
conversion_rate: number;
|
|
15
15
|
}
|