dub 0.20.2 → 0.21.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 +30 -5
- package/.speakeasy/gen.yaml +2 -1
- package/README.md +45 -20
- package/docs/sdks/analytics/README.md +40 -20
- package/docs/sdks/links/README.md +26 -14
- package/docs/sdks/qrcodes/README.md +4 -2
- package/docs/sdks/tags/README.md +8 -4
- package/docs/sdks/workspaces/README.md +12 -6
- package/hooks/auth.d.ts +3 -0
- package/hooks/auth.d.ts.map +1 -0
- package/hooks/auth.js +22 -0
- package/hooks/auth.js.map +1 -0
- package/hooks/base-url.d.ts +3 -0
- package/hooks/base-url.d.ts.map +1 -0
- package/hooks/base-url.js +24 -0
- package/hooks/base-url.js.map +1 -0
- package/hooks/hooks.d.ts.map +1 -1
- package/hooks/hooks.js +2 -0
- package/hooks/hooks.js.map +1 -1
- package/hooks/registration.d.ts +3 -0
- package/hooks/registration.d.ts.map +1 -0
- package/hooks/registration.js +19 -0
- package/hooks/registration.js.map +1 -0
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/operations/bulkcreatelinks.d.ts +14 -0
- package/models/operations/bulkcreatelinks.d.ts.map +1 -1
- package/models/operations/bulkcreatelinks.js +23 -1
- package/models/operations/bulkcreatelinks.js.map +1 -1
- package/models/operations/createlink.d.ts +14 -0
- package/models/operations/createlink.d.ts.map +1 -1
- package/models/operations/createlink.js +23 -1
- package/models/operations/createlink.js.map +1 -1
- package/models/operations/createtag.d.ts +14 -0
- package/models/operations/createtag.d.ts.map +1 -1
- package/models/operations/createtag.js +23 -1
- package/models/operations/createtag.js.map +1 -1
- package/models/operations/createworkspace.d.ts +14 -0
- package/models/operations/createworkspace.d.ts.map +1 -1
- package/models/operations/createworkspace.js +23 -1
- package/models/operations/createworkspace.js.map +1 -1
- package/models/operations/deletelink.d.ts +14 -0
- package/models/operations/deletelink.d.ts.map +1 -1
- package/models/operations/deletelink.js +23 -1
- package/models/operations/deletelink.js.map +1 -1
- package/models/operations/editlink.d.ts +14 -0
- package/models/operations/editlink.d.ts.map +1 -1
- package/models/operations/editlink.js +23 -1
- package/models/operations/editlink.js.map +1 -1
- package/models/operations/getbrowseranalytics.d.ts +14 -0
- package/models/operations/getbrowseranalytics.d.ts.map +1 -1
- package/models/operations/getbrowseranalytics.js +23 -1
- package/models/operations/getbrowseranalytics.js.map +1 -1
- package/models/operations/getcityanalytics.d.ts +14 -0
- package/models/operations/getcityanalytics.d.ts.map +1 -1
- package/models/operations/getcityanalytics.js +23 -1
- package/models/operations/getcityanalytics.js.map +1 -1
- package/models/operations/getclicksanalytics.d.ts +14 -0
- package/models/operations/getclicksanalytics.d.ts.map +1 -1
- package/models/operations/getclicksanalytics.js +23 -1
- package/models/operations/getclicksanalytics.js.map +1 -1
- package/models/operations/getcountryanalytics.d.ts +14 -0
- package/models/operations/getcountryanalytics.d.ts.map +1 -1
- package/models/operations/getcountryanalytics.js +23 -1
- package/models/operations/getcountryanalytics.js.map +1 -1
- package/models/operations/getdeviceanalytics.d.ts +14 -0
- package/models/operations/getdeviceanalytics.d.ts.map +1 -1
- package/models/operations/getdeviceanalytics.js +23 -1
- package/models/operations/getdeviceanalytics.js.map +1 -1
- package/models/operations/getlinkinfo.d.ts +14 -3
- package/models/operations/getlinkinfo.d.ts.map +1 -1
- package/models/operations/getlinkinfo.js +23 -1
- package/models/operations/getlinkinfo.js.map +1 -1
- package/models/operations/getlinks.d.ts +14 -0
- package/models/operations/getlinks.d.ts.map +1 -1
- package/models/operations/getlinks.js +23 -1
- package/models/operations/getlinks.js.map +1 -1
- package/models/operations/getlinkscount.d.ts +14 -0
- package/models/operations/getlinkscount.d.ts.map +1 -1
- package/models/operations/getlinkscount.js +23 -1
- package/models/operations/getlinkscount.js.map +1 -1
- package/models/operations/getosanalytics.d.ts +14 -0
- package/models/operations/getosanalytics.d.ts.map +1 -1
- package/models/operations/getosanalytics.js +23 -1
- package/models/operations/getosanalytics.js.map +1 -1
- package/models/operations/getqrcode.d.ts +14 -0
- package/models/operations/getqrcode.d.ts.map +1 -1
- package/models/operations/getqrcode.js +23 -1
- package/models/operations/getqrcode.js.map +1 -1
- package/models/operations/getrefereranalytics.d.ts +14 -0
- package/models/operations/getrefereranalytics.d.ts.map +1 -1
- package/models/operations/getrefereranalytics.js +23 -1
- package/models/operations/getrefereranalytics.js.map +1 -1
- package/models/operations/gettags.d.ts +14 -0
- package/models/operations/gettags.d.ts.map +1 -1
- package/models/operations/gettags.js +23 -1
- package/models/operations/gettags.js.map +1 -1
- package/models/operations/gettimeseriesanalytics.d.ts +14 -0
- package/models/operations/gettimeseriesanalytics.d.ts.map +1 -1
- package/models/operations/gettimeseriesanalytics.js +23 -1
- package/models/operations/gettimeseriesanalytics.js.map +1 -1
- package/models/operations/gettoplinks.d.ts +14 -0
- package/models/operations/gettoplinks.d.ts.map +1 -1
- package/models/operations/gettoplinks.js +23 -1
- package/models/operations/gettoplinks.js.map +1 -1
- package/models/operations/gettopurls.d.ts +14 -0
- package/models/operations/gettopurls.d.ts.map +1 -1
- package/models/operations/gettopurls.js +23 -1
- package/models/operations/gettopurls.js.map +1 -1
- package/models/operations/getworkspace.d.ts +14 -0
- package/models/operations/getworkspace.d.ts.map +1 -1
- package/models/operations/getworkspace.js +23 -1
- package/models/operations/getworkspace.js.map +1 -1
- package/models/operations/getworkspaces.d.ts +16 -0
- package/models/operations/getworkspaces.d.ts.map +1 -0
- package/models/operations/getworkspaces.js +53 -0
- package/models/operations/getworkspaces.js.map +1 -0
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/package.json +2 -1
- package/sdk/analytics.d.ts +10 -10
- package/sdk/analytics.d.ts.map +1 -1
- package/sdk/analytics.js +160 -138
- package/sdk/analytics.js.map +1 -1
- package/sdk/links.d.ts +7 -7
- package/sdk/links.d.ts.map +1 -1
- package/sdk/links.js +112 -111
- package/sdk/links.js.map +1 -1
- package/sdk/qrcodes.d.ts +1 -1
- package/sdk/qrcodes.d.ts.map +1 -1
- package/sdk/qrcodes.js +12 -17
- package/sdk/qrcodes.js.map +1 -1
- package/sdk/tags.d.ts +2 -2
- package/sdk/tags.d.ts.map +1 -1
- package/sdk/tags.js +32 -34
- package/sdk/tags.js.map +1 -1
- package/sdk/workspaces.d.ts +3 -3
- package/sdk/workspaces.d.ts.map +1 -1
- package/sdk/workspaces.js +36 -39
- package/sdk/workspaces.js.map +1 -1
- package/src/hooks/auth.ts +23 -0
- package/src/hooks/base-url.ts +24 -0
- package/src/hooks/hooks.ts +5 -1
- package/src/hooks/registration.ts +18 -0
- package/src/lib/config.ts +3 -3
- package/src/models/operations/bulkcreatelinks.ts +35 -0
- package/src/models/operations/createlink.ts +35 -0
- package/src/models/operations/createtag.ts +35 -0
- package/src/models/operations/createworkspace.ts +35 -0
- package/src/models/operations/deletelink.ts +35 -0
- package/src/models/operations/editlink.ts +35 -0
- package/src/models/operations/getbrowseranalytics.ts +35 -0
- package/src/models/operations/getcityanalytics.ts +35 -0
- package/src/models/operations/getclicksanalytics.ts +35 -0
- package/src/models/operations/getcountryanalytics.ts +35 -0
- package/src/models/operations/getdeviceanalytics.ts +35 -0
- package/src/models/operations/getlinkinfo.ts +35 -3
- package/src/models/operations/getlinks.ts +35 -0
- package/src/models/operations/getlinkscount.ts +35 -0
- package/src/models/operations/getosanalytics.ts +35 -0
- package/src/models/operations/getqrcode.ts +35 -0
- package/src/models/operations/getrefereranalytics.ts +35 -0
- package/src/models/operations/gettags.ts +35 -0
- package/src/models/operations/gettimeseriesanalytics.ts +36 -0
- package/src/models/operations/gettoplinks.ts +35 -0
- package/src/models/operations/gettopurls.ts +35 -0
- package/src/models/operations/getworkspace.ts +35 -0
- package/src/models/operations/getworkspaces.ts +40 -0
- package/src/models/operations/index.ts +1 -0
- package/src/sdk/analytics.ts +161 -108
- package/src/sdk/links.ts +117 -91
- package/src/sdk/qrcodes.ts +13 -14
- package/src/sdk/tags.ts +33 -28
- package/src/sdk/workspaces.ts +40 -31
|
@@ -22,16 +22,17 @@ import { Dub } from "dub";
|
|
|
22
22
|
|
|
23
23
|
async function run() {
|
|
24
24
|
const sdk = new Dub({
|
|
25
|
-
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
26
25
|
workspaceId: "<value>",
|
|
27
26
|
projectSlug: "<value>",
|
|
28
27
|
});
|
|
29
28
|
|
|
29
|
+
const operationSecurity = "<YOUR_BEARER_TOKEN_HERE>";
|
|
30
|
+
|
|
30
31
|
const result = await sdk.links.list({
|
|
31
32
|
tagIds: [
|
|
32
33
|
"<value>",
|
|
33
34
|
],
|
|
34
|
-
});
|
|
35
|
+
}, operationSecurity);
|
|
35
36
|
|
|
36
37
|
// Handle the result
|
|
37
38
|
console.log(result)
|
|
@@ -45,6 +46,7 @@ run();
|
|
|
45
46
|
| Parameter | Type | Required | Description |
|
|
46
47
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
47
48
|
| `request` | [operations.GetLinksRequest](../../models/operations/getlinksrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
49
|
+
| `security` | [operations.GetLinksSecurity](../../models/operations/getlinkssecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
48
50
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
49
51
|
| `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. |
|
|
50
52
|
|
|
@@ -78,18 +80,19 @@ import { Dub } from "dub";
|
|
|
78
80
|
|
|
79
81
|
async function run() {
|
|
80
82
|
const sdk = new Dub({
|
|
81
|
-
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
82
83
|
workspaceId: "<value>",
|
|
83
84
|
projectSlug: "<value>",
|
|
84
85
|
});
|
|
85
86
|
|
|
87
|
+
const operationSecurity = "<YOUR_BEARER_TOKEN_HERE>";
|
|
88
|
+
|
|
86
89
|
const result = await sdk.links.create({
|
|
87
90
|
url: "http://limp-pastry.org",
|
|
88
91
|
geo: {
|
|
89
92
|
"key": "<value>",
|
|
90
93
|
},
|
|
91
94
|
tagIds: "<value>",
|
|
92
|
-
});
|
|
95
|
+
}, operationSecurity);
|
|
93
96
|
|
|
94
97
|
// Handle the result
|
|
95
98
|
console.log(result)
|
|
@@ -103,6 +106,7 @@ run();
|
|
|
103
106
|
| Parameter | Type | Required | Description |
|
|
104
107
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
105
108
|
| `request` | [operations.CreateLinkRequestBody](../../models/operations/createlinkrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
109
|
+
| `security` | [operations.CreateLinkSecurity](../../models/operations/createlinksecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
106
110
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
107
111
|
| `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. |
|
|
108
112
|
|
|
@@ -137,15 +141,16 @@ import { One } from "dub/models/operations";
|
|
|
137
141
|
|
|
138
142
|
async function run() {
|
|
139
143
|
const sdk = new Dub({
|
|
140
|
-
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
141
144
|
workspaceId: "<value>",
|
|
142
145
|
projectSlug: "<value>",
|
|
143
146
|
});
|
|
144
147
|
|
|
148
|
+
const operationSecurity = "<YOUR_BEARER_TOKEN_HERE>";
|
|
149
|
+
|
|
145
150
|
const result = await sdk.links.count({
|
|
146
151
|
tagIds: "<value>",
|
|
147
152
|
groupBy: One.Domain,
|
|
148
|
-
});
|
|
153
|
+
}, operationSecurity);
|
|
149
154
|
|
|
150
155
|
// Handle the result
|
|
151
156
|
console.log(result)
|
|
@@ -159,6 +164,7 @@ run();
|
|
|
159
164
|
| Parameter | Type | Required | Description |
|
|
160
165
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
161
166
|
| `request` | [operations.GetLinksCountRequest](../../models/operations/getlinkscountrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
167
|
+
| `security` | [operations.GetLinksCountSecurity](../../models/operations/getlinkscountsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
162
168
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
163
169
|
| `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. |
|
|
164
170
|
|
|
@@ -192,15 +198,16 @@ import { Dub } from "dub";
|
|
|
192
198
|
|
|
193
199
|
async function run() {
|
|
194
200
|
const sdk = new Dub({
|
|
195
|
-
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
196
201
|
workspaceId: "<value>",
|
|
197
202
|
projectSlug: "<value>",
|
|
198
203
|
});
|
|
199
204
|
|
|
205
|
+
const operationSecurity = "<YOUR_BEARER_TOKEN_HERE>";
|
|
206
|
+
|
|
200
207
|
const result = await sdk.links.get({
|
|
201
208
|
domain: "ringed-blow.name",
|
|
202
209
|
key: "<key>",
|
|
203
|
-
});
|
|
210
|
+
}, operationSecurity);
|
|
204
211
|
|
|
205
212
|
// Handle the result
|
|
206
213
|
console.log(result)
|
|
@@ -214,6 +221,7 @@ run();
|
|
|
214
221
|
| Parameter | Type | Required | Description |
|
|
215
222
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
216
223
|
| `request` | [operations.GetLinkInfoRequest](../../models/operations/getlinkinforequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
224
|
+
| `security` | [operations.GetLinkInfoSecurity](../../models/operations/getlinkinfosecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
217
225
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
218
226
|
| `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. |
|
|
219
227
|
|
|
@@ -247,7 +255,6 @@ import { Dub } from "dub";
|
|
|
247
255
|
|
|
248
256
|
async function run() {
|
|
249
257
|
const sdk = new Dub({
|
|
250
|
-
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
251
258
|
workspaceId: "<value>",
|
|
252
259
|
projectSlug: "<value>",
|
|
253
260
|
});
|
|
@@ -260,8 +267,9 @@ async function run() {
|
|
|
260
267
|
},
|
|
261
268
|
tagIds: "<value>",
|
|
262
269
|
};
|
|
270
|
+
const operationSecurity = "<YOUR_BEARER_TOKEN_HERE>";
|
|
263
271
|
|
|
264
|
-
const result = await sdk.links.update(linkId, requestBody);
|
|
272
|
+
const result = await sdk.links.update(operationSecurity, linkId, requestBody);
|
|
265
273
|
|
|
266
274
|
// Handle the result
|
|
267
275
|
console.log(result)
|
|
@@ -274,6 +282,7 @@ run();
|
|
|
274
282
|
|
|
275
283
|
| Parameter | Type | Required | Description |
|
|
276
284
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
285
|
+
| `security` | [operations.EditLinkSecurity](../../models/operations/editlinksecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
277
286
|
| `linkId` | *string* | :heavy_check_mark: | The id of the link to edit. You can get this via the `getLinkInfo` endpoint. |
|
|
278
287
|
| `requestBody` | [operations.EditLinkRequestBody](../../models/operations/editlinkrequestbody.md) | :heavy_minus_sign: | N/A |
|
|
279
288
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
@@ -309,14 +318,14 @@ import { Dub } from "dub";
|
|
|
309
318
|
|
|
310
319
|
async function run() {
|
|
311
320
|
const sdk = new Dub({
|
|
312
|
-
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
313
321
|
workspaceId: "<value>",
|
|
314
322
|
projectSlug: "<value>",
|
|
315
323
|
});
|
|
316
324
|
|
|
317
325
|
const linkId = "<value>";
|
|
326
|
+
const operationSecurity = "<YOUR_BEARER_TOKEN_HERE>";
|
|
318
327
|
|
|
319
|
-
const result = await sdk.links.delete(linkId);
|
|
328
|
+
const result = await sdk.links.delete(operationSecurity, linkId);
|
|
320
329
|
|
|
321
330
|
// Handle the result
|
|
322
331
|
console.log(result)
|
|
@@ -329,6 +338,7 @@ run();
|
|
|
329
338
|
|
|
330
339
|
| Parameter | Type | Required | Description |
|
|
331
340
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
341
|
+
| `security` | [operations.DeleteLinkSecurity](../../models/operations/deletelinksecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
332
342
|
| `linkId` | *string* | :heavy_check_mark: | The id of the link to delete. You can get this via the `getLinkInfo` endpoint. |
|
|
333
343
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
334
344
|
| `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. |
|
|
@@ -363,11 +373,12 @@ import { Dub } from "dub";
|
|
|
363
373
|
|
|
364
374
|
async function run() {
|
|
365
375
|
const sdk = new Dub({
|
|
366
|
-
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
367
376
|
workspaceId: "<value>",
|
|
368
377
|
projectSlug: "<value>",
|
|
369
378
|
});
|
|
370
379
|
|
|
380
|
+
const operationSecurity = "<YOUR_BEARER_TOKEN_HERE>";
|
|
381
|
+
|
|
371
382
|
const result = await sdk.links.createMany([
|
|
372
383
|
{
|
|
373
384
|
url: "https://positive-plane.info",
|
|
@@ -378,7 +389,7 @@ async function run() {
|
|
|
378
389
|
"<value>",
|
|
379
390
|
],
|
|
380
391
|
},
|
|
381
|
-
]);
|
|
392
|
+
], operationSecurity);
|
|
382
393
|
|
|
383
394
|
// Handle the result
|
|
384
395
|
console.log(result)
|
|
@@ -392,6 +403,7 @@ run();
|
|
|
392
403
|
| Parameter | Type | Required | Description |
|
|
393
404
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
394
405
|
| `request` | [operations.RequestBody[]](../../models/.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
406
|
+
| `security` | [operations.BulkCreateLinksSecurity](../../models/operations/bulkcreatelinkssecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
395
407
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
396
408
|
| `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. |
|
|
397
409
|
|
|
@@ -16,12 +16,13 @@ import { Dub } from "dub";
|
|
|
16
16
|
|
|
17
17
|
async function run() {
|
|
18
18
|
const sdk = new Dub({
|
|
19
|
-
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
20
19
|
workspaceId: "<value>",
|
|
21
20
|
projectSlug: "<value>",
|
|
22
21
|
});
|
|
23
22
|
|
|
24
|
-
const
|
|
23
|
+
const operationSecurity = "<YOUR_BEARER_TOKEN_HERE>";
|
|
24
|
+
|
|
25
|
+
const result = await sdk.qrCodes.get({}, operationSecurity);
|
|
25
26
|
|
|
26
27
|
// Handle the result
|
|
27
28
|
console.log(result)
|
|
@@ -35,6 +36,7 @@ run();
|
|
|
35
36
|
| Parameter | Type | Required | Description |
|
|
36
37
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
37
38
|
| `request` | [operations.GetQRCodeRequest](../../models/operations/getqrcoderequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
39
|
+
| `security` | [operations.GetQRCodeSecurity](../../models/operations/getqrcodesecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
38
40
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
39
41
|
| `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. |
|
|
40
42
|
|
package/docs/sdks/tags/README.md
CHANGED
|
@@ -17,12 +17,13 @@ import { Dub } from "dub";
|
|
|
17
17
|
|
|
18
18
|
async function run() {
|
|
19
19
|
const sdk = new Dub({
|
|
20
|
-
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
21
20
|
workspaceId: "<value>",
|
|
22
21
|
projectSlug: "<value>",
|
|
23
22
|
});
|
|
24
23
|
|
|
25
|
-
const
|
|
24
|
+
const operationSecurity = "<YOUR_BEARER_TOKEN_HERE>";
|
|
25
|
+
|
|
26
|
+
const result = await sdk.tags.list({}, operationSecurity);
|
|
26
27
|
|
|
27
28
|
// Handle the result
|
|
28
29
|
console.log(result)
|
|
@@ -36,6 +37,7 @@ run();
|
|
|
36
37
|
| Parameter | Type | Required | Description |
|
|
37
38
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
38
39
|
| `request` | [operations.GetTagsRequest](../../models/operations/gettagsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
40
|
+
| `security` | [operations.GetTagsSecurity](../../models/operations/gettagssecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
39
41
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
40
42
|
| `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. |
|
|
41
43
|
|
|
@@ -69,14 +71,15 @@ import { Dub } from "dub";
|
|
|
69
71
|
|
|
70
72
|
async function run() {
|
|
71
73
|
const sdk = new Dub({
|
|
72
|
-
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
73
74
|
workspaceId: "<value>",
|
|
74
75
|
projectSlug: "<value>",
|
|
75
76
|
});
|
|
76
77
|
|
|
78
|
+
const operationSecurity = "<YOUR_BEARER_TOKEN_HERE>";
|
|
79
|
+
|
|
77
80
|
const result = await sdk.tags.create({
|
|
78
81
|
tag: "<value>",
|
|
79
|
-
});
|
|
82
|
+
}, operationSecurity);
|
|
80
83
|
|
|
81
84
|
// Handle the result
|
|
82
85
|
console.log(result)
|
|
@@ -90,6 +93,7 @@ run();
|
|
|
90
93
|
| Parameter | Type | Required | Description |
|
|
91
94
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
92
95
|
| `request` | [operations.CreateTagRequestBody](../../models/operations/createtagrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
96
|
+
| `security` | [operations.CreateTagSecurity](../../models/operations/createtagsecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
93
97
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
94
98
|
| `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. |
|
|
95
99
|
|
|
@@ -18,12 +18,13 @@ import { Dub } from "dub";
|
|
|
18
18
|
|
|
19
19
|
async function run() {
|
|
20
20
|
const sdk = new Dub({
|
|
21
|
-
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
22
21
|
workspaceId: "<value>",
|
|
23
22
|
projectSlug: "<value>",
|
|
24
23
|
});
|
|
25
24
|
|
|
26
|
-
const
|
|
25
|
+
const operationSecurity = "<YOUR_BEARER_TOKEN_HERE>";
|
|
26
|
+
|
|
27
|
+
const result = await sdk.workspaces.list(operationSecurity);
|
|
27
28
|
|
|
28
29
|
// Handle the result
|
|
29
30
|
console.log(result)
|
|
@@ -36,6 +37,7 @@ run();
|
|
|
36
37
|
|
|
37
38
|
| Parameter | Type | Required | Description |
|
|
38
39
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
40
|
+
| `security` | [operations.GetWorkspacesSecurity](../../models/operations/getworkspacessecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
39
41
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
40
42
|
| `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. |
|
|
41
43
|
|
|
@@ -69,15 +71,16 @@ import { Dub } from "dub";
|
|
|
69
71
|
|
|
70
72
|
async function run() {
|
|
71
73
|
const sdk = new Dub({
|
|
72
|
-
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
73
74
|
workspaceId: "<value>",
|
|
74
75
|
projectSlug: "<value>",
|
|
75
76
|
});
|
|
76
77
|
|
|
78
|
+
const operationSecurity = "<YOUR_BEARER_TOKEN_HERE>";
|
|
79
|
+
|
|
77
80
|
const result = await sdk.workspaces.create({
|
|
78
81
|
name: "<value>",
|
|
79
82
|
slug: "<value>",
|
|
80
|
-
});
|
|
83
|
+
}, operationSecurity);
|
|
81
84
|
|
|
82
85
|
// Handle the result
|
|
83
86
|
console.log(result)
|
|
@@ -91,6 +94,7 @@ run();
|
|
|
91
94
|
| Parameter | Type | Required | Description |
|
|
92
95
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
93
96
|
| `request` | [operations.CreateWorkspaceRequestBody](../../models/operations/createworkspacerequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
97
|
+
| `security` | [operations.CreateWorkspaceSecurity](../../models/operations/createworkspacesecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
94
98
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
95
99
|
| `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. |
|
|
96
100
|
|
|
@@ -124,14 +128,15 @@ import { Dub } from "dub";
|
|
|
124
128
|
|
|
125
129
|
async function run() {
|
|
126
130
|
const sdk = new Dub({
|
|
127
|
-
token: "<YOUR_BEARER_TOKEN_HERE>",
|
|
128
131
|
workspaceId: "<value>",
|
|
129
132
|
projectSlug: "<value>",
|
|
130
133
|
});
|
|
131
134
|
|
|
135
|
+
const operationSecurity = "<YOUR_BEARER_TOKEN_HERE>";
|
|
136
|
+
|
|
132
137
|
const result = await sdk.workspaces.get({
|
|
133
138
|
idOrSlug: "<value>",
|
|
134
|
-
});
|
|
139
|
+
}, operationSecurity);
|
|
135
140
|
|
|
136
141
|
// Handle the result
|
|
137
142
|
console.log(result)
|
|
@@ -145,6 +150,7 @@ run();
|
|
|
145
150
|
| Parameter | Type | Required | Description |
|
|
146
151
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
147
152
|
| `request` | [operations.GetWorkspaceRequest](../../models/operations/getworkspacerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
153
|
+
| `security` | [operations.GetWorkspaceSecurity](../../models/operations/getworkspacesecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
148
154
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
149
155
|
| `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
156
|
|
package/hooks/auth.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/hooks/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,YAAY,EAAE,iBAoB1B,CAAC"}
|
package/hooks/auth.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.injectAPIKey = void 0;
|
|
4
|
+
exports.injectAPIKey = {
|
|
5
|
+
beforeRequest: async (_, request) => {
|
|
6
|
+
var _a;
|
|
7
|
+
const authz = request.headers.get("Authorization");
|
|
8
|
+
if (authz) {
|
|
9
|
+
return request;
|
|
10
|
+
}
|
|
11
|
+
let token = "";
|
|
12
|
+
if (typeof process !== "undefined") {
|
|
13
|
+
token = (_a = process.env["DUB_API_KEY"]) !== null && _a !== void 0 ? _a : "";
|
|
14
|
+
}
|
|
15
|
+
if (!token) {
|
|
16
|
+
throw new Error("The DUB_API_KEY environment variable is missing or empty; either provide it, or instantiate the Dub client with an token option, like new Dub({ token: 'My Token' }).");
|
|
17
|
+
}
|
|
18
|
+
request.headers.set("Authorization", `Bearer ${token}`);
|
|
19
|
+
return request;
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/hooks/auth.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAsB;IAC3C,aAAa,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;;QAChC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QACnD,IAAI,KAAK,EAAE,CAAC;YACR,OAAO,OAAO,CAAC;QACnB,CAAC;QAED,IAAI,KAAK,GAAG,EAAE,CAAC;QACf,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE,CAAC;YACjC,KAAK,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,mCAAI,EAAE,CAAC;QAC7C,CAAC;QAED,IAAI,CAAC,KAAK,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CAAC,uKAAuK,CAAC,CAAC;QAC7L,CAAC;QAED,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,KAAK,EAAE,CAAC,CAAC;QAExD,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-url.d.ts","sourceRoot":"","sources":["../src/hooks/base-url.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,eAAe,EAAE,iBAqB7B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.overrideBaseURL = void 0;
|
|
4
|
+
exports.overrideBaseURL = {
|
|
5
|
+
beforeRequest: async (_, request) => {
|
|
6
|
+
var _a;
|
|
7
|
+
let baseURL = "";
|
|
8
|
+
if (typeof process !== "undefined") {
|
|
9
|
+
baseURL = (_a = process.env["DUB_BASE_URL"]) !== null && _a !== void 0 ? _a : "";
|
|
10
|
+
}
|
|
11
|
+
if (!baseURL) {
|
|
12
|
+
return request;
|
|
13
|
+
}
|
|
14
|
+
const clone = new URL(request.url);
|
|
15
|
+
const base = new URL(baseURL);
|
|
16
|
+
clone.protocol = base.protocol;
|
|
17
|
+
clone.host = base.host;
|
|
18
|
+
clone.port = base.port;
|
|
19
|
+
clone.username = base.username;
|
|
20
|
+
clone.password = base.password;
|
|
21
|
+
return new Request(clone.toString(), request);
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=base-url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-url.js","sourceRoot":"","sources":["../src/hooks/base-url.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAsB;IAC9C,aAAa,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;;QAChC,IAAI,OAAO,GAAG,EAAE,CAAC;QACjB,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE,CAAC;YACjC,OAAO,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,mCAAI,EAAE,CAAC;QAChD,CAAC;QACD,IAAI,CAAC,OAAO,EAAE,CAAC;YACX,OAAO,OAAO,CAAC;QACnB,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACnC,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;QAE9B,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACvB,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACvB,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAE/B,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;CACJ,CAAC"}
|
package/hooks/hooks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks/hooks.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,KAAK,EACL,WAAW,EACX,cAAc,EACjB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks/hooks.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,KAAK,EACL,WAAW,EACX,cAAc,EACjB,MAAM,SAAS,CAAC;AAIjB,qBAAa,QAAS,YAAW,KAAK;IAClC,YAAY,EAAE,WAAW,EAAE,CAAM;IACjC,kBAAkB,EAAE,iBAAiB,EAAE,CAAM;IAC7C,iBAAiB,EAAE,gBAAgB,EAAE,CAAM;IAC3C,eAAe,EAAE,cAAc,EAAE,CAAM;;IAMvC,mBAAmB,CAAC,IAAI,EAAE,WAAW;IAIrC,yBAAyB,CAAC,IAAI,EAAE,iBAAiB;IAIjD,wBAAwB,CAAC,IAAI,EAAE,gBAAgB;IAI/C,sBAAsB,CAAC,IAAI,EAAE,cAAc;IAI3C,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,cAAc;IAIvC,aAAa,CAAC,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAUhF,YAAY,CAAC,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAUjF,UAAU,CACZ,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,QAAQ,GAAG,IAAI,EACzB,KAAK,EAAE,OAAO,GACf,OAAO,CAAC;QAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC;CAY5D"}
|
package/hooks/hooks.js
CHANGED
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SDKHooks = void 0;
|
|
7
|
+
const registration_1 = require("./registration");
|
|
7
8
|
class SDKHooks {
|
|
8
9
|
constructor() {
|
|
9
10
|
this.sdkInitHooks = [];
|
|
10
11
|
this.beforeRequestHooks = [];
|
|
11
12
|
this.afterSuccessHooks = [];
|
|
12
13
|
this.afterErrorHooks = [];
|
|
14
|
+
(0, registration_1.initHooks)(this);
|
|
13
15
|
}
|
|
14
16
|
registerSDKInitHook(hook) {
|
|
15
17
|
this.sdkInitHooks.push(hook);
|
package/hooks/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks/hooks.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAcH,MAAa,QAAQ;IAMjB;QALA,iBAAY,GAAkB,EAAE,CAAC;QACjC,uBAAkB,GAAwB,EAAE,CAAC;QAC7C,sBAAiB,GAAuB,EAAE,CAAC;QAC3C,oBAAe,GAAqB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks/hooks.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAcH,iDAA2C;AAE3C,MAAa,QAAQ;IAMjB;QALA,iBAAY,GAAkB,EAAE,CAAC;QACjC,uBAAkB,GAAwB,EAAE,CAAC;QAC7C,sBAAiB,GAAuB,EAAE,CAAC;QAC3C,oBAAe,GAAqB,EAAE,CAAC;QAGnC,IAAA,wBAAS,EAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAED,mBAAmB,CAAC,IAAiB;QACjC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,yBAAyB,CAAC,IAAuB;QAC7C,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED,wBAAwB,CAAC,IAAsB;QAC3C,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,sBAAsB,CAAC,IAAoB;QACvC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,OAAO,CAAC,IAAoB;QACxB,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;IAC9E,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,OAA6B,EAAE,OAAgB;QAC/D,IAAI,GAAG,GAAG,OAAO,CAAC;QAElB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACzC,GAAG,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QACjD,CAAC;QAED,OAAO,GAAG,CAAC;IACf,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,OAA4B,EAAE,QAAkB;QAC/D,IAAI,GAAG,GAAG,QAAQ,CAAC;QAEnB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACxC,GAAG,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAChD,CAAC;QAED,OAAO,GAAG,CAAC;IACf,CAAC;IAED,KAAK,CAAC,UAAU,CACZ,OAA0B,EAC1B,QAAyB,EACzB,KAAc;QAEd,IAAI,GAAG,GAAG,QAAQ,CAAC;QACnB,IAAI,GAAG,GAAG,KAAK,CAAC;QAEhB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACtC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;YACxD,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;YACtB,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC;QACvB,CAAC;QAED,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;IACzC,CAAC;CACJ;AAlED,4BAkEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registration.d.ts","sourceRoot":"","sources":["../src/hooks/registration.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAQhC,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,QAOrC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initHooks = void 0;
|
|
4
|
+
const auth_1 = require("./auth");
|
|
5
|
+
const base_url_1 = require("./base-url");
|
|
6
|
+
/*
|
|
7
|
+
* This file is only ever generated once on the first generation and then is free to be modified.
|
|
8
|
+
* Any hooks you wish to add should be registered in the initHooks function. Feel free to define them
|
|
9
|
+
* in this file or in separate files in the hooks folder.
|
|
10
|
+
*/
|
|
11
|
+
function initHooks(hooks) {
|
|
12
|
+
// Add hooks by calling hooks.register{ClientInit/BeforeRequest/AfterSuccess/AfterError}Hook
|
|
13
|
+
// with an instance of a hook that implements that specific Hook interface
|
|
14
|
+
// Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance
|
|
15
|
+
hooks.registerBeforeRequestHook(auth_1.injectAPIKey);
|
|
16
|
+
hooks.registerBeforeRequestHook(base_url_1.overrideBaseURL);
|
|
17
|
+
}
|
|
18
|
+
exports.initHooks = initHooks;
|
|
19
|
+
//# sourceMappingURL=registration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registration.js","sourceRoot":"","sources":["../src/hooks/registration.ts"],"names":[],"mappings":";;;AAAA,iCAAsC;AACtC,yCAA6C;AAG7C;;;;GAIG;AAEH,SAAgB,SAAS,CAAC,KAAY;IAClC,4FAA4F;IAC5F,0EAA0E;IAC1E,4FAA4F;IAE5F,KAAK,CAAC,yBAAyB,CAAC,mBAAY,CAAC,CAAC;IAC9C,KAAK,CAAC,yBAAyB,CAAC,0BAAe,CAAC,CAAC;AACrD,CAAC;AAPD,8BAOC"}
|
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.
|
|
36
|
-
genVersion: "2.302.
|
|
37
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
35
|
+
sdkVersion: "0.21.0";
|
|
36
|
+
genVersion: "2.302.1";
|
|
37
|
+
userAgent: "speakeasy-sdk/typescript 0.21.0 2.302.1 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.
|
|
36
|
-
genVersion: "2.302.
|
|
37
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
35
|
+
sdkVersion: "0.21.0",
|
|
36
|
+
genVersion: "2.302.1",
|
|
37
|
+
userAgent: "speakeasy-sdk/typescript 0.21.0 2.302.1 0.0.1 dub",
|
|
38
38
|
});
|
|
39
39
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
+
export type BulkCreateLinksSecurity = {
|
|
3
|
+
token?: string | undefined;
|
|
4
|
+
};
|
|
2
5
|
/**
|
|
3
6
|
* The unique IDs of the tags assigned to the short link.
|
|
4
7
|
*/
|
|
@@ -88,6 +91,17 @@ export type RequestBody = {
|
|
|
88
91
|
comments?: string | null | undefined;
|
|
89
92
|
};
|
|
90
93
|
/** @internal */
|
|
94
|
+
export declare namespace BulkCreateLinksSecurity$ {
|
|
95
|
+
type Inbound = {
|
|
96
|
+
token?: string | undefined;
|
|
97
|
+
};
|
|
98
|
+
const inboundSchema: z.ZodType<BulkCreateLinksSecurity, z.ZodTypeDef, Inbound>;
|
|
99
|
+
type Outbound = {
|
|
100
|
+
token?: string | undefined;
|
|
101
|
+
};
|
|
102
|
+
const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, BulkCreateLinksSecurity>;
|
|
103
|
+
}
|
|
104
|
+
/** @internal */
|
|
91
105
|
export declare namespace BulkCreateLinksTagIds$ {
|
|
92
106
|
type Inbound = string | Array<string>;
|
|
93
107
|
type Outbound = string | Array<string>;
|