dub 0.22.2 → 0.22.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.
- package/.speakeasy/gen.lock +4 -4
- package/.speakeasy/gen.yaml +1 -1
- package/README.md +32 -32
- package/docs/sdks/analytics/README.md +60 -60
- package/docs/sdks/links/README.md +42 -42
- package/docs/sdks/metatags/README.md +6 -6
- package/docs/sdks/qrcodes/README.md +6 -6
- package/docs/sdks/tags/README.md +12 -12
- package/docs/sdks/workspaces/README.md +18 -18
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
package/.speakeasy/gen.lock
CHANGED
|
@@ -3,10 +3,10 @@ id: f28179cc-ef59-426d-9e85-60cec22fc642
|
|
|
3
3
|
management:
|
|
4
4
|
docChecksum: a7672fcdce994905df2837c38c661ab7
|
|
5
5
|
docVersion: 0.0.1
|
|
6
|
-
speakeasyVersion: 1.
|
|
7
|
-
generationVersion: 2.
|
|
8
|
-
releaseVersion: 0.22.
|
|
9
|
-
configChecksum:
|
|
6
|
+
speakeasyVersion: 1.252.0
|
|
7
|
+
generationVersion: 2.306.0
|
|
8
|
+
releaseVersion: 0.22.3
|
|
9
|
+
configChecksum: 6dfa60cf43b354c2423e7e6cd94d8557
|
|
10
10
|
repoURL: https://github.com/dubinc/dub-node.git
|
|
11
11
|
installationURL: https://github.com/dubinc/dub-node
|
|
12
12
|
published: true
|
package/.speakeasy/gen.yaml
CHANGED
package/README.md
CHANGED
|
@@ -37,13 +37,13 @@ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
|
|
|
37
37
|
```typescript
|
|
38
38
|
import { Dub } from "dub";
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
});
|
|
40
|
+
const dub = new Dub({
|
|
41
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
42
|
+
workspaceId: "<value>",
|
|
43
|
+
});
|
|
45
44
|
|
|
46
|
-
|
|
45
|
+
async function run() {
|
|
46
|
+
const result = await dub.links.list({
|
|
47
47
|
tagIds: ["<value>"],
|
|
48
48
|
});
|
|
49
49
|
|
|
@@ -127,15 +127,15 @@ Validation errors can also occur when either method arguments or data returned f
|
|
|
127
127
|
import { Dub } from "dub";
|
|
128
128
|
import * as errors from "dub/models/errors";
|
|
129
129
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
});
|
|
130
|
+
const dub = new Dub({
|
|
131
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
132
|
+
workspaceId: "<value>",
|
|
133
|
+
});
|
|
135
134
|
|
|
135
|
+
async function run() {
|
|
136
136
|
let result;
|
|
137
137
|
try {
|
|
138
|
-
result = await
|
|
138
|
+
result = await dub.links.list({
|
|
139
139
|
tagIds: ["<value>"],
|
|
140
140
|
});
|
|
141
141
|
} catch (err) {
|
|
@@ -212,14 +212,14 @@ You can override the default server globally by passing a server index to the `s
|
|
|
212
212
|
```typescript
|
|
213
213
|
import { Dub } from "dub";
|
|
214
214
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
});
|
|
215
|
+
const dub = new Dub({
|
|
216
|
+
serverIdx: 0,
|
|
217
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
218
|
+
workspaceId: "<value>",
|
|
219
|
+
});
|
|
221
220
|
|
|
222
|
-
|
|
221
|
+
async function run() {
|
|
222
|
+
const result = await dub.links.list({
|
|
223
223
|
tagIds: ["<value>"],
|
|
224
224
|
});
|
|
225
225
|
|
|
@@ -239,14 +239,14 @@ The default server can also be overridden globally by passing a URL to the `serv
|
|
|
239
239
|
```typescript
|
|
240
240
|
import { Dub } from "dub";
|
|
241
241
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
});
|
|
242
|
+
const dub = new Dub({
|
|
243
|
+
serverURL: "https://api.dub.co",
|
|
244
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
245
|
+
workspaceId: "<value>",
|
|
246
|
+
});
|
|
248
247
|
|
|
249
|
-
|
|
248
|
+
async function run() {
|
|
249
|
+
const result = await dub.links.list({
|
|
250
250
|
tagIds: ["<value>"],
|
|
251
251
|
});
|
|
252
252
|
|
|
@@ -323,13 +323,13 @@ To authenticate with the API the `token` parameter must be set when initializing
|
|
|
323
323
|
```typescript
|
|
324
324
|
import { Dub } from "dub";
|
|
325
325
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
});
|
|
326
|
+
const dub = new Dub({
|
|
327
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
328
|
+
workspaceId: "<value>",
|
|
329
|
+
});
|
|
331
330
|
|
|
332
|
-
|
|
331
|
+
async function run() {
|
|
332
|
+
const result = await dub.links.list({
|
|
333
333
|
tagIds: ["<value>"],
|
|
334
334
|
});
|
|
335
335
|
|
|
@@ -23,13 +23,13 @@ Retrieve the number of clicks for a link, a domain, or the authenticated workspa
|
|
|
23
23
|
```typescript
|
|
24
24
|
import { Dub } from "dub";
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
});
|
|
26
|
+
const dub = new Dub({
|
|
27
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
28
|
+
workspaceId: "<value>",
|
|
29
|
+
});
|
|
31
30
|
|
|
32
|
-
|
|
31
|
+
async function run() {
|
|
32
|
+
const result = await dub.analytics.clicks({});
|
|
33
33
|
|
|
34
34
|
// Handle the result
|
|
35
35
|
console.log(result)
|
|
@@ -74,13 +74,13 @@ Retrieve the number of clicks for a link, a domain, or the authenticated workspa
|
|
|
74
74
|
```typescript
|
|
75
75
|
import { Dub } from "dub";
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
});
|
|
77
|
+
const dub = new Dub({
|
|
78
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
79
|
+
workspaceId: "<value>",
|
|
80
|
+
});
|
|
82
81
|
|
|
83
|
-
|
|
82
|
+
async function run() {
|
|
83
|
+
const result = await dub.analytics.timeseries({});
|
|
84
84
|
|
|
85
85
|
// Handle the result
|
|
86
86
|
console.log(result)
|
|
@@ -125,13 +125,13 @@ Retrieve the top countries by number of clicks for a link, a domain, or the auth
|
|
|
125
125
|
```typescript
|
|
126
126
|
import { Dub } from "dub";
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
});
|
|
128
|
+
const dub = new Dub({
|
|
129
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
130
|
+
workspaceId: "<value>",
|
|
131
|
+
});
|
|
133
132
|
|
|
134
|
-
|
|
133
|
+
async function run() {
|
|
134
|
+
const result = await dub.analytics.countries({});
|
|
135
135
|
|
|
136
136
|
// Handle the result
|
|
137
137
|
console.log(result)
|
|
@@ -176,13 +176,13 @@ Retrieve the top countries by number of clicks for a link, a domain, or the auth
|
|
|
176
176
|
```typescript
|
|
177
177
|
import { Dub } from "dub";
|
|
178
178
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
});
|
|
179
|
+
const dub = new Dub({
|
|
180
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
181
|
+
workspaceId: "<value>",
|
|
182
|
+
});
|
|
184
183
|
|
|
185
|
-
|
|
184
|
+
async function run() {
|
|
185
|
+
const result = await dub.analytics.cities({});
|
|
186
186
|
|
|
187
187
|
// Handle the result
|
|
188
188
|
console.log(result)
|
|
@@ -227,13 +227,13 @@ Retrieve the top devices by number of clicks for a link, a domain, or the authen
|
|
|
227
227
|
```typescript
|
|
228
228
|
import { Dub } from "dub";
|
|
229
229
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
});
|
|
230
|
+
const dub = new Dub({
|
|
231
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
232
|
+
workspaceId: "<value>",
|
|
233
|
+
});
|
|
235
234
|
|
|
236
|
-
|
|
235
|
+
async function run() {
|
|
236
|
+
const result = await dub.analytics.devices({});
|
|
237
237
|
|
|
238
238
|
// Handle the result
|
|
239
239
|
console.log(result)
|
|
@@ -278,13 +278,13 @@ Retrieve the top browsers by number of clicks for a link, a domain, or the authe
|
|
|
278
278
|
```typescript
|
|
279
279
|
import { Dub } from "dub";
|
|
280
280
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
});
|
|
281
|
+
const dub = new Dub({
|
|
282
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
283
|
+
workspaceId: "<value>",
|
|
284
|
+
});
|
|
286
285
|
|
|
287
|
-
|
|
286
|
+
async function run() {
|
|
287
|
+
const result = await dub.analytics.browsers({});
|
|
288
288
|
|
|
289
289
|
// Handle the result
|
|
290
290
|
console.log(result)
|
|
@@ -329,13 +329,13 @@ Retrieve the top OS by number of clicks for a link, a domain, or the authenticat
|
|
|
329
329
|
```typescript
|
|
330
330
|
import { Dub } from "dub";
|
|
331
331
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
});
|
|
332
|
+
const dub = new Dub({
|
|
333
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
334
|
+
workspaceId: "<value>",
|
|
335
|
+
});
|
|
337
336
|
|
|
338
|
-
|
|
337
|
+
async function run() {
|
|
338
|
+
const result = await dub.analytics.os({});
|
|
339
339
|
|
|
340
340
|
// Handle the result
|
|
341
341
|
console.log(result)
|
|
@@ -380,13 +380,13 @@ Retrieve the top referers by number of clicks for a link, a domain, or the authe
|
|
|
380
380
|
```typescript
|
|
381
381
|
import { Dub } from "dub";
|
|
382
382
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
});
|
|
383
|
+
const dub = new Dub({
|
|
384
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
385
|
+
workspaceId: "<value>",
|
|
386
|
+
});
|
|
388
387
|
|
|
389
|
-
|
|
388
|
+
async function run() {
|
|
389
|
+
const result = await dub.analytics.referers({});
|
|
390
390
|
|
|
391
391
|
// Handle the result
|
|
392
392
|
console.log(result)
|
|
@@ -431,13 +431,13 @@ Retrieve the top links by number of clicks for a domain or the authenticated wor
|
|
|
431
431
|
```typescript
|
|
432
432
|
import { Dub } from "dub";
|
|
433
433
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
});
|
|
434
|
+
const dub = new Dub({
|
|
435
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
436
|
+
workspaceId: "<value>",
|
|
437
|
+
});
|
|
439
438
|
|
|
440
|
-
|
|
439
|
+
async function run() {
|
|
440
|
+
const result = await dub.analytics.topLinks({});
|
|
441
441
|
|
|
442
442
|
// Handle the result
|
|
443
443
|
console.log(result)
|
|
@@ -482,13 +482,13 @@ Retrieve the top URLs by number of clicks for a given short link.
|
|
|
482
482
|
```typescript
|
|
483
483
|
import { Dub } from "dub";
|
|
484
484
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
});
|
|
485
|
+
const dub = new Dub({
|
|
486
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
487
|
+
workspaceId: "<value>",
|
|
488
|
+
});
|
|
490
489
|
|
|
491
|
-
|
|
490
|
+
async function run() {
|
|
491
|
+
const result = await dub.analytics.topUrls({});
|
|
492
492
|
|
|
493
493
|
// Handle the result
|
|
494
494
|
console.log(result)
|
|
@@ -20,13 +20,13 @@ Retrieve a list of links for the authenticated workspace. The list will be pagin
|
|
|
20
20
|
```typescript
|
|
21
21
|
import { Dub } from "dub";
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
});
|
|
23
|
+
const dub = new Dub({
|
|
24
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
25
|
+
workspaceId: "<value>",
|
|
26
|
+
});
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
async function run() {
|
|
29
|
+
const result = await dub.links.list({
|
|
30
30
|
tagIds: [
|
|
31
31
|
"<value>",
|
|
32
32
|
],
|
|
@@ -75,13 +75,13 @@ Create a new link for the authenticated workspace.
|
|
|
75
75
|
```typescript
|
|
76
76
|
import { Dub } from "dub";
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
});
|
|
78
|
+
const dub = new Dub({
|
|
79
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
80
|
+
workspaceId: "<value>",
|
|
81
|
+
});
|
|
83
82
|
|
|
84
|
-
|
|
83
|
+
async function run() {
|
|
84
|
+
const result = await dub.links.create({
|
|
85
85
|
url: "http://limp-pastry.org",
|
|
86
86
|
tagIds: "<value>",
|
|
87
87
|
geo: {},
|
|
@@ -131,13 +131,13 @@ Retrieve the number of links for the authenticated workspace. The provided query
|
|
|
131
131
|
import { Dub } from "dub";
|
|
132
132
|
import { One } from "dub/models/operations";
|
|
133
133
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
});
|
|
134
|
+
const dub = new Dub({
|
|
135
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
136
|
+
workspaceId: "<value>",
|
|
137
|
+
});
|
|
139
138
|
|
|
140
|
-
|
|
139
|
+
async function run() {
|
|
140
|
+
const result = await dub.links.count({
|
|
141
141
|
tagIds: "<value>",
|
|
142
142
|
groupBy: One.Domain,
|
|
143
143
|
});
|
|
@@ -185,13 +185,13 @@ Retrieve the info for a link from their domain and key.
|
|
|
185
185
|
```typescript
|
|
186
186
|
import { Dub } from "dub";
|
|
187
187
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
});
|
|
188
|
+
const dub = new Dub({
|
|
189
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
190
|
+
workspaceId: "<value>",
|
|
191
|
+
});
|
|
193
192
|
|
|
194
|
-
|
|
193
|
+
async function run() {
|
|
194
|
+
const result = await dub.links.get({
|
|
195
195
|
domain: "ringed-blow.name",
|
|
196
196
|
key: "<key>",
|
|
197
197
|
});
|
|
@@ -239,12 +239,12 @@ Edit a link for the authenticated workspace.
|
|
|
239
239
|
```typescript
|
|
240
240
|
import { Dub } from "dub";
|
|
241
241
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
});
|
|
242
|
+
const dub = new Dub({
|
|
243
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
244
|
+
workspaceId: "<value>",
|
|
245
|
+
});
|
|
247
246
|
|
|
247
|
+
async function run() {
|
|
248
248
|
const linkId = "<value>";
|
|
249
249
|
const requestBody = {
|
|
250
250
|
url: "https://alarming-nondisclosure.com",
|
|
@@ -252,7 +252,7 @@ async function run() {
|
|
|
252
252
|
geo: {},
|
|
253
253
|
};
|
|
254
254
|
|
|
255
|
-
const result = await
|
|
255
|
+
const result = await dub.links.update(linkId, requestBody);
|
|
256
256
|
|
|
257
257
|
// Handle the result
|
|
258
258
|
console.log(result)
|
|
@@ -298,15 +298,15 @@ Delete a link for the authenticated workspace.
|
|
|
298
298
|
```typescript
|
|
299
299
|
import { Dub } from "dub";
|
|
300
300
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
});
|
|
301
|
+
const dub = new Dub({
|
|
302
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
303
|
+
workspaceId: "<value>",
|
|
304
|
+
});
|
|
306
305
|
|
|
306
|
+
async function run() {
|
|
307
307
|
const linkId = "<value>";
|
|
308
308
|
|
|
309
|
-
const result = await
|
|
309
|
+
const result = await dub.links.delete(linkId);
|
|
310
310
|
|
|
311
311
|
// Handle the result
|
|
312
312
|
console.log(result)
|
|
@@ -351,13 +351,13 @@ Bulk create up to 100 links for the authenticated workspace.
|
|
|
351
351
|
```typescript
|
|
352
352
|
import { Dub } from "dub";
|
|
353
353
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
});
|
|
354
|
+
const dub = new Dub({
|
|
355
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
356
|
+
workspaceId: "<value>",
|
|
357
|
+
});
|
|
359
358
|
|
|
360
|
-
|
|
359
|
+
async function run() {
|
|
360
|
+
const result = await dub.links.createMany([
|
|
361
361
|
{
|
|
362
362
|
url: "https://positive-plane.info",
|
|
363
363
|
tagIds: [
|
|
@@ -14,13 +14,13 @@ Retrieve the metatags for a URL
|
|
|
14
14
|
```typescript
|
|
15
15
|
import { Dub } from "dub";
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
});
|
|
17
|
+
const dub = new Dub({
|
|
18
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
19
|
+
workspaceId: "<value>",
|
|
20
|
+
});
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
async function run() {
|
|
23
|
+
const result = await dub.metatags.get({
|
|
24
24
|
url: "https://brief-micronutrient.org",
|
|
25
25
|
});
|
|
26
26
|
|
|
@@ -14,13 +14,13 @@ Retrieve a QR code for a link.
|
|
|
14
14
|
```typescript
|
|
15
15
|
import { Dub } from "dub";
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
});
|
|
17
|
+
const dub = new Dub({
|
|
18
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
19
|
+
workspaceId: "<value>",
|
|
20
|
+
});
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
async function run() {
|
|
23
|
+
const result = await dub.qrCodes.get({});
|
|
24
24
|
|
|
25
25
|
// Handle the result
|
|
26
26
|
console.log(result)
|
package/docs/sdks/tags/README.md
CHANGED
|
@@ -15,13 +15,13 @@ Retrieve a list of tags for the authenticated workspace.
|
|
|
15
15
|
```typescript
|
|
16
16
|
import { Dub } from "dub";
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
});
|
|
18
|
+
const dub = new Dub({
|
|
19
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
20
|
+
workspaceId: "<value>",
|
|
21
|
+
});
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
async function run() {
|
|
24
|
+
const result = await dub.tags.list({});
|
|
25
25
|
|
|
26
26
|
// Handle the result
|
|
27
27
|
console.log(result)
|
|
@@ -66,13 +66,13 @@ Create a new tag for the authenticated workspace.
|
|
|
66
66
|
```typescript
|
|
67
67
|
import { Dub } from "dub";
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
});
|
|
69
|
+
const dub = new Dub({
|
|
70
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
71
|
+
workspaceId: "<value>",
|
|
72
|
+
});
|
|
74
73
|
|
|
75
|
-
|
|
74
|
+
async function run() {
|
|
75
|
+
const result = await dub.tags.create({
|
|
76
76
|
tag: "<value>",
|
|
77
77
|
});
|
|
78
78
|
|
|
@@ -16,13 +16,13 @@ Retrieve a list of workspaces for the authenticated user.
|
|
|
16
16
|
```typescript
|
|
17
17
|
import { Dub } from "dub";
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
});
|
|
19
|
+
const dub = new Dub({
|
|
20
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
21
|
+
workspaceId: "<value>",
|
|
22
|
+
});
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
async function run() {
|
|
25
|
+
const result = await dub.workspaces.list();
|
|
26
26
|
|
|
27
27
|
// Handle the result
|
|
28
28
|
console.log(result)
|
|
@@ -66,13 +66,13 @@ Create a new workspace for the authenticated user.
|
|
|
66
66
|
```typescript
|
|
67
67
|
import { Dub } from "dub";
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
});
|
|
69
|
+
const dub = new Dub({
|
|
70
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
71
|
+
workspaceId: "<value>",
|
|
72
|
+
});
|
|
74
73
|
|
|
75
|
-
|
|
74
|
+
async function run() {
|
|
75
|
+
const result = await dub.workspaces.create({
|
|
76
76
|
name: "<value>",
|
|
77
77
|
slug: "<value>",
|
|
78
78
|
});
|
|
@@ -120,13 +120,13 @@ Retrieve a workspace for the authenticated user.
|
|
|
120
120
|
```typescript
|
|
121
121
|
import { Dub } from "dub";
|
|
122
122
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
});
|
|
123
|
+
const dub = new Dub({
|
|
124
|
+
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
125
|
+
workspaceId: "<value>",
|
|
126
|
+
});
|
|
128
127
|
|
|
129
|
-
|
|
128
|
+
async function run() {
|
|
129
|
+
const result = await dub.workspaces.get({
|
|
130
130
|
idOrSlug: "<value>",
|
|
131
131
|
});
|
|
132
132
|
|
package/lib/config.d.ts
CHANGED
|
@@ -32,8 +32,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
32
32
|
export declare const SDK_METADATA: Readonly<{
|
|
33
33
|
language: "typescript";
|
|
34
34
|
openapiDocVersion: "0.0.1";
|
|
35
|
-
sdkVersion: "0.22.
|
|
36
|
-
genVersion: "2.
|
|
37
|
-
userAgent: "speakeasy-sdk/typescript 0.22.
|
|
35
|
+
sdkVersion: "0.22.3";
|
|
36
|
+
genVersion: "2.306.0";
|
|
37
|
+
userAgent: "speakeasy-sdk/typescript 0.22.3 2.306.0 0.0.1 dub";
|
|
38
38
|
}>;
|
|
39
39
|
//# sourceMappingURL=config.d.ts.map
|
package/lib/config.js
CHANGED
|
@@ -32,8 +32,8 @@ exports.serverURLFromOptions = serverURLFromOptions;
|
|
|
32
32
|
exports.SDK_METADATA = Object.freeze({
|
|
33
33
|
language: "typescript",
|
|
34
34
|
openapiDocVersion: "0.0.1",
|
|
35
|
-
sdkVersion: "0.22.
|
|
36
|
-
genVersion: "2.
|
|
37
|
-
userAgent: "speakeasy-sdk/typescript 0.22.
|
|
35
|
+
sdkVersion: "0.22.3",
|
|
36
|
+
genVersion: "2.306.0",
|
|
37
|
+
userAgent: "speakeasy-sdk/typescript 0.22.3 2.306.0 0.0.1 dub",
|
|
38
38
|
});
|
|
39
39
|
//# sourceMappingURL=config.js.map
|
package/package.json
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -64,7 +64,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
64
64
|
export const SDK_METADATA = Object.freeze({
|
|
65
65
|
language: "typescript",
|
|
66
66
|
openapiDocVersion: "0.0.1",
|
|
67
|
-
sdkVersion: "0.22.
|
|
68
|
-
genVersion: "2.
|
|
69
|
-
userAgent: "speakeasy-sdk/typescript 0.22.
|
|
67
|
+
sdkVersion: "0.22.3",
|
|
68
|
+
genVersion: "2.306.0",
|
|
69
|
+
userAgent: "speakeasy-sdk/typescript 0.22.3 2.306.0 0.0.1 dub",
|
|
70
70
|
});
|