@tolt/api 1.1.0 → 1.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/README.md +43 -15
- package/dist/BaseClient.js +1 -1
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +4 -0
- package/dist/api/resources/embedTokens/client/Client.d.ts +1 -1
- package/dist/api/resources/embedTokens/client/Client.js +1 -1
- package/dist/api/resources/embedTokens/client/requests/CreateEmbedTokenRequest.d.ts +8 -2
- package/dist/api/resources/index.d.ts +3 -0
- package/dist/api/resources/index.js +3 -0
- package/dist/api/resources/partnerTags/client/Client.d.ts +118 -0
- package/dist/api/resources/partnerTags/client/Client.js +352 -0
- package/dist/api/resources/partnerTags/client/index.d.ts +1 -0
- package/dist/api/resources/partnerTags/client/index.js +1 -0
- package/dist/api/resources/partnerTags/client/requests/CreatePartnerTagRequest.d.ts +16 -0
- package/dist/api/resources/partnerTags/client/requests/CreatePartnerTagRequest.js +2 -0
- package/dist/api/resources/partnerTags/client/requests/DeletePartnerTagRequest.d.ts +9 -0
- package/dist/api/resources/partnerTags/client/requests/DeletePartnerTagRequest.js +2 -0
- package/dist/api/resources/partnerTags/client/requests/GetPartnerTagRequest.d.ts +9 -0
- package/dist/api/resources/partnerTags/client/requests/GetPartnerTagRequest.js +2 -0
- package/dist/api/resources/partnerTags/client/requests/ListPartnerTagsRequest.d.ts +29 -0
- package/dist/api/resources/partnerTags/client/requests/ListPartnerTagsRequest.js +2 -0
- package/dist/api/resources/partnerTags/client/requests/UpdatePartnerTagRequest.d.ts +15 -0
- package/dist/api/resources/partnerTags/client/requests/UpdatePartnerTagRequest.js +2 -0
- package/dist/api/resources/partnerTags/client/requests/index.d.ts +5 -0
- package/dist/api/resources/partnerTags/client/requests/index.js +1 -0
- package/dist/api/resources/partnerTags/exports.d.ts +2 -0
- package/dist/api/resources/partnerTags/exports.js +3 -0
- package/dist/api/resources/partnerTags/index.d.ts +2 -0
- package/dist/api/resources/partnerTags/index.js +2 -0
- package/dist/api/resources/partnerTags/types/CreatePartnerTagResponse.d.ts +6 -0
- package/dist/api/resources/partnerTags/types/CreatePartnerTagResponse.js +2 -0
- package/dist/api/resources/partnerTags/types/DeletePartnerTagResponse.d.ts +6 -0
- package/dist/api/resources/partnerTags/types/DeletePartnerTagResponse.js +2 -0
- package/dist/api/resources/partnerTags/types/GetPartnerTagResponse.d.ts +6 -0
- package/dist/api/resources/partnerTags/types/GetPartnerTagResponse.js +2 -0
- package/dist/api/resources/partnerTags/types/ListPartnerTagsRequestOrder.d.ts +6 -0
- package/dist/api/resources/partnerTags/types/ListPartnerTagsRequestOrder.js +6 -0
- package/dist/api/resources/partnerTags/types/ListPartnerTagsRequestSort.d.ts +6 -0
- package/dist/api/resources/partnerTags/types/ListPartnerTagsRequestSort.js +6 -0
- package/dist/api/resources/partnerTags/types/ListPartnerTagsResponse.d.ts +11 -0
- package/dist/api/resources/partnerTags/types/ListPartnerTagsResponse.js +2 -0
- package/dist/api/resources/partnerTags/types/UpdatePartnerTagResponse.d.ts +6 -0
- package/dist/api/resources/partnerTags/types/UpdatePartnerTagResponse.js +2 -0
- package/dist/api/resources/partnerTags/types/index.d.ts +7 -0
- package/dist/api/resources/partnerTags/types/index.js +7 -0
- package/dist/api/resources/partners/client/Client.d.ts +43 -0
- package/dist/api/resources/partners/client/Client.js +132 -1
- package/dist/api/resources/partners/client/requests/AddPartnerTagsRequest.d.ts +12 -0
- package/dist/api/resources/partners/client/requests/AddPartnerTagsRequest.js +2 -0
- package/dist/api/resources/partners/client/requests/ListPartnersRequest.d.ts +2 -0
- package/dist/api/resources/partners/client/requests/RemovePartnerTagRequest.d.ts +11 -0
- package/dist/api/resources/partners/client/requests/RemovePartnerTagRequest.js +2 -0
- package/dist/api/resources/partners/client/requests/index.d.ts +2 -0
- package/dist/api/resources/partners/types/AddPartnerTagsResponse.d.ts +6 -0
- package/dist/api/resources/partners/types/AddPartnerTagsResponse.js +2 -0
- package/dist/api/resources/partners/types/RemovePartnerTagResponse.d.ts +6 -0
- package/dist/api/resources/partners/types/RemovePartnerTagResponse.js +2 -0
- package/dist/api/resources/partners/types/index.d.ts +2 -0
- package/dist/api/resources/partners/types/index.js +2 -0
- package/dist/api/resources/transactions/client/requests/CreateTransactionRequest.d.ts +1 -1
- package/dist/api/types/EmbedToken.d.ts +2 -0
- package/dist/api/types/PartnerDetails.d.ts +2 -0
- package/dist/api/types/PartnerTag.d.ts +11 -0
- package/dist/api/types/PartnerTag.js +2 -0
- package/dist/api/types/PartnerTagSummary.d.ts +5 -0
- package/dist/api/types/PartnerTagSummary.js +2 -0
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @tolt/api
|
|
2
2
|
|
|
3
|
-
TypeScript SDK for the
|
|
3
|
+
TypeScript SDK for the Tolt API (v2). Run it on your server: it needs your secret API key. Requires Node 18 or newer.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -13,25 +13,53 @@ npm install @tolt/api
|
|
|
13
13
|
```ts
|
|
14
14
|
import { ToltApiClient } from "@tolt/api";
|
|
15
15
|
|
|
16
|
-
const
|
|
17
|
-
baseUrl: "https://api.tolt.com",
|
|
18
|
-
token: process.env.TOLT_API_KEY!, // your Tolt API key
|
|
19
|
-
});
|
|
16
|
+
const tolt = new ToltApiClient({ token: process.env.TOLT_API_KEY! });
|
|
20
17
|
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
const
|
|
18
|
+
const { data: partner } = await tolt.partners.get({ id: "part_8fKq2LmZx7RtYw3nVbHc5dPj" });
|
|
19
|
+
|
|
20
|
+
for await (const customer of await tolt.customers.list()) {
|
|
21
|
+
console.log(customer.id);
|
|
22
|
+
}
|
|
24
23
|
```
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
Single-item calls return the API envelope, so read `.data`. `list` returns a page: iterate it with `for await` to walk every page, or read `page.data` for one page.
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
Resources: `partners`, `customers`, `transactions`, `commissions`, `links`, `clicks`, `promotionCodes`, `programs`, `groups`, `flows`, `reports`, `embedTokens`.
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
## Errors
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import { ToltApi, ToltApiError, ToltApiTimeoutError } from "@tolt/api";
|
|
33
|
+
|
|
34
|
+
try {
|
|
35
|
+
await tolt.partners.get({ id: "part_8fKq2LmZx7RtYw3nVbHc5dPj" });
|
|
36
|
+
} catch (err) {
|
|
37
|
+
if (err instanceof ToltApi.NotFoundError) {
|
|
38
|
+
// err.body.code === "not_found"
|
|
39
|
+
} else if (err instanceof ToltApiTimeoutError) {
|
|
40
|
+
// no response within timeoutInSeconds
|
|
41
|
+
} else if (err instanceof ToltApiError) {
|
|
42
|
+
console.error(err.statusCode, err.body, err.requestId);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Retries and timeouts
|
|
48
|
+
|
|
49
|
+
Failed requests (408, 429, 5xx) are retried twice with backoff. Calls that create something (every `create`, and `transactions.rerunFlows`) are never retried, so a server error can't create a duplicate. Override per client or per call:
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
const tolt = new ToltApiClient({ token: process.env.TOLT_API_KEY!, maxRetries: 3, timeoutInSeconds: 30 });
|
|
33
53
|
```
|
|
34
54
|
|
|
35
|
-
|
|
55
|
+
The client talks to `https://platform.tolt.com` by default. Pass `baseUrl` to point it elsewhere.
|
|
56
|
+
|
|
57
|
+
## Development
|
|
36
58
|
|
|
37
|
-
|
|
59
|
+
`src/` is generated by [Fern](https://buildwithfern.com) from the API's OpenAPI spec in [toltapp/tolt-sdks](https://github.com/toltapp/tolt-sdks), which opens a pull request here when the spec changes. Don't edit `src/` by hand.
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm ci
|
|
63
|
+
npm run build
|
|
64
|
+
npm test
|
|
65
|
+
```
|
package/dist/BaseClient.js
CHANGED
|
@@ -5,7 +5,7 @@ import * as core from "./core/index.js";
|
|
|
5
5
|
export function normalizeClientOptions(options) {
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
|
-
"User-Agent": "tolt-typescript/1.
|
|
8
|
+
"User-Agent": "tolt-typescript/1.3.0",
|
|
9
9
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
10
10
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
11
11
|
}, options?.headers);
|
package/dist/Client.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { FlowsClient } from "./api/resources/flows/client/Client.js";
|
|
|
6
6
|
import { GroupsClient } from "./api/resources/groups/client/Client.js";
|
|
7
7
|
import { LinksClient } from "./api/resources/links/client/Client.js";
|
|
8
8
|
import { PartnersClient } from "./api/resources/partners/client/Client.js";
|
|
9
|
+
import { PartnerTagsClient } from "./api/resources/partnerTags/client/Client.js";
|
|
9
10
|
import { ProgramsClient } from "./api/resources/programs/client/Client.js";
|
|
10
11
|
import { PromotionCodesClient } from "./api/resources/promotionCodes/client/Client.js";
|
|
11
12
|
import { ReportsClient } from "./api/resources/reports/client/Client.js";
|
|
@@ -25,6 +26,7 @@ export declare class ToltApiClient {
|
|
|
25
26
|
protected _flows: FlowsClient | undefined;
|
|
26
27
|
protected _clicks: ClicksClient | undefined;
|
|
27
28
|
protected _partners: PartnersClient | undefined;
|
|
29
|
+
protected _partnerTags: PartnerTagsClient | undefined;
|
|
28
30
|
protected _programs: ProgramsClient | undefined;
|
|
29
31
|
protected _customers: CustomersClient | undefined;
|
|
30
32
|
protected _commissions: CommissionsClient | undefined;
|
|
@@ -38,6 +40,7 @@ export declare class ToltApiClient {
|
|
|
38
40
|
get flows(): FlowsClient;
|
|
39
41
|
get clicks(): ClicksClient;
|
|
40
42
|
get partners(): PartnersClient;
|
|
43
|
+
get partnerTags(): PartnerTagsClient;
|
|
41
44
|
get programs(): ProgramsClient;
|
|
42
45
|
get customers(): CustomersClient;
|
|
43
46
|
get commissions(): CommissionsClient;
|
package/dist/Client.js
CHANGED
|
@@ -7,6 +7,7 @@ import { FlowsClient } from "./api/resources/flows/client/Client.js";
|
|
|
7
7
|
import { GroupsClient } from "./api/resources/groups/client/Client.js";
|
|
8
8
|
import { LinksClient } from "./api/resources/links/client/Client.js";
|
|
9
9
|
import { PartnersClient } from "./api/resources/partners/client/Client.js";
|
|
10
|
+
import { PartnerTagsClient } from "./api/resources/partnerTags/client/Client.js";
|
|
10
11
|
import { ProgramsClient } from "./api/resources/programs/client/Client.js";
|
|
11
12
|
import { PromotionCodesClient } from "./api/resources/promotionCodes/client/Client.js";
|
|
12
13
|
import { ReportsClient } from "./api/resources/reports/client/Client.js";
|
|
@@ -32,6 +33,9 @@ export class ToltApiClient {
|
|
|
32
33
|
get partners() {
|
|
33
34
|
return (this._partners ??= new PartnersClient(this._options));
|
|
34
35
|
}
|
|
36
|
+
get partnerTags() {
|
|
37
|
+
return (this._partnerTags ??= new PartnerTagsClient(this._options));
|
|
38
|
+
}
|
|
35
39
|
get programs() {
|
|
36
40
|
return (this._programs ??= new ProgramsClient(this._options));
|
|
37
41
|
}
|
|
@@ -11,7 +11,7 @@ export declare class EmbedTokensClient {
|
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<EmbedTokensClient.Options>;
|
|
12
12
|
constructor(options: EmbedTokensClient.Options);
|
|
13
13
|
/**
|
|
14
|
-
* Mint a short-lived, partner-scoped token for the embedded referral dashboard. Safe to send to the browser.
|
|
14
|
+
* Mint a short-lived, partner-scoped token for the embedded referral dashboard. Safe to send to the browser. With partner (email and program_id), the partner is created when the program has none with that email, so one call covers a user's first visit.
|
|
15
15
|
*
|
|
16
16
|
* @param {ToltApi.CreateEmbedTokenRequest} request
|
|
17
17
|
* @param {EmbedTokensClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -12,7 +12,7 @@ export class EmbedTokensClient {
|
|
|
12
12
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* Mint a short-lived, partner-scoped token for the embedded referral dashboard. Safe to send to the browser.
|
|
15
|
+
* Mint a short-lived, partner-scoped token for the embedded referral dashboard. Safe to send to the browser. With partner (email and program_id), the partner is created when the program has none with that email, so one call covers a user's first visit.
|
|
16
16
|
*
|
|
17
17
|
* @param {ToltApi.CreateEmbedTokenRequest} request
|
|
18
18
|
* @param {EmbedTokensClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -5,17 +5,23 @@
|
|
|
5
5
|
export interface CreateEmbedTokenRequest {
|
|
6
6
|
/** Id of an existing partner (part_...). Send this or partner, not both. */
|
|
7
7
|
partner_id?: string;
|
|
8
|
-
/**
|
|
8
|
+
/** Find the partner by email within the program, or create them (active, with a referral link) when the program has no partner with that email. Send this or partner_id, not both. */
|
|
9
9
|
partner?: CreateEmbedTokenRequest.Partner;
|
|
10
10
|
}
|
|
11
11
|
export declare namespace CreateEmbedTokenRequest {
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Find the partner by email within the program, or create them (active, with a referral link) when the program has no partner with that email. Send this or partner_id, not both.
|
|
14
14
|
*/
|
|
15
15
|
interface Partner {
|
|
16
16
|
/** Email of the partner, matched without regard to case. */
|
|
17
17
|
email: string;
|
|
18
18
|
/** Program the partner belongs to (prg_...). */
|
|
19
19
|
program_id: string;
|
|
20
|
+
/** First name, used only when the partner is created. */
|
|
21
|
+
first_name?: string | undefined;
|
|
22
|
+
/** Last name, used only when the partner is created. */
|
|
23
|
+
last_name?: string | undefined;
|
|
24
|
+
/** Group for a newly created partner. Defaults to the program's default group. */
|
|
25
|
+
group_id?: string | undefined;
|
|
20
26
|
}
|
|
21
27
|
}
|
|
@@ -22,6 +22,9 @@ export * from "./links/types/index.js";
|
|
|
22
22
|
export * from "./partners/client/requests/index.js";
|
|
23
23
|
export * as partners from "./partners/index.js";
|
|
24
24
|
export * from "./partners/types/index.js";
|
|
25
|
+
export * from "./partnerTags/client/requests/index.js";
|
|
26
|
+
export * as partnerTags from "./partnerTags/index.js";
|
|
27
|
+
export * from "./partnerTags/types/index.js";
|
|
25
28
|
export * from "./programs/client/requests/index.js";
|
|
26
29
|
export * as programs from "./programs/index.js";
|
|
27
30
|
export * from "./programs/types/index.js";
|
|
@@ -22,6 +22,9 @@ export * from "./links/types/index.js";
|
|
|
22
22
|
export * from "./partners/client/requests/index.js";
|
|
23
23
|
export * as partners from "./partners/index.js";
|
|
24
24
|
export * from "./partners/types/index.js";
|
|
25
|
+
export * from "./partnerTags/client/requests/index.js";
|
|
26
|
+
export * as partnerTags from "./partnerTags/index.js";
|
|
27
|
+
export * from "./partnerTags/types/index.js";
|
|
25
28
|
export * from "./programs/client/requests/index.js";
|
|
26
29
|
export * as programs from "./programs/index.js";
|
|
27
30
|
export * from "./programs/types/index.js";
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../core/index.js";
|
|
4
|
+
import * as ToltApi from "../../../index.js";
|
|
5
|
+
export declare namespace PartnerTagsClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class PartnerTagsClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<PartnerTagsClient.Options>;
|
|
12
|
+
constructor(options: PartnerTagsClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Lists the tags you can put on partners. Filter by program, search by name, and page with cursors.
|
|
15
|
+
*
|
|
16
|
+
* @param {ToltApi.ListPartnerTagsRequest} request
|
|
17
|
+
* @param {PartnerTagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link ToltApi.BadRequestError}
|
|
20
|
+
* @throws {@link ToltApi.UnauthorizedError}
|
|
21
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
22
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
23
|
+
* @throws {@link errors.ToltApiError}
|
|
24
|
+
* @throws {@link errors.ToltApiTimeoutError}
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* await client.partnerTags.listPartnerTags()
|
|
28
|
+
*/
|
|
29
|
+
listPartnerTags(request?: ToltApi.ListPartnerTagsRequest, requestOptions?: PartnerTagsClient.RequestOptions): core.HttpResponsePromise<ToltApi.ListPartnerTagsResponse>;
|
|
30
|
+
private __listPartnerTags;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a tag in a program. Put it on partners with POST /v2/partners/{id}/tags.
|
|
33
|
+
*
|
|
34
|
+
* @param {ToltApi.CreatePartnerTagRequest} request
|
|
35
|
+
* @param {PartnerTagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
|
+
*
|
|
37
|
+
* @throws {@link ToltApi.BadRequestError}
|
|
38
|
+
* @throws {@link ToltApi.UnauthorizedError}
|
|
39
|
+
* @throws {@link ToltApi.ConflictError}
|
|
40
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
41
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
42
|
+
* @throws {@link errors.ToltApiError}
|
|
43
|
+
* @throws {@link errors.ToltApiTimeoutError}
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* await client.partnerTags.createPartnerTag({
|
|
47
|
+
* program_id: "prg_T6z8aRW3XCmvFWP972RKxpAd",
|
|
48
|
+
* name: "VIP",
|
|
49
|
+
* color: "#2457D6"
|
|
50
|
+
* })
|
|
51
|
+
*/
|
|
52
|
+
createPartnerTag(request: ToltApi.CreatePartnerTagRequest, requestOptions?: PartnerTagsClient.RequestOptions): core.HttpResponsePromise<ToltApi.CreatePartnerTagResponse>;
|
|
53
|
+
private __createPartnerTag;
|
|
54
|
+
/**
|
|
55
|
+
* Gets a partner tag by ID, with how many partners have it.
|
|
56
|
+
*
|
|
57
|
+
* @param {ToltApi.GetPartnerTagRequest} request
|
|
58
|
+
* @param {PartnerTagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
59
|
+
*
|
|
60
|
+
* @throws {@link ToltApi.UnauthorizedError}
|
|
61
|
+
* @throws {@link ToltApi.NotFoundError}
|
|
62
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
63
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
64
|
+
* @throws {@link errors.ToltApiError}
|
|
65
|
+
* @throws {@link errors.ToltApiTimeoutError}
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* await client.partnerTags.getPartnerTag({
|
|
69
|
+
* id: "ptag_zDEcdqNuNBPcokarWxBnk9gB"
|
|
70
|
+
* })
|
|
71
|
+
*/
|
|
72
|
+
getPartnerTag(request: ToltApi.GetPartnerTagRequest, requestOptions?: PartnerTagsClient.RequestOptions): core.HttpResponsePromise<ToltApi.GetPartnerTagResponse>;
|
|
73
|
+
private __getPartnerTag;
|
|
74
|
+
/**
|
|
75
|
+
* Renames a tag or changes its color. Partners who have the tag keep it.
|
|
76
|
+
*
|
|
77
|
+
* @param {ToltApi.UpdatePartnerTagRequest} request
|
|
78
|
+
* @param {PartnerTagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
79
|
+
*
|
|
80
|
+
* @throws {@link ToltApi.BadRequestError}
|
|
81
|
+
* @throws {@link ToltApi.UnauthorizedError}
|
|
82
|
+
* @throws {@link ToltApi.NotFoundError}
|
|
83
|
+
* @throws {@link ToltApi.ConflictError}
|
|
84
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
85
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
86
|
+
* @throws {@link errors.ToltApiError}
|
|
87
|
+
* @throws {@link errors.ToltApiTimeoutError}
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* await client.partnerTags.updatePartnerTag({
|
|
91
|
+
* id: "ptag_zDEcdqNuNBPcokarWxBnk9gB",
|
|
92
|
+
* name: "VIP",
|
|
93
|
+
* color: "#2457D6"
|
|
94
|
+
* })
|
|
95
|
+
*/
|
|
96
|
+
updatePartnerTag(request: ToltApi.UpdatePartnerTagRequest, requestOptions?: PartnerTagsClient.RequestOptions): core.HttpResponsePromise<ToltApi.UpdatePartnerTagResponse>;
|
|
97
|
+
private __updatePartnerTag;
|
|
98
|
+
/**
|
|
99
|
+
* Deletes a tag and removes it from every partner who has it.
|
|
100
|
+
*
|
|
101
|
+
* @param {ToltApi.DeletePartnerTagRequest} request
|
|
102
|
+
* @param {PartnerTagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
103
|
+
*
|
|
104
|
+
* @throws {@link ToltApi.UnauthorizedError}
|
|
105
|
+
* @throws {@link ToltApi.NotFoundError}
|
|
106
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
107
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
108
|
+
* @throws {@link errors.ToltApiError}
|
|
109
|
+
* @throws {@link errors.ToltApiTimeoutError}
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* await client.partnerTags.deletePartnerTag({
|
|
113
|
+
* id: "ptag_zDEcdqNuNBPcokarWxBnk9gB"
|
|
114
|
+
* })
|
|
115
|
+
*/
|
|
116
|
+
deletePartnerTag(request: ToltApi.DeletePartnerTagRequest, requestOptions?: PartnerTagsClient.RequestOptions): core.HttpResponsePromise<ToltApi.DeletePartnerTagResponse>;
|
|
117
|
+
private __deletePartnerTag;
|
|
118
|
+
}
|