dub 0.22.3 → 0.23.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 (83) hide show
  1. package/.speakeasy/gen.lock +36 -6
  2. package/.speakeasy/gen.yaml +2 -1
  3. package/.speakeasy/workflow.lock +21 -0
  4. package/.speakeasy/workflow.yaml +1 -0
  5. package/README.md +18 -7
  6. package/docs/sdks/analytics/README.md +10 -10
  7. package/docs/sdks/domains/README.md +331 -0
  8. package/docs/sdks/links/README.md +17 -13
  9. package/docs/sdks/metatags/README.md +1 -1
  10. package/docs/sdks/qrcodes/README.md +1 -1
  11. package/docs/sdks/tags/README.md +2 -2
  12. package/docs/sdks/workspaces/README.md +3 -3
  13. package/lib/config.d.ts +3 -3
  14. package/lib/config.js +3 -3
  15. package/models/components/workspaceschema.d.ts +4 -4
  16. package/models/components/workspaceschema.d.ts.map +1 -1
  17. package/models/components/workspaceschema.js +2 -2
  18. package/models/components/workspaceschema.js.map +1 -1
  19. package/models/operations/adddomain.d.ts +149 -0
  20. package/models/operations/adddomain.d.ts.map +1 -0
  21. package/models/operations/adddomain.js +145 -0
  22. package/models/operations/adddomain.js.map +1 -0
  23. package/models/operations/bulkcreatelinks.d.ts +1 -751
  24. package/models/operations/bulkcreatelinks.d.ts.map +1 -1
  25. package/models/operations/bulkcreatelinks.js.map +1 -1
  26. package/models/operations/createlink.d.ts +1 -751
  27. package/models/operations/createlink.d.ts.map +1 -1
  28. package/models/operations/createlink.js.map +1 -1
  29. package/models/operations/deletedomain.d.ts +39 -0
  30. package/models/operations/deletedomain.d.ts.map +1 -0
  31. package/models/operations/deletedomain.js +75 -0
  32. package/models/operations/deletedomain.js.map +1 -0
  33. package/models/operations/editdomain.d.ts +169 -0
  34. package/models/operations/editdomain.d.ts.map +1 -0
  35. package/models/operations/editdomain.js +171 -0
  36. package/models/operations/editdomain.js.map +1 -0
  37. package/models/operations/editlink.d.ts +1 -751
  38. package/models/operations/editlink.d.ts.map +1 -1
  39. package/models/operations/editlink.js.map +1 -1
  40. package/models/operations/getmetatags.d.ts +9 -9
  41. package/models/operations/getmetatags.d.ts.map +1 -1
  42. package/models/operations/getmetatags.js +12 -12
  43. package/models/operations/getmetatags.js.map +1 -1
  44. package/models/operations/index.d.ts +6 -0
  45. package/models/operations/index.d.ts.map +1 -1
  46. package/models/operations/index.js +6 -0
  47. package/models/operations/index.js.map +1 -1
  48. package/models/operations/listdomains.d.ts +91 -0
  49. package/models/operations/listdomains.d.ts.map +1 -0
  50. package/models/operations/listdomains.js +100 -0
  51. package/models/operations/listdomains.js.map +1 -0
  52. package/models/operations/setprimarydomain.d.ts +103 -0
  53. package/models/operations/setprimarydomain.d.ts.map +1 -0
  54. package/models/operations/setprimarydomain.js +116 -0
  55. package/models/operations/setprimarydomain.js.map +1 -0
  56. package/models/operations/transferdomain.d.ts +123 -0
  57. package/models/operations/transferdomain.d.ts.map +1 -0
  58. package/models/operations/transferdomain.js +142 -0
  59. package/models/operations/transferdomain.js.map +1 -0
  60. package/package.json +2 -3
  61. package/sdk/domains.d.ts +50 -0
  62. package/sdk/domains.d.ts.map +1 -0
  63. package/sdk/domains.js +1130 -0
  64. package/sdk/domains.js.map +1 -0
  65. package/sdk/sdk.d.ts +3 -0
  66. package/sdk/sdk.d.ts.map +1 -1
  67. package/sdk/sdk.js +5 -0
  68. package/sdk/sdk.js.map +1 -1
  69. package/src/lib/config.ts +3 -3
  70. package/src/models/components/workspaceschema.ts +6 -6
  71. package/src/models/operations/adddomain.ts +244 -0
  72. package/src/models/operations/bulkcreatelinks.ts +1 -751
  73. package/src/models/operations/createlink.ts +1 -751
  74. package/src/models/operations/deletedomain.ts +84 -0
  75. package/src/models/operations/editdomain.ts +290 -0
  76. package/src/models/operations/editlink.ts +1 -751
  77. package/src/models/operations/getmetatags.ts +21 -21
  78. package/src/models/operations/index.ts +6 -0
  79. package/src/models/operations/listdomains.ts +153 -0
  80. package/src/models/operations/setprimarydomain.ts +179 -0
  81. package/src/models/operations/transferdomain.ts +224 -0
  82. package/src/sdk/domains.ts +1387 -0
  83. package/src/sdk/sdk.ts +6 -0
