dub 0.64.1 → 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 +883 -154
- package/bin/mcp-server.js.map +24 -20
- 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/tracksale.d.ts +3 -0
- package/dist/commonjs/models/operations/tracksale.d.ts.map +1 -1
- package/dist/commonjs/models/operations/tracksale.js +1 -0
- 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/tracksale.d.ts +3 -0
- package/dist/esm/models/operations/tracksale.d.ts.map +1 -1
- package/dist/esm/models/operations/tracksale.js +1 -0
- 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 +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- 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/tracksale.ts +1 -0
- package/src/models/operations/updatecommission.ts +242 -8
- package/src/sdk/partners.ts +18 -0
|
@@ -71,6 +71,22 @@ export type PartnerEnrolledEventLink = {
|
|
|
71
71
|
saleAmount?: number | undefined;
|
|
72
72
|
};
|
|
73
73
|
|
|
74
|
+
/**
|
|
75
|
+
* If the partner was banned from the program, this is the reason for the ban.
|
|
76
|
+
*/
|
|
77
|
+
export const BannedReason = {
|
|
78
|
+
TosViolation: "tos_violation",
|
|
79
|
+
InappropriateContent: "inappropriate_content",
|
|
80
|
+
FakeTraffic: "fake_traffic",
|
|
81
|
+
Fraud: "fraud",
|
|
82
|
+
Spam: "spam",
|
|
83
|
+
BrandAbuse: "brand_abuse",
|
|
84
|
+
} as const;
|
|
85
|
+
/**
|
|
86
|
+
* If the partner was banned from the program, this is the reason for the ban.
|
|
87
|
+
*/
|
|
88
|
+
export type BannedReason = ClosedEnum<typeof BannedReason>;
|
|
89
|
+
|
|
74
90
|
export type PartnerEnrolledEventData = {
|
|
75
91
|
/**
|
|
76
92
|
* The partner's unique ID on Dub.
|
|
@@ -96,30 +112,6 @@ export type PartnerEnrolledEventData = {
|
|
|
96
112
|
* The partner's country (required for tax purposes).
|
|
97
113
|
*/
|
|
98
114
|
country: string | null;
|
|
99
|
-
/**
|
|
100
|
-
* The partner's website URL (including the https protocol).
|
|
101
|
-
*/
|
|
102
|
-
website: string | null;
|
|
103
|
-
/**
|
|
104
|
-
* The partner's YouTube channel username (e.g. `johndoe`).
|
|
105
|
-
*/
|
|
106
|
-
youtube: string | null;
|
|
107
|
-
/**
|
|
108
|
-
* The partner's Twitter username (e.g. `johndoe`).
|
|
109
|
-
*/
|
|
110
|
-
twitter: string | null;
|
|
111
|
-
/**
|
|
112
|
-
* The partner's LinkedIn username (e.g. `johndoe`).
|
|
113
|
-
*/
|
|
114
|
-
linkedin: string | null;
|
|
115
|
-
/**
|
|
116
|
-
* The partner's Instagram username (e.g. `johndoe`).
|
|
117
|
-
*/
|
|
118
|
-
instagram: string | null;
|
|
119
|
-
/**
|
|
120
|
-
* The partner's TikTok username (e.g. `johndoe`).
|
|
121
|
-
*/
|
|
122
|
-
tiktok: string | null;
|
|
123
115
|
/**
|
|
124
116
|
* The partner's PayPal email (for receiving payouts via PayPal).
|
|
125
117
|
*/
|
|
@@ -133,55 +125,99 @@ export type PartnerEnrolledEventData = {
|
|
|
133
125
|
*/
|
|
134
126
|
payoutsEnabledAt: string | null;
|
|
135
127
|
/**
|
|
136
|
-
* The
|
|
128
|
+
* The partner's unique ID on Dub.
|
|
137
129
|
*/
|
|
138
|
-
|
|
130
|
+
partnerId: string;
|
|
139
131
|
/**
|
|
140
|
-
* The
|
|
132
|
+
* 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.
|
|
141
133
|
*/
|
|
142
|
-
|
|
134
|
+
tenantId: string | null;
|
|
143
135
|
/**
|
|
144
136
|
* The program's unique ID on Dub.
|
|
145
137
|
*/
|
|
146
138
|
programId: string;
|
|
139
|
+
createdAt: string;
|
|
147
140
|
/**
|
|
148
|
-
* The
|
|
141
|
+
* The status of the partner's enrollment in the program.
|
|
149
142
|
*/
|
|
150
|
-
|
|
143
|
+
status: Status;
|
|
151
144
|
/**
|
|
152
145
|
* The partner's referral links in this program.
|
|
153
146
|
*/
|
|
154
147
|
links: Array<PartnerEnrolledEventLink> | null;
|
|
155
148
|
/**
|
|
156
|
-
* The total
|
|
149
|
+
* The total commissions paid to the partner for their referrals. Defaults to 0 if `includeExpandedFields` is false.
|
|
150
|
+
*/
|
|
151
|
+
totalCommissions?: number | undefined;
|
|
152
|
+
clickRewardId?: string | null | undefined;
|
|
153
|
+
leadRewardId?: string | null | undefined;
|
|
154
|
+
saleRewardId?: string | null | undefined;
|
|
155
|
+
discountId?: string | null | undefined;
|
|
156
|
+
/**
|
|
157
|
+
* If the partner submitted an application to join the program, this is the ID of the application.
|
|
158
|
+
*/
|
|
159
|
+
applicationId?: string | null | undefined;
|
|
160
|
+
/**
|
|
161
|
+
* If the partner was banned from the program, this is the date of the ban.
|
|
162
|
+
*/
|
|
163
|
+
bannedAt?: string | null | undefined;
|
|
164
|
+
/**
|
|
165
|
+
* If the partner was banned from the program, this is the reason for the ban.
|
|
166
|
+
*/
|
|
167
|
+
bannedReason?: BannedReason | null | undefined;
|
|
168
|
+
/**
|
|
169
|
+
* The total number of clicks on the partner's links. Defaults to 0 if `includeExpandedFields` is false.
|
|
157
170
|
*/
|
|
158
171
|
clicks?: number | undefined;
|
|
159
172
|
/**
|
|
160
|
-
* The total number of leads generated by the partner's links.
|
|
173
|
+
* The total number of leads generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false.
|
|
161
174
|
*/
|
|
162
175
|
leads?: number | undefined;
|
|
163
176
|
/**
|
|
164
|
-
* The total number of sales generated by the partner's links.
|
|
177
|
+
* The total number of sales generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false.
|
|
165
178
|
*/
|
|
166
179
|
sales?: number | undefined;
|
|
167
180
|
/**
|
|
168
|
-
* The total amount of sales (in cents) generated by the partner's links.
|
|
181
|
+
* The total amount of sales (in cents) generated by the partner's links. Defaults to 0 if `includeExpandedFields` is false.
|
|
169
182
|
*/
|
|
170
183
|
saleAmount?: number | undefined;
|
|
171
184
|
/**
|
|
172
|
-
* The total
|
|
185
|
+
* The total net revenue generated by the partner. Defaults to 0 if `includeExpandedFields` is false.
|
|
173
186
|
*/
|
|
174
|
-
|
|
187
|
+
netRevenue?: number | undefined;
|
|
175
188
|
/**
|
|
176
|
-
* The
|
|
189
|
+
* The partner's website URL (including the https protocol).
|
|
177
190
|
*/
|
|
178
|
-
|
|
191
|
+
website?: string | null | undefined;
|
|
192
|
+
websiteTxtRecord?: string | null | undefined;
|
|
193
|
+
websiteVerifiedAt?: string | null | undefined;
|
|
194
|
+
/**
|
|
195
|
+
* The partner's YouTube channel username (e.g. `johndoe`).
|
|
196
|
+
*/
|
|
197
|
+
youtube?: string | null | undefined;
|
|
198
|
+
youtubeVerifiedAt?: string | null | undefined;
|
|
199
|
+
youtubeSubscriberCount?: number | null | undefined;
|
|
200
|
+
youtubeViewCount?: number | null | undefined;
|
|
201
|
+
/**
|
|
202
|
+
* The partner's Twitter username (e.g. `johndoe`).
|
|
203
|
+
*/
|
|
204
|
+
twitter?: string | null | undefined;
|
|
205
|
+
twitterVerifiedAt?: string | null | undefined;
|
|
206
|
+
/**
|
|
207
|
+
* The partner's LinkedIn username (e.g. `johndoe`).
|
|
208
|
+
*/
|
|
209
|
+
linkedin?: string | null | undefined;
|
|
210
|
+
linkedinVerifiedAt?: string | null | undefined;
|
|
211
|
+
/**
|
|
212
|
+
* The partner's Instagram username (e.g. `johndoe`).
|
|
213
|
+
*/
|
|
214
|
+
instagram?: string | null | undefined;
|
|
215
|
+
instagramVerifiedAt?: string | null | undefined;
|
|
179
216
|
/**
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
217
|
+
* The partner's TikTok username (e.g. `johndoe`).
|
|
183
218
|
*/
|
|
184
|
-
|
|
219
|
+
tiktok?: string | null | undefined;
|
|
220
|
+
tiktokVerifiedAt?: string | null | undefined;
|
|
185
221
|
};
|
|
186
222
|
|
|
187
223
|
/**
|
|
@@ -312,6 +348,25 @@ export function partnerEnrolledEventLinkFromJSON(
|
|
|
312
348
|
);
|
|
313
349
|
}
|
|
314
350
|
|
|
351
|
+
/** @internal */
|
|
352
|
+
export const BannedReason$inboundSchema: z.ZodNativeEnum<typeof BannedReason> =
|
|
353
|
+
z.nativeEnum(BannedReason);
|
|
354
|
+
|
|
355
|
+
/** @internal */
|
|
356
|
+
export const BannedReason$outboundSchema: z.ZodNativeEnum<typeof BannedReason> =
|
|
357
|
+
BannedReason$inboundSchema;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* @internal
|
|
361
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
362
|
+
*/
|
|
363
|
+
export namespace BannedReason$ {
|
|
364
|
+
/** @deprecated use `BannedReason$inboundSchema` instead. */
|
|
365
|
+
export const inboundSchema = BannedReason$inboundSchema;
|
|
366
|
+
/** @deprecated use `BannedReason$outboundSchema` instead. */
|
|
367
|
+
export const outboundSchema = BannedReason$outboundSchema;
|
|
368
|
+
}
|
|
369
|
+
|
|
315
370
|
/** @internal */
|
|
316
371
|
export const PartnerEnrolledEventData$inboundSchema: z.ZodType<
|
|
317
372
|
PartnerEnrolledEventData,
|
|
@@ -324,29 +379,45 @@ export const PartnerEnrolledEventData$inboundSchema: z.ZodType<
|
|
|
324
379
|
image: z.nullable(z.string()),
|
|
325
380
|
description: z.nullable(z.string()).optional(),
|
|
326
381
|
country: z.nullable(z.string()),
|
|
327
|
-
website: z.nullable(z.string()),
|
|
328
|
-
youtube: z.nullable(z.string()),
|
|
329
|
-
twitter: z.nullable(z.string()),
|
|
330
|
-
linkedin: z.nullable(z.string()),
|
|
331
|
-
instagram: z.nullable(z.string()),
|
|
332
|
-
tiktok: z.nullable(z.string()),
|
|
333
382
|
paypalEmail: z.nullable(z.string()),
|
|
334
383
|
stripeConnectId: z.nullable(z.string()),
|
|
335
384
|
payoutsEnabledAt: z.nullable(z.string()),
|
|
385
|
+
partnerId: z.string(),
|
|
386
|
+
tenantId: z.nullable(z.string()),
|
|
387
|
+
programId: z.string(),
|
|
336
388
|
createdAt: z.string(),
|
|
337
389
|
status: Status$inboundSchema,
|
|
338
|
-
programId: z.string(),
|
|
339
|
-
tenantId: z.nullable(z.string()),
|
|
340
390
|
links: z.nullable(
|
|
341
391
|
z.array(z.lazy(() => PartnerEnrolledEventLink$inboundSchema)),
|
|
342
392
|
),
|
|
393
|
+
totalCommissions: z.number().default(0),
|
|
394
|
+
clickRewardId: z.nullable(z.string()).optional(),
|
|
395
|
+
leadRewardId: z.nullable(z.string()).optional(),
|
|
396
|
+
saleRewardId: z.nullable(z.string()).optional(),
|
|
397
|
+
discountId: z.nullable(z.string()).optional(),
|
|
398
|
+
applicationId: z.nullable(z.string()).optional(),
|
|
399
|
+
bannedAt: z.nullable(z.string()).optional(),
|
|
400
|
+
bannedReason: z.nullable(BannedReason$inboundSchema).optional(),
|
|
343
401
|
clicks: z.number().default(0),
|
|
344
402
|
leads: z.number().default(0),
|
|
345
403
|
sales: z.number().default(0),
|
|
346
404
|
saleAmount: z.number().default(0),
|
|
347
|
-
totalCommissions: z.number().default(0),
|
|
348
405
|
netRevenue: z.number().default(0),
|
|
349
|
-
|
|
406
|
+
website: z.nullable(z.string()).optional(),
|
|
407
|
+
websiteTxtRecord: z.nullable(z.string()).optional(),
|
|
408
|
+
websiteVerifiedAt: z.nullable(z.string()).optional(),
|
|
409
|
+
youtube: z.nullable(z.string()).optional(),
|
|
410
|
+
youtubeVerifiedAt: z.nullable(z.string()).optional(),
|
|
411
|
+
youtubeSubscriberCount: z.nullable(z.number()).optional(),
|
|
412
|
+
youtubeViewCount: z.nullable(z.number()).optional(),
|
|
413
|
+
twitter: z.nullable(z.string()).optional(),
|
|
414
|
+
twitterVerifiedAt: z.nullable(z.string()).optional(),
|
|
415
|
+
linkedin: z.nullable(z.string()).optional(),
|
|
416
|
+
linkedinVerifiedAt: z.nullable(z.string()).optional(),
|
|
417
|
+
instagram: z.nullable(z.string()).optional(),
|
|
418
|
+
instagramVerifiedAt: z.nullable(z.string()).optional(),
|
|
419
|
+
tiktok: z.nullable(z.string()).optional(),
|
|
420
|
+
tiktokVerifiedAt: z.nullable(z.string()).optional(),
|
|
350
421
|
});
|
|
351
422
|
|
|
352
423
|
/** @internal */
|
|
@@ -357,27 +428,43 @@ export type PartnerEnrolledEventData$Outbound = {
|
|
|
357
428
|
image: string | null;
|
|
358
429
|
description?: string | null | undefined;
|
|
359
430
|
country: string | null;
|
|
360
|
-
website: string | null;
|
|
361
|
-
youtube: string | null;
|
|
362
|
-
twitter: string | null;
|
|
363
|
-
linkedin: string | null;
|
|
364
|
-
instagram: string | null;
|
|
365
|
-
tiktok: string | null;
|
|
366
431
|
paypalEmail: string | null;
|
|
367
432
|
stripeConnectId: string | null;
|
|
368
433
|
payoutsEnabledAt: string | null;
|
|
434
|
+
partnerId: string;
|
|
435
|
+
tenantId: string | null;
|
|
436
|
+
programId: string;
|
|
369
437
|
createdAt: string;
|
|
370
438
|
status: string;
|
|
371
|
-
programId: string;
|
|
372
|
-
tenantId: string | null;
|
|
373
439
|
links: Array<PartnerEnrolledEventLink$Outbound> | null;
|
|
440
|
+
totalCommissions: number;
|
|
441
|
+
clickRewardId?: string | null | undefined;
|
|
442
|
+
leadRewardId?: string | null | undefined;
|
|
443
|
+
saleRewardId?: string | null | undefined;
|
|
444
|
+
discountId?: string | null | undefined;
|
|
445
|
+
applicationId?: string | null | undefined;
|
|
446
|
+
bannedAt?: string | null | undefined;
|
|
447
|
+
bannedReason?: string | null | undefined;
|
|
374
448
|
clicks: number;
|
|
375
449
|
leads: number;
|
|
376
450
|
sales: number;
|
|
377
451
|
saleAmount: number;
|
|
378
|
-
totalCommissions: number;
|
|
379
452
|
netRevenue: number;
|
|
380
|
-
|
|
453
|
+
website?: string | null | undefined;
|
|
454
|
+
websiteTxtRecord?: string | null | undefined;
|
|
455
|
+
websiteVerifiedAt?: string | null | undefined;
|
|
456
|
+
youtube?: string | null | undefined;
|
|
457
|
+
youtubeVerifiedAt?: string | null | undefined;
|
|
458
|
+
youtubeSubscriberCount?: number | null | undefined;
|
|
459
|
+
youtubeViewCount?: number | null | undefined;
|
|
460
|
+
twitter?: string | null | undefined;
|
|
461
|
+
twitterVerifiedAt?: string | null | undefined;
|
|
462
|
+
linkedin?: string | null | undefined;
|
|
463
|
+
linkedinVerifiedAt?: string | null | undefined;
|
|
464
|
+
instagram?: string | null | undefined;
|
|
465
|
+
instagramVerifiedAt?: string | null | undefined;
|
|
466
|
+
tiktok?: string | null | undefined;
|
|
467
|
+
tiktokVerifiedAt?: string | null | undefined;
|
|
381
468
|
};
|
|
382
469
|
|
|
383
470
|
/** @internal */
|
|
@@ -392,29 +479,45 @@ export const PartnerEnrolledEventData$outboundSchema: z.ZodType<
|
|
|
392
479
|
image: z.nullable(z.string()),
|
|
393
480
|
description: z.nullable(z.string()).optional(),
|
|
394
481
|
country: z.nullable(z.string()),
|
|
395
|
-
website: z.nullable(z.string()),
|
|
396
|
-
youtube: z.nullable(z.string()),
|
|
397
|
-
twitter: z.nullable(z.string()),
|
|
398
|
-
linkedin: z.nullable(z.string()),
|
|
399
|
-
instagram: z.nullable(z.string()),
|
|
400
|
-
tiktok: z.nullable(z.string()),
|
|
401
482
|
paypalEmail: z.nullable(z.string()),
|
|
402
483
|
stripeConnectId: z.nullable(z.string()),
|
|
403
484
|
payoutsEnabledAt: z.nullable(z.string()),
|
|
485
|
+
partnerId: z.string(),
|
|
486
|
+
tenantId: z.nullable(z.string()),
|
|
487
|
+
programId: z.string(),
|
|
404
488
|
createdAt: z.string(),
|
|
405
489
|
status: Status$outboundSchema,
|
|
406
|
-
programId: z.string(),
|
|
407
|
-
tenantId: z.nullable(z.string()),
|
|
408
490
|
links: z.nullable(
|
|
409
491
|
z.array(z.lazy(() => PartnerEnrolledEventLink$outboundSchema)),
|
|
410
492
|
),
|
|
493
|
+
totalCommissions: z.number().default(0),
|
|
494
|
+
clickRewardId: z.nullable(z.string()).optional(),
|
|
495
|
+
leadRewardId: z.nullable(z.string()).optional(),
|
|
496
|
+
saleRewardId: z.nullable(z.string()).optional(),
|
|
497
|
+
discountId: z.nullable(z.string()).optional(),
|
|
498
|
+
applicationId: z.nullable(z.string()).optional(),
|
|
499
|
+
bannedAt: z.nullable(z.string()).optional(),
|
|
500
|
+
bannedReason: z.nullable(BannedReason$outboundSchema).optional(),
|
|
411
501
|
clicks: z.number().default(0),
|
|
412
502
|
leads: z.number().default(0),
|
|
413
503
|
sales: z.number().default(0),
|
|
414
504
|
saleAmount: z.number().default(0),
|
|
415
|
-
totalCommissions: z.number().default(0),
|
|
416
505
|
netRevenue: z.number().default(0),
|
|
417
|
-
|
|
506
|
+
website: z.nullable(z.string()).optional(),
|
|
507
|
+
websiteTxtRecord: z.nullable(z.string()).optional(),
|
|
508
|
+
websiteVerifiedAt: z.nullable(z.string()).optional(),
|
|
509
|
+
youtube: z.nullable(z.string()).optional(),
|
|
510
|
+
youtubeVerifiedAt: z.nullable(z.string()).optional(),
|
|
511
|
+
youtubeSubscriberCount: z.nullable(z.number()).optional(),
|
|
512
|
+
youtubeViewCount: z.nullable(z.number()).optional(),
|
|
513
|
+
twitter: z.nullable(z.string()).optional(),
|
|
514
|
+
twitterVerifiedAt: z.nullable(z.string()).optional(),
|
|
515
|
+
linkedin: z.nullable(z.string()).optional(),
|
|
516
|
+
linkedinVerifiedAt: z.nullable(z.string()).optional(),
|
|
517
|
+
instagram: z.nullable(z.string()).optional(),
|
|
518
|
+
instagramVerifiedAt: z.nullable(z.string()).optional(),
|
|
519
|
+
tiktok: z.nullable(z.string()).optional(),
|
|
520
|
+
tiktokVerifiedAt: z.nullable(z.string()).optional(),
|
|
418
521
|
});
|
|
419
522
|
|
|
420
523
|
/**
|
|
@@ -6,6 +6,12 @@ import * as z from "zod";
|
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
CommissionCreatedEvent,
|
|
11
|
+
CommissionCreatedEvent$inboundSchema,
|
|
12
|
+
CommissionCreatedEvent$Outbound,
|
|
13
|
+
CommissionCreatedEvent$outboundSchema,
|
|
14
|
+
} from "./commissioncreatedevent.js";
|
|
9
15
|
import {
|
|
10
16
|
LeadCreatedEvent,
|
|
11
17
|
LeadCreatedEvent$inboundSchema,
|
|
@@ -45,7 +51,8 @@ export type WebhookEvent =
|
|
|
45
51
|
| LinkClickedEvent
|
|
46
52
|
| LeadCreatedEvent
|
|
47
53
|
| SaleCreatedEvent
|
|
48
|
-
| PartnerEnrolledEvent
|
|
54
|
+
| PartnerEnrolledEvent
|
|
55
|
+
| CommissionCreatedEvent;
|
|
49
56
|
|
|
50
57
|
/** @internal */
|
|
51
58
|
export const WebhookEvent$inboundSchema: z.ZodType<
|
|
@@ -58,6 +65,7 @@ export const WebhookEvent$inboundSchema: z.ZodType<
|
|
|
58
65
|
LeadCreatedEvent$inboundSchema,
|
|
59
66
|
SaleCreatedEvent$inboundSchema,
|
|
60
67
|
PartnerEnrolledEvent$inboundSchema,
|
|
68
|
+
CommissionCreatedEvent$inboundSchema,
|
|
61
69
|
]);
|
|
62
70
|
|
|
63
71
|
/** @internal */
|
|
@@ -66,7 +74,8 @@ export type WebhookEvent$Outbound =
|
|
|
66
74
|
| LinkClickedEvent$Outbound
|
|
67
75
|
| LeadCreatedEvent$Outbound
|
|
68
76
|
| SaleCreatedEvent$Outbound
|
|
69
|
-
| PartnerEnrolledEvent$Outbound
|
|
77
|
+
| PartnerEnrolledEvent$Outbound
|
|
78
|
+
| CommissionCreatedEvent$Outbound;
|
|
70
79
|
|
|
71
80
|
/** @internal */
|
|
72
81
|
export const WebhookEvent$outboundSchema: z.ZodType<
|
|
@@ -79,6 +88,7 @@ export const WebhookEvent$outboundSchema: z.ZodType<
|
|
|
79
88
|
LeadCreatedEvent$outboundSchema,
|
|
80
89
|
SaleCreatedEvent$outboundSchema,
|
|
81
90
|
PartnerEnrolledEvent$outboundSchema,
|
|
91
|
+
CommissionCreatedEvent$outboundSchema,
|
|
82
92
|
]);
|
|
83
93
|
|
|
84
94
|
/**
|