dub 0.71.1 → 0.71.3

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.
Files changed (90) hide show
  1. package/README.md +43 -29
  2. package/dist/commonjs/lib/config.d.ts +3 -3
  3. package/dist/commonjs/lib/config.js +3 -3
  4. package/dist/commonjs/models/operations/createpartner.d.ts +56 -56
  5. package/dist/commonjs/models/operations/createpartner.d.ts.map +1 -1
  6. package/dist/commonjs/models/operations/createpartner.js +87 -93
  7. package/dist/commonjs/models/operations/createpartner.js.map +1 -1
  8. package/dist/commonjs/models/operations/listpartners.d.ts +56 -56
  9. package/dist/commonjs/models/operations/listpartners.d.ts.map +1 -1
  10. package/dist/commonjs/models/operations/listpartners.js +93 -88
  11. package/dist/commonjs/models/operations/listpartners.js.map +1 -1
  12. package/dist/commonjs/models/operations/listpayouts.d.ts +5 -164
  13. package/dist/commonjs/models/operations/listpayouts.d.ts.map +1 -1
  14. package/dist/commonjs/models/operations/listpayouts.js +3 -101
  15. package/dist/commonjs/models/operations/listpayouts.js.map +1 -1
  16. package/dist/commonjs/sdk/customers.d.ts +6 -6
  17. package/dist/commonjs/sdk/customers.d.ts.map +1 -1
  18. package/dist/commonjs/sdk/customers.js +8 -8
  19. package/dist/commonjs/sdk/customers.js.map +1 -1
  20. package/dist/commonjs/sdk/domains.d.ts +10 -10
  21. package/dist/commonjs/sdk/domains.d.ts.map +1 -1
  22. package/dist/commonjs/sdk/domains.js +13 -13
  23. package/dist/commonjs/sdk/domains.js.map +1 -1
  24. package/dist/commonjs/sdk/folders.d.ts +10 -10
  25. package/dist/commonjs/sdk/folders.d.ts.map +1 -1
  26. package/dist/commonjs/sdk/folders.js +13 -13
  27. package/dist/commonjs/sdk/folders.js.map +1 -1
  28. package/dist/commonjs/sdk/links.d.ts +19 -19
  29. package/dist/commonjs/sdk/links.d.ts.map +1 -1
  30. package/dist/commonjs/sdk/links.js +24 -24
  31. package/dist/commonjs/sdk/links.js.map +1 -1
  32. package/dist/commonjs/sdk/partners.d.ts +10 -10
  33. package/dist/commonjs/sdk/partners.d.ts.map +1 -1
  34. package/dist/commonjs/sdk/partners.js +13 -13
  35. package/dist/commonjs/sdk/partners.js.map +1 -1
  36. package/dist/commonjs/sdk/tags.d.ts +10 -10
  37. package/dist/commonjs/sdk/tags.d.ts.map +1 -1
  38. package/dist/commonjs/sdk/tags.js +13 -13
  39. package/dist/commonjs/sdk/tags.js.map +1 -1
  40. package/dist/esm/lib/config.d.ts +3 -3
  41. package/dist/esm/lib/config.js +3 -3
  42. package/dist/esm/models/operations/createpartner.d.ts +56 -56
  43. package/dist/esm/models/operations/createpartner.d.ts.map +1 -1
  44. package/dist/esm/models/operations/createpartner.js +71 -77
  45. package/dist/esm/models/operations/createpartner.js.map +1 -1
  46. package/dist/esm/models/operations/listpartners.d.ts +56 -56
  47. package/dist/esm/models/operations/listpartners.d.ts.map +1 -1
  48. package/dist/esm/models/operations/listpartners.js +77 -72
  49. package/dist/esm/models/operations/listpartners.js.map +1 -1
  50. package/dist/esm/models/operations/listpayouts.d.ts +5 -164
  51. package/dist/esm/models/operations/listpayouts.d.ts.map +1 -1
  52. package/dist/esm/models/operations/listpayouts.js +2 -99
  53. package/dist/esm/models/operations/listpayouts.js.map +1 -1
  54. package/dist/esm/sdk/customers.d.ts +6 -6
  55. package/dist/esm/sdk/customers.d.ts.map +1 -1
  56. package/dist/esm/sdk/customers.js +8 -8
  57. package/dist/esm/sdk/customers.js.map +1 -1
  58. package/dist/esm/sdk/domains.d.ts +10 -10
  59. package/dist/esm/sdk/domains.d.ts.map +1 -1
  60. package/dist/esm/sdk/domains.js +13 -13
  61. package/dist/esm/sdk/domains.js.map +1 -1
  62. package/dist/esm/sdk/folders.d.ts +10 -10
  63. package/dist/esm/sdk/folders.d.ts.map +1 -1
  64. package/dist/esm/sdk/folders.js +13 -13
  65. package/dist/esm/sdk/folders.js.map +1 -1
  66. package/dist/esm/sdk/links.d.ts +19 -19
  67. package/dist/esm/sdk/links.d.ts.map +1 -1
  68. package/dist/esm/sdk/links.js +24 -24
  69. package/dist/esm/sdk/links.js.map +1 -1
  70. package/dist/esm/sdk/partners.d.ts +10 -10
  71. package/dist/esm/sdk/partners.d.ts.map +1 -1
  72. package/dist/esm/sdk/partners.js +13 -13
  73. package/dist/esm/sdk/partners.js.map +1 -1
  74. package/dist/esm/sdk/tags.d.ts +10 -10
  75. package/dist/esm/sdk/tags.d.ts.map +1 -1
  76. package/dist/esm/sdk/tags.js +13 -13
  77. package/dist/esm/sdk/tags.js.map +1 -1
  78. package/examples/package-lock.json +1 -1
  79. package/jsr.json +1 -1
  80. package/package.json +1 -1
  81. package/src/lib/config.ts +3 -3
  82. package/src/models/operations/createpartner.ts +233 -194
  83. package/src/models/operations/listpartners.ts +194 -231
  84. package/src/models/operations/listpayouts.ts +7 -224
  85. package/src/sdk/customers.ts +14 -14
  86. package/src/sdk/domains.ts +24 -24
  87. package/src/sdk/folders.ts +24 -24
  88. package/src/sdk/links.ts +36 -36
  89. package/src/sdk/partners.ts +23 -23
  90. package/src/sdk/tags.ts +24 -24
