@tolt/api 0.1.1 → 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/Client.d.ts +3 -0
- package/dist/Client.js +4 -0
- 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/CreateClickResponse.d.ts +6 -0
- 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/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 +7 -4
- package/dist/api/resources/customers/client/Client.js +25 -6
- package/dist/api/resources/customers/client/requests/CreateCustomerRequest.d.ts +14 -0
- package/dist/api/resources/customers/client/requests/CreateCustomerRequest.js +2 -0
- 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/client/requests/index.d.ts +1 -0
- 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 -1
- package/dist/api/resources/customers/types/index.js +1 -1
- package/dist/api/resources/embed/client/Client.d.ts +31 -0
- package/dist/api/resources/embed/client/Client.js +75 -0
- package/dist/api/resources/embed/client/index.d.ts +1 -0
- package/dist/api/resources/embed/client/index.js +1 -0
- package/dist/api/resources/embed/client/requests/CreateEmbedTokenRequest.d.ts +14 -0
- package/dist/api/resources/embed/client/requests/CreateEmbedTokenRequest.js +2 -0
- package/dist/api/resources/embed/client/requests/index.d.ts +1 -0
- package/dist/api/resources/embed/client/requests/index.js +1 -0
- package/dist/api/resources/embed/exports.d.ts +2 -0
- package/dist/api/resources/embed/exports.js +3 -0
- package/dist/api/resources/embed/index.d.ts +2 -0
- package/dist/api/resources/embed/index.js +2 -0
- package/dist/api/resources/embed/types/CreateEmbedTokenResponse.d.ts +6 -0
- package/dist/api/resources/embed/types/CreateEmbedTokenResponse.js +2 -0
- package/dist/api/resources/embed/types/index.d.ts +1 -0
- package/dist/api/resources/embed/types/index.js +1 -0
- 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/index.d.ts +3 -0
- package/dist/api/resources/index.js +3 -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 +61 -2
- package/dist/api/resources/reports/client/Client.js +264 -2
- package/dist/api/resources/reports/client/requests/ReportsCustomerStatsRequest.d.ts +9 -0
- package/dist/api/resources/reports/client/requests/ReportsCustomerStatsRequest.js +2 -0
- package/dist/api/resources/reports/client/requests/ReportsLinksRequest.d.ts +14 -0
- package/dist/api/resources/reports/client/requests/ReportsLinksRequest.js +2 -0
- package/dist/api/resources/reports/client/requests/ReportsPartnersRequest.d.ts +14 -0
- package/dist/api/resources/reports/client/requests/ReportsPartnersRequest.js +2 -0
- package/dist/api/resources/reports/client/requests/ReportsTimeseriesRequest.d.ts +11 -0
- package/dist/api/resources/reports/client/requests/ReportsTimeseriesRequest.js +2 -0
- package/dist/api/resources/reports/client/requests/index.d.ts +4 -0
- package/dist/api/resources/reports/types/ReportsCustomerStatsResponse.d.ts +6 -0
- package/dist/api/resources/reports/types/ReportsCustomerStatsResponse.js +2 -0
- package/dist/api/resources/reports/types/ReportsLinksRequestOrder.d.ts +5 -0
- package/dist/api/resources/{clicks/types/ListClicksRequestOrder.js → reports/types/ReportsLinksRequestOrder.js} +1 -1
- package/dist/api/resources/reports/types/ReportsLinksRequestSort.d.ts +7 -0
- package/dist/api/resources/reports/types/ReportsLinksRequestSort.js +7 -0
- package/dist/api/resources/{clicks/types/ListClicksResponse.d.ts → reports/types/ReportsLinksResponse.d.ts} +2 -2
- package/dist/api/resources/reports/types/ReportsLinksResponse.js +2 -0
- package/dist/api/resources/reports/types/ReportsPartnersRequestOrder.d.ts +5 -0
- package/dist/api/resources/reports/types/ReportsPartnersRequestOrder.js +5 -0
- package/dist/api/resources/reports/types/ReportsPartnersRequestSort.d.ts +7 -0
- package/dist/api/resources/reports/types/ReportsPartnersRequestSort.js +7 -0
- package/dist/api/resources/reports/types/ReportsPartnersResponse.d.ts +7 -0
- package/dist/api/resources/reports/types/ReportsPartnersResponse.js +2 -0
- package/dist/api/resources/reports/types/ReportsTimeseriesRequestGranularity.d.ts +6 -0
- package/dist/api/resources/reports/types/ReportsTimeseriesRequestGranularity.js +6 -0
- package/dist/api/resources/reports/types/ReportsTimeseriesResponse.d.ts +6 -0
- package/dist/api/resources/reports/types/ReportsTimeseriesResponse.js +2 -0
- package/dist/api/resources/reports/types/index.d.ts +9 -0
- package/dist/api/resources/reports/types/index.js +9 -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 +4 -0
- package/dist/api/types/EmbedToken.js +2 -0
- 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/ReportsCustomerStats.d.ts +6 -0
- package/dist/api/types/ReportsCustomerStats.js +2 -0
- package/dist/api/types/ReportsLinkRow.d.ts +12 -0
- package/dist/api/types/ReportsLinkRow.js +2 -0
- package/dist/api/types/ReportsOverview.d.ts +5 -5
- package/dist/api/types/ReportsPartnerRow.d.ts +15 -0
- package/dist/api/types/ReportsPartnerRow.js +2 -0
- package/dist/api/types/ReportsTimeseriesPoint.d.ts +10 -0
- package/dist/api/types/ReportsTimeseriesPoint.js +2 -0
- package/dist/api/types/Transaction.d.ts +17 -17
- package/dist/api/types/index.d.ts +7 -0
- package/dist/api/types/index.js +7 -0
- package/dist/environments.d.ts +1 -1
- package/dist/environments.js +1 -1
- 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/customers/types/CreateCustomerRequest.d.ts +0 -1
- /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
- /package/dist/api/resources/{customers/types/CreateCustomerRequest.js → commissions/client/requests/BulkApproveCommissionsRequest.js} +0 -0
package/dist/Client.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ClicksClient } from "./api/resources/clicks/client/Client.js";
|
|
2
2
|
import { CommissionsClient } from "./api/resources/commissions/client/Client.js";
|
|
3
3
|
import { CustomersClient } from "./api/resources/customers/client/Client.js";
|
|
4
|
+
import { EmbedClient } from "./api/resources/embed/client/Client.js";
|
|
4
5
|
import { FlowsClient } from "./api/resources/flows/client/Client.js";
|
|
5
6
|
import { GroupsClient } from "./api/resources/groups/client/Client.js";
|
|
6
7
|
import { LinksClient } from "./api/resources/links/client/Client.js";
|
|
@@ -19,6 +20,7 @@ export declare namespace ToltApiClient {
|
|
|
19
20
|
}
|
|
20
21
|
export declare class ToltApiClient {
|
|
21
22
|
protected readonly _options: NormalizedClientOptionsWithAuth<ToltApiClient.Options>;
|
|
23
|
+
protected _embed: EmbedClient | undefined;
|
|
22
24
|
protected _groups: GroupsClient | undefined;
|
|
23
25
|
protected _flows: FlowsClient | undefined;
|
|
24
26
|
protected _clicks: ClicksClient | undefined;
|
|
@@ -31,6 +33,7 @@ export declare class ToltApiClient {
|
|
|
31
33
|
protected _promotionCodes: PromotionCodesClient | undefined;
|
|
32
34
|
protected _reports: ReportsClient | undefined;
|
|
33
35
|
constructor(options: ToltApiClient.Options);
|
|
36
|
+
get embed(): EmbedClient;
|
|
34
37
|
get groups(): GroupsClient;
|
|
35
38
|
get flows(): FlowsClient;
|
|
36
39
|
get clicks(): ClicksClient;
|
package/dist/Client.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { ClicksClient } from "./api/resources/clicks/client/Client.js";
|
|
3
3
|
import { CommissionsClient } from "./api/resources/commissions/client/Client.js";
|
|
4
4
|
import { CustomersClient } from "./api/resources/customers/client/Client.js";
|
|
5
|
+
import { EmbedClient } from "./api/resources/embed/client/Client.js";
|
|
5
6
|
import { FlowsClient } from "./api/resources/flows/client/Client.js";
|
|
6
7
|
import { GroupsClient } from "./api/resources/groups/client/Client.js";
|
|
7
8
|
import { LinksClient } from "./api/resources/links/client/Client.js";
|
|
@@ -16,6 +17,9 @@ export class ToltApiClient {
|
|
|
16
17
|
constructor(options) {
|
|
17
18
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
18
19
|
}
|
|
20
|
+
get embed() {
|
|
21
|
+
return (this._embed ??= new EmbedClient(this._options));
|
|
22
|
+
}
|
|
19
23
|
get groups() {
|
|
20
24
|
return (this._groups ??= new GroupsClient(this._options));
|
|
21
25
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as ToltApi from "../index.js";
|
|
4
|
+
export declare class TooManyRequestsError extends errors.ToltApiError {
|
|
5
|
+
readonly body: ToltApi.Error_;
|
|
6
|
+
constructor(body: ToltApi.Error_, rawResponse?: core.RawResponse);
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
export class TooManyRequestsError extends errors.ToltApiError {
|
|
4
|
+
constructor(body, rawResponse) {
|
|
5
|
+
super({
|
|
6
|
+
message: "TooManyRequestsError",
|
|
7
|
+
statusCode: 429,
|
|
8
|
+
body: body,
|
|
9
|
+
rawResponse: rawResponse,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = "TooManyRequestsError";
|
|
16
|
+
}
|
|
17
|
+
}
|
package/dist/api/errors/index.js
CHANGED
|
@@ -11,25 +11,31 @@ export declare class ClicksClient {
|
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<ClicksClient.Options>;
|
|
12
12
|
constructor(options: ClicksClient.Options);
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Records a click on a partner's link from your own server, for visits the browser script cannot see. Identify the source by link_id, by partner_id with an optional link_id, or by the link's param and value; the partner and program are resolved from it. Pass the returned id as click_id when you create the customer.
|
|
15
|
+
*
|
|
16
|
+
* @param {ToltApi.CreateClickRequest} request
|
|
15
17
|
* @param {ClicksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
16
18
|
*
|
|
17
19
|
* @throws {@link ToltApi.BadRequestError}
|
|
18
20
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
21
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
19
22
|
* @throws {@link errors.ToltApiError}
|
|
20
23
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
21
24
|
*
|
|
22
25
|
* @example
|
|
23
|
-
* await client.clicks.
|
|
26
|
+
* await client.clicks.createClick({
|
|
27
|
+
* "key": "value"
|
|
28
|
+
* })
|
|
24
29
|
*/
|
|
25
|
-
|
|
26
|
-
private
|
|
30
|
+
createClick(request: ToltApi.CreateClickRequest, requestOptions?: ClicksClient.RequestOptions): core.HttpResponsePromise<ToltApi.CreateClickResponse>;
|
|
31
|
+
private __createClick;
|
|
27
32
|
/**
|
|
28
33
|
* @param {ToltApi.GetClickRequest} request
|
|
29
34
|
* @param {ClicksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
30
35
|
*
|
|
31
36
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
32
37
|
* @throws {@link ToltApi.NotFoundError}
|
|
38
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
33
39
|
* @throws {@link errors.ToltApiError}
|
|
34
40
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
35
41
|
*
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
3
|
import { mergeHeaders } from "../../../../core/headers.js";
|
|
4
4
|
import * as core from "../../../../core/index.js";
|
|
5
|
+
import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.js";
|
|
5
6
|
import * as environments from "../../../../environments.js";
|
|
6
7
|
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js";
|
|
7
8
|
import * as errors from "../../../../errors/index.js";
|
|
@@ -11,46 +12,38 @@ export class ClicksClient {
|
|
|
11
12
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
|
-
*
|
|
15
|
+
* Records a click on a partner's link from your own server, for visits the browser script cannot see. Identify the source by link_id, by partner_id with an optional link_id, or by the link's param and value; the partner and program are resolved from it. Pass the returned id as click_id when you create the customer.
|
|
16
|
+
*
|
|
17
|
+
* @param {ToltApi.CreateClickRequest} request
|
|
15
18
|
* @param {ClicksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
16
19
|
*
|
|
17
20
|
* @throws {@link ToltApi.BadRequestError}
|
|
18
21
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
22
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
19
23
|
* @throws {@link errors.ToltApiError}
|
|
20
24
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
21
25
|
*
|
|
22
26
|
* @example
|
|
23
|
-
* await client.clicks.
|
|
27
|
+
* await client.clicks.createClick({
|
|
28
|
+
* "key": "value"
|
|
29
|
+
* })
|
|
24
30
|
*/
|
|
25
|
-
|
|
26
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
31
|
+
createClick(request, requestOptions) {
|
|
32
|
+
return core.HttpResponsePromise.fromPromise(this.__createClick(request, requestOptions));
|
|
27
33
|
}
|
|
28
|
-
async
|
|
29
|
-
const { limit, order, starting_after: startingAfter, program_id: programId, partner_id: partnerId, link_id: linkId, country, device, browser, } = request;
|
|
30
|
-
const _queryParams = {
|
|
31
|
-
limit,
|
|
32
|
-
order: order != null ? order : undefined,
|
|
33
|
-
starting_after: startingAfter,
|
|
34
|
-
program_id: programId,
|
|
35
|
-
partner_id: partnerId,
|
|
36
|
-
link_id: linkId,
|
|
37
|
-
country,
|
|
38
|
-
device,
|
|
39
|
-
browser,
|
|
40
|
-
};
|
|
34
|
+
async __createClick(request, requestOptions) {
|
|
41
35
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
42
36
|
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
43
37
|
const _response = await core.fetcher({
|
|
44
38
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
45
39
|
(await core.Supplier.get(this._options.environment)) ??
|
|
46
40
|
environments.ToltApiEnvironment.Production, "v2/clicks"),
|
|
47
|
-
method: "
|
|
41
|
+
method: "POST",
|
|
48
42
|
headers: _headers,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
.build(),
|
|
43
|
+
contentType: "application/json",
|
|
44
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
45
|
+
requestType: "json",
|
|
46
|
+
body: mergeAdditionalBodyParameters(request, requestOptions?.additionalBodyParameters),
|
|
54
47
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
55
48
|
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
56
49
|
abortSignal: requestOptions?.abortSignal,
|
|
@@ -66,6 +59,8 @@ export class ClicksClient {
|
|
|
66
59
|
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
67
60
|
case 401:
|
|
68
61
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
62
|
+
case 429:
|
|
63
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
69
64
|
default:
|
|
70
65
|
throw new errors.ToltApiError({
|
|
71
66
|
statusCode: _response.error.statusCode,
|
|
@@ -74,7 +69,7 @@ export class ClicksClient {
|
|
|
74
69
|
});
|
|
75
70
|
}
|
|
76
71
|
}
|
|
77
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "
|
|
72
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/clicks");
|
|
78
73
|
}
|
|
79
74
|
/**
|
|
80
75
|
* @param {ToltApi.GetClickRequest} request
|
|
@@ -82,6 +77,7 @@ export class ClicksClient {
|
|
|
82
77
|
*
|
|
83
78
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
84
79
|
* @throws {@link ToltApi.NotFoundError}
|
|
80
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
85
81
|
* @throws {@link errors.ToltApiError}
|
|
86
82
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
87
83
|
*
|
|
@@ -119,6 +115,8 @@ export class ClicksClient {
|
|
|
119
115
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
120
116
|
case 404:
|
|
121
117
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
118
|
+
case 429:
|
|
119
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
122
120
|
default:
|
|
123
121
|
throw new errors.ToltApiError({
|
|
124
122
|
statusCode: _response.error.statusCode,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type CreateClickRequest = unknown;
|
|
@@ -10,12 +10,51 @@ export declare namespace CommissionsClient {
|
|
|
10
10
|
export declare class CommissionsClient {
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<CommissionsClient.Options>;
|
|
12
12
|
constructor(options: CommissionsClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Approves up to 100 commissions. Each id is processed on its own and the response reports the outcome per id, with the error code for any that were refused.
|
|
15
|
+
*
|
|
16
|
+
* @param {ToltApi.BulkApproveCommissionsRequest} request
|
|
17
|
+
* @param {CommissionsClient.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.commissions.bulkApproveCommissions({
|
|
27
|
+
* ids: ["part_9fQ2xLL", "part_3RtV9k"]
|
|
28
|
+
* })
|
|
29
|
+
*/
|
|
30
|
+
bulkApproveCommissions(request: ToltApi.BulkApproveCommissionsRequest, requestOptions?: CommissionsClient.RequestOptions): core.HttpResponsePromise<ToltApi.BulkApproveCommissionsResponse>;
|
|
31
|
+
private __bulkApproveCommissions;
|
|
32
|
+
/**
|
|
33
|
+
* Declines up to 100 commissions. Each id is processed on its own and the response reports the outcome per id, with the error code for any that were refused.
|
|
34
|
+
*
|
|
35
|
+
* @param {ToltApi.BulkDeclineCommissionsRequest} request
|
|
36
|
+
* @param {CommissionsClient.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.commissions.bulkDeclineCommissions({
|
|
46
|
+
* ids: ["part_9fQ2xLL", "part_3RtV9k"]
|
|
47
|
+
* })
|
|
48
|
+
*/
|
|
49
|
+
bulkDeclineCommissions(request: ToltApi.BulkDeclineCommissionsRequest, requestOptions?: CommissionsClient.RequestOptions): core.HttpResponsePromise<ToltApi.BulkDeclineCommissionsResponse>;
|
|
50
|
+
private __bulkDeclineCommissions;
|
|
13
51
|
/**
|
|
14
52
|
* @param {ToltApi.ListCommissionsRequest} request
|
|
15
53
|
* @param {CommissionsClient.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
|
*
|
|
@@ -31,6 +70,7 @@ export declare class CommissionsClient {
|
|
|
31
70
|
* @throws {@link ToltApi.BadRequestError}
|
|
32
71
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
33
72
|
* @throws {@link ToltApi.ConflictError}
|
|
73
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
34
74
|
* @throws {@link errors.ToltApiError}
|
|
35
75
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
36
76
|
*
|
|
@@ -47,6 +87,7 @@ export declare class CommissionsClient {
|
|
|
47
87
|
*
|
|
48
88
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
49
89
|
* @throws {@link ToltApi.NotFoundError}
|
|
90
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
50
91
|
* @throws {@link errors.ToltApiError}
|
|
51
92
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
52
93
|
*
|
|
@@ -65,6 +106,7 @@ export declare class CommissionsClient {
|
|
|
65
106
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
66
107
|
* @throws {@link ToltApi.NotFoundError}
|
|
67
108
|
* @throws {@link ToltApi.ConflictError}
|
|
109
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
68
110
|
* @throws {@link errors.ToltApiError}
|
|
69
111
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
70
112
|
*
|
|
@@ -83,6 +125,7 @@ export declare class CommissionsClient {
|
|
|
83
125
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
84
126
|
* @throws {@link ToltApi.NotFoundError}
|
|
85
127
|
* @throws {@link ToltApi.ConflictError}
|
|
128
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
86
129
|
* @throws {@link errors.ToltApiError}
|
|
87
130
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
88
131
|
*
|
|
@@ -101,6 +144,7 @@ export declare class CommissionsClient {
|
|
|
101
144
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
102
145
|
* @throws {@link ToltApi.NotFoundError}
|
|
103
146
|
* @throws {@link ToltApi.ConflictError}
|
|
147
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
104
148
|
* @throws {@link errors.ToltApiError}
|
|
105
149
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
106
150
|
*
|
|
@@ -119,6 +163,7 @@ export declare class CommissionsClient {
|
|
|
119
163
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
120
164
|
* @throws {@link ToltApi.NotFoundError}
|
|
121
165
|
* @throws {@link ToltApi.ConflictError}
|
|
166
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
122
167
|
* @throws {@link errors.ToltApiError}
|
|
123
168
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
124
169
|
*
|
|
@@ -11,12 +11,139 @@ export class CommissionsClient {
|
|
|
11
11
|
constructor(options) {
|
|
12
12
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Approves up to 100 commissions. Each id is processed on its own and the response reports the outcome per id, with the error code for any that were refused.
|
|
16
|
+
*
|
|
17
|
+
* @param {ToltApi.BulkApproveCommissionsRequest} request
|
|
18
|
+
* @param {CommissionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
19
|
+
*
|
|
20
|
+
* @throws {@link ToltApi.BadRequestError}
|
|
21
|
+
* @throws {@link ToltApi.UnauthorizedError}
|
|
22
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
23
|
+
* @throws {@link errors.ToltApiError}
|
|
24
|
+
* @throws {@link errors.ToltApiTimeoutError}
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* await client.commissions.bulkApproveCommissions({
|
|
28
|
+
* ids: ["part_9fQ2xLL", "part_3RtV9k"]
|
|
29
|
+
* })
|
|
30
|
+
*/
|
|
31
|
+
bulkApproveCommissions(request, requestOptions) {
|
|
32
|
+
return core.HttpResponsePromise.fromPromise(this.__bulkApproveCommissions(request, requestOptions));
|
|
33
|
+
}
|
|
34
|
+
async __bulkApproveCommissions(request, requestOptions) {
|
|
35
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
36
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
37
|
+
const _response = await core.fetcher({
|
|
38
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
39
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
40
|
+
environments.ToltApiEnvironment.Production, "v2/commissions/bulk/approve"),
|
|
41
|
+
method: "POST",
|
|
42
|
+
headers: _headers,
|
|
43
|
+
contentType: "application/json",
|
|
44
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
45
|
+
requestType: "json",
|
|
46
|
+
body: mergeAdditionalBodyParameters(request, requestOptions?.additionalBodyParameters),
|
|
47
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
48
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
49
|
+
abortSignal: requestOptions?.abortSignal,
|
|
50
|
+
fetchFn: this._options?.fetch,
|
|
51
|
+
logging: this._options.logging,
|
|
52
|
+
});
|
|
53
|
+
if (_response.ok) {
|
|
54
|
+
return {
|
|
55
|
+
data: _response.body,
|
|
56
|
+
rawResponse: _response.rawResponse,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
if (_response.error.reason === "status-code") {
|
|
60
|
+
switch (_response.error.statusCode) {
|
|
61
|
+
case 400:
|
|
62
|
+
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
63
|
+
case 401:
|
|
64
|
+
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
65
|
+
case 429:
|
|
66
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
67
|
+
default:
|
|
68
|
+
throw new errors.ToltApiError({
|
|
69
|
+
statusCode: _response.error.statusCode,
|
|
70
|
+
body: _response.error.body,
|
|
71
|
+
rawResponse: _response.rawResponse,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/commissions/bulk/approve");
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Declines up to 100 commissions. Each id is processed on its own and the response reports the outcome per id, with the error code for any that were refused.
|
|
79
|
+
*
|
|
80
|
+
* @param {ToltApi.BulkDeclineCommissionsRequest} request
|
|
81
|
+
* @param {CommissionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
82
|
+
*
|
|
83
|
+
* @throws {@link ToltApi.BadRequestError}
|
|
84
|
+
* @throws {@link ToltApi.UnauthorizedError}
|
|
85
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
86
|
+
* @throws {@link errors.ToltApiError}
|
|
87
|
+
* @throws {@link errors.ToltApiTimeoutError}
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* await client.commissions.bulkDeclineCommissions({
|
|
91
|
+
* ids: ["part_9fQ2xLL", "part_3RtV9k"]
|
|
92
|
+
* })
|
|
93
|
+
*/
|
|
94
|
+
bulkDeclineCommissions(request, requestOptions) {
|
|
95
|
+
return core.HttpResponsePromise.fromPromise(this.__bulkDeclineCommissions(request, requestOptions));
|
|
96
|
+
}
|
|
97
|
+
async __bulkDeclineCommissions(request, requestOptions) {
|
|
98
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
99
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
100
|
+
const _response = await core.fetcher({
|
|
101
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
102
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
103
|
+
environments.ToltApiEnvironment.Production, "v2/commissions/bulk/decline"),
|
|
104
|
+
method: "POST",
|
|
105
|
+
headers: _headers,
|
|
106
|
+
contentType: "application/json",
|
|
107
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
108
|
+
requestType: "json",
|
|
109
|
+
body: mergeAdditionalBodyParameters(request, requestOptions?.additionalBodyParameters),
|
|
110
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
111
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
112
|
+
abortSignal: requestOptions?.abortSignal,
|
|
113
|
+
fetchFn: this._options?.fetch,
|
|
114
|
+
logging: this._options.logging,
|
|
115
|
+
});
|
|
116
|
+
if (_response.ok) {
|
|
117
|
+
return {
|
|
118
|
+
data: _response.body,
|
|
119
|
+
rawResponse: _response.rawResponse,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
if (_response.error.reason === "status-code") {
|
|
123
|
+
switch (_response.error.statusCode) {
|
|
124
|
+
case 400:
|
|
125
|
+
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
126
|
+
case 401:
|
|
127
|
+
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
128
|
+
case 429:
|
|
129
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
130
|
+
default:
|
|
131
|
+
throw new errors.ToltApiError({
|
|
132
|
+
statusCode: _response.error.statusCode,
|
|
133
|
+
body: _response.error.body,
|
|
134
|
+
rawResponse: _response.rawResponse,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/commissions/bulk/decline");
|
|
139
|
+
}
|
|
14
140
|
/**
|
|
15
141
|
* @param {ToltApi.ListCommissionsRequest} request
|
|
16
142
|
* @param {CommissionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
17
143
|
*
|
|
18
144
|
* @throws {@link ToltApi.BadRequestError}
|
|
19
145
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
146
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
20
147
|
* @throws {@link errors.ToltApiError}
|
|
21
148
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
22
149
|
*
|
|
@@ -27,11 +154,17 @@ export class CommissionsClient {
|
|
|
27
154
|
return core.HttpResponsePromise.fromPromise(this.__listCommissions(request, requestOptions));
|
|
28
155
|
}
|
|
29
156
|
async __listCommissions(request = {}, requestOptions) {
|
|
30
|
-
const { limit, order, starting_after: startingAfter, program_id: programId, partner_id: partnerId, customer_id: customerId, transaction_id: transactionId, status, type: type_, search, } = request;
|
|
157
|
+
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, transaction_id: transactionId, status, type: type_, search, } = request;
|
|
31
158
|
const _queryParams = {
|
|
32
159
|
limit,
|
|
33
160
|
order: order != null ? order : undefined,
|
|
161
|
+
sort: sort != null ? sort : undefined,
|
|
34
162
|
starting_after: startingAfter,
|
|
163
|
+
ending_before: endingBefore,
|
|
164
|
+
created_after: createdAfter != null ? createdAfter : undefined,
|
|
165
|
+
created_before: createdBefore != null ? createdBefore : undefined,
|
|
166
|
+
updated_after: updatedAfter != null ? updatedAfter : undefined,
|
|
167
|
+
updated_before: updatedBefore != null ? updatedBefore : undefined,
|
|
35
168
|
program_id: programId,
|
|
36
169
|
partner_id: partnerId,
|
|
37
170
|
customer_id: customerId,
|
|
@@ -68,6 +201,8 @@ export class CommissionsClient {
|
|
|
68
201
|
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
69
202
|
case 401:
|
|
70
203
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
204
|
+
case 429:
|
|
205
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
71
206
|
default:
|
|
72
207
|
throw new errors.ToltApiError({
|
|
73
208
|
statusCode: _response.error.statusCode,
|
|
@@ -85,6 +220,7 @@ export class CommissionsClient {
|
|
|
85
220
|
* @throws {@link ToltApi.BadRequestError}
|
|
86
221
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
87
222
|
* @throws {@link ToltApi.ConflictError}
|
|
223
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
88
224
|
* @throws {@link errors.ToltApiError}
|
|
89
225
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
90
226
|
*
|
|
@@ -126,6 +262,8 @@ export class CommissionsClient {
|
|
|
126
262
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
127
263
|
case 409:
|
|
128
264
|
throw new ToltApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
265
|
+
case 429:
|
|
266
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
129
267
|
default:
|
|
130
268
|
throw new errors.ToltApiError({
|
|
131
269
|
statusCode: _response.error.statusCode,
|
|
@@ -142,6 +280,7 @@ export class CommissionsClient {
|
|
|
142
280
|
*
|
|
143
281
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
144
282
|
* @throws {@link ToltApi.NotFoundError}
|
|
283
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
145
284
|
* @throws {@link errors.ToltApiError}
|
|
146
285
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
147
286
|
*
|
|
@@ -179,6 +318,8 @@ export class CommissionsClient {
|
|
|
179
318
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
180
319
|
case 404:
|
|
181
320
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
321
|
+
case 429:
|
|
322
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
182
323
|
default:
|
|
183
324
|
throw new errors.ToltApiError({
|
|
184
325
|
statusCode: _response.error.statusCode,
|
|
@@ -197,6 +338,7 @@ export class CommissionsClient {
|
|
|
197
338
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
198
339
|
* @throws {@link ToltApi.NotFoundError}
|
|
199
340
|
* @throws {@link ToltApi.ConflictError}
|
|
341
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
200
342
|
* @throws {@link errors.ToltApiError}
|
|
201
343
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
202
344
|
*
|
|
@@ -241,6 +383,8 @@ export class CommissionsClient {
|
|
|
241
383
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
242
384
|
case 409:
|
|
243
385
|
throw new ToltApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
386
|
+
case 429:
|
|
387
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
244
388
|
default:
|
|
245
389
|
throw new errors.ToltApiError({
|
|
246
390
|
statusCode: _response.error.statusCode,
|
|
@@ -259,6 +403,7 @@ export class CommissionsClient {
|
|
|
259
403
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
260
404
|
* @throws {@link ToltApi.NotFoundError}
|
|
261
405
|
* @throws {@link ToltApi.ConflictError}
|
|
406
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
262
407
|
* @throws {@link errors.ToltApiError}
|
|
263
408
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
264
409
|
*
|
|
@@ -300,6 +445,8 @@ export class CommissionsClient {
|
|
|
300
445
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
301
446
|
case 409:
|
|
302
447
|
throw new ToltApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
448
|
+
case 429:
|
|
449
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
303
450
|
default:
|
|
304
451
|
throw new errors.ToltApiError({
|
|
305
452
|
statusCode: _response.error.statusCode,
|
|
@@ -318,6 +465,7 @@ export class CommissionsClient {
|
|
|
318
465
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
319
466
|
* @throws {@link ToltApi.NotFoundError}
|
|
320
467
|
* @throws {@link ToltApi.ConflictError}
|
|
468
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
321
469
|
* @throws {@link errors.ToltApiError}
|
|
322
470
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
323
471
|
*
|
|
@@ -359,6 +507,8 @@ export class CommissionsClient {
|
|
|
359
507
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
360
508
|
case 409:
|
|
361
509
|
throw new ToltApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
510
|
+
case 429:
|
|
511
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
362
512
|
default:
|
|
363
513
|
throw new errors.ToltApiError({
|
|
364
514
|
statusCode: _response.error.statusCode,
|
|
@@ -377,6 +527,7 @@ export class CommissionsClient {
|
|
|
377
527
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
378
528
|
* @throws {@link ToltApi.NotFoundError}
|
|
379
529
|
* @throws {@link ToltApi.ConflictError}
|
|
530
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
380
531
|
* @throws {@link errors.ToltApiError}
|
|
381
532
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
382
533
|
*
|
|
@@ -418,6 +569,8 @@ export class CommissionsClient {
|
|
|
418
569
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
419
570
|
case 409:
|
|
420
571
|
throw new ToltApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
572
|
+
case 429:
|
|
573
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
421
574
|
default:
|
|
422
575
|
throw new errors.ToltApiError({
|
|
423
576
|
statusCode: _response.error.statusCode,
|