@tolt/api 1.2.0 → 1.4.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/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 +2 -1
- package/dist/api/resources/embedTokens/client/Client.js +4 -1
- package/dist/api/resources/embedTokens/client/requests/CreateEmbedTokenRequest.d.ts +4 -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 +46 -1
- package/dist/api/resources/partners/client/Client.js +138 -2
- 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/CreatePartnerRequest.d.ts +3 -0
- package/dist/api/resources/partners/client/requests/ListPartnersRequest.d.ts +4 -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/UpdatePartnerRequest.d.ts +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/types/CreatedPartner.d.ts +2 -0
- package/dist/api/types/Partner.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/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.4.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. With partner (email and program_id), the partner is created when the program has
|
|
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, plus your own external_id), the partner is found by external_id, then by email, and created when the program has neither, 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.
|
|
@@ -19,6 +19,7 @@ export declare class EmbedTokensClient {
|
|
|
19
19
|
* @throws {@link ToltApi.BadRequestError}
|
|
20
20
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
21
21
|
* @throws {@link ToltApi.NotFoundError}
|
|
22
|
+
* @throws {@link ToltApi.ConflictError}
|
|
22
23
|
* @throws {@link ToltApi.ContentTooLargeError}
|
|
23
24
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
24
25
|
* @throws {@link errors.ToltApiError}
|
|
@@ -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. With partner (email and program_id), the partner is created when the program has
|
|
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, plus your own external_id), the partner is found by external_id, then by email, and created when the program has neither, 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.
|
|
@@ -20,6 +20,7 @@ export class EmbedTokensClient {
|
|
|
20
20
|
* @throws {@link ToltApi.BadRequestError}
|
|
21
21
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
22
22
|
* @throws {@link ToltApi.NotFoundError}
|
|
23
|
+
* @throws {@link ToltApi.ConflictError}
|
|
23
24
|
* @throws {@link ToltApi.ContentTooLargeError}
|
|
24
25
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
25
26
|
* @throws {@link errors.ToltApiError}
|
|
@@ -61,6 +62,8 @@ export class EmbedTokensClient {
|
|
|
61
62
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
62
63
|
case 404:
|
|
63
64
|
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
65
|
+
case 409:
|
|
66
|
+
throw new ToltApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
64
67
|
case 413:
|
|
65
68
|
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
66
69
|
case 429:
|
|
@@ -5,18 +5,20 @@
|
|
|
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
|
-
/** Find the partner by email within the program, or create them (active, with a referral link) when the program has no partner
|
|
8
|
+
/** Find the partner by external_id or email within the program, or create them (active, with a referral link) when the program has no such partner. Send this or partner_id, not both. */
|
|
9
9
|
partner?: CreateEmbedTokenRequest.Partner;
|
|
10
10
|
}
|
|
11
11
|
export declare namespace CreateEmbedTokenRequest {
|
|
12
12
|
/**
|
|
13
|
-
* Find the partner by email within the program, or create them (active, with a referral link) when the program has no partner
|
|
13
|
+
* Find the partner by external_id or email within the program, or create them (active, with a referral link) when the program has no such partner. 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
|
+
/** Your own id for the partner, such as the user id in your app. Matched before email, so the partner is still found after their email changes. Saved on a partner found by email who has none yet, and on a newly created partner. */
|
|
21
|
+
external_id?: string | undefined;
|
|
20
22
|
/** First name, used only when the partner is created. */
|
|
21
23
|
first_name?: string | undefined;
|
|
22
24
|
/** Last name, used only when the partner is created. */
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
|
+
import { mergeHeaders } from "../../../../core/headers.js";
|
|
4
|
+
import * as core from "../../../../core/index.js";
|
|
5
|
+
import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.js";
|
|
6
|
+
import * as environments from "../../../../environments.js";
|
|
7
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js";
|
|
8
|
+
import * as errors from "../../../../errors/index.js";
|
|
9
|
+
import * as ToltApi from "../../../index.js";
|
|
10
|
+
export class PartnerTagsClient {
|
|
11
|
+
constructor(options) {
|
|
12
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Lists the tags you can put on partners. Filter by program, search by name, and page with cursors.
|
|
16
|
+
*
|
|
17
|
+
* @param {ToltApi.ListPartnerTagsRequest} request
|
|
18
|
+
* @param {PartnerTagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
19
|
+
*
|
|
20
|
+
* @throws {@link ToltApi.BadRequestError}
|
|
21
|
+
* @throws {@link ToltApi.UnauthorizedError}
|
|
22
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
23
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
24
|
+
* @throws {@link errors.ToltApiError}
|
|
25
|
+
* @throws {@link errors.ToltApiTimeoutError}
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* await client.partnerTags.listPartnerTags()
|
|
29
|
+
*/
|
|
30
|
+
listPartnerTags(request = {}, requestOptions) {
|
|
31
|
+
return core.HttpResponsePromise.fromPromise(this.__listPartnerTags(request, requestOptions));
|
|
32
|
+
}
|
|
33
|
+
async __listPartnerTags(request = {}, requestOptions) {
|
|
34
|
+
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, search, } = request;
|
|
35
|
+
const _queryParams = {
|
|
36
|
+
limit,
|
|
37
|
+
order: order != null ? order : undefined,
|
|
38
|
+
sort: sort != null ? sort : undefined,
|
|
39
|
+
starting_after: startingAfter,
|
|
40
|
+
ending_before: endingBefore,
|
|
41
|
+
created_after: createdAfter != null ? createdAfter : undefined,
|
|
42
|
+
created_before: createdBefore != null ? createdBefore : undefined,
|
|
43
|
+
updated_after: updatedAfter != null ? updatedAfter : undefined,
|
|
44
|
+
updated_before: updatedBefore != null ? updatedBefore : undefined,
|
|
45
|
+
program_id: programId,
|
|
46
|
+
search,
|
|
47
|
+
};
|
|
48
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
49
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
50
|
+
const _response = await core.fetcher({
|
|
51
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
52
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
53
|
+
environments.ToltApiEnvironment.Default, "v2/partner-tags"),
|
|
54
|
+
method: "GET",
|
|
55
|
+
headers: _headers,
|
|
56
|
+
queryString: core.url
|
|
57
|
+
.queryBuilder()
|
|
58
|
+
.addMany(_queryParams)
|
|
59
|
+
.mergeAdditional(requestOptions?.queryParams)
|
|
60
|
+
.build(),
|
|
61
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
62
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
63
|
+
abortSignal: requestOptions?.abortSignal,
|
|
64
|
+
fetchFn: this._options?.fetch,
|
|
65
|
+
logging: this._options.logging,
|
|
66
|
+
});
|
|
67
|
+
if (_response.ok) {
|
|
68
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
69
|
+
}
|
|
70
|
+
if (_response.error.reason === "status-code") {
|
|
71
|
+
switch (_response.error.statusCode) {
|
|
72
|
+
case 400:
|
|
73
|
+
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
74
|
+
case 401:
|
|
75
|
+
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
76
|
+
case 413:
|
|
77
|
+
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
78
|
+
case 429:
|
|
79
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
80
|
+
default:
|
|
81
|
+
throw new errors.ToltApiError({
|
|
82
|
+
statusCode: _response.error.statusCode,
|
|
83
|
+
body: _response.error.body,
|
|
84
|
+
rawResponse: _response.rawResponse,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/partner-tags");
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Creates a tag in a program. Put it on partners with POST /v2/partners/{id}/tags.
|
|
92
|
+
*
|
|
93
|
+
* @param {ToltApi.CreatePartnerTagRequest} request
|
|
94
|
+
* @param {PartnerTagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
95
|
+
*
|
|
96
|
+
* @throws {@link ToltApi.BadRequestError}
|
|
97
|
+
* @throws {@link ToltApi.UnauthorizedError}
|
|
98
|
+
* @throws {@link ToltApi.ConflictError}
|
|
99
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
100
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
101
|
+
* @throws {@link errors.ToltApiError}
|
|
102
|
+
* @throws {@link errors.ToltApiTimeoutError}
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* await client.partnerTags.createPartnerTag({
|
|
106
|
+
* program_id: "prg_T6z8aRW3XCmvFWP972RKxpAd",
|
|
107
|
+
* name: "VIP",
|
|
108
|
+
* color: "#2457D6"
|
|
109
|
+
* })
|
|
110
|
+
*/
|
|
111
|
+
createPartnerTag(request, requestOptions) {
|
|
112
|
+
return core.HttpResponsePromise.fromPromise(this.__createPartnerTag(request, requestOptions));
|
|
113
|
+
}
|
|
114
|
+
async __createPartnerTag(request, requestOptions) {
|
|
115
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
116
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
117
|
+
const _response = await core.fetcher({
|
|
118
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
119
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
120
|
+
environments.ToltApiEnvironment.Default, "v2/partner-tags"),
|
|
121
|
+
method: "POST",
|
|
122
|
+
headers: _headers,
|
|
123
|
+
contentType: "application/json",
|
|
124
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
125
|
+
requestType: "json",
|
|
126
|
+
body: mergeAdditionalBodyParameters(request, requestOptions?.additionalBodyParameters),
|
|
127
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
128
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
129
|
+
abortSignal: requestOptions?.abortSignal,
|
|
130
|
+
fetchFn: this._options?.fetch,
|
|
131
|
+
logging: this._options.logging,
|
|
132
|
+
});
|
|
133
|
+
if (_response.ok) {
|
|
134
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
135
|
+
}
|
|
136
|
+
if (_response.error.reason === "status-code") {
|
|
137
|
+
switch (_response.error.statusCode) {
|
|
138
|
+
case 400:
|
|
139
|
+
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
140
|
+
case 401:
|
|
141
|
+
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
142
|
+
case 409:
|
|
143
|
+
throw new ToltApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
144
|
+
case 413:
|
|
145
|
+
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
146
|
+
case 429:
|
|
147
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
148
|
+
default:
|
|
149
|
+
throw new errors.ToltApiError({
|
|
150
|
+
statusCode: _response.error.statusCode,
|
|
151
|
+
body: _response.error.body,
|
|
152
|
+
rawResponse: _response.rawResponse,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/partner-tags");
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Gets a partner tag by ID, with how many partners have it.
|
|
160
|
+
*
|
|
161
|
+
* @param {ToltApi.GetPartnerTagRequest} request
|
|
162
|
+
* @param {PartnerTagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
163
|
+
*
|
|
164
|
+
* @throws {@link ToltApi.UnauthorizedError}
|
|
165
|
+
* @throws {@link ToltApi.NotFoundError}
|
|
166
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
167
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
168
|
+
* @throws {@link errors.ToltApiError}
|
|
169
|
+
* @throws {@link errors.ToltApiTimeoutError}
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* await client.partnerTags.getPartnerTag({
|
|
173
|
+
* id: "ptag_zDEcdqNuNBPcokarWxBnk9gB"
|
|
174
|
+
* })
|
|
175
|
+
*/
|
|
176
|
+
getPartnerTag(request, requestOptions) {
|
|
177
|
+
return core.HttpResponsePromise.fromPromise(this.__getPartnerTag(request, requestOptions));
|
|
178
|
+
}
|
|
179
|
+
async __getPartnerTag(request, requestOptions) {
|
|
180
|
+
const { id } = request;
|
|
181
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
182
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
183
|
+
const _response = await core.fetcher({
|
|
184
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
185
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
186
|
+
environments.ToltApiEnvironment.Default, `v2/partner-tags/${core.url.encodePathParam(id, errors.ToltApiError)}`),
|
|
187
|
+
method: "GET",
|
|
188
|
+
headers: _headers,
|
|
189
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
190
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
191
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
192
|
+
abortSignal: requestOptions?.abortSignal,
|
|
193
|
+
fetchFn: this._options?.fetch,
|
|
194
|
+
logging: this._options.logging,
|
|
195
|
+
});
|
|
196
|
+
if (_response.ok) {
|
|
197
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
198
|
+
}
|
|
199
|
+
if (_response.error.reason === "status-code") {
|
|
200
|
+
switch (_response.error.statusCode) {
|
|
201
|
+
case 401:
|
|
202
|
+
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
203
|
+
case 404:
|
|
204
|
+
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
205
|
+
case 413:
|
|
206
|
+
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
207
|
+
case 429:
|
|
208
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
209
|
+
default:
|
|
210
|
+
throw new errors.ToltApiError({
|
|
211
|
+
statusCode: _response.error.statusCode,
|
|
212
|
+
body: _response.error.body,
|
|
213
|
+
rawResponse: _response.rawResponse,
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/partner-tags/{id}");
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Renames a tag or changes its color. Partners who have the tag keep it.
|
|
221
|
+
*
|
|
222
|
+
* @param {ToltApi.UpdatePartnerTagRequest} request
|
|
223
|
+
* @param {PartnerTagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
224
|
+
*
|
|
225
|
+
* @throws {@link ToltApi.BadRequestError}
|
|
226
|
+
* @throws {@link ToltApi.UnauthorizedError}
|
|
227
|
+
* @throws {@link ToltApi.NotFoundError}
|
|
228
|
+
* @throws {@link ToltApi.ConflictError}
|
|
229
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
230
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
231
|
+
* @throws {@link errors.ToltApiError}
|
|
232
|
+
* @throws {@link errors.ToltApiTimeoutError}
|
|
233
|
+
*
|
|
234
|
+
* @example
|
|
235
|
+
* await client.partnerTags.updatePartnerTag({
|
|
236
|
+
* id: "ptag_zDEcdqNuNBPcokarWxBnk9gB",
|
|
237
|
+
* name: "VIP",
|
|
238
|
+
* color: "#2457D6"
|
|
239
|
+
* })
|
|
240
|
+
*/
|
|
241
|
+
updatePartnerTag(request, requestOptions) {
|
|
242
|
+
return core.HttpResponsePromise.fromPromise(this.__updatePartnerTag(request, requestOptions));
|
|
243
|
+
}
|
|
244
|
+
async __updatePartnerTag(request, requestOptions) {
|
|
245
|
+
const { id, ..._body } = request;
|
|
246
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
247
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
248
|
+
const _response = await core.fetcher({
|
|
249
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
250
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
251
|
+
environments.ToltApiEnvironment.Default, `v2/partner-tags/${core.url.encodePathParam(id, errors.ToltApiError)}`),
|
|
252
|
+
method: "PUT",
|
|
253
|
+
headers: _headers,
|
|
254
|
+
contentType: "application/json",
|
|
255
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
256
|
+
requestType: "json",
|
|
257
|
+
body: mergeAdditionalBodyParameters(_body, requestOptions?.additionalBodyParameters),
|
|
258
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
259
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
260
|
+
abortSignal: requestOptions?.abortSignal,
|
|
261
|
+
fetchFn: this._options?.fetch,
|
|
262
|
+
logging: this._options.logging,
|
|
263
|
+
});
|
|
264
|
+
if (_response.ok) {
|
|
265
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
266
|
+
}
|
|
267
|
+
if (_response.error.reason === "status-code") {
|
|
268
|
+
switch (_response.error.statusCode) {
|
|
269
|
+
case 400:
|
|
270
|
+
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
271
|
+
case 401:
|
|
272
|
+
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
273
|
+
case 404:
|
|
274
|
+
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
275
|
+
case 409:
|
|
276
|
+
throw new ToltApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
277
|
+
case 413:
|
|
278
|
+
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
279
|
+
case 429:
|
|
280
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
281
|
+
default:
|
|
282
|
+
throw new errors.ToltApiError({
|
|
283
|
+
statusCode: _response.error.statusCode,
|
|
284
|
+
body: _response.error.body,
|
|
285
|
+
rawResponse: _response.rawResponse,
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/v2/partner-tags/{id}");
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Deletes a tag and removes it from every partner who has it.
|
|
293
|
+
*
|
|
294
|
+
* @param {ToltApi.DeletePartnerTagRequest} request
|
|
295
|
+
* @param {PartnerTagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
296
|
+
*
|
|
297
|
+
* @throws {@link ToltApi.UnauthorizedError}
|
|
298
|
+
* @throws {@link ToltApi.NotFoundError}
|
|
299
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
300
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
301
|
+
* @throws {@link errors.ToltApiError}
|
|
302
|
+
* @throws {@link errors.ToltApiTimeoutError}
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
* await client.partnerTags.deletePartnerTag({
|
|
306
|
+
* id: "ptag_zDEcdqNuNBPcokarWxBnk9gB"
|
|
307
|
+
* })
|
|
308
|
+
*/
|
|
309
|
+
deletePartnerTag(request, requestOptions) {
|
|
310
|
+
return core.HttpResponsePromise.fromPromise(this.__deletePartnerTag(request, requestOptions));
|
|
311
|
+
}
|
|
312
|
+
async __deletePartnerTag(request, requestOptions) {
|
|
313
|
+
const { id } = request;
|
|
314
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
315
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
316
|
+
const _response = await core.fetcher({
|
|
317
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
318
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
319
|
+
environments.ToltApiEnvironment.Default, `v2/partner-tags/${core.url.encodePathParam(id, errors.ToltApiError)}`),
|
|
320
|
+
method: "DELETE",
|
|
321
|
+
headers: _headers,
|
|
322
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
323
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
324
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
325
|
+
abortSignal: requestOptions?.abortSignal,
|
|
326
|
+
fetchFn: this._options?.fetch,
|
|
327
|
+
logging: this._options.logging,
|
|
328
|
+
});
|
|
329
|
+
if (_response.ok) {
|
|
330
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
331
|
+
}
|
|
332
|
+
if (_response.error.reason === "status-code") {
|
|
333
|
+
switch (_response.error.statusCode) {
|
|
334
|
+
case 401:
|
|
335
|
+
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
336
|
+
case 404:
|
|
337
|
+
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
338
|
+
case 413:
|
|
339
|
+
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
340
|
+
case 429:
|
|
341
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
342
|
+
default:
|
|
343
|
+
throw new errors.ToltApiError({
|
|
344
|
+
statusCode: _response.error.statusCode,
|
|
345
|
+
body: _response.error.body,
|
|
346
|
+
rawResponse: _response.rawResponse,
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v2/partner-tags/{id}");
|
|
351
|
+
}
|
|
352
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* program_id: "prg_T6z8aRW3XCmvFWP972RKxpAd",
|
|
5
|
+
* name: "VIP",
|
|
6
|
+
* color: "#2457D6"
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
9
|
+
export interface CreatePartnerTagRequest {
|
|
10
|
+
/** Id of the program the tag belongs to (prg_...), as returned when listing programs. Only partners in that program can have the tag. */
|
|
11
|
+
program_id: string;
|
|
12
|
+
/** Label shown on the partner in the dashboard, up to 50 characters. A program cannot have two tags with the same name, ignoring case. */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Color of the tag in the dashboard, as a hex code like #2457D6. Defaults to one of the dashboard's tag colors. */
|
|
15
|
+
color?: string;
|
|
16
|
+
}
|