@@ -1,12 +1,12 @@
1
1
  lockVersion: 2.0.0
2
2
  id: f28179cc-ef59-426d-9e85-60cec22fc642
3
3
  management:
4
- docChecksum: a7672fcdce994905df2837c38c661ab7
4
+ docChecksum: 59b2c58aae7e82783142168d3327e8c8
5
5
  docVersion: 0.0.1
6
- speakeasyVersion: 1.252.0
7
- generationVersion: 2.306.0
8
- releaseVersion: 0.22.3
9
- configChecksum: 6dfa60cf43b354c2423e7e6cd94d8557
6
+ speakeasyVersion: 1.257.1
7
+ generationVersion: 2.308.2
8
+ releaseVersion: 0.23.1
9
+ configChecksum: bfc60f1488f62d05649364aba10d384b
10
10
  repoURL: https://github.com/dubinc/dub-node.git
11
11
  installationURL: https://github.com/dubinc/dub-node
12
12
  published: true
@@ -14,8 +14,9 @@ features:
14
14
  typescript:
15
15
  acceptHeaders: 2.81.1
16
16
  constsAndDefaults: 0.1.5
17
- core: 3.7.1
17
+ core: 3.7.2
18
18
  deprecations: 2.81.1
19
+ examples: 2.81.3
19
20
  flattening: 2.81.1
20
21
  globalSecurity: 2.82.9
21
22
  globalServerURLs: 2.82.4
@@ -30,6 +31,7 @@ generatedFiles:
30
31
  - src/sdk/analytics.ts
31
32
  - src/sdk/workspaces.ts
32
33
  - src/sdk/tags.ts
34
+ - src/sdk/domains.ts
33
35
  - src/sdk/metatags.ts
34
36
  - src/sdk/sdk.ts
35
37
  - .eslintrc.js
@@ -88,6 +90,12 @@ generatedFiles:
88
90
  - src/models/operations/getworkspace.ts
89
91
  - src/models/operations/gettags.ts
90
92
  - src/models/operations/createtag.ts
93
+ - src/models/operations/listdomains.ts
94
+ - src/models/operations/adddomain.ts
95
+ - src/models/operations/deletedomain.ts
96
+ - src/models/operations/editdomain.ts
97
+ - src/models/operations/setprimarydomain.ts
98
+ - src/models/operations/transferdomain.ts
91
99
  - src/models/operations/getmetatags.ts
92
100
  - src/models/errors/index.ts
93
101
  - src/models/components/index.ts
@@ -198,6 +206,27 @@ generatedFiles:
198
206
  - docs/models/operations/gettagsrequest.md
199
207
  - docs/models/operations/color.md
200
208
  - docs/models/operations/createtagrequestbody.md
209
+ - docs/models/operations/listdomainsrequest.md
210
+ - docs/models/operations/listdomainstype.md
211
+ - docs/models/operations/listdomainsresponsebody.md
212
+ - docs/models/operations/type.md
213
+ - docs/models/operations/adddomainrequestbody.md
214
+ - docs/models/operations/adddomaintype.md
215
+ - docs/models/operations/adddomainresponsebody.md
216
+ - docs/models/operations/deletedomainrequest.md
217
+ - docs/models/operations/deletedomainresponsebody.md
218
+ - docs/models/operations/editdomaintype.md
219
+ - docs/models/operations/editdomainrequestbody.md
220
+ - docs/models/operations/editdomainrequest.md
221
+ - docs/models/operations/editdomaindomainstype.md
222
+ - docs/models/operations/editdomainresponsebody.md
223
+ - docs/models/operations/setprimarydomainrequest.md
224
+ - docs/models/operations/setprimarydomaintype.md
225
+ - docs/models/operations/setprimarydomainresponsebody.md
226
+ - docs/models/operations/transferdomainrequestbody.md
227
+ - docs/models/operations/transferdomainrequest.md
228
+ - docs/models/operations/transferdomaintype.md
229
+ - docs/models/operations/transferdomainresponsebody.md
201
230
  - docs/models/operations/getmetatagsrequest.md
