dub 0.22.3 → 0.23.0
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 +5 -4
- package/.speakeasy/gen.yaml +1 -1
- package/README.md +9 -7
- package/docs/sdks/analytics/README.md +10 -10
- package/docs/sdks/links/README.md +17 -13
- package/docs/sdks/metatags/README.md +1 -1
- package/docs/sdks/qrcodes/README.md +1 -1
- package/docs/sdks/tags/README.md +2 -2
- package/docs/sdks/workspaces/README.md +3 -3
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
package/.speakeasy/gen.lock
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
lockVersion: 2.0.0
|
|
2
2
|
id: f28179cc-ef59-426d-9e85-60cec22fc642
|
|
3
3
|
management:
|
|
4
|
-
docChecksum:
|
|
4
|
+
docChecksum: 0fd7c7dd60bcd8b21c5a82e77f886ca4
|
|
5
5
|
docVersion: 0.0.1
|
|
6
|
-
speakeasyVersion: 1.
|
|
6
|
+
speakeasyVersion: 1.253.1
|
|
7
7
|
generationVersion: 2.306.0
|
|
8
|
-
releaseVersion: 0.
|
|
9
|
-
configChecksum:
|
|
8
|
+
releaseVersion: 0.23.0
|
|
9
|
+
configChecksum: 42694dd34d8f28936b3acf5fc2011448
|
|
10
10
|
repoURL: https://github.com/dubinc/dub-node.git
|
|
11
11
|
installationURL: https://github.com/dubinc/dub-node
|
|
12
12
|
published: true
|
|
@@ -16,6 +16,7 @@ features:
|
|
|
16
16
|
constsAndDefaults: 0.1.5
|
|
17
17
|
core: 3.7.1
|
|
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
|
package/.speakeasy/gen.yaml
CHANGED
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: "
|
|
41
|
+
token: "DUB_API_KEY",
|
|
42
42
|
workspaceId: "<value>",
|
|
43
43
|
});
|
|
44
44
|
|
|
45
45
|
async function run() {
|
|
46
|
-
const result = await dub.links.
|
|
47
|
-
|
|
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
|
|
@@ -128,7 +130,7 @@ import { Dub } from "dub";
|
|
|
128
130
|
import * as errors from "dub/models/errors";
|
|
129
131
|
|
|
130
132
|
const dub = new Dub({
|
|
131
|
-
token: "
|
|
133
|
+
token: "DUB_API_KEY",
|
|
132
134
|
workspaceId: "<value>",
|
|
133
135
|
});
|
|
134
136
|
|
|
@@ -214,7 +216,7 @@ import { Dub } from "dub";
|
|
|
214
216
|
|
|
215
217
|
const dub = new Dub({
|
|
216
218
|
serverIdx: 0,
|
|
217
|
-
token: "
|
|
219
|
+
token: "DUB_API_KEY",
|
|
218
220
|
workspaceId: "<value>",
|
|
219
221
|
});
|
|
220
222
|
|
|
@@ -241,7 +243,7 @@ import { Dub } from "dub";
|
|
|
241
243
|
|
|
242
244
|
const dub = new Dub({
|
|
243
245
|
serverURL: "https://api.dub.co",
|
|
244
|
-
token: "
|
|
246
|
+
token: "DUB_API_KEY",
|
|
245
247
|
workspaceId: "<value>",
|
|
246
248
|
});
|
|
247
249
|
|
|
@@ -324,7 +326,7 @@ To authenticate with the API the `token` parameter must be set when initializing
|
|
|
324
326
|
import { Dub } from "dub";
|
|
325
327
|
|
|
326
328
|
const dub = new Dub({
|
|
327
|
-
token: "
|
|
329
|
+
token: "DUB_API_KEY",
|
|
328
330
|
workspaceId: "<value>",
|
|
329
331
|
});
|
|
330
332
|
|
|
@@ -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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
486
|
+
token: "DUB_API_KEY",
|
|
487
487
|
workspaceId: "<value>",
|
|
488
488
|
});
|
|
489
489
|
|
|
@@ -21,7 +21,7 @@ Retrieve a list of links for the authenticated workspace. The list will be pagin
|
|
|
21
21
|
import { Dub } from "dub";
|
|
22
22
|
|
|
23
23
|
const dub = new Dub({
|
|
24
|
-
token: "
|
|
24
|
+
token: "DUB_API_KEY",
|
|
25
25
|
workspaceId: "<value>",
|
|
26
26
|
});
|
|
27
27
|
|
|
@@ -76,14 +76,16 @@ Create a new link for the authenticated workspace.
|
|
|
76
76
|
import { Dub } from "dub";
|
|
77
77
|
|
|
78
78
|
const dub = new Dub({
|
|
79
|
-
token: "
|
|
79
|
+
token: "DUB_API_KEY",
|
|
80
80
|
workspaceId: "<value>",
|
|
81
81
|
});
|
|
82
82
|
|
|
83
83
|
async function run() {
|
|
84
84
|
const result = await dub.links.create({
|
|
85
|
-
url: "
|
|
86
|
-
tagIds:
|
|
85
|
+
url: "https://google/com",
|
|
86
|
+
tagIds: [
|
|
87
|
+
"clux0rgak00011...",
|
|
88
|
+
],
|
|
87
89
|
geo: {},
|
|
88
90
|
});
|
|
89
91
|
|
|
@@ -132,7 +134,7 @@ import { Dub } from "dub";
|
|
|
132
134
|
import { One } from "dub/models/operations";
|
|
133
135
|
|
|
134
136
|
const dub = new Dub({
|
|
135
|
-
token: "
|
|
137
|
+
token: "DUB_API_KEY",
|
|
136
138
|
workspaceId: "<value>",
|
|
137
139
|
});
|
|
138
140
|
|
|
@@ -186,7 +188,7 @@ Retrieve the info for a link from their domain and key.
|
|
|
186
188
|
import { Dub } from "dub";
|
|
187
189
|
|
|
188
190
|
const dub = new Dub({
|
|
189
|
-
token: "
|
|
191
|
+
token: "DUB_API_KEY",
|
|
190
192
|
workspaceId: "<value>",
|
|
191
193
|
});
|
|
192
194
|
|
|
@@ -240,15 +242,17 @@ Edit a link for the authenticated workspace.
|
|
|
240
242
|
import { Dub } from "dub";
|
|
241
243
|
|
|
242
244
|
const dub = new Dub({
|
|
243
|
-
token: "
|
|
245
|
+
token: "DUB_API_KEY",
|
|
244
246
|
workspaceId: "<value>",
|
|
245
247
|
});
|
|
246
248
|
|
|
247
249
|
async function run() {
|
|
248
250
|
const linkId = "<value>";
|
|
249
251
|
const requestBody = {
|
|
250
|
-
url: "https://
|
|
251
|
-
tagIds:
|
|
252
|
+
url: "https://google/com",
|
|
253
|
+
tagIds: [
|
|
254
|
+
"clux0rgak00011...",
|
|
255
|
+
],
|
|
252
256
|
geo: {},
|
|
253
257
|
};
|
|
254
258
|
|
|
@@ -299,7 +303,7 @@ Delete a link for the authenticated workspace.
|
|
|
299
303
|
import { Dub } from "dub";
|
|
300
304
|
|
|
301
305
|
const dub = new Dub({
|
|
302
|
-
token: "
|
|
306
|
+
token: "DUB_API_KEY",
|
|
303
307
|
workspaceId: "<value>",
|
|
304
308
|
});
|
|
305
309
|
|
|
@@ -352,16 +356,16 @@ Bulk create up to 100 links for the authenticated workspace.
|
|
|
352
356
|
import { Dub } from "dub";
|
|
353
357
|
|
|
354
358
|
const dub = new Dub({
|
|
355
|
-
token: "
|
|
359
|
+
token: "DUB_API_KEY",
|
|
356
360
|
workspaceId: "<value>",
|
|
357
361
|
});
|
|
358
362
|
|
|
359
363
|
async function run() {
|
|
360
364
|
const result = await dub.links.createMany([
|
|
361
365
|
{
|
|
362
|
-
url: "https://
|
|
366
|
+
url: "https://google/com",
|
|
363
367
|
tagIds: [
|
|
364
|
-
"
|
|
368
|
+
"clux0rgak00011...",
|
|
365
369
|
],
|
|
366
370
|
geo: {},
|
|
367
371
|
},
|
package/docs/sdks/tags/README.md
CHANGED
|
@@ -16,7 +16,7 @@ Retrieve a list of tags for the authenticated workspace.
|
|
|
16
16
|
import { Dub } from "dub";
|
|
17
17
|
|
|
18
18
|
const dub = new Dub({
|
|
19
|
-
token: "
|
|
19
|
+
token: "DUB_API_KEY",
|
|
20
20
|
workspaceId: "<value>",
|
|
21
21
|
});
|
|
22
22
|
|
|
@@ -67,7 +67,7 @@ Create a new tag for the authenticated workspace.
|
|
|
67
67
|
import { Dub } from "dub";
|
|
68
68
|
|
|
69
69
|
const dub = new Dub({
|
|
70
|
-
token: "
|
|
70
|
+
token: "DUB_API_KEY",
|
|
71
71
|
workspaceId: "<value>",
|
|
72
72
|
});
|
|
73
73
|
|
|
@@ -17,7 +17,7 @@ Retrieve a list of workspaces for the authenticated user.
|
|
|
17
17
|
import { Dub } from "dub";
|
|
18
18
|
|
|
19
19
|
const dub = new Dub({
|
|
20
|
-
token: "
|
|
20
|
+
token: "DUB_API_KEY",
|
|
21
21
|
workspaceId: "<value>",
|
|
22
22
|
});
|
|
23
23
|
|
|
@@ -67,7 +67,7 @@ Create a new workspace for the authenticated user.
|
|
|
67
67
|
import { Dub } from "dub";
|
|
68
68
|
|
|
69
69
|
const dub = new Dub({
|
|
70
|
-
token: "
|
|
70
|
+
token: "DUB_API_KEY",
|
|
71
71
|
workspaceId: "<value>",
|
|
72
72
|
});
|
|
73
73
|
|
|
@@ -121,7 +121,7 @@ Retrieve a workspace for the authenticated user.
|
|
|
121
121
|
import { Dub } from "dub";
|
|
122
122
|
|
|
123
123
|
const dub = new Dub({
|
|
124
|
-
token: "
|
|
124
|
+
token: "DUB_API_KEY",
|
|
125
125
|
workspaceId: "<value>",
|
|
126
126
|
});
|
|
127
127
|
|
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.
|
|
35
|
+
sdkVersion: "0.23.0";
|
|
36
36
|
genVersion: "2.306.0";
|
|
37
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
37
|
+
userAgent: "speakeasy-sdk/typescript 0.23.0 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.
|
|
35
|
+
sdkVersion: "0.23.0",
|
|
36
36
|
genVersion: "2.306.0",
|
|
37
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
37
|
+
userAgent: "speakeasy-sdk/typescript 0.23.0 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.
|
|
67
|
+
sdkVersion: "0.23.0",
|
|
68
68
|
genVersion: "2.306.0",
|
|
69
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
69
|
+
userAgent: "speakeasy-sdk/typescript 0.23.0 2.306.0 0.0.1 dub",
|
|
70
70
|
});
|