dub 0.25.2 → 0.26.1

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 (78) hide show
  1. package/README.md +4 -2
  2. package/docs/sdks/domains/README.md +3 -3
  3. package/docs/sdks/links/README.md +17 -20
  4. package/lib/config.d.ts +3 -3
  5. package/lib/config.js +3 -3
  6. package/lib/http.d.ts +0 -1
  7. package/lib/http.d.ts.map +1 -1
  8. package/lib/http.js +45 -15
  9. package/lib/http.js.map +1 -1
  10. package/lib/security.d.ts +1 -1
  11. package/lib/security.d.ts.map +1 -1
  12. package/models/components/linkschema.d.ts +1 -1
  13. package/models/components/linkschema.d.ts.map +1 -1
  14. package/models/components/linkschema.js +2 -5
  15. package/models/components/linkschema.js.map +1 -1
  16. package/models/errors/sdkerror.d.ts +1 -0
  17. package/models/errors/sdkerror.d.ts.map +1 -1
  18. package/models/errors/sdkerror.js +3 -1
  19. package/models/errors/sdkerror.js.map +1 -1
  20. package/models/operations/getlinkinfo.d.ts +18 -6
  21. package/models/operations/getlinkinfo.d.ts.map +1 -1
  22. package/models/operations/getlinkinfo.js +16 -8
  23. package/models/operations/getlinkinfo.js.map +1 -1
  24. package/models/operations/index.d.ts +2 -2
  25. package/models/operations/index.d.ts.map +1 -1
  26. package/models/operations/index.js +2 -2
  27. package/models/operations/index.js.map +1 -1
  28. package/models/operations/{editdomain.d.ts → updatedomain.d.ts} +18 -18
  29. package/models/operations/updatedomain.d.ts.map +1 -0
  30. package/models/operations/{editdomain.js → updatedomain.js} +18 -18
  31. package/models/operations/updatedomain.js.map +1 -0
  32. package/models/operations/{editlink.d.ts → updatelink.d.ts} +28 -28
  33. package/models/operations/{editlink.d.ts.map → updatelink.d.ts.map} +1 -1
  34. package/models/operations/{editlink.js → updatelink.js} +31 -31
  35. package/models/operations/{editlink.js.map → updatelink.js.map} +1 -1
  36. package/package.json +1 -1
  37. package/sdk/analytics.d.ts.map +1 -1
  38. package/sdk/analytics.js +10 -10
  39. package/sdk/analytics.js.map +1 -1
  40. package/sdk/domains.d.ts +3 -3
  41. package/sdk/domains.d.ts.map +1 -1
  42. package/sdk/domains.js +10 -10
  43. package/sdk/domains.js.map +1 -1
  44. package/sdk/links.d.ts +7 -7
  45. package/sdk/links.d.ts.map +1 -1
  46. package/sdk/links.js +31 -26
  47. package/sdk/links.js.map +1 -1
  48. package/sdk/metatags.d.ts.map +1 -1
  49. package/sdk/metatags.js +1 -1
  50. package/sdk/metatags.js.map +1 -1
  51. package/sdk/qrcodes.d.ts +1 -7
  52. package/sdk/qrcodes.d.ts.map +1 -1
  53. package/sdk/qrcodes.js +3 -9
  54. package/sdk/qrcodes.js.map +1 -1
  55. package/sdk/tags.d.ts.map +1 -1
  56. package/sdk/tags.js +2 -2
  57. package/sdk/tags.js.map +1 -1
  58. package/sdk/workspaces.d.ts.map +1 -1
  59. package/sdk/workspaces.js +3 -3
  60. package/sdk/workspaces.js.map +1 -1
  61. package/src/lib/config.ts +3 -3
  62. package/src/lib/http.ts +53 -16
  63. package/src/lib/security.ts +1 -1
  64. package/src/models/components/linkschema.ts +3 -8
  65. package/src/models/errors/sdkerror.ts +4 -1
  66. package/src/models/operations/getlinkinfo.ts +34 -14
  67. package/src/models/operations/index.ts +2 -2
  68. package/src/models/operations/{editdomain.ts → updatedomain.ts} +22 -21
  69. package/src/models/operations/{editlink.ts → updatelink.ts} +31 -31
  70. package/src/sdk/analytics.ts +50 -10
  71. package/src/sdk/domains.ts +36 -12
  72. package/src/sdk/links.ts +64 -31
  73. package/src/sdk/metatags.ts +5 -1
  74. package/src/sdk/qrcodes.ts +7 -13
  75. package/src/sdk/tags.ts +10 -2
  76. package/src/sdk/workspaces.ts +15 -3
  77. package/models/operations/editdomain.d.ts.map +0 -1
  78. package/models/operations/editdomain.js.map +0 -1