202
231
  - docs/models/operations/getmetatagsresponsebody.md
203
232
  - docs/sdks/dub/README.md
@@ -206,6 +235,7 @@ generatedFiles:
206
235
  - docs/sdks/analytics/README.md
207
236
  - docs/sdks/workspaces/README.md
208
237
  - docs/sdks/tags/README.md
238
+ - docs/sdks/domains/README.md
209
239
  - docs/sdks/metatags/README.md
210
240
  - USAGE.md
211
241
  - .gitattributes
@@ -12,13 +12,14 @@ generation:
12
12
  auth:
13
13
  oAuth2ClientCredentialsEnabled: false
14
14
  typescript:
15
- version: 0.22.3
15
+ version: 0.23.1
16
16
  additionalDependencies:
17
17
  dependencies: {}
18
18
  devDependencies:
19
19
  '@types/node': ^20.12.7
20
20
  vitest: 1.4.0
21
21
  peerDependencies: {}
22
+ additionalPackageJSON: {}
22
23
  author: Dub
23
24
  clientServerStatusCodesAsErrors: true
24
25
  enumFormat: union
@@ -0,0 +1,21 @@
1
+ speakeasyVersion: 1.257.1
2
+ sources:
3
+ my-first-source: {}
4
+ targets:
5
+ my-first-target:
6
+ source: my-first-source
7
+ outLocation: /github/workspace/repo
8
+ workflow:
9
+ workflowVersion: 1.0.0
10
+ speakeasyVersion: latest
11
+ sources:
12
+ my-first-source:
13
+ inputs:
14
+ - location: https://api.dub.co
15
+ targets:
16
+ my-first-target:
17
+ target: typescript
18
+ source: my-first-source
19
+ publish:
20
+ npm:
21
+ token: $npm_token
@@ -1,4 +1,5 @@
1
1
  workflowVersion: 1.0.0
2
+ speakeasyVersion: latest
2
3
  sources:
3
4
  my-first-source:
4
5
  inputs:
package/README.md CHANGED
@@ -38,13 +38,15 @@ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
38
38
  import { Dub } from "dub";
39
39
 
40
40
  const dub = new Dub({
41
- token: "<YOUR_BEARER_TOKEN_HERE>",
41
+ token: "DUB_API_KEY",
42
42
  workspaceId: "<value>",
43
43
  });
44
44
 
