dub 0.64.0 → 0.64.2
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 +2 -0
- package/bin/mcp-server.js +887 -158
- package/bin/mcp-server.js.map +25 -21
- package/dist/commonjs/funcs/analyticsRetrieve.js +1 -0
- package/dist/commonjs/funcs/analyticsRetrieve.js.map +1 -1
- package/dist/commonjs/funcs/eventsList.js +1 -0
- package/dist/commonjs/funcs/eventsList.js.map +1 -1
- package/dist/commonjs/funcs/partnersList.d.ts +18 -0
- package/dist/commonjs/funcs/partnersList.d.ts.map +1 -0
- package/dist/commonjs/funcs/partnersList.js +133 -0
- package/dist/commonjs/funcs/partnersList.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +3 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/partnersList.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/partnersList.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/partnersList.js +54 -0
- package/dist/commonjs/mcp-server/tools/partnersList.js.map +1 -0
- package/dist/commonjs/models/components/analyticstriggers.d.ts +6 -0
- package/dist/commonjs/models/components/analyticstriggers.d.ts.map +1 -1
- package/dist/commonjs/models/components/analyticstriggers.js +2 -0
- package/dist/commonjs/models/components/analyticstriggers.js.map +1 -1
- package/dist/commonjs/models/components/commissioncreatedevent.d.ts +310 -0
- package/dist/commonjs/models/components/commissioncreatedevent.d.ts.map +1 -0
- package/dist/commonjs/models/components/commissioncreatedevent.js +261 -0
- package/dist/commonjs/models/components/commissioncreatedevent.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +1 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/partnerenrolledevent.d.ts +131 -52
- package/dist/commonjs/models/components/partnerenrolledevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/partnerenrolledevent.js +79 -21
- package/dist/commonjs/models/components/partnerenrolledevent.js.map +1 -1
- package/dist/commonjs/models/components/saleevent.d.ts +3 -0
- package/dist/commonjs/models/components/saleevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/saleevent.js +1 -0
- package/dist/commonjs/models/components/saleevent.js.map +1 -1
- package/dist/commonjs/models/components/webhookevent.d.ts +3 -2
- package/dist/commonjs/models/components/webhookevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/webhookevent.js +3 -0
- package/dist/commonjs/models/components/webhookevent.js.map +1 -1
- package/dist/commonjs/models/operations/createpartner.d.ts +131 -52
- package/dist/commonjs/models/operations/createpartner.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createpartner.js +79 -21
- package/dist/commonjs/models/operations/createpartner.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listcommissions.d.ts +136 -4
- package/dist/commonjs/models/operations/listcommissions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listcommissions.js +95 -5
- package/dist/commonjs/models/operations/listcommissions.js.map +1 -1
- package/dist/commonjs/models/operations/listevents.d.ts +42 -0
- package/dist/commonjs/models/operations/listevents.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listevents.js +27 -1
- package/dist/commonjs/models/operations/listevents.js.map +1 -1
- package/dist/commonjs/models/operations/listpartners.d.ts +549 -0
- package/dist/commonjs/models/operations/listpartners.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listpartners.js +358 -0
- package/dist/commonjs/models/operations/listpartners.js.map +1 -0
- package/dist/commonjs/models/operations/retrieveanalytics.d.ts +42 -0
- package/dist/commonjs/models/operations/retrieveanalytics.d.ts.map +1 -1
- package/dist/commonjs/models/operations/retrieveanalytics.js +28 -1
- package/dist/commonjs/models/operations/retrieveanalytics.js.map +1 -1
- package/dist/commonjs/models/operations/tracklead.d.ts +2 -2
- package/dist/commonjs/models/operations/tracklead.d.ts.map +1 -1
- package/dist/commonjs/models/operations/tracklead.js +2 -2
- package/dist/commonjs/models/operations/tracklead.js.map +1 -1
- package/dist/commonjs/models/operations/tracksale.d.ts +5 -2
- package/dist/commonjs/models/operations/tracksale.d.ts.map +1 -1
- package/dist/commonjs/models/operations/tracksale.js +3 -2
- package/dist/commonjs/models/operations/tracksale.js.map +1 -1
- package/dist/commonjs/models/operations/updatecommission.d.ts +136 -4
- package/dist/commonjs/models/operations/updatecommission.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatecommission.js +95 -5
- package/dist/commonjs/models/operations/updatecommission.js.map +1 -1
- package/dist/commonjs/sdk/partners.d.ts +7 -0
- package/dist/commonjs/sdk/partners.d.ts.map +1 -1
- package/dist/commonjs/sdk/partners.js +10 -0
- package/dist/commonjs/sdk/partners.js.map +1 -1
- package/dist/esm/funcs/analyticsRetrieve.js +1 -0
- package/dist/esm/funcs/analyticsRetrieve.js.map +1 -1
- package/dist/esm/funcs/eventsList.js +1 -0
- package/dist/esm/funcs/eventsList.js.map +1 -1
- package/dist/esm/funcs/partnersList.d.ts +18 -0
- package/dist/esm/funcs/partnersList.d.ts.map +1 -0
- package/dist/esm/funcs/partnersList.js +106 -0
- package/dist/esm/funcs/partnersList.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +3 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/partnersList.d.ts +8 -0
- package/dist/esm/mcp-server/tools/partnersList.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/partnersList.js +28 -0
- package/dist/esm/mcp-server/tools/partnersList.js.map +1 -0
- package/dist/esm/models/components/analyticstriggers.d.ts +6 -0
- package/dist/esm/models/components/analyticstriggers.d.ts.map +1 -1
- package/dist/esm/models/components/analyticstriggers.js +2 -0
- package/dist/esm/models/components/analyticstriggers.js.map +1 -1
- package/dist/esm/models/components/commissioncreatedevent.d.ts +310 -0
- package/dist/esm/models/components/commissioncreatedevent.d.ts.map +1 -0
- package/dist/esm/models/components/commissioncreatedevent.js +227 -0
- package/dist/esm/models/components/commissioncreatedevent.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +1 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/partnerenrolledevent.d.ts +131 -52
- package/dist/esm/models/components/partnerenrolledevent.d.ts.map +1 -1
- package/dist/esm/models/components/partnerenrolledevent.js +78 -20
- package/dist/esm/models/components/partnerenrolledevent.js.map +1 -1
- package/dist/esm/models/components/saleevent.d.ts +3 -0
- package/dist/esm/models/components/saleevent.d.ts.map +1 -1
- package/dist/esm/models/components/saleevent.js +1 -0
- package/dist/esm/models/components/saleevent.js.map +1 -1
- package/dist/esm/models/components/webhookevent.d.ts +3 -2
- package/dist/esm/models/components/webhookevent.d.ts.map +1 -1
- package/dist/esm/models/components/webhookevent.js +3 -0
- package/dist/esm/models/components/webhookevent.js.map +1 -1
- package/dist/esm/models/operations/createpartner.d.ts +131 -52
- package/dist/esm/models/operations/createpartner.d.ts.map +1 -1
- package/dist/esm/models/operations/createpartner.js +78 -20
- package/dist/esm/models/operations/createpartner.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listcommissions.d.ts +136 -4
- package/dist/esm/models/operations/listcommissions.d.ts.map +1 -1
- package/dist/esm/models/operations/listcommissions.js +90 -4
- package/dist/esm/models/operations/listcommissions.js.map +1 -1
- package/dist/esm/models/operations/listevents.d.ts +42 -0
- package/dist/esm/models/operations/listevents.d.ts.map +1 -1
- package/dist/esm/models/operations/listevents.js +26 -0
- package/dist/esm/models/operations/listevents.js.map +1 -1
- package/dist/esm/models/operations/listpartners.d.ts +549 -0
- package/dist/esm/models/operations/listpartners.d.ts.map +1 -0
- package/dist/esm/models/operations/listpartners.js +326 -0
- package/dist/esm/models/operations/listpartners.js.map +1 -0
- package/dist/esm/models/operations/retrieveanalytics.d.ts +42 -0
- package/dist/esm/models/operations/retrieveanalytics.d.ts.map +1 -1
- package/dist/esm/models/operations/retrieveanalytics.js +27 -0
- package/dist/esm/models/operations/retrieveanalytics.js.map +1 -1
- package/dist/esm/models/operations/tracklead.d.ts +2 -2
- package/dist/esm/models/operations/tracklead.d.ts.map +1 -1
- package/dist/esm/models/operations/tracklead.js +2 -2
- package/dist/esm/models/operations/tracklead.js.map +1 -1
- package/dist/esm/models/operations/tracksale.d.ts +5 -2
- package/dist/esm/models/operations/tracksale.d.ts.map +1 -1
- package/dist/esm/models/operations/tracksale.js +3 -2
- package/dist/esm/models/operations/tracksale.js.map +1 -1
- package/dist/esm/models/operations/updatecommission.d.ts +136 -4
- package/dist/esm/models/operations/updatecommission.d.ts.map +1 -1
- package/dist/esm/models/operations/updatecommission.js +90 -4
- package/dist/esm/models/operations/updatecommission.js.map +1 -1
- package/dist/esm/sdk/partners.d.ts +7 -0
- package/dist/esm/sdk/partners.d.ts.map +1 -1
- package/dist/esm/sdk/partners.js +10 -0
- package/dist/esm/sdk/partners.js.map +1 -1
- package/docs/sdks/partners/README.md +78 -0
- package/examples/README.md +5 -0
- package/examples/linksCreate.example.ts +2 -0
- package/examples/package-lock.json +2 -2
- package/jsr.json +1 -1
- package/package.json +2 -2
- package/src/funcs/analyticsRetrieve.ts +1 -0
- package/src/funcs/eventsList.ts +1 -0
- package/src/funcs/partnersList.ts +227 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/partnersList.ts +37 -0
- package/src/models/components/analyticstriggers.ts +2 -0
- package/src/models/components/commissioncreatedevent.ts +503 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/partnerenrolledevent.ts +175 -72
- package/src/models/components/saleevent.ts +1 -0
- package/src/models/components/webhookevent.ts +12 -2
- package/src/models/operations/createpartner.ts +175 -72
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/listcommissions.ts +242 -8
- package/src/models/operations/listevents.ts +42 -0
- package/src/models/operations/listpartners.ts +748 -0
- package/src/models/operations/retrieveanalytics.ts +40 -0
- package/src/models/operations/tracklead.ts +4 -4
- package/src/models/operations/tracksale.ts +5 -4
- package/src/models/operations/updatecommission.ts +242 -8
- package/src/sdk/partners.ts +18 -0
|
@@ -0,0 +1,748 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A filter on the list based on the partner's `status` field.
|
|
13
|
+
*/
|
|
14
|
+
export const ListPartnersQueryParamStatus = {
|
|
15
|
+
Pending: "pending",
|
|
16
|
+
Approved: "approved",
|
|
17
|
+
Rejected: "rejected",
|
|
18
|
+
Invited: "invited",
|
|
19
|
+
Declined: "declined",
|
|
20
|
+
Banned: "banned",
|
|
21
|
+
Archived: "archived",
|
|
22
|
+
} as const;
|
|
23
|
+
/**
|
|
24
|
+
* A filter on the list based on the partner's `status` field.
|
|
25
|
+
*/
|
|
26
|
+
export type ListPartnersQueryParamStatus = ClosedEnum<
|
|
27
|
+
typeof ListPartnersQueryParamStatus
|
|
28
|
+
>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The field to sort the partners by. The default is `saleAmount`.
|
|
32
|
+
*/
|
|
33
|
+
export const ListPartnersQueryParamSortBy = {
|
|
34
|
+
CreatedAt: "createdAt",
|
|
35
|
+
Clicks: "clicks",
|
|
36
|
+
Leads: "leads",
|
|
37
|
+
Sales: "sales",
|
|
38
|
+
SaleAmount: "saleAmount",
|
|
39
|
+
Commissions: "commissions",
|
|
40
|
+
NetRevenue: "netRevenue",
|
|
41
|
+
} as const;
|
|
42
|
+
/**
|
|
43
|
+
* The field to sort the partners by. The default is `saleAmount`.
|
|
44
|
+
*/
|
|
45
|
+
export type ListPartnersQueryParamSortBy = ClosedEnum<
|
|
46
|
+
typeof ListPartnersQueryParamSortBy
|
|
47
|
+
>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The sort order. The default is `desc`.
|
|
51
|
+
*/
|
|
52
|
+
export const ListPartnersQueryParamSortOrder = {
|
|
53
|
+
Asc: "asc",
|
|
54
|
+
Desc: "desc",
|
|
55
|
+
} as const;
|
|
56
|
+
/**
|
|
57
|
+
* The sort order. The default is `desc`.
|
|
58
|
+
*/
|
|
59
|
+
export type ListPartnersQueryParamSortOrder = ClosedEnum<
|
|
60
|
+
typeof ListPartnersQueryParamSortOrder
|
|
61
|
+
>;
|
|
62
|
+
|
|
63
|
+
export type ListPartnersRequest = {
|
|
64
|
+
/**
|
|
65
|
+
* A filter on the list based on the partner's `status` field.
|
|
66
|
+
*/
|
|
67
|
+
status?: ListPartnersQueryParamStatus | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* A filter on the list based on the partner's `country` field.
|
|
70
|
+
*/
|
|
71
|
+
country?: string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* The field to sort the partners by. The default is `saleAmount`.
|
|
74
|
+
*/
|
|
75
|
+
sortBy?: ListPartnersQueryParamSortBy | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* The sort order. The default is `desc`.
|
|
78
|
+
*/
|
|
79
|
+
sortOrder?: ListPartnersQueryParamSortOrder | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* A case-sensitive filter on the list based on the partner's `tenantId` field. The value must be a string. Takes precedence over `search`.
|
|
82
|
+
*/
|
|
83
|
+
tenantId?: string | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Whether to include stats fields on the partner (`clicks`, `leads`, `sales`, `saleAmount`, `commissions`, `netRevenue`). If false, those fields will be returned as 0.
|
|
86
|
+
*/
|
|
87
|
+
includeExpandedFields?: boolean | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* A search query to filter partners by name, email, or tenantId.
|
|
90
|
+
*/
|
|
91
|
+
search?: string | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* The page number for pagination.
|
|
94
|
+
*/
|
|
95
|
+
page?: number | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* The number of items per page.
|
|
98
|
+
*/
|
|
99
|
+
pageSize?: number | undefined;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The status of the partner's enrollment in the program.
|
|
104
|
+
*/
|
|
105
|
+
export const ListPartnersStatus = {
|
|
106
|
+
Pending: "pending",
|
|
107
|
+
Approved: "approved",
|
|
108
|
+
Rejected: "rejected",
|
|
109
|
+
Invited: "invited",
|
|
110
|
+
Declined: "declined",
|
|
111
|
+
Banned: "banned",
|
|
112
|
+
Archived: "archived",
|
|
113
|
+
} as const;
|
|
114
|
+
/**
|
|
115
|
+
* The status of the partner's enrollment in the program.
|
|
116
|
+
*/
|
|
117
|
+
export type ListPartnersStatus = ClosedEnum<typeof ListPartnersStatus>;
|
|
118
|
+
|
|
119
|
+
export type ListPartnersLink = {
|
|
120
|
+
/**
|
|
121
|
+
* The unique ID of the short link.
|
|
122
|
+
*/
|
|
123
|
+
id: string;
|
|
124
|
+
/**
|
|
125
|
+
* The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).
|
|
126
|
+
*/
|
|
127
|
+
domain: string;
|
|
128
|
+
/**
|
|
129
|
+
* The short link slug. If not provided, a random 7-character slug will be generated.
|
|
130
|
+
*/
|
|
131
|
+
key: string;
|
|
132
|
+
/**
|
|
133
|
+
* The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).
|
|
134
|
+
*/
|
|
135
|
+
shortLink: string;
|
|
136
|
+
/**
|
|
137
|
+
* The destination URL of the short link.
|
|
138
|
+
*/
|
|
139
|
+
url: string;
|
|
140
|
+
/**
|
|
141
|
+
* The number of clicks on the short link.
|
|
142
|
+
*/
|
|
143
|
+
clicks?: number | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* The number of leads the short links has generated.
|
|
146
|
+
*/
|
|
147
|
+
leads?: number | undefined;
|
|
148
|
+
/**
|
|
149
|
+
* The number of sales the short links has generated.
|
|
150
|
+
*/
|
|
151
|
+
sales?: number | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* The total dollar amount of sales the short links has generated (in cents).
|
|
154
|
+
*/
|
|
155
|
+
saleAmount?: number | undefined;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* If the partner was banned from the program, this is the reason for the ban.
|
|
160
|
+
*/
|
|
161
|
+
export const ListPartnersBannedReason = {
|
|
162
|
+
TosViolation: "tos_violation",
|
|
163
|
+
InappropriateContent: "inappropriate_content",
|
|
164
|
+
FakeTraffic: "fake_traffic",
|
|
165
|
+
Fraud: "fraud",
|
|
166
|
+
Spam: "spam",
|
|
167
|
+
BrandAbuse: "brand_abuse",
|
|
168
|
+
} as const;
|
|
169
|
+
/**
|
|
170
|
+
* If the partner was banned from the program, this is the reason for the ban.
|
|
171
|
+
*/
|
|
172
|
+
export type ListPartnersBannedReason = ClosedEnum<
|
|
173
|
+
typeof ListPartnersBannedReason
|
|
174
|
+
>;
|
|
175
|
+
|
|
176
|
+
export type ListPartnersResponseBody = {
|
|
177
|
+
/**
|
|
178
|
+
* The partner's unique ID on Dub.
|
|
179
|
+
*/
|
|
180
|
+
id: string;
|
|
181
|
+
/**
|
|
182
|
+
* The partner's full legal name.
|
|
183
|
+
*/
|
|
184
|
+
name: string;
|
|
185
|
+
/**
|
|
186
|
+
* The partner's email address. Should be a unique value across Dub.
|
|
187
|
+
*/
|
|
188
|
+
email: string | null;
|
|
189
|
+
/**
|
|
190
|
+
* The partner's avatar image.
|
|
191
|
+
*/
|
|
192
|
+
image: string | null;
|
|
193
|
+
/**
|
|
194
|
+
* A brief description of the partner and their background.
|
|
195
|
+
*/
|
|
196
|
+
description?: string | null | undefined;
|
|
197
|
+
/**
|
|
198
|
+
* The partner's country (required for tax purposes).
|
|
199
|
+
*/
|
|
200
|
+
country: string | null;
|
|
201
|
+
/**
|
|
202
|
+
* The partner's PayPal email (for receiving payouts via PayPal).
|
|
203
|
+
*/
|
|
204
|
+
paypalEmail: string | null;
|
|
205
|
+
/**
|
|
206
|
+
* The partner's Stripe Connect ID (for receiving payouts via Stripe).
|
|
207
|
+
*/
|
|
208
|
+
stripeConnectId: string | null;
|
|
209
|
+
/**
|
|
210
|
+
* The date when the partner enabled payouts.
|
|
211
|
+
*/
|
|
212
|
+
payoutsEnabledAt: string | null;
|
|
213
|
+
/**
|
|
214
|
+
* The partner's unique ID on Dub.
|
|
215
|
+
*/
|
|
216
|
+
partnerId: string;
|
|
217
|
+
/**
|
|
218
|
+
* The partner's unique ID within your database. Can be useful for associating the partner with a user in your database and retrieving/update their data in the future.
|
|
219
|
+
*/
|
|
220
|
+
tenantId: string | null;
|
|
221
|
+
/**
|
|
222
|
+
* The program's unique ID on Dub.
|
|
223
|
+
*/
|
|
224
|
+
programId: string;
|
|
225
|
+
createdAt: string;
|
|
226
|
+
/**
|
|
227
|
+
* The status of the partner's enrollment in the program.
|
|
228
|
+
*/
|
|
229
|
+
status: ListPartnersStatus;
|
|
230
|
+
/**
|
|
231
|
+
* The partner's referral links in this program.
|
|
232
|
+
*/
|
|
233
|
+
links: Array<ListPartnersLink> | null;
|
|
234
|
+
/**
|
|
235
|
+
* The total commissions paid to the partner for their referrals. Defaults to 0 if `includeExpandedFields` is false.
|
|
236
|
+
*/
|
|
237
|
+
totalCommissions?: number | undefined;
|
|
238
|
+
clickRewardId?: string | null | undefined;
|
|
239
|
+
leadRewardId?: string | null | undefined;
|
|
240
|
+
saleRewardId?: string | null | undefined;
|
|
241
|
+
discountId?: string | null | undefined;
|
|
242
|
+
/**
|
|
243
|
+
* If the partner submitted an application to join the program, this is the ID of the application.
|
|
244
|
+
*/
|
|
245
|
+
applicationId?: string | null | undefined;
|
|
246
|
+
/**
|
|
247
|
+
* If the partner was banned from the program, this is the date of the ban.
|
|
248
|
+
*/
|
|
249
|
+
bannedAt?: string | null | undefined;
|
|
250
|
+
/**
|
|
251
|
+
* If the partner was banned from the program, this is the reason for the ban.
|
|
252
|
+
*/
|
|
253
|
+
bannedReason?: ListPartnersBannedReason | null | undefined;
|
|
254
|
+
/**
|
|
255
|
+
* The total number of clicks on the partner's links. Defaults to 0 if `includeExpandedFields` is false.
|
|
256
|
+
*/
|
|
257
|
+
clicks?: number | undefined;
|
|
258
|
+
/**
|
|
259
|
+
* The total number of leads generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false.
|
|
260
|
+
*/
|
|
261
|
+
leads?: number | undefined;
|
|
262
|
+
/**
|
|
263
|
+
* The total number of sales generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false.
|
|
264
|
+
*/
|
|
265
|
+
sales?: number | undefined;
|
|
266
|
+
/**
|
|
267
|
+
* The total amount of sales (in cents) generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false.
|
|
268
|
+
*/
|
|
269
|
+
saleAmount?: number | undefined;
|
|
270
|
+
/**
|
|
271
|
+
* The total net revenue generated by the partner. Defaults to 0 if `includeExpandedFields` is false.
|
|
272
|
+
*/
|
|
273
|
+
netRevenue?: number | undefined;
|
|
274
|
+
/**
|
|
275
|
+
* The partner's website URL (including the https protocol).
|
|
276
|
+
*/
|
|
277
|
+
website?: string | null | undefined;
|
|
278
|
+
websiteTxtRecord?: string | null | undefined;
|
|
279
|
+
websiteVerifiedAt?: string | null | undefined;
|
|
280
|
+
/**
|
|
281
|
+
* The partner's YouTube channel username (e.g. `johndoe`).
|
|
282
|
+
*/
|
|
283
|
+
youtube?: string | null | undefined;
|
|
284
|
+
youtubeVerifiedAt?: string | null | undefined;
|
|
285
|
+
youtubeSubscriberCount?: number | null | undefined;
|
|
286
|
+
youtubeViewCount?: number | null | undefined;
|
|
287
|
+
/**
|
|
288
|
+
* The partner's Twitter username (e.g. `johndoe`).
|
|
289
|
+
*/
|
|
290
|
+
twitter?: string | null | undefined;
|
|
291
|
+
twitterVerifiedAt?: string | null | undefined;
|
|
292
|
+
/**
|
|
293
|
+
* The partner's LinkedIn username (e.g. `johndoe`).
|
|
294
|
+
*/
|
|
295
|
+
linkedin?: string | null | undefined;
|
|
296
|
+
linkedinVerifiedAt?: string | null | undefined;
|
|
297
|
+
/**
|
|
298
|
+
* The partner's Instagram username (e.g. `johndoe`).
|
|
299
|
+
*/
|
|
300
|
+
instagram?: string | null | undefined;
|
|
301
|
+
instagramVerifiedAt?: string | null | undefined;
|
|
302
|
+
/**
|
|
303
|
+
* The partner's TikTok username (e.g. `johndoe`).
|
|
304
|
+
*/
|
|
305
|
+
tiktok?: string | null | undefined;
|
|
306
|
+
tiktokVerifiedAt?: string | null | undefined;
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
/** @internal */
|
|
310
|
+
export const ListPartnersQueryParamStatus$inboundSchema: z.ZodNativeEnum<
|
|
311
|
+
typeof ListPartnersQueryParamStatus
|
|
312
|
+
> = z.nativeEnum(ListPartnersQueryParamStatus);
|
|
313
|
+
|
|
314
|
+
/** @internal */
|
|
315
|
+
export const ListPartnersQueryParamStatus$outboundSchema: z.ZodNativeEnum<
|
|
316
|
+
typeof ListPartnersQueryParamStatus
|
|
317
|
+
> = ListPartnersQueryParamStatus$inboundSchema;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* @internal
|
|
321
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
322
|
+
*/
|
|
323
|
+
export namespace ListPartnersQueryParamStatus$ {
|
|
324
|
+
/** @deprecated use `ListPartnersQueryParamStatus$inboundSchema` instead. */
|
|
325
|
+
export const inboundSchema = ListPartnersQueryParamStatus$inboundSchema;
|
|
326
|
+
/** @deprecated use `ListPartnersQueryParamStatus$outboundSchema` instead. */
|
|
327
|
+
export const outboundSchema = ListPartnersQueryParamStatus$outboundSchema;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/** @internal */
|
|
331
|
+
export const ListPartnersQueryParamSortBy$inboundSchema: z.ZodNativeEnum<
|
|
332
|
+
typeof ListPartnersQueryParamSortBy
|
|
333
|
+
> = z.nativeEnum(ListPartnersQueryParamSortBy);
|
|
334
|
+
|
|
335
|
+
/** @internal */
|
|
336
|
+
export const ListPartnersQueryParamSortBy$outboundSchema: z.ZodNativeEnum<
|
|
337
|
+
typeof ListPartnersQueryParamSortBy
|
|
338
|
+
> = ListPartnersQueryParamSortBy$inboundSchema;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* @internal
|
|
342
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
343
|
+
*/
|
|
344
|
+
export namespace ListPartnersQueryParamSortBy$ {
|
|
345
|
+
/** @deprecated use `ListPartnersQueryParamSortBy$inboundSchema` instead. */
|
|
346
|
+
export const inboundSchema = ListPartnersQueryParamSortBy$inboundSchema;
|
|
347
|
+
/** @deprecated use `ListPartnersQueryParamSortBy$outboundSchema` instead. */
|
|
348
|
+
export const outboundSchema = ListPartnersQueryParamSortBy$outboundSchema;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/** @internal */
|
|
352
|
+
export const ListPartnersQueryParamSortOrder$inboundSchema: z.ZodNativeEnum<
|
|
353
|
+
typeof ListPartnersQueryParamSortOrder
|
|
354
|
+
> = z.nativeEnum(ListPartnersQueryParamSortOrder);
|
|
355
|
+
|
|
356
|
+
/** @internal */
|
|
357
|
+
export const ListPartnersQueryParamSortOrder$outboundSchema: z.ZodNativeEnum<
|
|
358
|
+
typeof ListPartnersQueryParamSortOrder
|
|
359
|
+
> = ListPartnersQueryParamSortOrder$inboundSchema;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* @internal
|
|
363
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
364
|
+
*/
|
|
365
|
+
export namespace ListPartnersQueryParamSortOrder$ {
|
|
366
|
+
/** @deprecated use `ListPartnersQueryParamSortOrder$inboundSchema` instead. */
|
|
367
|
+
export const inboundSchema = ListPartnersQueryParamSortOrder$inboundSchema;
|
|
368
|
+
/** @deprecated use `ListPartnersQueryParamSortOrder$outboundSchema` instead. */
|
|
369
|
+
export const outboundSchema = ListPartnersQueryParamSortOrder$outboundSchema;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/** @internal */
|
|
373
|
+
export const ListPartnersRequest$inboundSchema: z.ZodType<
|
|
374
|
+
ListPartnersRequest,
|
|
375
|
+
z.ZodTypeDef,
|
|
376
|
+
unknown
|
|
377
|
+
> = z.object({
|
|
378
|
+
status: ListPartnersQueryParamStatus$inboundSchema.optional(),
|
|
379
|
+
country: z.string().optional(),
|
|
380
|
+
sortBy: ListPartnersQueryParamSortBy$inboundSchema.default("saleAmount"),
|
|
381
|
+
sortOrder: ListPartnersQueryParamSortOrder$inboundSchema.default("desc"),
|
|
382
|
+
tenantId: z.string().optional(),
|
|
383
|
+
includeExpandedFields: z.boolean().optional(),
|
|
384
|
+
search: z.string().optional(),
|
|
385
|
+
page: z.number().default(1),
|
|
386
|
+
pageSize: z.number().default(100),
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
/** @internal */
|
|
390
|
+
export type ListPartnersRequest$Outbound = {
|
|
391
|
+
status?: string | undefined;
|
|
392
|
+
country?: string | undefined;
|
|
393
|
+
sortBy: string;
|
|
394
|
+
sortOrder: string;
|
|
395
|
+
tenantId?: string | undefined;
|
|
396
|
+
includeExpandedFields?: boolean | undefined;
|
|
397
|
+
search?: string | undefined;
|
|
398
|
+
page: number;
|
|
399
|
+
pageSize: number;
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
/** @internal */
|
|
403
|
+
export const ListPartnersRequest$outboundSchema: z.ZodType<
|
|
404
|
+
ListPartnersRequest$Outbound,
|
|
405
|
+
z.ZodTypeDef,
|
|
406
|
+
ListPartnersRequest
|
|
407
|
+
> = z.object({
|
|
408
|
+
status: ListPartnersQueryParamStatus$outboundSchema.optional(),
|
|
409
|
+
country: z.string().optional(),
|
|
410
|
+
sortBy: ListPartnersQueryParamSortBy$outboundSchema.default("saleAmount"),
|
|
411
|
+
sortOrder: ListPartnersQueryParamSortOrder$outboundSchema.default("desc"),
|
|
412
|
+
tenantId: z.string().optional(),
|
|
413
|
+
includeExpandedFields: z.boolean().optional(),
|
|
414
|
+
search: z.string().optional(),
|
|
415
|
+
page: z.number().default(1),
|
|
416
|
+
pageSize: z.number().default(100),
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* @internal
|
|
421
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
422
|
+
*/
|
|
423
|
+
export namespace ListPartnersRequest$ {
|
|
424
|
+
/** @deprecated use `ListPartnersRequest$inboundSchema` instead. */
|
|
425
|
+
export const inboundSchema = ListPartnersRequest$inboundSchema;
|
|
426
|
+
/** @deprecated use `ListPartnersRequest$outboundSchema` instead. */
|
|
427
|
+
export const outboundSchema = ListPartnersRequest$outboundSchema;
|
|
428
|
+
/** @deprecated use `ListPartnersRequest$Outbound` instead. */
|
|
429
|
+
export type Outbound = ListPartnersRequest$Outbound;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export function listPartnersRequestToJSON(
|
|
433
|
+
listPartnersRequest: ListPartnersRequest,
|
|
434
|
+
): string {
|
|
435
|
+
return JSON.stringify(
|
|
436
|
+
ListPartnersRequest$outboundSchema.parse(listPartnersRequest),
|
|
437
|
+
);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
export function listPartnersRequestFromJSON(
|
|
441
|
+
jsonString: string,
|
|
442
|
+
): SafeParseResult<ListPartnersRequest, SDKValidationError> {
|
|
443
|
+
return safeParse(
|
|
444
|
+
jsonString,
|
|
445
|
+
(x) => ListPartnersRequest$inboundSchema.parse(JSON.parse(x)),
|
|
446
|
+
`Failed to parse 'ListPartnersRequest' from JSON`,
|
|
447
|
+
);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/** @internal */
|
|
451
|
+
export const ListPartnersStatus$inboundSchema: z.ZodNativeEnum<
|
|
452
|
+
typeof ListPartnersStatus
|
|
453
|
+
> = z.nativeEnum(ListPartnersStatus);
|
|
454
|
+
|
|
455
|
+
/** @internal */
|
|
456
|
+
export const ListPartnersStatus$outboundSchema: z.ZodNativeEnum<
|
|
457
|
+
typeof ListPartnersStatus
|
|
458
|
+
> = ListPartnersStatus$inboundSchema;
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* @internal
|
|
462
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
463
|
+
*/
|
|
464
|
+
export namespace ListPartnersStatus$ {
|
|
465
|
+
/** @deprecated use `ListPartnersStatus$inboundSchema` instead. */
|
|
466
|
+
export const inboundSchema = ListPartnersStatus$inboundSchema;
|
|
467
|
+
/** @deprecated use `ListPartnersStatus$outboundSchema` instead. */
|
|
468
|
+
export const outboundSchema = ListPartnersStatus$outboundSchema;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/** @internal */
|
|
472
|
+
export const ListPartnersLink$inboundSchema: z.ZodType<
|
|
473
|
+
ListPartnersLink,
|
|
474
|
+
z.ZodTypeDef,
|
|
475
|
+
unknown
|
|
476
|
+
> = z.object({
|
|
477
|
+
id: z.string(),
|
|
478
|
+
domain: z.string(),
|
|
479
|
+
key: z.string(),
|
|
480
|
+
shortLink: z.string(),
|
|
481
|
+
url: z.string(),
|
|
482
|
+
clicks: z.number().default(0),
|
|
483
|
+
leads: z.number().default(0),
|
|
484
|
+
sales: z.number().default(0),
|
|
485
|
+
saleAmount: z.number().default(0),
|
|
486
|
+
});
|
|
487
|
+
|
|
488
|
+
/** @internal */
|
|
489
|
+
export type ListPartnersLink$Outbound = {
|
|
490
|
+
id: string;
|
|
491
|
+
domain: string;
|
|
492
|
+
key: string;
|
|
493
|
+
shortLink: string;
|
|
494
|
+
url: string;
|
|
495
|
+
clicks: number;
|
|
496
|
+
leads: number;
|
|
497
|
+
sales: number;
|
|
498
|
+
saleAmount: number;
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
/** @internal */
|
|
502
|
+
export const ListPartnersLink$outboundSchema: z.ZodType<
|
|
503
|
+
ListPartnersLink$Outbound,
|
|
504
|
+
z.ZodTypeDef,
|
|
505
|
+
ListPartnersLink
|
|
506
|
+
> = z.object({
|
|
507
|
+
id: z.string(),
|
|
508
|
+
domain: z.string(),
|
|
509
|
+
key: z.string(),
|
|
510
|
+
shortLink: z.string(),
|
|
511
|
+
url: z.string(),
|
|
512
|
+
clicks: z.number().default(0),
|
|
513
|
+
leads: z.number().default(0),
|
|
514
|
+
sales: z.number().default(0),
|
|
515
|
+
saleAmount: z.number().default(0),
|
|
516
|
+
});
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* @internal
|
|
520
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
521
|
+
*/
|
|
522
|
+
export namespace ListPartnersLink$ {
|
|
523
|
+
/** @deprecated use `ListPartnersLink$inboundSchema` instead. */
|
|
524
|
+
export const inboundSchema = ListPartnersLink$inboundSchema;
|
|
525
|
+
/** @deprecated use `ListPartnersLink$outboundSchema` instead. */
|
|
526
|
+
export const outboundSchema = ListPartnersLink$outboundSchema;
|
|
527
|
+
/** @deprecated use `ListPartnersLink$Outbound` instead. */
|
|
528
|
+
export type Outbound = ListPartnersLink$Outbound;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
export function listPartnersLinkToJSON(
|
|
532
|
+
listPartnersLink: ListPartnersLink,
|
|
533
|
+
): string {
|
|
534
|
+
return JSON.stringify(
|
|
535
|
+
ListPartnersLink$outboundSchema.parse(listPartnersLink),
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
export function listPartnersLinkFromJSON(
|
|
540
|
+
jsonString: string,
|
|
541
|
+
): SafeParseResult<ListPartnersLink, SDKValidationError> {
|
|
542
|
+
return safeParse(
|
|
543
|
+
jsonString,
|
|
544
|
+
(x) => ListPartnersLink$inboundSchema.parse(JSON.parse(x)),
|
|
545
|
+
`Failed to parse 'ListPartnersLink' from JSON`,
|
|
546
|
+
);
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
/** @internal */
|
|
550
|
+
export const ListPartnersBannedReason$inboundSchema: z.ZodNativeEnum<
|
|
551
|
+
typeof ListPartnersBannedReason
|
|
552
|
+
> = z.nativeEnum(ListPartnersBannedReason);
|
|
553
|
+
|
|
554
|
+
/** @internal */
|
|
555
|
+
export const ListPartnersBannedReason$outboundSchema: z.ZodNativeEnum<
|
|
556
|
+
typeof ListPartnersBannedReason
|
|
557
|
+
> = ListPartnersBannedReason$inboundSchema;
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* @internal
|
|
561
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
562
|
+
*/
|
|
563
|
+
export namespace ListPartnersBannedReason$ {
|
|
564
|
+
/** @deprecated use `ListPartnersBannedReason$inboundSchema` instead. */
|
|
565
|
+
export const inboundSchema = ListPartnersBannedReason$inboundSchema;
|
|
566
|
+
/** @deprecated use `ListPartnersBannedReason$outboundSchema` instead. */
|
|
567
|
+
export const outboundSchema = ListPartnersBannedReason$outboundSchema;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
/** @internal */
|
|
571
|
+
export const ListPartnersResponseBody$inboundSchema: z.ZodType<
|
|
572
|
+
ListPartnersResponseBody,
|
|
573
|
+
z.ZodTypeDef,
|
|
574
|
+
unknown
|
|
575
|
+
> = z.object({
|
|
576
|
+
id: z.string(),
|
|
577
|
+
name: z.string(),
|
|
578
|
+
email: z.nullable(z.string()),
|
|
579
|
+
image: z.nullable(z.string()),
|
|
580
|
+
description: z.nullable(z.string()).optional(),
|
|
581
|
+
country: z.nullable(z.string()),
|
|
582
|
+
paypalEmail: z.nullable(z.string()),
|
|
583
|
+
stripeConnectId: z.nullable(z.string()),
|
|
584
|
+
payoutsEnabledAt: z.nullable(z.string()),
|
|
585
|
+
partnerId: z.string(),
|
|
586
|
+
tenantId: z.nullable(z.string()),
|
|
587
|
+
programId: z.string(),
|
|
588
|
+
createdAt: z.string(),
|
|
589
|
+
status: ListPartnersStatus$inboundSchema,
|
|
590
|
+
links: z.nullable(z.array(z.lazy(() => ListPartnersLink$inboundSchema))),
|
|
591
|
+
totalCommissions: z.number().default(0),
|
|
592
|
+
clickRewardId: z.nullable(z.string()).optional(),
|
|
593
|
+
leadRewardId: z.nullable(z.string()).optional(),
|
|
594
|
+
saleRewardId: z.nullable(z.string()).optional(),
|
|
595
|
+
discountId: z.nullable(z.string()).optional(),
|
|
596
|
+
applicationId: z.nullable(z.string()).optional(),
|
|
597
|
+
bannedAt: z.nullable(z.string()).optional(),
|
|
598
|
+
bannedReason: z.nullable(ListPartnersBannedReason$inboundSchema).optional(),
|
|
599
|
+
clicks: z.number().default(0),
|
|
600
|
+
leads: z.number().default(0),
|
|
601
|
+
sales: z.number().default(0),
|
|
602
|
+
saleAmount: z.number().default(0),
|
|
603
|
+
netRevenue: z.number().default(0),
|
|
604
|
+
website: z.nullable(z.string()).optional(),
|
|
605
|
+
websiteTxtRecord: z.nullable(z.string()).optional(),
|
|
606
|
+
websiteVerifiedAt: z.nullable(z.string()).optional(),
|
|
607
|
+
youtube: z.nullable(z.string()).optional(),
|
|
608
|
+
youtubeVerifiedAt: z.nullable(z.string()).optional(),
|
|
609
|
+
youtubeSubscriberCount: z.nullable(z.number()).optional(),
|
|
610
|
+
youtubeViewCount: z.nullable(z.number()).optional(),
|
|
611
|
+
twitter: z.nullable(z.string()).optional(),
|
|
612
|
+
twitterVerifiedAt: z.nullable(z.string()).optional(),
|
|
613
|
+
linkedin: z.nullable(z.string()).optional(),
|
|
614
|
+
linkedinVerifiedAt: z.nullable(z.string()).optional(),
|
|
615
|
+
instagram: z.nullable(z.string()).optional(),
|
|
616
|
+
instagramVerifiedAt: z.nullable(z.string()).optional(),
|
|
617
|
+
tiktok: z.nullable(z.string()).optional(),
|
|
618
|
+
tiktokVerifiedAt: z.nullable(z.string()).optional(),
|
|
619
|
+
});
|
|
620
|
+
|
|
621
|
+
/** @internal */
|
|
622
|
+
export type ListPartnersResponseBody$Outbound = {
|
|
623
|
+
id: string;
|
|
624
|
+
name: string;
|
|
625
|
+
email: string | null;
|
|
626
|
+
image: string | null;
|
|
627
|
+
description?: string | null | undefined;
|
|
628
|
+
country: string | null;
|
|
629
|
+
paypalEmail: string | null;
|
|
630
|
+
stripeConnectId: string | null;
|
|
631
|
+
payoutsEnabledAt: string | null;
|
|
632
|
+
partnerId: string;
|
|
633
|
+
tenantId: string | null;
|
|
634
|
+
programId: string;
|
|
635
|
+
createdAt: string;
|
|
636
|
+
status: string;
|
|
637
|
+
links: Array<ListPartnersLink$Outbound> | null;
|
|
638
|
+
totalCommissions: number;
|
|
639
|
+
clickRewardId?: string | null | undefined;
|
|
640
|
+
leadRewardId?: string | null | undefined;
|
|
641
|
+
saleRewardId?: string | null | undefined;
|
|
642
|
+
discountId?: string | null | undefined;
|
|
643
|
+
applicationId?: string | null | undefined;
|
|
644
|
+
bannedAt?: string | null | undefined;
|
|
645
|
+
bannedReason?: string | null | undefined;
|
|
646
|
+
clicks: number;
|
|
647
|
+
leads: number;
|
|
648
|
+
sales: number;
|
|
649
|
+
saleAmount: number;
|
|
650
|
+
netRevenue: number;
|
|
651
|
+
website?: string | null | undefined;
|
|
652
|
+
websiteTxtRecord?: string | null | undefined;
|
|
653
|
+
websiteVerifiedAt?: string | null | undefined;
|
|
654
|
+
youtube?: string | null | undefined;
|
|
655
|
+
youtubeVerifiedAt?: string | null | undefined;
|
|
656
|
+
youtubeSubscriberCount?: number | null | undefined;
|
|
657
|
+
youtubeViewCount?: number | null | undefined;
|
|
658
|
+
twitter?: string | null | undefined;
|
|
659
|
+
twitterVerifiedAt?: string | null | undefined;
|
|
660
|
+
linkedin?: string | null | undefined;
|
|
661
|
+
linkedinVerifiedAt?: string | null | undefined;
|
|
662
|
+
instagram?: string | null | undefined;
|
|
663
|
+
instagramVerifiedAt?: string | null | undefined;
|
|
664
|
+
tiktok?: string | null | undefined;
|
|
665
|
+
tiktokVerifiedAt?: string | null | undefined;
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
/** @internal */
|
|
669
|
+
export const ListPartnersResponseBody$outboundSchema: z.ZodType<
|
|
670
|
+
ListPartnersResponseBody$Outbound,
|
|
671
|
+
z.ZodTypeDef,
|
|
672
|
+
ListPartnersResponseBody
|
|
673
|
+
> = z.object({
|
|
674
|
+
id: z.string(),
|
|
675
|
+
name: z.string(),
|
|
676
|
+
email: z.nullable(z.string()),
|
|
677
|
+
image: z.nullable(z.string()),
|
|
678
|
+
description: z.nullable(z.string()).optional(),
|
|
679
|
+
country: z.nullable(z.string()),
|
|
680
|
+
paypalEmail: z.nullable(z.string()),
|
|
681
|
+
stripeConnectId: z.nullable(z.string()),
|
|
682
|
+
payoutsEnabledAt: z.nullable(z.string()),
|
|
683
|
+
partnerId: z.string(),
|
|
684
|
+
tenantId: z.nullable(z.string()),
|
|
685
|
+
programId: z.string(),
|
|
686
|
+
createdAt: z.string(),
|
|
687
|
+
status: ListPartnersStatus$outboundSchema,
|
|
688
|
+
links: z.nullable(z.array(z.lazy(() => ListPartnersLink$outboundSchema))),
|
|
689
|
+
totalCommissions: z.number().default(0),
|
|
690
|
+
clickRewardId: z.nullable(z.string()).optional(),
|
|
691
|
+
leadRewardId: z.nullable(z.string()).optional(),
|
|
692
|
+
saleRewardId: z.nullable(z.string()).optional(),
|
|
693
|
+
discountId: z.nullable(z.string()).optional(),
|
|
694
|
+
applicationId: z.nullable(z.string()).optional(),
|
|
695
|
+
bannedAt: z.nullable(z.string()).optional(),
|
|
696
|
+
bannedReason: z.nullable(ListPartnersBannedReason$outboundSchema).optional(),
|
|
697
|
+
clicks: z.number().default(0),
|
|
698
|
+
leads: z.number().default(0),
|
|
699
|
+
sales: z.number().default(0),
|
|
700
|
+
saleAmount: z.number().default(0),
|
|
701
|
+
netRevenue: z.number().default(0),
|
|
702
|
+
website: z.nullable(z.string()).optional(),
|
|
703
|
+
websiteTxtRecord: z.nullable(z.string()).optional(),
|
|
704
|
+
websiteVerifiedAt: z.nullable(z.string()).optional(),
|
|
705
|
+
youtube: z.nullable(z.string()).optional(),
|
|
706
|
+
youtubeVerifiedAt: z.nullable(z.string()).optional(),
|
|
707
|
+
youtubeSubscriberCount: z.nullable(z.number()).optional(),
|
|
708
|
+
youtubeViewCount: z.nullable(z.number()).optional(),
|
|
709
|
+
twitter: z.nullable(z.string()).optional(),
|
|
710
|
+
twitterVerifiedAt: z.nullable(z.string()).optional(),
|
|
711
|
+
linkedin: z.nullable(z.string()).optional(),
|
|
712
|
+
linkedinVerifiedAt: z.nullable(z.string()).optional(),
|
|
713
|
+
instagram: z.nullable(z.string()).optional(),
|
|
714
|
+
instagramVerifiedAt: z.nullable(z.string()).optional(),
|
|
715
|
+
tiktok: z.nullable(z.string()).optional(),
|
|
716
|
+
tiktokVerifiedAt: z.nullable(z.string()).optional(),
|
|
717
|
+
});
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* @internal
|
|
721
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
722
|
+
*/
|
|
723
|
+
export namespace ListPartnersResponseBody$ {
|
|
724
|
+
/** @deprecated use `ListPartnersResponseBody$inboundSchema` instead. */
|
|
725
|
+
export const inboundSchema = ListPartnersResponseBody$inboundSchema;
|
|
726
|
+
/** @deprecated use `ListPartnersResponseBody$outboundSchema` instead. */
|
|
727
|
+
export const outboundSchema = ListPartnersResponseBody$outboundSchema;
|
|
728
|
+
/** @deprecated use `ListPartnersResponseBody$Outbound` instead. */
|
|
729
|
+
export type Outbound = ListPartnersResponseBody$Outbound;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
export function listPartnersResponseBodyToJSON(
|
|
733
|
+
listPartnersResponseBody: ListPartnersResponseBody,
|
|
734
|
+
): string {
|
|
735
|
+
return JSON.stringify(
|
|
736
|
+
ListPartnersResponseBody$outboundSchema.parse(listPartnersResponseBody),
|
|
737
|
+
);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
export function listPartnersResponseBodyFromJSON(
|
|
741
|
+
jsonString: string,
|
|
742
|
+
): SafeParseResult<ListPartnersResponseBody, SDKValidationError> {
|
|
743
|
+
return safeParse(
|
|
744
|
+
jsonString,
|
|
745
|
+
(x) => ListPartnersResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
746
|
+
`Failed to parse 'ListPartnersResponseBody' from JSON`,
|
|
747
|
+
);
|
|
748
|
+
}
|