@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
|
@@ -16,6 +16,7 @@ export declare class LinksClient {
|
|
|
16
16
|
*
|
|
17
17
|
* @throws {@link ToltApi.BadRequestError}
|
|
18
18
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
19
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
19
20
|
* @throws {@link errors.ToltApiError}
|
|
20
21
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
21
22
|
*
|
|
@@ -30,13 +31,14 @@ export declare class LinksClient {
|
|
|
30
31
|
*
|
|
31
32
|
* @throws {@link ToltApi.BadRequestError}
|
|
32
33
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
34
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
33
35
|
* @throws {@link errors.ToltApiError}
|
|
34
36
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
35
37
|
*
|
|
36
38
|
* @example
|
|
37
39
|
* await client.links.createLink({
|
|
38
40
|
* value: "value",
|
|
39
|
-
*
|
|
41
|
+
* partner_id: "partner_id"
|
|
40
42
|
* })
|
|
41
43
|
*/
|
|
42
44
|
createLink(request: ToltApi.CreateLinkRequest, requestOptions?: LinksClient.RequestOptions): core.HttpResponsePromise<ToltApi.CreateLinkResponse>;
|
|
@@ -47,6 +49,7 @@ export declare class LinksClient {
|
|
|
47
49
|
*
|
|
48
50
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
49
51
|
* @throws {@link ToltApi.NotFoundError}
|
|
52
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
50
53
|
* @throws {@link errors.ToltApiError}
|
|
51
54
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
52
55
|
*
|
|
@@ -64,6 +67,7 @@ export declare class LinksClient {
|
|
|
64
67
|
* @throws {@link ToltApi.BadRequestError}
|
|
65
68
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
66
69
|
* @throws {@link ToltApi.NotFoundError}
|
|
70
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
67
71
|
* @throws {@link errors.ToltApiError}
|
|
68
72
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
69
73
|
*
|
|
@@ -80,6 +84,7 @@ export declare class LinksClient {
|
|
|
80
84
|
*
|
|
81
85
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
82
86
|
* @throws {@link ToltApi.NotFoundError}
|
|
87
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
83
88
|
* @throws {@link errors.ToltApiError}
|
|
84
89
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
85
90
|
*
|
|
@@ -17,6 +17,7 @@ export class LinksClient {
|
|
|
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 LinksClient {
|
|
|
27
28
|
return core.HttpResponsePromise.fromPromise(this.__listLinks(request, requestOptions));
|
|
28
29
|
}
|
|
29
30
|
async __listLinks(request = {}, requestOptions) {
|
|
30
|
-
const { limit, order, starting_after: startingAfter, program_id: programId, partner_id: partnerId, 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, 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
|
search,
|
|
@@ -64,6 +71,8 @@ export class LinksClient {
|
|
|
64
71
|
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
65
72
|
case 401:
|
|
66
73
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
74
|
+
case 429:
|
|
75
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
67
76
|
default:
|
|
68
77
|
throw new errors.ToltApiError({
|
|
69
78
|
statusCode: _response.error.statusCode,
|
|
@@ -80,13 +89,14 @@ export class LinksClient {
|
|
|
80
89
|
*
|
|
81
90
|
* @throws {@link ToltApi.BadRequestError}
|
|
82
91
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
92
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
83
93
|
* @throws {@link errors.ToltApiError}
|
|
84
94
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
85
95
|
*
|
|
86
96
|
* @example
|
|
87
97
|
* await client.links.createLink({
|
|
88
98
|
* value: "value",
|
|
89
|
-
*
|
|
99
|
+
* partner_id: "partner_id"
|
|
90
100
|
* })
|
|
91
101
|
*/
|
|
92
102
|
createLink(request, requestOptions) {
|
|
@@ -120,6 +130,8 @@ export class LinksClient {
|
|
|
120
130
|
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
121
131
|
case 401:
|
|
122
132
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
133
|
+
case 429:
|
|
134
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
123
135
|
default:
|
|
124
136
|
throw new errors.ToltApiError({
|
|
125
137
|
statusCode: _response.error.statusCode,
|
|
@@ -136,6 +148,7 @@ export class LinksClient {
|
|
|
136
148
|
*
|
|
137
149
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
138
150
|
* @throws {@link ToltApi.NotFoundError}
|
|
151
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
139
152
|
* @throws {@link errors.ToltApiError}
|
|
140
153
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
141
154
|
*
|
|
@@ -173,6 +186,8 @@ export class LinksClient {
|
|
|
173
186
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
174
187
|
case 404:
|
|
175
188
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
189
|
+
case 429:
|
|
190
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
176
191
|
default:
|
|
177
192
|
throw new errors.ToltApiError({
|
|
178
193
|
statusCode: _response.error.statusCode,
|
|
@@ -190,6 +205,7 @@ export class LinksClient {
|
|
|
190
205
|
* @throws {@link ToltApi.BadRequestError}
|
|
191
206
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
192
207
|
* @throws {@link ToltApi.NotFoundError}
|
|
208
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
193
209
|
* @throws {@link errors.ToltApiError}
|
|
194
210
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
195
211
|
*
|
|
@@ -232,6 +248,8 @@ export class LinksClient {
|
|
|
232
248
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
233
249
|
case 404:
|
|
234
250
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
251
|
+
case 429:
|
|
252
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
235
253
|
default:
|
|
236
254
|
throw new errors.ToltApiError({
|
|
237
255
|
statusCode: _response.error.statusCode,
|
|
@@ -248,6 +266,7 @@ export class LinksClient {
|
|
|
248
266
|
*
|
|
249
267
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
250
268
|
* @throws {@link ToltApi.NotFoundError}
|
|
269
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
251
270
|
* @throws {@link errors.ToltApiError}
|
|
252
271
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
253
272
|
*
|
|
@@ -285,6 +304,8 @@ export class LinksClient {
|
|
|
285
304
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
286
305
|
case 404:
|
|
287
306
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
307
|
+
case 429:
|
|
308
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
288
309
|
default:
|
|
289
310
|
throw new errors.ToltApiError({
|
|
290
311
|
statusCode: _response.error.statusCode,
|
|
@@ -6,7 +6,20 @@ import type * as ToltApi from "../../../../index.js";
|
|
|
6
6
|
export interface ListLinksRequest {
|
|
7
7
|
limit?: number;
|
|
8
8
|
order?: ToltApi.ListLinksRequestOrder;
|
|
9
|
+
/** Column the list is ordered and paged by. */
|
|
10
|
+
sort?: ToltApi.ListLinksRequestSort;
|
|
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
|
search?: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Column the list is ordered and paged by. */
|
|
2
|
+
export declare const ListLinksRequestSort: {
|
|
3
|
+
readonly CreatedAt: "created_at";
|
|
4
|
+
readonly UpdatedAt: "updated_at";
|
|
5
|
+
};
|
|
6
|
+
export type ListLinksRequestSort = (typeof ListLinksRequestSort)[keyof typeof ListLinksRequestSort];
|
|
@@ -4,4 +4,8 @@ export interface ListLinksResponse {
|
|
|
4
4
|
message: string;
|
|
5
5
|
data: ToltApi.Link[];
|
|
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,5 +2,6 @@ export * from "./CreateLinkResponse.js";
|
|
|
2
2
|
export * from "./DeleteLinkResponse.js";
|
|
3
3
|
export * from "./GetLinkResponse.js";
|
|
4
4
|
export * from "./ListLinksRequestOrder.js";
|
|
5
|
+
export * from "./ListLinksRequestSort.js";
|
|
5
6
|
export * from "./ListLinksResponse.js";
|
|
6
7
|
export * from "./UpdateLinkResponse.js";
|
|
@@ -2,5 +2,6 @@ export * from "./CreateLinkResponse.js";
|
|
|
2
2
|
export * from "./DeleteLinkResponse.js";
|
|
3
3
|
export * from "./GetLinkResponse.js";
|
|
4
4
|
export * from "./ListLinksRequestOrder.js";
|
|
5
|
+
export * from "./ListLinksRequestSort.js";
|
|
5
6
|
export * from "./ListLinksResponse.js";
|
|
6
7
|
export * from "./UpdateLinkResponse.js";
|
|
@@ -10,12 +10,51 @@ export declare namespace PartnersClient {
|
|
|
10
10
|
export declare class PartnersClient {
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<PartnersClient.Options>;
|
|
12
12
|
constructor(options: PartnersClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Approves up to 100 partners. Each id is processed on its own and the response reports the outcome per id, so one refused partner does not fail the request.
|
|
15
|
+
*
|
|
16
|
+
* @param {ToltApi.BulkApprovePartnersRequest} request
|
|
17
|
+
* @param {PartnersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link ToltApi.BadRequestError}
|
|
20
|
+
* @throws {@link ToltApi.UnauthorizedError}
|
|
21
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
22
|
+
* @throws {@link errors.ToltApiError}
|
|
23
|
+
* @throws {@link errors.ToltApiTimeoutError}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* await client.partners.bulkApprovePartners({
|
|
27
|
+
* ids: ["part_9fQ2xLL", "part_3RtV9k"]
|
|
28
|
+
* })
|
|
29
|
+
*/
|
|
30
|
+
bulkApprovePartners(request: ToltApi.BulkApprovePartnersRequest, requestOptions?: PartnersClient.RequestOptions): core.HttpResponsePromise<ToltApi.BulkApprovePartnersResponse>;
|
|
31
|
+
private __bulkApprovePartners;
|
|
32
|
+
/**
|
|
33
|
+
* Rejects up to 100 partners with an optional shared rejection note. Each id is processed on its own and the response reports the outcome per id.
|
|
34
|
+
*
|
|
35
|
+
* @param {ToltApi.BulkRejectPartnersRequest} request
|
|
36
|
+
* @param {PartnersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
|
+
*
|
|
38
|
+
* @throws {@link ToltApi.BadRequestError}
|
|
39
|
+
* @throws {@link ToltApi.UnauthorizedError}
|
|
40
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
41
|
+
* @throws {@link errors.ToltApiError}
|
|
42
|
+
* @throws {@link errors.ToltApiTimeoutError}
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* await client.partners.bulkRejectPartners({
|
|
46
|
+
* ids: ["part_9fQ2xLL", "part_3RtV9k"]
|
|
47
|
+
* })
|
|
48
|
+
*/
|
|
49
|
+
bulkRejectPartners(request: ToltApi.BulkRejectPartnersRequest, requestOptions?: PartnersClient.RequestOptions): core.HttpResponsePromise<ToltApi.BulkRejectPartnersResponse>;
|
|
50
|
+
private __bulkRejectPartners;
|
|
13
51
|
/**
|
|
14
52
|
* @param {ToltApi.ListPartnersRequest} request
|
|
15
53
|
* @param {PartnersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
16
54
|
*
|
|
17
55
|
* @throws {@link ToltApi.BadRequestError}
|
|
18
56
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
57
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
19
58
|
* @throws {@link errors.ToltApiError}
|
|
20
59
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
21
60
|
*
|
|
@@ -24,12 +63,34 @@ export declare class PartnersClient {
|
|
|
24
63
|
*/
|
|
25
64
|
listPartners(request?: ToltApi.ListPartnersRequest, requestOptions?: PartnersClient.RequestOptions): core.HttpResponsePromise<ToltApi.ListPartnersResponse>;
|
|
26
65
|
private __listPartners;
|
|
66
|
+
/**
|
|
67
|
+
* Creates an onboarded partner together with their referral link. The link value defaults to a slug of the partner's name or email and the parameter to the program's first link parameter. Omit group_id to place the partner in the program's default group.
|
|
68
|
+
*
|
|
69
|
+
* @param {ToltApi.CreatePartnerRequest} request
|
|
70
|
+
* @param {PartnersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link ToltApi.BadRequestError}
|
|
73
|
+
* @throws {@link ToltApi.UnauthorizedError}
|
|
74
|
+
* @throws {@link ToltApi.ConflictError}
|
|
75
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
76
|
+
* @throws {@link errors.ToltApiError}
|
|
77
|
+
* @throws {@link errors.ToltApiTimeoutError}
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* await client.partners.createPartner({
|
|
81
|
+
* email: "sam@acme.com",
|
|
82
|
+
* program_id: "prg_YRsbPDAK"
|
|
83
|
+
* })
|
|
84
|
+
*/
|
|
85
|
+
createPartner(request: ToltApi.CreatePartnerRequest, requestOptions?: PartnersClient.RequestOptions): core.HttpResponsePromise<ToltApi.CreatePartnerResponse>;
|
|
86
|
+
private __createPartner;
|
|
27
87
|
/**
|
|
28
88
|
* @param {ToltApi.GetPartnerRequest} request
|
|
29
89
|
* @param {PartnersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
30
90
|
*
|
|
31
91
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
32
92
|
* @throws {@link ToltApi.NotFoundError}
|
|
93
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
33
94
|
* @throws {@link errors.ToltApiError}
|
|
34
95
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
35
96
|
*
|
|
@@ -40,12 +101,34 @@ export declare class PartnersClient {
|
|
|
40
101
|
*/
|
|
41
102
|
getPartner(request: ToltApi.GetPartnerRequest, requestOptions?: PartnersClient.RequestOptions): core.HttpResponsePromise<ToltApi.GetPartnerResponse>;
|
|
42
103
|
private __getPartner;
|
|
104
|
+
/**
|
|
105
|
+
* Edits profile fields and group membership. Status changes go through the approve, reject and suspend actions.
|
|
106
|
+
*
|
|
107
|
+
* @param {ToltApi.UpdatePartnerRequest} request
|
|
108
|
+
* @param {PartnersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
109
|
+
*
|
|
110
|
+
* @throws {@link ToltApi.BadRequestError}
|
|
111
|
+
* @throws {@link ToltApi.UnauthorizedError}
|
|
112
|
+
* @throws {@link ToltApi.NotFoundError}
|
|
113
|
+
* @throws {@link ToltApi.ConflictError}
|
|
114
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
115
|
+
* @throws {@link errors.ToltApiError}
|
|
116
|
+
* @throws {@link errors.ToltApiTimeoutError}
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* await client.partners.updatePartner({
|
|
120
|
+
* id: "id"
|
|
121
|
+
* })
|
|
122
|
+
*/
|
|
123
|
+
updatePartner(request: ToltApi.UpdatePartnerRequest, requestOptions?: PartnersClient.RequestOptions): core.HttpResponsePromise<ToltApi.UpdatePartnerResponse>;
|
|
124
|
+
private __updatePartner;
|
|
43
125
|
/**
|
|
44
126
|
* @param {ToltApi.ApprovePartnerRequest} request
|
|
45
127
|
* @param {PartnersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
46
128
|
*
|
|
47
129
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
48
130
|
* @throws {@link ToltApi.NotFoundError}
|
|
131
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
49
132
|
* @throws {@link errors.ToltApiError}
|
|
50
133
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
51
134
|
*
|
|
@@ -63,6 +146,7 @@ export declare class PartnersClient {
|
|
|
63
146
|
* @throws {@link ToltApi.BadRequestError}
|
|
64
147
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
65
148
|
* @throws {@link ToltApi.NotFoundError}
|
|
149
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
66
150
|
* @throws {@link errors.ToltApiError}
|
|
67
151
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
68
152
|
*
|
|
@@ -80,6 +164,7 @@ export declare class PartnersClient {
|
|
|
80
164
|
* @throws {@link ToltApi.BadRequestError}
|
|
81
165
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
82
166
|
* @throws {@link ToltApi.NotFoundError}
|
|
167
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
83
168
|
* @throws {@link errors.ToltApiError}
|
|
84
169
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
85
170
|
*
|