45
45
  async function run() {
46
- const result = await dub.links.list({
47
- tagIds: ["<value>"],
46
+ const result = await dub.links.create({
47
+ url: "https://google/com",
48
+ tagIds: ["clux0rgak00011..."],
49
+ geo: {},
48
50
  });
49
51
 
50
52
  // Handle the result
@@ -97,6 +99,15 @@ run();
97
99
  * [list](docs/sdks/tags/README.md#list) - Retrieve a list of tags
98
100
  * [create](docs/sdks/tags/README.md#create) - Create a new tag
99
101
 
102
+ ### [domains](docs/sdks/domains/README.md)
103
+
104
+ * [list](docs/sdks/domains/README.md#list) - Retrieve a list of domains
105
+ * [add](docs/sdks/domains/README.md#add) - Add a domain
106
+ * [delete](docs/sdks/domains/README.md#delete) - Delete a domain
107
+ * [update](docs/sdks/domains/README.md#update) - Edit a domain
108
+ * [setPrimary](docs/sdks/domains/README.md#setprimary) - Set a domain as primary
109
+ * [transfer](docs/sdks/domains/README.md#transfer) - Transfer a domain
110
+
100
111
  ### [metatags](docs/sdks/metatags/README.md)
101
112
 
102
113
  * [get](docs/sdks/metatags/README.md#get) - Retrieve the metatags for a URL
@@ -128,7 +139,7 @@ import { Dub } from "dub";
128
139
  import * as errors from "dub/models/errors";
129
140
 
130
141
  const dub = new Dub({
131
- token: "<YOUR_BEARER_TOKEN_HERE>",
142
+ token: "DUB_API_KEY",
132
143
  workspaceId: "<value>",
133
144
  });
134
145
 
@@ -214,7 +225,7 @@ import { Dub } from "dub";
214
225
 
215
226
  const dub = new Dub({
216
227
  serverIdx: 0,
217
- token: "<YOUR_BEARER_TOKEN_HERE>",
228
+ token: "DUB_API_KEY",
218
229
  workspaceId: "<value>",
219
230
  });
220
231
 
@@ -241,7 +252,7 @@ import { Dub } from "dub";
241
252
 
242
253
  const dub = new Dub({
243
254
  serverURL: "https://api.dub.co",
244
- token: "<YOUR_BEARER_TOKEN_HERE>",
255
+ token: "DUB_API_KEY",
245
256
  workspaceId: "<value>",
246
257
  });
247
258
 
@@ -324,7 +335,7 @@ To authenticate with the API the `token` parameter must be set when initializing
324
335
  import { Dub } from "dub";
325
336
 
326
337
  const dub = new Dub({
327
- token: "<YOUR_BEARER_TOKEN_HERE>",
338
+ token: "DUB_API_KEY",
328
339
  workspaceId: "<value>",
329
340
  });
330
341
 
@@ -24,7 +24,7 @@ Retrieve the number of clicks for a link, a domain, or the authenticated workspa
24
24
  import { Dub } from "dub";
25
25
 
26
26
  const dub = new Dub({
27
- token: "<YOUR_BEARER_TOKEN_HERE>",
27
+ token: "DUB_API_KEY",
28
28
  workspaceId: "<value>",
29
29
  });
30
30
 
@@ -75,7 +75,7 @@ Retrieve the number of clicks for a link, a domain, or the authenticated workspa
75
75
  import { Dub } from "dub";
76
76
 
77
77
  const dub = new Dub({
78
- token: "<YOUR_BEARER_TOKEN_HERE>",
78
+ token: "DUB_API_KEY",
79
79
  workspaceId: "<value>",
80
80
  });
81
81
 
@@ -126,7 +126,7 @@ Retrieve the top countries by number of clicks for a link, a domain, or the auth
126
126
  import { Dub } from "dub";
127
127
 
128
128
  const dub = new Dub({
129
- token: "<YOUR_BEARER_TOKEN_HERE>",
129
+ token: "DUB_API_KEY",
130
130
  workspaceId: "<value>",
131
131
  });
132
132
 
@@ -177,7 +177,7 @@ Retrieve the top countries by number of clicks for a link, a domain, or the auth
177
177
  import { Dub } from "dub";
178
178
 
179
179
  const dub = new Dub({
180
- token: "<YOUR_BEARER_TOKEN_HERE>",
180
+ token: "DUB_API_KEY",
181
181
  workspaceId: "<value>",
182
182
  });
183
183
 
@@ -228,7 +228,7 @@ Retrieve the top devices by number of clicks for a link, a domain, or the authen
228
228
  import { Dub } from "dub";
229
229
 
230
230
  const dub = new Dub({
231
- token: "<YOUR_BEARER_TOKEN_HERE>",
231
+ token: "DUB_API_KEY",
232
232
  workspaceId: "<value>",
233
233
  });
234
234
 
@@ -279,7 +279,7 @@ Retrieve the top browsers by number of clicks for a link, a domain, or the authe
279
279
  import { Dub } from "dub";
280
280
 
281
281
  const dub = new Dub({
282
- token: "<YOUR_BEARER_TOKEN_HERE>",
282
+ token: "DUB_API_KEY",
283
283
  workspaceId: "<value>",
284
284
  });
285
285
 
@@ -330,7 +330,7 @@ Retrieve the top OS by number of clicks for a link, a domain, or the authenticat
330
330
  import { Dub } from "dub";
331
331
 
332
332
  const dub = new Dub({
333
- token: "<YOUR_BEARER_TOKEN_HERE>",
333
+ token: "DUB_API_KEY",
334
334
  workspaceId: "<value>",
335
335
  });
336
336
 
@@ -381,7 +381,7 @@ Retrieve the top referers by number of clicks for a link, a domain, or the authe
381
381
  import { Dub } from "dub";
382
382
 
383
383
  const dub = new Dub({
384
- token: "<YOUR_BEARER_TOKEN_HERE>",
384
+ token: "DUB_API_KEY",
385
385
  workspaceId: "<value>",
386
386
  });
387
387
 
@@ -432,7 +432,7 @@ Retrieve the top links by number of clicks for a domain or the authenticated wor
432
432
  import { Dub } from "dub";
433
433
 
434
434
  const dub = new Dub({
435
- token: "<YOUR_BEARER_TOKEN_HERE>",
435
+ token: "DUB_API_KEY",
436
436
  workspaceId: "<value>",
437
437
  });
438
438
 
@@ -483,7 +483,7 @@ Retrieve the top URLs by number of clicks for a given short link.
483
483
  import { Dub } from "dub";
484
484
 
485
485
  const dub = new Dub({
486
- token: "<YOUR_BEARER_TOKEN_HERE>",
486
+ token: "DUB_API_KEY",
487
487
  workspaceId: "<value>",
488
488
  });
489
489
 
@@ -0,0 +1,331 @@
1
+ # Domains
2
+ (*domains*)
3
+
4
+ ### Available Operations
5
+
6
+ * [list](#list) - Retrieve a list of domains
7
+ * [add](#add) - Add a domain
8
+ * [delete](#delete) - Delete a domain
9
+ * [update](#update) - Edit a domain
10
+ * [setPrimary](#setprimary) - Set a domain as primary
11
+ * [transfer](#transfer) - Transfer a domain
12
+
13
+ ## list
14
+
15
+ Retrieve a list of domains associated with the authenticated workspace.
16
+
17
+ ### Example Usage
18
+
19
+ ```typescript
20
+ import { Dub } from "dub";
21
+
22
+ const dub = new Dub({
23
+ token: "DUB_API_KEY",
24
+ workspaceId: "<value>",
25
+ });
26
+
27
+ async function run() {
28
+ const result = await dub.domains.list({});
29
+
30
+ // Handle the result
31
+ console.log(result)
32
+ }
33
+
34
+ run();
35
+ ```
36
+
37
+ ### Parameters
38
+
39
+ | Parameter | Type | Required | Description |
40
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
41
+ | `request` | [operations.ListDomainsRequest](../../models/operations/listdomainsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
42
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
43
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
44
+
45
+
46
+ ### Response
47
+
48
+ **Promise<[operations.ListDomainsResponseBody[]](../../models/.md)>**
49
+ ### Errors
50
+
51
+ | Error Object | Status Code | Content Type |
52
+ | -------------------------- | -------------------------- | -------------------------- |
53
+ | errors.BadRequest | 400 | application/json |
54
+ | errors.Unauthorized | 401 | application/json |
55
+ | errors.Forbidden | 403 | application/json |
56
+ | errors.NotFound | 404 | application/json |
57
+ | errors.Conflict | 409 | application/json |
58
+ | errors.InviteExpired | 410 | application/json |
59
+ | errors.UnprocessableEntity | 422 | application/json |
60
+ | errors.RateLimitExceeded | 429 | application/json |
61
+ | errors.InternalServerError | 500 | application/json |
62
+ | errors.SDKError | 4xx-5xx | */* |
63
+
64
+ ## add
65
+
66
+ Add a domain to the authenticated workspace.
67
+
68
+ ### Example Usage
69
+
70
+ ```typescript
71
+ import { Dub } from "dub";
72
+
73
+ const dub = new Dub({
74
+ token: "DUB_API_KEY",
75
+ workspaceId: "<value>",
76
+ });
77
+
78
+ async function run() {
79
+ const result = await dub.domains.add({
80
+ slug: "<value>",
81
+ });
82
+
83
+ // Handle the result
84
+ console.log(result)
85
+ }
86
+
87
+ run();
88
+ ```
89
+
90
+ ### Parameters
91
+
92
+ | Parameter | Type | Required | Description |
93
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
94
+ | `request` | [operations.AddDomainRequestBody](../../models/operations/adddomainrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
95
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
96
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
97
+
98
+
99
+ ### Response
100
+
101
+ **Promise<[operations.AddDomainResponseBody](../../models/operations/adddomainresponsebody.md)>**
102
+ ### Errors
103
+
104
+ | Error Object | Status Code | Content Type |
105
+ | -------------------------- | -------------------------- | -------------------------- |
106
+ | errors.BadRequest | 400 | application/json |
107
+ | errors.Unauthorized | 401 | application/json |
108
+ | errors.Forbidden | 403 | application/json |
109
+ | errors.NotFound | 404 | application/json |
110
+ | errors.Conflict | 409 | application/json |
111
+ | errors.InviteExpired | 410 | application/json |
112
+ | errors.UnprocessableEntity | 422 | application/json |
113
+ | errors.RateLimitExceeded | 429 | application/json |
114
+ | errors.InternalServerError | 500 | application/json |
115
+ | errors.SDKError | 4xx-5xx | */* |
116
+
117
+ ## delete
118
+
119
+ Delete a domain from a workspace.
120
+
121
+ ### Example Usage
122
+
123
+ ```typescript
124
+ import { Dub } from "dub";
125
+
126
+ const dub = new Dub({
127
+ token: "DUB_API_KEY",
128
+ workspaceId: "<value>",
129
+ });
130
+
131
+ async function run() {
132
+ const result = await dub.domains.delete({
133
+ slug: "acme.com",
134
+ });
135
+
136
+ // Handle the result
137
+ console.log(result)
138
+ }
139
+
140
+ run();
141
+ ```
142
+
143
+ ### Parameters
144
+
145
+ | Parameter | Type | Required | Description |
146
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
147
+ | `request` | [operations.DeleteDomainRequest](../../models/operations/deletedomainrequest.md) | :heavy_check_mark: | The request object to use for the request. |
148
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
149
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
150
+
151
+
152
+ ### Response
153
+
154
+ **Promise<[operations.DeleteDomainResponseBody](../../models/operations/deletedomainresponsebody.md)>**
155
+ ### Errors
156
+
157
+ | Error Object | Status Code | Content Type |
158
+ | -------------------------- | -------------------------- | -------------------------- |
159
+ | errors.BadRequest | 400 | application/json |
160
+ | errors.Unauthorized | 401 | application/json |
161
+ | errors.Forbidden | 403 | application/json |
162
+ | errors.NotFound | 404 | application/json |
163
+ | errors.Conflict | 409 | application/json |
164
+ | errors.InviteExpired | 410 | application/json |
165
+ | errors.UnprocessableEntity | 422 | application/json |
166
+ | errors.RateLimitExceeded | 429 | application/json |
167
+ | errors.InternalServerError | 500 | application/json |
168
+ | errors.SDKError | 4xx-5xx | */* |
169
+
170
+ ## update
171
+
172
+ Edit a domain for the authenticated workspace.
173
+
174
+ ### Example Usage
175
+
176
+ ```typescript
177
+ import { Dub } from "dub";
178
+
179
+ const dub = new Dub({
180
+ token: "DUB_API_KEY",
181
+ workspaceId: "<value>",
182
+ });
183
+
184
+ async function run() {
185
+ const result = await dub.domains.update({
186
+ slug: "acme.com",
187
+ requestBody: {},
188
+ });
189
+
190
+ // Handle the result
191
+ console.log(result)
192
+ }
193
+
194
+ run();
195
+ ```
196
+
197
+ ### Parameters
198
+
199
+ | Parameter | Type | Required | Description |
200
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
201
+ | `request` | [operations.EditDomainRequest](../../models/operations/editdomainrequest.md) | :heavy_check_mark: | The request object to use for the request. |
202
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
203
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
204
+
205
+
206
+ ### Response
207
+
208
+ **Promise<[operations.EditDomainResponseBody](../../models/operations/editdomainresponsebody.md)>**
209
+ ### Errors
210
+
211
+ | Error Object | Status Code | Content Type |
212
+ | -------------------------- | -------------------------- | -------------------------- |
213
+ | errors.BadRequest | 400 | application/json |
214
+ | errors.Unauthorized | 401 | application/json |
215
+ | errors.Forbidden | 403 | application/json |
216
+ | errors.NotFound | 404 | application/json |
217
+ | errors.Conflict | 409 | application/json |
218
+ | errors.InviteExpired | 410 | application/json |
219
+ | errors.UnprocessableEntity | 422 | application/json |
220
+ | errors.RateLimitExceeded | 429 | application/json |
221
+ | errors.InternalServerError | 500 | application/json |
222
+ | errors.SDKError | 4xx-5xx | */* |
223
+
224
+ ## setPrimary
225
+
226
+ Set a domain as primary for the authenticated workspace.
227
+
228
+ ### Example Usage
229
+
230
+ ```typescript
231
+ import { Dub } from "dub";
232
+
233
+ const dub = new Dub({
234
+ token: "DUB_API_KEY",
235
+ workspaceId: "<value>",
236
+ });
237
+
238
+ async function run() {
239
+ const result = await dub.domains.setPrimary({
240
+ slug: "acme.com",
241
+ });
242
+
243
+ // Handle the result
244
+ console.log(result)
245
+ }
246
+
247
+ run();
248
+ ```
249
+
250
+ ### Parameters
251
+
252
+ | Parameter | Type | Required | Description |
253
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
254
+ | `request` | [operations.SetPrimaryDomainRequest](../../models/operations/setprimarydomainrequest.md) | :heavy_check_mark: | The request object to use for the request. |
255
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
256
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
257
+
258
+
259
+ ### Response
260
+
261
+ **Promise<[operations.SetPrimaryDomainResponseBody](../../models/operations/setprimarydomainresponsebody.md)>**
262
+ ### Errors
263
+
264
+ | Error Object | Status Code | Content Type |
265
+ | -------------------------- | -------------------------- | -------------------------- |
266
+ | errors.BadRequest | 400 | application/json |
267
+ | errors.Unauthorized | 401 | application/json |
268
+ | errors.Forbidden | 403 | application/json |
269
+ | errors.NotFound | 404 | application/json |
270
+ | errors.Conflict | 409 | application/json |
271
+ | errors.InviteExpired | 410 | application/json |
272
+ | errors.UnprocessableEntity | 422 | application/json |
273
+ | errors.RateLimitExceeded | 429 | application/json |
274
+ | errors.InternalServerError | 500 | application/json |
275
+ | errors.SDKError | 4xx-5xx | */* |
276
+
277
+ ## transfer
278
+
279
+ Transfer a domain to another workspace within the authenticated account.
280
+
281
+ ### Example Usage
282
+
283
+ ```typescript
284
+ import { Dub } from "dub";
285
+
286
+ const dub = new Dub({
287
+ token: "DUB_API_KEY",
288
+ workspaceId: "<value>",
289
+ });
290
+
291
+ async function run() {
292
+ const result = await dub.domains.transfer({
293
+ slug: "acme.com",
294
+ requestBody: {
295
+ newWorkspaceId: "<value>",
296
+ },
297
+ });
298
+
299
+ // Handle the result
300
+ console.log(result)
301
+ }
302
+
303
+ run();
304
+ ```
305
+
306
+ ### Parameters
307
+
308
+ | Parameter | Type | Required | Description |
309
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
310
+ | `request` | [operations.TransferDomainRequest](../../models/operations/transferdomainrequest.md) | :heavy_check_mark: | The request object to use for the request. |
311
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
312
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
313
+
314
+
315
+ ### Response
316
+
317
+ **Promise<[operations.TransferDomainResponseBody](../../models/operations/transferdomainresponsebody.md)>**
318
+ ### Errors
319
+
320
+ | Error Object | Status Code | Content Type |
321
+ | -------------------------- | -------------------------- | -------------------------- |
322
+ | errors.BadRequest | 400 | application/json |
323
+ | errors.Unauthorized | 401 | application/json |
324
+ | errors.Forbidden | 403 | application/json |
325
+ | errors.NotFound | 404 | application/json |
326
+ | errors.Conflict | 409 | application/json |
327
+ | errors.InviteExpired | 410 | application/json |
328
+ | errors.UnprocessableEntity | 422 | application/json |
329
+ | errors.RateLimitExceeded | 429 | application/json |
330
+ | errors.InternalServerError | 500 | application/json |
331
+ | errors.SDKError | 4xx-5xx | */* |