@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.
Files changed (152) hide show
  1. package/dist/api/errors/TooManyRequestsError.d.ts +7 -0
  2. package/dist/api/errors/TooManyRequestsError.js +17 -0
  3. package/dist/api/errors/index.d.ts +1 -0
  4. package/dist/api/errors/index.js +1 -0
  5. package/dist/api/resources/clicks/client/Client.d.ts +10 -4
  6. package/dist/api/resources/clicks/client/Client.js +22 -24
  7. package/dist/api/resources/clicks/client/requests/index.d.ts +0 -1
  8. package/dist/api/resources/clicks/types/CreateClickRequest.d.ts +1 -0
  9. package/dist/api/resources/clicks/types/{ListClicksResponse.d.ts → CreateClickResponse.d.ts} +2 -3
  10. package/dist/api/resources/clicks/types/index.d.ts +2 -2
  11. package/dist/api/resources/clicks/types/index.js +2 -2
  12. package/dist/api/resources/commissions/client/Client.d.ts +45 -0
  13. package/dist/api/resources/commissions/client/Client.js +154 -1
  14. package/dist/api/resources/commissions/client/requests/BulkApproveCommissionsRequest.d.ts +10 -0
  15. package/dist/api/resources/commissions/client/requests/BulkApproveCommissionsRequest.js +2 -0
  16. package/dist/api/resources/commissions/client/requests/BulkDeclineCommissionsRequest.d.ts +10 -0
  17. package/dist/api/resources/commissions/client/requests/BulkDeclineCommissionsRequest.js +2 -0
  18. package/dist/api/resources/commissions/client/requests/ListCommissionsRequest.d.ts +13 -0
  19. package/dist/api/resources/commissions/client/requests/UpdateCommissionRequest.d.ts +3 -3
  20. package/dist/api/resources/commissions/client/requests/index.d.ts +2 -0
  21. package/dist/api/resources/commissions/types/BulkApproveCommissionsResponse.d.ts +6 -0
  22. package/dist/api/resources/commissions/types/BulkApproveCommissionsResponse.js +2 -0
  23. package/dist/api/resources/commissions/types/BulkDeclineCommissionsResponse.d.ts +6 -0
  24. package/dist/api/resources/commissions/types/BulkDeclineCommissionsResponse.js +2 -0
  25. package/dist/api/resources/commissions/types/ListCommissionsRequestSort.d.ts +6 -0
  26. package/dist/api/resources/commissions/types/ListCommissionsRequestSort.js +6 -0
  27. package/dist/api/resources/commissions/types/ListCommissionsResponse.d.ts +4 -0
  28. package/dist/api/resources/commissions/types/index.d.ts +3 -0
  29. package/dist/api/resources/commissions/types/index.js +3 -0
  30. package/dist/api/resources/customers/client/Client.d.ts +5 -1
  31. package/dist/api/resources/customers/client/Client.js +22 -4
  32. package/dist/api/resources/customers/client/requests/CreateCustomerRequest.d.ts +5 -5
  33. package/dist/api/resources/customers/client/requests/ListCustomersRequest.d.ts +13 -0
  34. package/dist/api/resources/customers/client/requests/UpdateCustomerRequest.d.ts +6 -6
  35. package/dist/api/resources/customers/types/ListCustomersRequestSort.d.ts +6 -0
  36. package/dist/api/resources/customers/types/ListCustomersRequestSort.js +6 -0
  37. package/dist/api/resources/customers/types/ListCustomersResponse.d.ts +4 -0
  38. package/dist/api/resources/customers/types/index.d.ts +1 -0
  39. package/dist/api/resources/customers/types/index.js +1 -0
  40. package/dist/api/resources/embed/client/Client.d.ts +1 -0
  41. package/dist/api/resources/embed/client/Client.js +3 -0
  42. package/dist/api/resources/embed/client/requests/CreateEmbedTokenRequest.d.ts +2 -2
  43. package/dist/api/resources/flows/client/Client.d.ts +2 -0
  44. package/dist/api/resources/flows/client/Client.js +13 -1
  45. package/dist/api/resources/flows/client/requests/ListFlowsRequest.d.ts +13 -0
  46. package/dist/api/resources/flows/types/ListFlowsRequestSort.d.ts +6 -0
  47. package/dist/api/resources/flows/types/ListFlowsRequestSort.js +6 -0
  48. package/dist/api/resources/flows/types/ListFlowsResponse.d.ts +4 -0
  49. package/dist/api/resources/flows/types/index.d.ts +1 -0
  50. package/dist/api/resources/flows/types/index.js +1 -0
  51. package/dist/api/resources/groups/client/Client.d.ts +2 -0
  52. package/dist/api/resources/groups/client/Client.js +13 -1
  53. package/dist/api/resources/groups/client/requests/ListGroupsRequest.d.ts +13 -0
  54. package/dist/api/resources/groups/types/ListGroupsRequestSort.d.ts +6 -0
  55. package/dist/api/resources/groups/types/ListGroupsRequestSort.js +6 -0
  56. package/dist/api/resources/groups/types/ListGroupsResponse.d.ts +4 -0
  57. package/dist/api/resources/groups/types/index.d.ts +1 -0
  58. package/dist/api/resources/groups/types/index.js +1 -0
  59. package/dist/api/resources/links/client/Client.d.ts +6 -1
  60. package/dist/api/resources/links/client/Client.js +23 -2
  61. package/dist/api/resources/links/client/requests/CreateLinkRequest.d.ts +2 -2
  62. package/dist/api/resources/links/client/requests/ListLinksRequest.d.ts +13 -0
  63. package/dist/api/resources/links/types/ListLinksRequestSort.d.ts +6 -0
  64. package/dist/api/resources/links/types/ListLinksRequestSort.js +6 -0
  65. package/dist/api/resources/links/types/ListLinksResponse.d.ts +4 -0
  66. package/dist/api/resources/links/types/index.d.ts +1 -0
  67. package/dist/api/resources/links/types/index.js +1 -0
  68. package/dist/api/resources/partners/client/Client.d.ts +85 -0
  69. package/dist/api/resources/partners/client/Client.js +273 -1
  70. package/dist/api/resources/partners/client/requests/BulkApprovePartnersRequest.d.ts +10 -0
  71. package/dist/api/resources/partners/client/requests/BulkApprovePartnersRequest.js +2 -0
  72. package/dist/api/resources/partners/client/requests/BulkRejectPartnersRequest.d.ts +11 -0
  73. package/dist/api/resources/partners/client/requests/BulkRejectPartnersRequest.js +2 -0
  74. package/dist/api/resources/partners/client/requests/CreatePartnerRequest.d.ts +41 -0
  75. package/dist/api/resources/partners/client/requests/CreatePartnerRequest.js +8 -0
  76. package/dist/api/resources/partners/client/requests/ListPartnersRequest.d.ts +13 -0
  77. package/dist/api/resources/partners/client/requests/RejectPartnerRequest.d.ts +1 -1
  78. package/dist/api/resources/partners/client/requests/SuspendPartnerRequest.d.ts +1 -1
  79. package/dist/api/resources/partners/client/requests/UpdatePartnerRequest.d.ts +16 -0
  80. package/dist/api/resources/partners/client/requests/UpdatePartnerRequest.js +2 -0
  81. package/dist/api/resources/partners/client/requests/index.d.ts +4 -0
  82. package/dist/api/resources/partners/client/requests/index.js +1 -1
  83. package/dist/api/resources/partners/types/BulkApprovePartnersResponse.d.ts +6 -0
  84. package/dist/api/resources/partners/types/BulkApprovePartnersResponse.js +2 -0
  85. package/dist/api/resources/partners/types/BulkRejectPartnersResponse.d.ts +6 -0
  86. package/dist/api/resources/partners/types/BulkRejectPartnersResponse.js +2 -0
  87. package/dist/api/resources/partners/types/CreatePartnerResponse.d.ts +6 -0
  88. package/dist/api/resources/partners/types/CreatePartnerResponse.js +2 -0
  89. package/dist/api/resources/partners/types/ListPartnersRequestSort.d.ts +6 -0
  90. package/dist/api/resources/partners/types/ListPartnersRequestSort.js +6 -0
  91. package/dist/api/resources/partners/types/ListPartnersResponse.d.ts +4 -0
  92. package/dist/api/resources/partners/types/UpdatePartnerResponse.d.ts +6 -0
  93. package/dist/api/resources/partners/types/UpdatePartnerResponse.js +2 -0
  94. package/dist/api/resources/partners/types/index.d.ts +5 -0
  95. package/dist/api/resources/partners/types/index.js +5 -0
  96. package/dist/api/resources/programs/client/Client.d.ts +2 -0
  97. package/dist/api/resources/programs/client/Client.js +13 -1
  98. package/dist/api/resources/programs/client/requests/ListProgramsRequest.d.ts +13 -0
  99. package/dist/api/resources/programs/types/ListProgramsRequestSort.d.ts +6 -0
  100. package/dist/api/resources/programs/types/ListProgramsRequestSort.js +6 -0
  101. package/dist/api/resources/programs/types/ListProgramsResponse.d.ts +4 -0
  102. package/dist/api/resources/programs/types/index.d.ts +1 -0
  103. package/dist/api/resources/programs/types/index.js +1 -0
  104. package/dist/api/resources/promotionCodes/client/Client.d.ts +6 -1
  105. package/dist/api/resources/promotionCodes/client/Client.js +23 -2
  106. package/dist/api/resources/promotionCodes/client/requests/CreatePromotionCodeRequest.d.ts +2 -2
  107. package/dist/api/resources/promotionCodes/client/requests/ListPromotionCodesRequest.d.ts +13 -0
  108. package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestSort.d.ts +6 -0
  109. package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestSort.js +6 -0
  110. package/dist/api/resources/promotionCodes/types/ListPromotionCodesResponse.d.ts +4 -0
  111. package/dist/api/resources/promotionCodes/types/index.d.ts +1 -0
  112. package/dist/api/resources/promotionCodes/types/index.js +1 -0
  113. package/dist/api/resources/reports/client/Client.d.ts +5 -0
  114. package/dist/api/resources/reports/client/Client.js +15 -0
  115. package/dist/api/resources/transactions/client/Client.d.ts +8 -1
  116. package/dist/api/resources/transactions/client/Client.js +29 -2
  117. package/dist/api/resources/transactions/client/requests/CreateTransactionRequest.d.ts +5 -5
  118. package/dist/api/resources/transactions/client/requests/ListTransactionsRequest.d.ts +13 -0
  119. package/dist/api/resources/transactions/client/requests/UpdateTransactionRequest.d.ts +4 -4
  120. package/dist/api/resources/transactions/types/ListTransactionsRequestSort.d.ts +6 -0
  121. package/dist/api/resources/transactions/types/ListTransactionsRequestSort.js +6 -0
  122. package/dist/api/resources/transactions/types/ListTransactionsResponse.d.ts +4 -0
  123. package/dist/api/resources/transactions/types/index.d.ts +1 -0
  124. package/dist/api/resources/transactions/types/index.js +1 -0
  125. package/dist/api/types/BulkResult.d.ts +24 -0
  126. package/dist/api/types/BulkResult.js +14 -0
  127. package/dist/api/types/Click.d.ts +5 -5
  128. package/dist/api/types/Commission.d.ts +13 -13
  129. package/dist/api/types/CreatedPartner.d.ts +19 -0
  130. package/dist/api/types/CreatedPartner.js +2 -0
  131. package/dist/api/types/Customer.d.ts +11 -11
  132. package/dist/api/types/EmbedToken.d.ts +1 -1
  133. package/dist/api/types/Error_.d.ts +34 -0
  134. package/dist/api/types/Error_.js +21 -1
  135. package/dist/api/types/Flow.d.ts +8 -8
  136. package/dist/api/types/Group.d.ts +9 -9
  137. package/dist/api/types/Link.d.ts +5 -5
  138. package/dist/api/types/Partner.d.ts +12 -8
  139. package/dist/api/types/Program.d.ts +8 -8
  140. package/dist/api/types/PromotionCode.d.ts +8 -8
  141. package/dist/api/types/ReportsLinkRow.d.ts +2 -2
  142. package/dist/api/types/ReportsOverview.d.ts +3 -3
  143. package/dist/api/types/ReportsPartnerRow.d.ts +4 -4
  144. package/dist/api/types/Transaction.d.ts +17 -17
  145. package/dist/api/types/index.d.ts +2 -0
  146. package/dist/api/types/index.js +2 -0
  147. package/package.json +1 -1
  148. package/dist/api/resources/clicks/client/requests/ListClicksRequest.d.ts +0 -16
  149. package/dist/api/resources/clicks/types/ListClicksRequestOrder.d.ts +0 -5
  150. package/dist/api/resources/clicks/types/ListClicksRequestOrder.js +0 -5
  151. /package/dist/api/resources/clicks/{client/requests/ListClicksRequest.js → types/CreateClickRequest.js} +0 -0
  152. /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
- * partnerId: "partnerId"
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
- * partnerId: "partnerId"
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,
@@ -2,11 +2,11 @@
2
2
  * @example
3
3
  * {
4
4
  * value: "value",
5
- * partnerId: "partnerId"
5
+ * partner_id: "partner_id"
6
6
  * }
7
7
  */
8
8
  export interface CreateLinkRequest {
9
9
  value: string;
10
10
  param?: string;
11
- partnerId: string;
11
+ partner_id: string;
12
12
  }
@@ -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];
@@ -0,0 +1,6 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ /** Column the list is ordered and paged by. */
3
+ export const ListLinksRequestSort = {
4
+ CreatedAt: "created_at",
5
+ UpdatedAt: "updated_at",
6
+ };
@@ -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
  *