@@ -7,16 +7,16 @@ import * as z from "zod";
7
7
  /**
8
8
  * The type of redirect to use for this domain.
9
9
  */
10
- export const EditDomainType = {
10
+ export const UpdateDomainType = {
11
11
  Redirect: "redirect",
12
12
  Rewrite: "rewrite",
13
13
  } as const;
14
14
  /**
15
15
  * The type of redirect to use for this domain.
16
16
  */
17
- export type EditDomainType = (typeof EditDomainType)[keyof typeof EditDomainType];
17
+ export type UpdateDomainType = (typeof UpdateDomainType)[keyof typeof UpdateDomainType];
18
18
 
19
- export type EditDomainRequestBody = {
19
+ export type UpdateDomainRequestBody = {
20
20
  /**
21
21
  * Name of the domain.
22
22
  */
@@ -24,7 +24,7 @@ export type EditDomainRequestBody = {
24
24
  /**
25
25
  * The type of redirect to use for this domain.
26
26
  */
27
- type?: EditDomainType | undefined;
27
+ type?: UpdateDomainType | undefined;
28
28
  /**
29
29
  * The page your users will get redirected to when they visit your domain.
30
30
  */
@@ -43,32 +43,33 @@ export type EditDomainRequestBody = {
43
43
  placeholder?: string | null | undefined;
44
44
  };
45
45
 
46
- export type EditDomainRequest = {
46
+ export type UpdateDomainRequest = {
47
47
  /**
48
48
  * The domain name.
49
49
  */
50
50
  slug: string;
51
- requestBody?: EditDomainRequestBody | undefined;
51
+ requestBody?: UpdateDomainRequestBody | undefined;
52
52
  };
53
53
 
54
54
  /** @internal */
55
- export const EditDomainType$: z.ZodNativeEnum<typeof EditDomainType> = z.nativeEnum(EditDomainType);
55
+ export const UpdateDomainType$: z.ZodNativeEnum<typeof UpdateDomainType> =
56
+ z.nativeEnum(UpdateDomainType);
56
57
 
57
58
  /** @internal */
58
- export namespace EditDomainRequestBody$ {
59
+ export namespace UpdateDomainRequestBody$ {
59
60
  export type Inbound = {
60
61
  slug?: string | undefined;
61
- type?: EditDomainType | undefined;
62
+ type?: UpdateDomainType | undefined;
62
63
  target?: string | null | undefined;
63
64
  expiredUrl?: string | null | undefined;
64
65
  archived?: boolean | undefined;
65
66
  placeholder?: string | null | undefined;
66
67
  };
67
68
 
68
- export const inboundSchema: z.ZodType<EditDomainRequestBody, z.ZodTypeDef, Inbound> = z
69
+ export const inboundSchema: z.ZodType<UpdateDomainRequestBody, z.ZodTypeDef, Inbound> = z
69
70
  .object({
70
71
  slug: z.string().optional(),
71
- type: EditDomainType$.default("redirect"),
72
+ type: UpdateDomainType$.default("redirect"),
72
73
  target: z.nullable(z.string()).optional(),
73
74
  expiredUrl: z.nullable(z.string()).optional(),
74
75
  archived: z.boolean().default(false),
@@ -87,17 +88,17 @@ export namespace EditDomainRequestBody$ {
87
88
 
88
89
  export type Outbound = {
89
90
  slug?: string | undefined;
90
- type: EditDomainType;
91
+ type: UpdateDomainType;
91
92
  target?: string | null | undefined;
92
93
  expiredUrl?: string | null | undefined;
93
94
  archived: boolean;
94
95
  placeholder: string | null;
95
96
  };
96
97
 
97
- export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EditDomainRequestBody> = z
98
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateDomainRequestBody> = z
98
99
  .object({
99
100
  slug: z.string().optional(),
100
- type: EditDomainType$.default("redirect"),
101
+ type: UpdateDomainType$.default("redirect"),
101
102
  target: z.nullable(z.string()).optional(),
102
103
  expiredUrl: z.nullable(z.string()).optional(),
103
104
  archived: z.boolean().default(false),
@@ -116,16 +117,16 @@ export namespace EditDomainRequestBody$ {
116
117
  }
117
118
 
118
119
  /** @internal */
119
- export namespace EditDomainRequest$ {
120
+ export namespace UpdateDomainRequest$ {
120
121
  export type Inbound = {
121
122
  slug: string;
122
- RequestBody?: EditDomainRequestBody$.Inbound | undefined;
123
+ RequestBody?: UpdateDomainRequestBody$.Inbound | undefined;
123
124
  };
124
125
 
125
- export const inboundSchema: z.ZodType<EditDomainRequest, z.ZodTypeDef, Inbound> = z
126
+ export const inboundSchema: z.ZodType<UpdateDomainRequest, z.ZodTypeDef, Inbound> = z
126
127
  .object({
127
128
  slug: z.string(),
128
- RequestBody: z.lazy(() => EditDomainRequestBody$.inboundSchema).optional(),
129
+ RequestBody: z.lazy(() => UpdateDomainRequestBody$.inboundSchema).optional(),
129
130
  })
130
131
  .transform((v) => {
131
132
  return {
@@ -136,13 +137,13 @@ export namespace EditDomainRequest$ {
136
137
 
137
138
  export type Outbound = {
138
139
  slug: string;
139
- RequestBody?: EditDomainRequestBody$.Outbound | undefined;
140
+ RequestBody?: UpdateDomainRequestBody$.Outbound | undefined;
140
141
  };
141
142
 
142
- export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EditDomainRequest> = z
143
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateDomainRequest> = z
143
144
  .object({
144
145
  slug: z.string(),
145
- requestBody: z.lazy(() => EditDomainRequestBody$.outboundSchema).optional(),
146
+ requestBody: z.lazy(() => UpdateDomainRequestBody$.outboundSchema).optional(),
146
147
  })
147
148
  .transform((v) => {
148
149
  return {
@@ -7,17 +7,17 @@ import * as z from "zod";
7
7
  /**
8
8
  * The unique IDs of the tags assigned to the short link.
9
9
  */
10
- export type EditLinkTagIds = string | Array<string>;
10
+ export type UpdateLinkTagIds = string | Array<string>;
11
11
 
12
12
  /**
13
13
  * The unique name of the tags assigned to the short link (case insensitive).
14
14
  */
15
- export type EditLinkTagNames = string | Array<string>;
15
+ export type UpdateLinkTagNames = string | Array<string>;
16
16
 
17
17
  /**
18
18
  * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.
19
19
  */
20
- export type EditLinkGeo = {
20
+ export type UpdateLinkGeo = {
21
21
  af?: string | undefined;
22
22
  al?: string | undefined;
23
23
  dz?: string | undefined;
@@ -270,7 +270,7 @@ export type EditLinkGeo = {
270
270
  xk?: string | undefined;
271
271
  };
272
272
 
273
- export type EditLinkRequestBody = {
273
+ export type UpdateLinkRequestBody = {
274
274
  /**
275
275
  * The destination URL of the short link.
276
276
  */
@@ -360,49 +360,49 @@ export type EditLinkRequestBody = {
360
360
  /**
361
361
  * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`.
362
362
  */
363
- geo?: EditLinkGeo | null | undefined;
363
+ geo?: UpdateLinkGeo | null | undefined;
364
364
  };
365
365
 
366
- export type EditLinkRequest = {
366
+ export type UpdateLinkRequest = {
367
367
  /**
368
- * The id of the link to edit. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`.
368
+ * The id of the link to update. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`.
369
369
  */
370
370
  linkId: string;
371
- requestBody?: EditLinkRequestBody | undefined;
371
+ requestBody?: UpdateLinkRequestBody | undefined;
372
372
  };
373
373
 
374
374
  /** @internal */
375
- export namespace EditLinkTagIds$ {
375
+ export namespace UpdateLinkTagIds$ {
376
376
  export type Inbound = string | Array<string>;
377
377
 
378
378
  export type Outbound = string | Array<string>;
379
- export const inboundSchema: z.ZodType<EditLinkTagIds, z.ZodTypeDef, Inbound> = z.union([
379
+ export const inboundSchema: z.ZodType<UpdateLinkTagIds, z.ZodTypeDef, Inbound> = z.union([
380
380
  z.string(),
381
381
  z.array(z.string()),
382
382
  ]);
383
- export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EditLinkTagIds> = z.union([
383
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateLinkTagIds> = z.union([
384
384
  z.string(),
385
385
  z.array(z.string()),
386
386
  ]);
387
387
  }
388
388
 
389
389
  /** @internal */
390
- export namespace EditLinkTagNames$ {
390
+ export namespace UpdateLinkTagNames$ {
391
391
  export type Inbound = string | Array<string>;
392
392
 
393
393
  export type Outbound = string | Array<string>;
394
- export const inboundSchema: z.ZodType<EditLinkTagNames, z.ZodTypeDef, Inbound> = z.union([
394
+ export const inboundSchema: z.ZodType<UpdateLinkTagNames, z.ZodTypeDef, Inbound> = z.union([
395
395
  z.string(),
396
396
  z.array(z.string()),
397
397
  ]);
398
- export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EditLinkTagNames> = z.union([
398
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateLinkTagNames> = z.union([
399
399
  z.string(),
400
400
  z.array(z.string()),
401
401
  ]);
402
402
  }
403
403
 
404
404
  /** @internal */
405
- export namespace EditLinkGeo$ {
405
+ export namespace UpdateLinkGeo$ {
406
406
  export type Inbound = {
407
407
  AF?: string | undefined;
408
408
  AL?: string | undefined;
@@ -656,7 +656,7 @@ export namespace EditLinkGeo$ {
656
656
  XK?: string | undefined;
657
657
  };
658
658
 
659
- export const inboundSchema: z.ZodType<EditLinkGeo, z.ZodTypeDef, Inbound> = z
659
+ export const inboundSchema: z.ZodType<UpdateLinkGeo, z.ZodTypeDef, Inbound> = z
660
660
  .object({
661
661
  AF: z.string().optional(),
662
662
  AL: z.string().optional(),
@@ -1417,7 +1417,7 @@ export namespace EditLinkGeo$ {
1417
1417
  XK?: string | undefined;
1418
1418
  };
1419
1419
 
1420
- export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EditLinkGeo> = z
1420
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateLinkGeo> = z
1421
1421
  .object({
1422
1422
  af: z.string().optional(),
1423
1423
  al: z.string().optional(),
@@ -1927,7 +1927,7 @@ export namespace EditLinkGeo$ {
1927
1927
  }
1928
1928
 
1929
1929
  /** @internal */
1930
- export namespace EditLinkRequestBody$ {
1930
+ export namespace UpdateLinkRequestBody$ {
1931
1931
  export type Inbound = {
1932
1932
  url: string;
1933
1933
  domain?: string | undefined;
@@ -1950,10 +1950,10 @@ export namespace EditLinkRequestBody$ {
1950
1950
  rewrite?: boolean | undefined;
1951
1951
  ios?: string | null | undefined;
1952
1952
  android?: string | null | undefined;
1953
- geo?: EditLinkGeo$.Inbound | null | undefined;
1953
+ geo?: UpdateLinkGeo$.Inbound | null | undefined;
1954
1954
  };
1955
1955
 
1956
- export const inboundSchema: z.ZodType<EditLinkRequestBody, z.ZodTypeDef, Inbound> = z
1956
+ export const inboundSchema: z.ZodType<UpdateLinkRequestBody, z.ZodTypeDef, Inbound> = z
1957
1957
  .object({
1958
1958
  url: z.string(),
1959
1959
  domain: z.string().optional(),
@@ -1976,7 +1976,7 @@ export namespace EditLinkRequestBody$ {
1976
1976
  rewrite: z.boolean().default(false),
1977
1977
  ios: z.nullable(z.string()).optional(),
1978
1978
  android: z.nullable(z.string()).optional(),
1979
- geo: z.nullable(z.lazy(() => EditLinkGeo$.inboundSchema)).optional(),
1979
+ geo: z.nullable(z.lazy(() => UpdateLinkGeo$.inboundSchema)).optional(),
1980
1980
  })
1981
1981
  .transform((v) => {
1982
1982
  return {
@@ -2027,10 +2027,10 @@ export namespace EditLinkRequestBody$ {
2027
2027
  rewrite: boolean;
2028
2028
  ios?: string | null | undefined;
2029
2029
  android?: string | null | undefined;
2030
- geo?: EditLinkGeo$.Outbound | null | undefined;
2030
+ geo?: UpdateLinkGeo$.Outbound | null | undefined;
2031
2031
  };
2032
2032
 
2033
- export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EditLinkRequestBody> = z
2033
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateLinkRequestBody> = z
2034
2034
  .object({
2035
2035
  url: z.string(),
2036
2036
  domain: z.string().optional(),
@@ -2053,7 +2053,7 @@ export namespace EditLinkRequestBody$ {
2053
2053
  rewrite: z.boolean().default(false),
2054
2054
  ios: z.nullable(z.string()).optional(),
2055
2055
  android: z.nullable(z.string()).optional(),
2056
- geo: z.nullable(z.lazy(() => EditLinkGeo$.outboundSchema)).optional(),
2056
+ geo: z.nullable(z.lazy(() => UpdateLinkGeo$.outboundSchema)).optional(),
2057
2057
  })
2058
2058
  .transform((v) => {
2059
2059
  return {
@@ -2084,16 +2084,16 @@ export namespace EditLinkRequestBody$ {
2084
2084
  }
2085
2085
 
2086
2086
  /** @internal */
2087
- export namespace EditLinkRequest$ {
2087
+ export namespace UpdateLinkRequest$ {
2088
2088
  export type Inbound = {
2089
2089
  linkId: string;
2090
- RequestBody?: EditLinkRequestBody$.Inbound | undefined;
2090
+ RequestBody?: UpdateLinkRequestBody$.Inbound | undefined;
2091
2091
  };
2092
2092
 
2093
- export const inboundSchema: z.ZodType<EditLinkRequest, z.ZodTypeDef, Inbound> = z
2093
+ export const inboundSchema: z.ZodType<UpdateLinkRequest, z.ZodTypeDef, Inbound> = z
2094
2094
  .object({
2095
2095
  linkId: z.string(),
2096
- RequestBody: z.lazy(() => EditLinkRequestBody$.inboundSchema).optional(),
2096
+ RequestBody: z.lazy(() => UpdateLinkRequestBody$.inboundSchema).optional(),
2097
2097
  })
2098
2098
  .transform((v) => {
2099
2099
  return {
@@ -2104,13 +2104,13 @@ export namespace EditLinkRequest$ {
2104
2104
 
2105
2105
  export type Outbound = {
2106
2106
  linkId: string;
2107
- RequestBody?: EditLinkRequestBody$.Outbound | undefined;
2107
+ RequestBody?: UpdateLinkRequestBody$.Outbound | undefined;
2108
2108
  };
2109
2109
 
2110
- export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, EditLinkRequest> = z
2110
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateLinkRequest> = z
2111
2111
  .object({
2112
2112
  linkId: z.string(),
2113
- requestBody: z.lazy(() => EditLinkRequestBody$.outboundSchema).optional(),
2113
+ requestBody: z.lazy(() => UpdateLinkRequestBody$.outboundSchema).optional(),
2114
2114
  })
2115
2115
  .transform((v) => {
2116
2116
  return {
@@ -287,7 +287,11 @@ export class Analytics extends ClientSDK {
287
287
  throw result;
288
288
  } else {
289
289
  const responseBody = await response.text();
290
- throw new errors.SDKError("Unexpected API response", response, responseBody);
290
+ throw new errors.SDKError(
291
+ "Unexpected API response status or content-type",
292
+ response,
293
+ responseBody
294
+ );
291
295
  }
292
296
  }
293
297
 
@@ -539,7 +543,11 @@ export class Analytics extends ClientSDK {
539
543
  throw result;
540
544
  } else {
541
545
  const responseBody = await response.text();
542
- throw new errors.SDKError("Unexpected API response", response, responseBody);
546
+ throw new errors.SDKError(
547
+ "Unexpected API response status or content-type",
548
+ response,
549
+ responseBody
550
+ );
543
551
  }
544
552
  }
545
553
 
@@ -793,7 +801,11 @@ export class Analytics extends ClientSDK {
793
801
  throw result;
794
802
  } else {
795
803
  const responseBody = await response.text();
796
- throw new errors.SDKError("Unexpected API response", response, responseBody);
804
+ throw new errors.SDKError(
805
+ "Unexpected API response status or content-type",
806
+ response,
807
+ responseBody
808
+ );
797
809
  }
798
810
  }
799
811
 
@@ -1047,7 +1059,11 @@ export class Analytics extends ClientSDK {
1047
1059
  throw result;
1048
1060
  } else {
1049
1061
  const responseBody = await response.text();
1050
- throw new errors.SDKError("Unexpected API response", response, responseBody);
1062
+ throw new errors.SDKError(
1063
+ "Unexpected API response status or content-type",
1064
+ response,
1065
+ responseBody
1066
+ );
1051
1067
  }
1052
1068
  }
1053
1069
 
@@ -1301,7 +1317,11 @@ export class Analytics extends ClientSDK {
1301
1317
  throw result;
1302
1318
  } else {
1303
1319
  const responseBody = await response.text();
1304
- throw new errors.SDKError("Unexpected API response", response, responseBody);
1320
+ throw new errors.SDKError(
1321
+ "Unexpected API response status or content-type",
1322
+ response,
1323
+ responseBody
1324
+ );
1305
1325
  }
1306
1326
  }
1307
1327
 
@@ -1555,7 +1575,11 @@ export class Analytics extends ClientSDK {
1555
1575
  throw result;
1556
1576
  } else {
1557
1577
  const responseBody = await response.text();
1558
- throw new errors.SDKError("Unexpected API response", response, responseBody);
1578
+ throw new errors.SDKError(
1579
+ "Unexpected API response status or content-type",
1580
+ response,
1581
+ responseBody
1582
+ );
1559
1583
  }
1560
1584
  }
1561
1585
 
@@ -1809,7 +1833,11 @@ export class Analytics extends ClientSDK {
1809
1833
  throw result;
1810
1834
  } else {
1811
1835
  const responseBody = await response.text();
1812
- throw new errors.SDKError("Unexpected API response", response, responseBody);
1836
+ throw new errors.SDKError(
1837
+ "Unexpected API response status or content-type",
1838
+ response,
1839
+ responseBody
1840
+ );
1813
1841
  }
1814
1842
  }
1815
1843
 
@@ -2063,7 +2091,11 @@ export class Analytics extends ClientSDK {
2063
2091
  throw result;
2064
2092
  } else {
2065
2093
  const responseBody = await response.text();
2066
- throw new errors.SDKError("Unexpected API response", response, responseBody);
2094
+ throw new errors.SDKError(
2095
+ "Unexpected API response status or content-type",
2096
+ response,
2097
+ responseBody
2098
+ );
2067
2099
  }
2068
2100
  }
2069
2101
 
@@ -2315,7 +2347,11 @@ export class Analytics extends ClientSDK {
2315
2347
  throw result;
2316
2348
  } else {
2317
2349
  const responseBody = await response.text();
2318
- throw new errors.SDKError("Unexpected API response", response, responseBody);
2350
+ throw new errors.SDKError(
2351
+ "Unexpected API response status or content-type",
2352
+ response,
2353
+ responseBody
2354
+ );
2319
2355
  }
2320
2356
  }
2321
2357
 
@@ -2567,7 +2603,11 @@ export class Analytics extends ClientSDK {
2567
2603
  throw result;
2568
2604
  } else {
2569
2605
  const responseBody = await response.text();
2570
- throw new errors.SDKError("Unexpected API response", response, responseBody);
2606
+ throw new errors.SDKError(
2607
+ "Unexpected API response status or content-type",
2608
+ response,
2609
+ responseBody
2610
+ );
2571
2611
  }
2572
2612
  }
2573
2613
  }
@@ -250,7 +250,11 @@ export class Domains extends ClientSDK {
250
250
  throw result;
251
251
  } else {
252
252
  const responseBody = await response.text();
253
- throw new errors.SDKError("Unexpected API response", response, responseBody);
253
+ throw new errors.SDKError(
254
+ "Unexpected API response status or content-type",
255
+ response,
256
+ responseBody
257
+ );
254
258
  }
255
259
  }
256
260
 
@@ -474,7 +478,11 @@ export class Domains extends ClientSDK {
474
478
  throw result;
475
479
  } else {
476
480
  const responseBody = await response.text();
477
- throw new errors.SDKError("Unexpected API response", response, responseBody);
481
+ throw new errors.SDKError(
482
+ "Unexpected API response status or content-type",
483
+ response,
484
+ responseBody
485
+ );
478
486
  }
479
487
  }
480
488
 
@@ -705,22 +713,26 @@ export class Domains extends ClientSDK {
705
713
  throw result;
706
714
  } else {
707
715
  const responseBody = await response.text();
708
- throw new errors.SDKError("Unexpected API response", response, responseBody);
716
+ throw new errors.SDKError(
717
+ "Unexpected API response status or content-type",
718
+ response,
719
+ responseBody
720
+ );
709
721
  }
710
722
  }
711
723
 
712
724
  /**
713
- * Edit a domain
725
+ * Update a domain
714
726
  *
715
727
  * @remarks
716
- * Edit a domain for the authenticated workspace.
728
+ * Update a domain for the authenticated workspace.
717
729
  */
718
730
  async update(
719
731
  slug: string,
720
- requestBody?: operations.EditDomainRequestBody | undefined,
732
+ requestBody?: operations.UpdateDomainRequestBody | undefined,
721
733
  options?: RequestOptions
722
734
  ): Promise<components.DomainSchema> {
723
- const input$: operations.EditDomainRequest = {
735
+ const input$: operations.UpdateDomainRequest = {
724
736
  slug: slug,
725
737
  requestBody: requestBody,
726
738
  };
@@ -731,7 +743,7 @@ export class Domains extends ClientSDK {
731
743
 
732
744
  const payload$ = schemas$.parse(
733
745
  input$,
734
- (value$) => operations.EditDomainRequest$.outboundSchema.parse(value$),
746
+ (value$) => operations.UpdateDomainRequest$.outboundSchema.parse(value$),
735
747
  "Input validation failed"
736
748
  );
737
749
  const body$ = enc$.encodeJSON("body", payload$.RequestBody, { explode: true });
@@ -766,7 +778,7 @@ export class Domains extends ClientSDK {
766
778
  security$ = {};
767
779
  }
768
780
  const context = {
769
- operationID: "editDomain",
781
+ operationID: "updateDomain",
770
782
  oAuth2Scopes: [],
771
783
  securitySource: this.options$.token,
772
784
  };
@@ -939,7 +951,11 @@ export class Domains extends ClientSDK {
939
951
  throw result;
940
952
  } else {
941
953
  const responseBody = await response.text();
942
- throw new errors.SDKError("Unexpected API response", response, responseBody);
954
+ throw new errors.SDKError(
955
+ "Unexpected API response status or content-type",
956
+ response,
957
+ responseBody
958
+ );
943
959
  }
944
960
  }
945
961
 
@@ -1167,7 +1183,11 @@ export class Domains extends ClientSDK {
1167
1183
  throw result;
1168
1184
  } else {
1169
1185
  const responseBody = await response.text();
1170
- throw new errors.SDKError("Unexpected API response", response, responseBody);
1186
+ throw new errors.SDKError(
1187
+ "Unexpected API response status or content-type",
1188
+ response,
1189
+ responseBody
1190
+ );
1171
1191
  }
1172
1192
  }
1173
1193
 
@@ -1401,7 +1421,11 @@ export class Domains extends ClientSDK {
1401
1421
  throw result;
1402
1422
  } else {
1403
1423
  const responseBody = await response.text();
1404
- throw new errors.SDKError("Unexpected API response", response, responseBody);
1424
+ throw new errors.SDKError(
1425
+ "Unexpected API response status or content-type",
1426
+ response,
1427
+ responseBody
1428
+ );
1405
1429
  }
1406
1430
  }
1407
1431
  }