@@ -108,91 +108,6 @@ export const ListPayoutsMode = {
108
108
  } as const;
109
109
  export type ListPayoutsMode = ClosedEnum<typeof ListPayoutsMode>;
110
110
 
111
- /**
112
- * The partner's profile type on Dub.
113
- */
114
- export const ProfileType = {
115
- Individual: "individual",
116
- Company: "company",
117
- } as const;
118
- /**
119
- * The partner's profile type on Dub.
120
- */
121
- export type ProfileType = ClosedEnum<typeof ProfileType>;
122
-
123
- /**
124
- * The partner's invoice settings.
125
- */
126
- export type InvoiceSettings = {
127
- address?: string | null | undefined;
128
- taxId?: string | null | undefined;
129
- };
130
-
131
- /**
132
- * The partner's monthly traffic.
133
- */
134
- export const MonthlyTraffic = {
135
- ZeroToOneThousand: "ZeroToOneThousand",
136
- OneThousandToTenThousand: "OneThousandToTenThousand",
137
- TenThousandToFiftyThousand: "TenThousandToFiftyThousand",
138
- FiftyThousandToOneHundredThousand: "FiftyThousandToOneHundredThousand",
139
- OneHundredThousandPlus: "OneHundredThousandPlus",
140
- } as const;
141
- /**
142
- * The partner's monthly traffic.
143
- */
144
- export type MonthlyTraffic = ClosedEnum<typeof MonthlyTraffic>;
145
-
146
- export const IndustryInterests = {
147
- SaaS: "SaaS",
148
- DevTool: "DevTool",
149
- Ai: "AI",
150
- CreativeAndDesign: "Creative_And_Design",
151
- ProductivitySoftware: "Productivity_Software",
152
- Marketing: "Marketing",
153
- Gaming: "Gaming",
154
- Finance: "Finance",
155
- Sales: "Sales",
156
- Ecommerce: "Ecommerce",
157
- CustomerServiceAndSupport: "Customer_Service_And_Support",
158
- ContentManagement: "Content_Management",
159
- HumanResources: "Human_Resources",
160
- Security: "Security",
161
- AnalyticsAndData: "Analytics_And_Data",
162
- SocialMedia: "Social_Media",
163
- ConsumerTech: "Consumer_Tech",
164
- EducationAndLearning: "Education_And_Learning",
165
- HealthAndFitness: "Health_And_Fitness",
166
- FoodAndBeverage: "Food_And_Beverage",
167
- TravelAndLifestyle: "Travel_And_Lifestyle",
168
- EntertainmentAndMedia: "Entertainment_And_Media",
169
- Sports: "Sports",
170
- ScienceAndEngineering: "Science_And_Engineering",
171
- } as const;
172
- export type IndustryInterests = ClosedEnum<typeof IndustryInterests>;
173
-
174
- export const PreferredEarningStructures = {
175
- RevenueShare: "Revenue_Share",
176
- PerLead: "Per_Lead",
177
- PerSale: "Per_Sale",
178
- PerClick: "Per_Click",
179
- OneTimePayment: "One_Time_Payment",
180
- } as const;
181
- export type PreferredEarningStructures = ClosedEnum<
182
- typeof PreferredEarningStructures
183
- >;
184
-
185
- export const SalesChannels = {
186
- Blogs: "Blogs",
187
- Coupons: "Coupons",
188
- DirectReselling: "Direct_Reselling",
189
- Newsletters: "Newsletters",
190
- SocialMedia: "Social_Media",
191
- Events: "Events",
192
- CompanyReferrals: "Company_Referrals",
193
- } as const;
194
- export type SalesChannels = ClosedEnum<typeof SalesChannels>;
195
-
196
111
  export type ListPayoutsPartner = {
197
112
  /**
198
113
  * The partner's unique ID on Dub.
@@ -202,14 +117,6 @@ export type ListPayoutsPartner = {
202
117
  * The partner's full legal name.
203
118
  */
204
119
  name: string;
205
- /**
206
- * If the partner profile type is a company, this is the partner's legal company name.
207
- */
208
- companyName: string | null;
209
- /**
210
- * The partner's profile type on Dub.
211
- */
212
- profileType: ProfileType;
213
120
  /**
214
121
  * The partner's email address. Should be a unique value across Dub.
215
122
  */
@@ -218,82 +125,21 @@ export type ListPayoutsPartner = {
218
125
  * The partner's avatar image.
219
126
  */
220
127
  image: string | null;
221
- /**
222
- * A brief description of the partner and their background.
223
- */
224
- description?: string | null | undefined;
225
- /**
226
- * The partner's country (required for tax purposes).
227
- */
228
- country: string | null;
229
- /**
230
- * The partner's Stripe Connect ID (for receiving payouts via Stripe).
231
- */
232
- stripeConnectId: string | null;
233
- /**
234
- * The partner's PayPal email (for receiving payouts via PayPal).
235
- */
236
- paypalEmail: string | null;
237
128
  /**
238
129
  * The date when the partner enabled payouts.
239
130
  */
240
131
  payoutsEnabledAt: string | null;
241
132
  /**
242
- * The partner's invoice settings.
243
- */
244
- invoiceSettings: InvoiceSettings | null;
245
- /**
246
- * The date when the partner was created on Dub.
247
- */
248
- createdAt: string;
249
- /**
250
- * The date when the partner was added to the partner network.
251
- */
252
- discoverableAt: string | null;
253
- /**
254
- * The date when the partner received the trusted badge in the partner network.
255
- */
256
- trustedAt: string | null;
257
- /**
258
- * The partner's website URL (including the https protocol).
259
- */
260
- website?: string | null | undefined;
261
- /**
262
- * The partner's YouTube channel username (e.g. `johndoe`).
263
- */
264
- youtube?: string | null | undefined;
265
- /**
266
- * The partner's Twitter username (e.g. `johndoe`).
267
- */
268
- twitter?: string | null | undefined;
269
- /**
270
- * The partner's LinkedIn username (e.g. `johndoe`).
271
- */
272
- linkedin?: string | null | undefined;
273
- /**
274
- * The partner's Instagram username (e.g. `johndoe`).
275
- */
276
- instagram?: string | null | undefined;
277
- /**
278
- * The partner's TikTok username (e.g. `johndoe`).
279
- */
280
- tiktok?: string | null | undefined;
281
- /**
282
- * The partner's monthly traffic.
283
- */
284
- monthlyTraffic?: MonthlyTraffic | null | undefined;
285
- /**
286
- * The partner's industry interests.
133
+ * The partner's country (required for tax purposes).
287
134
  */
288
- industryInterests?: Array<IndustryInterests> | undefined;
135
+ country: string | null;
289
136
  /**
290
- * The partner's preferred earning structures.
137
+ * The partner's group ID on Dub.
291
138
  */
292
- preferredEarningStructures?: Array<PreferredEarningStructures> | undefined;
139
+ groupId?: string | null | undefined;
293
140
  /**
294
- * The partner's sales channels.
141
+ * 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.
295
142
  */
296
- salesChannels?: Array<SalesChannels> | undefined;
297
143
  tenantId: string | null;
298
144
  };
299
145
 
@@ -383,50 +229,6 @@ export const ListPayoutsMode$inboundSchema: z.ZodNativeEnum<
383
229
  typeof ListPayoutsMode
384
230
  > = z.nativeEnum(ListPayoutsMode);
385
231
 
386
- /** @internal */
387
- export const ProfileType$inboundSchema: z.ZodNativeEnum<typeof ProfileType> = z
388
- .nativeEnum(ProfileType);
389
-
390
- /** @internal */
391
- export const InvoiceSettings$inboundSchema: z.ZodType<
392
- InvoiceSettings,
393
- z.ZodTypeDef,
394
- unknown
395
- > = z.object({
396
- address: z.nullable(z.string()).optional(),
397
- taxId: z.nullable(z.string()).optional(),
398
- });
399
-
400
- export function invoiceSettingsFromJSON(
401
- jsonString: string,
402
- ): SafeParseResult<InvoiceSettings, SDKValidationError> {
403
- return safeParse(
404
- jsonString,
405
- (x) => InvoiceSettings$inboundSchema.parse(JSON.parse(x)),
406
- `Failed to parse 'InvoiceSettings' from JSON`,
407
- );
408
- }
409
-
410
- /** @internal */
411
- export const MonthlyTraffic$inboundSchema: z.ZodNativeEnum<
412
- typeof MonthlyTraffic
413
- > = z.nativeEnum(MonthlyTraffic);
414
-
415
- /** @internal */
416
- export const IndustryInterests$inboundSchema: z.ZodNativeEnum<
417
- typeof IndustryInterests
418
- > = z.nativeEnum(IndustryInterests);
419
-
420
- /** @internal */
421
- export const PreferredEarningStructures$inboundSchema: z.ZodNativeEnum<
422
- typeof PreferredEarningStructures
423
- > = z.nativeEnum(PreferredEarningStructures);
424
-
425
- /** @internal */
426
- export const SalesChannels$inboundSchema: z.ZodNativeEnum<
427
- typeof SalesChannels
428
- > = z.nativeEnum(SalesChannels);
429
-
430
232
  /** @internal */
431
233
  export const ListPayoutsPartner$inboundSchema: z.ZodType<
432
234
  ListPayoutsPartner,
@@ -435,30 +237,11 @@ export const ListPayoutsPartner$inboundSchema: z.ZodType<
435
237
  > = z.object({
436
238
  id: z.string(),
437
239
  name: z.string(),
438
- companyName: z.nullable(z.string()),
439
- profileType: ProfileType$inboundSchema,
440
240
  email: z.nullable(z.string()),
441
241
  image: z.nullable(z.string()),
442
- description: z.nullable(z.string()).optional(),
443
- country: z.nullable(z.string()),
444
- stripeConnectId: z.nullable(z.string()),
445
- paypalEmail: z.nullable(z.string()),
446
242
  payoutsEnabledAt: z.nullable(z.string()),
447
- invoiceSettings: z.nullable(z.lazy(() => InvoiceSettings$inboundSchema)),
448
- createdAt: z.string(),
449
- discoverableAt: z.nullable(z.string()),
450
- trustedAt: z.nullable(z.string()),
451
- website: z.nullable(z.string()).optional(),
452
- youtube: z.nullable(z.string()).optional(),
453
- twitter: z.nullable(z.string()).optional(),
454
- linkedin: z.nullable(z.string()).optional(),
455
- instagram: z.nullable(z.string()).optional(),
456
- tiktok: z.nullable(z.string()).optional(),
457
- monthlyTraffic: z.nullable(MonthlyTraffic$inboundSchema).optional(),
458
- industryInterests: z.array(IndustryInterests$inboundSchema).optional(),
459
- preferredEarningStructures: z.array(PreferredEarningStructures$inboundSchema)
460
- .optional(),
461
- salesChannels: z.array(SalesChannels$inboundSchema).optional(),
243
+ country: z.nullable(z.string()),
244
+ groupId: z.nullable(z.string()).optional(),
462
245
  tenantId: z.nullable(z.string()),
463
246
  });
464
247
 
@@ -46,35 +46,35 @@ export class Customers extends ClientSDK {
46
46
  }
47
47
 
48
48
  /**
49
- * Update a customer
49
+ * Delete a customer
50
50
  *
51
51
  * @remarks
52
- * Update a customer for the authenticated workspace.
52
+ * Delete a customer from a workspace.
53
53
  */
54
- async update(
55
- request: operations.UpdateCustomerRequest,
54
+ async delete(
55
+ id: string,
56
56
  options?: RequestOptions,
57
- ): Promise<operations.UpdateCustomerResponseBody> {
58
- return unwrapAsync(customersUpdate(
57
+ ): Promise<operations.DeleteCustomerResponseBody> {
58
+ return unwrapAsync(customersDelete(
59
59
  this,
60
- request,
60
+ id,
61
61
  options,
62
62
  ));
63
63
  }
64
64
 
65
65
  /**
66
- * Delete a customer
66
+ * Update a customer
67
67
  *
68
68
  * @remarks
69
- * Delete a customer from a workspace.
69
+ * Update a customer for the authenticated workspace.
70
70
  */
71
- async delete(
72
- id: string,
71
+ async update(
72
+ request: operations.UpdateCustomerRequest,
73
73
  options?: RequestOptions,
74
- ): Promise<operations.DeleteCustomerResponseBody> {
75
- return unwrapAsync(customersDelete(
74
+ ): Promise<operations.UpdateCustomerResponseBody> {
75
+ return unwrapAsync(customersUpdate(
76
76
  this,
77
- id,
77
+ request,
78
78
  options,
79
79
  ));
80
80
  }
@@ -16,16 +16,16 @@ import { PageIterator, unwrapResultIterator } from "../types/operations.js";
16
16
 
17
17
  export class Domains extends ClientSDK {
18
18
  /**
19
- * Create a domain
19
+ * Retrieve a list of domains
20
20
  *
21
21
  * @remarks
22
- * Create a domain for the authenticated workspace.
22
+ * Retrieve a list of domains associated with the authenticated workspace.
23
23
  */
24
- async create(
25
- request?: operations.CreateDomainRequestBody | undefined,
24
+ async list(
25
+ request?: operations.ListDomainsRequest | undefined,
26
26
  options?: RequestOptions,
27
- ): Promise<components.DomainSchema> {
28
- return unwrapAsync(domainsCreate(
27
+ ): Promise<PageIterator<operations.ListDomainsResponse, { page: number }>> {
28
+ return unwrapResultIterator(domainsList(
29
29
  this,
30
30
  request,
31
31
  options,
@@ -33,16 +33,16 @@ export class Domains extends ClientSDK {
33
33
  }
34
34
 
35
35
  /**
36
- * Retrieve a list of domains
36
+ * Create a domain
37
37
  *
38
38
  * @remarks
39
- * Retrieve a list of domains associated with the authenticated workspace.
39
+ * Create a domain for the authenticated workspace.
40
40
  */
41
- async list(
42
- request?: operations.ListDomainsRequest | undefined,
41
+ async create(
42
+ request?: operations.CreateDomainRequestBody | undefined,
43
43
  options?: RequestOptions,
44
- ): Promise<PageIterator<operations.ListDomainsResponse, { page: number }>> {
45
- return unwrapResultIterator(domainsList(
44
+ ): Promise<components.DomainSchema> {
45
+ return unwrapAsync(domainsCreate(
46
46
  this,
47
47
  request,
48
48
  options,
@@ -50,37 +50,37 @@ export class Domains extends ClientSDK {
50
50
  }
51
51
 
52
52
  /**
53
- * Update a domain
53
+ * Delete a domain
54
54
  *
55
55
  * @remarks
56
- * Update a domain for the authenticated workspace.
56
+ * Delete a domain from a workspace. It cannot be undone. This will also delete all the links associated with the domain.
57
57
  */
58
- async update(
58
+ async delete(
59
59
  slug: string,
60
- requestBody?: operations.UpdateDomainRequestBody | undefined,
61
60
  options?: RequestOptions,
62
- ): Promise<components.DomainSchema> {
63
- return unwrapAsync(domainsUpdate(
61
+ ): Promise<operations.DeleteDomainResponseBody> {
62
+ return unwrapAsync(domainsDelete(
64
63
  this,
65
64
  slug,
66
- requestBody,
67
65
  options,
68
66
  ));
69
67
  }
70
68
 
71
69
  /**
72
- * Delete a domain
70
+ * Update a domain
73
71
  *
74
72
  * @remarks
75
- * Delete a domain from a workspace. It cannot be undone. This will also delete all the links associated with the domain.
73
+ * Update a domain for the authenticated workspace.
76
74
  */
77
- async delete(
75
+ async update(
78
76
  slug: string,
77
+ requestBody?: operations.UpdateDomainRequestBody | undefined,
79
78
  options?: RequestOptions,
80
- ): Promise<operations.DeleteDomainResponseBody> {
81
- return unwrapAsync(domainsDelete(
79
+ ): Promise<components.DomainSchema> {
80
+ return unwrapAsync(domainsUpdate(
82
81
  this,
83
82
  slug,
83
+ requestBody,
84
84
  options,
85
85
  ));
86
86
  }
@@ -13,16 +13,16 @@ import { unwrapAsync } from "../types/fp.js";
13
13
 
14
14
  export class Folders extends ClientSDK {
15
15
  /**
16
- * Create a folder
16
+ * Retrieve a list of folders
17
17
  *
18
18
  * @remarks
19
- * Create a folder for the authenticated workspace.
19
+ * Retrieve a list of folders for the authenticated workspace.
20
20
  */
21
- async create(
22
- request?: operations.CreateFolderRequestBody | undefined,
21
+ async list(
22
+ request?: operations.ListFoldersRequest | undefined,
23
23
  options?: RequestOptions,
24
- ): Promise<components.FolderSchema> {
25
- return unwrapAsync(foldersCreate(
24
+ ): Promise<Array<components.FolderSchema>> {
25
+ return unwrapAsync(foldersList(
26
26
  this,
27
27
  request,
28
28
  options,
@@ -30,16 +30,16 @@ export class Folders extends ClientSDK {
30
30
  }
31
31
 
32
32
  /**
33
- * Retrieve a list of folders
33
+ * Create a folder
34
34
  *
35
35
  * @remarks
36
- * Retrieve a list of folders for the authenticated workspace.
36
+ * Create a folder for the authenticated workspace.
37
37
  */
38
- async list(
39
- request?: operations.ListFoldersRequest | undefined,
38
+ async create(
39
+ request?: operations.CreateFolderRequestBody | undefined,
40
40
  options?: RequestOptions,
41
- ): Promise<Array<components.FolderSchema>> {
42
- return unwrapAsync(foldersList(
41
+ ): Promise<components.FolderSchema> {
42
+ return unwrapAsync(foldersCreate(
43
43
  this,
44
44
  request,
45
45
  options,
@@ -47,37 +47,37 @@ export class Folders extends ClientSDK {
47
47
  }
48
48
 
49
49
  /**
50
- * Update a folder
50
+ * Delete a folder
51
51
  *
52
52
  * @remarks
53
- * Update a folder in the workspace.
53
+ * Delete a folder from the workspace. All existing links will still work, but they will no longer be associated with this folder.
54
54
  */
55
- async update(
55
+ async delete(
56
56
  id: string,
57
- requestBody?: operations.UpdateFolderRequestBody | undefined,
58
57
  options?: RequestOptions,
59
- ): Promise<components.FolderSchema> {
60
- return unwrapAsync(foldersUpdate(
58
+ ): Promise<operations.DeleteFolderResponseBody> {
59
+ return unwrapAsync(foldersDelete(
61
60
  this,
62
61
  id,
63
- requestBody,
64
62
  options,
65
63
  ));
66
64
  }
67
65
 
68
66
  /**
69
- * Delete a folder
67
+ * Update a folder
70
68
  *
71
69
  * @remarks
72
- * Delete a folder from the workspace. All existing links will still work, but they will no longer be associated with this folder.
70
+ * Update a folder in the workspace.
73
71
  */
74
- async delete(
72
+ async update(
75
73
  id: string,
74
+ requestBody?: operations.UpdateFolderRequestBody | undefined,
76
75
  options?: RequestOptions,
77
- ): Promise<operations.DeleteFolderResponseBody> {
78
- return unwrapAsync(foldersDelete(
76
+ ): Promise<components.FolderSchema> {
77
+ return unwrapAsync(foldersUpdate(
79
78
  this,
80
79
  id,
80
+ requestBody,
81
81
  options,
82
82
  ));
83
83
  }
package/src/sdk/links.ts CHANGED
@@ -20,16 +20,16 @@ import { PageIterator, unwrapResultIterator } from "../types/operations.js";
20
20
 
21
21
  export class Links extends ClientSDK {
22
22
  /**
23
- * Create a link
23
+ * Retrieve a list of links
24
24
  *
25
25
  * @remarks
26
- * Create a link for the authenticated workspace.
26
+ * Retrieve a paginated list of links for the authenticated workspace.
27
27
  */
28
- async create(
29
- request?: operations.CreateLinkRequestBody | undefined,
28
+ async list(
29
+ request?: operations.GetLinksRequest | undefined,
30
30
  options?: RequestOptions,
31
- ): Promise<components.LinkSchema> {
32
- return unwrapAsync(linksCreate(
31
+ ): Promise<PageIterator<operations.GetLinksResponse, { page: number }>> {
32
+ return unwrapResultIterator(linksList(
33
33
  this,
34
34
  request,
35
35
  options,
@@ -37,16 +37,16 @@ export class Links extends ClientSDK {
37
37
  }
38
38
 
39
39
  /**
40
- * Retrieve a list of links
40
+ * Create a link
41
41
  *
42
42
  * @remarks
43
- * Retrieve a paginated list of links for the authenticated workspace.
43
+ * Create a link for the authenticated workspace.
44
44
  */
45
- async list(
46
- request?: operations.GetLinksRequest | undefined,
45
+ async create(
46
+ request?: operations.CreateLinkRequestBody | undefined,
47
47
  options?: RequestOptions,
48
- ): Promise<PageIterator<operations.GetLinksResponse, { page: number }>> {
49
- return unwrapResultIterator(linksList(
48
+ ): Promise<components.LinkSchema> {
49
+ return unwrapAsync(linksCreate(
50
50
  this,
51
51
  request,
52
52
  options,
@@ -88,37 +88,37 @@ export class Links extends ClientSDK {
88
88
  }
89
89
 
90
90
  /**
91
- * Update a link
91
+ * Delete a link
92
92
  *
93
93
  * @remarks
94
- * Update a link for the authenticated workspace. If there's no change, returns it as it is.
94
+ * Delete a link for the authenticated workspace.
95
95
  */
96
- async update(
96
+ async delete(
97
97
  linkId: string,
98
- requestBody?: operations.UpdateLinkRequestBody | undefined,
99
98
  options?: RequestOptions,
100
- ): Promise<components.LinkSchema> {
101
- return unwrapAsync(linksUpdate(
99
+ ): Promise<operations.DeleteLinkResponseBody> {
100
+ return unwrapAsync(linksDelete(
102
101
  this,
103
102
  linkId,
104
- requestBody,
105
103
  options,
106
104
  ));
107
105
  }
108
106
 
109
107
  /**
110
- * Delete a link
108
+ * Update a link
111
109
  *
112
110
  * @remarks
113
- * Delete a link for the authenticated workspace.
111
+ * Update a link for the authenticated workspace. If there's no change, returns it as it is.
114
112
  */
115
- async delete(
113
+ async update(
116
114
  linkId: string,
115
+ requestBody?: operations.UpdateLinkRequestBody | undefined,
117
116
  options?: RequestOptions,
118
- ): Promise<operations.DeleteLinkResponseBody> {
119
- return unwrapAsync(linksDelete(
117
+ ): Promise<components.LinkSchema> {
118
+ return unwrapAsync(linksUpdate(
120
119
  this,
121
120
  linkId,
121
+ requestBody,
122
122
  options,
123
123
  ));
124
124
  }
@@ -141,16 +141,16 @@ export class Links extends ClientSDK {
141
141
  }
142
142
 
143
143
  /**
144
- * Bulk update links
144
+ * Bulk delete links
145
145
  *
146
146
  * @remarks
147
- * Bulk update up to 100 links with the same data for the authenticated workspace.
147
+ * Bulk delete up to 100 links for the authenticated workspace.
148
148
  */
149
- async updateMany(
150
- request?: operations.BulkUpdateLinksRequestBody | undefined,
149
+ async deleteMany(
150
+ request: operations.BulkDeleteLinksRequest,
151
151
  options?: RequestOptions,
152
- ): Promise<Array<components.LinkSchema>> {
153
- return unwrapAsync(linksUpdateMany(
152
+ ): Promise<operations.BulkDeleteLinksResponseBody> {
153
+ return unwrapAsync(linksDeleteMany(
154
154
  this,
155
155
  request,
156
156
  options,
@@ -158,16 +158,16 @@ export class Links extends ClientSDK {
158
158
  }
159
159
 
160
160
  /**
161
- * Bulk delete links
161
+ * Bulk update links
162
162
  *
163
163
  * @remarks
164
- * Bulk delete up to 100 links for the authenticated workspace.
164
+ * Bulk update up to 100 links with the same data for the authenticated workspace.
165
165
  */
166
- async deleteMany(
167
- request: operations.BulkDeleteLinksRequest,
166
+ async updateMany(
167
+ request?: operations.BulkUpdateLinksRequestBody | undefined,
168
168
  options?: RequestOptions,
169
- ): Promise<operations.BulkDeleteLinksResponseBody> {
170
- return unwrapAsync(linksDeleteMany(
169
+ ): Promise<Array<components.LinkSchema>> {
170
+ return unwrapAsync(linksUpdateMany(
171
171
  this,
172
172
  request,
173
173
  options,