dub 0.5.0 → 0.7.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/CHANGELOG.md +17 -0
- package/core.d.ts.map +1 -1
- package/core.js +2 -1
- package/core.js.map +1 -1
- package/core.mjs +2 -1
- package/core.mjs.map +1 -1
- package/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/links/bulk.d.ts +9 -8
- package/resources/links/bulk.d.ts.map +1 -1
- package/resources/links/bulk.js.map +1 -1
- package/resources/links/bulk.mjs.map +1 -1
- package/resources/links/info.d.ts +5 -5
- package/resources/links/links.d.ts +50 -35
- package/resources/links/links.d.ts.map +1 -1
- package/resources/links/links.js.map +1 -1
- package/resources/links/links.mjs.map +1 -1
- package/resources/projects/projects.d.ts +2 -2
- package/resources/projects/tags.d.ts +3 -3
- package/resources/qr.d.ts +40 -0
- package/resources/qr.d.ts.map +1 -1
- package/resources/qr.js +8 -0
- package/resources/qr.js.map +1 -1
- package/resources/qr.mjs +8 -0
- package/resources/qr.mjs.map +1 -1
- package/src/core.ts +3 -1
- package/src/index.ts +1 -0
- package/src/resources/index.ts +1 -1
- package/src/resources/links/bulk.ts +9 -8
- package/src/resources/links/info.ts +5 -5
- package/src/resources/links/links.ts +53 -36
- package/src/resources/projects/projects.ts +2 -2
- package/src/resources/projects/tags.ts +3 -3
- package/src/resources/qr.ts +51 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -50,12 +50,13 @@ export interface Link {
|
|
|
50
50
|
*/
|
|
51
51
|
createdAt?: string;
|
|
52
52
|
/**
|
|
53
|
-
* The description of the short link generated via api.dub.co/metatags
|
|
53
|
+
* The description of the short link generated via `api.dub.co/metatags`. Will be
|
|
54
54
|
* used for Custom Social Media Cards if `proxy` is true.
|
|
55
55
|
*/
|
|
56
56
|
description?: string | null;
|
|
57
57
|
/**
|
|
58
|
-
* The domain of the short link.
|
|
58
|
+
* The domain of the short link. If not provided, the primary domain for the
|
|
59
|
+
* project will be used (or `dub.sh` if the project has no domains).
|
|
59
60
|
*/
|
|
60
61
|
domain?: string;
|
|
61
62
|
/**
|
|
@@ -65,12 +66,12 @@ export interface Link {
|
|
|
65
66
|
expiresAt?: string | null;
|
|
66
67
|
/**
|
|
67
68
|
* Geo targeting information for the short link in JSON format {[COUNTRY]:
|
|
68
|
-
*
|
|
69
|
+
* `https://example.com` }. Learn more: `https://dub.sh/geo`
|
|
69
70
|
*/
|
|
70
71
|
geo?: Record<string, string> | null;
|
|
71
72
|
/**
|
|
72
|
-
* The image of the short link generated via api.dub.co/metatags
|
|
73
|
-
* Custom Social Media Cards if `proxy` is true.
|
|
73
|
+
* The image of the short link generated via `api.dub.co/metatags`. Will be used
|
|
74
|
+
* for Custom Social Media Cards if `proxy` is true.
|
|
74
75
|
*/
|
|
75
76
|
image?: string | null;
|
|
76
77
|
/**
|
|
@@ -102,17 +103,27 @@ export interface Link {
|
|
|
102
103
|
* Whether the short link's stats are publicly accessible.
|
|
103
104
|
*/
|
|
104
105
|
publicStats?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* The full URL of the QR code for the short link (e.g.
|
|
108
|
+
* `https://api.dub.co/qr?url=https://dub.sh/try`).
|
|
109
|
+
*/
|
|
110
|
+
qrCode?: string;
|
|
105
111
|
/**
|
|
106
112
|
* Whether the short link uses link cloaking.
|
|
107
113
|
*/
|
|
108
114
|
rewrite?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* The full URL of the short link, including the https protocol (e.g.
|
|
117
|
+
* `https://dub.sh/try`).
|
|
118
|
+
*/
|
|
119
|
+
shortLink?: string;
|
|
109
120
|
/**
|
|
110
121
|
* The unique id of the tag assigned to the short link.
|
|
111
122
|
*/
|
|
112
123
|
tagId?: string | null;
|
|
113
124
|
/**
|
|
114
|
-
* The title of the short link generated via api.dub.co/metatags
|
|
115
|
-
* Custom Social Media Cards if `proxy` is true.
|
|
125
|
+
* The title of the short link generated via `api.dub.co/metatags`. Will be used
|
|
126
|
+
* for Custom Social Media Cards if `proxy` is true.
|
|
116
127
|
*/
|
|
117
128
|
title?: string | null;
|
|
118
129
|
/**
|
|
@@ -152,13 +163,9 @@ export type LinkListResponse = Array<Link>;
|
|
|
152
163
|
export interface LinkCreateParams {
|
|
153
164
|
/**
|
|
154
165
|
* Query param: The slug for the project to create links for. E.g. for
|
|
155
|
-
* app.dub.co/acme
|
|
166
|
+
* `app.dub.co/acme`, the projectSlug is `acme`.
|
|
156
167
|
*/
|
|
157
168
|
projectSlug?: string;
|
|
158
|
-
/**
|
|
159
|
-
* Body param: The domain of the short link.
|
|
160
|
-
*/
|
|
161
|
-
domain: string;
|
|
162
169
|
/**
|
|
163
170
|
* Body param: The destination URL of the short link.
|
|
164
171
|
*/
|
|
@@ -177,10 +184,16 @@ export interface LinkCreateParams {
|
|
|
177
184
|
*/
|
|
178
185
|
comments?: string | null;
|
|
179
186
|
/**
|
|
180
|
-
* Body param: The description of the short link generated via
|
|
181
|
-
* Will be used for Custom Social Media Cards if `proxy` is
|
|
187
|
+
* Body param: The description of the short link generated via
|
|
188
|
+
* `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is
|
|
189
|
+
* true.
|
|
182
190
|
*/
|
|
183
191
|
description?: string | null;
|
|
192
|
+
/**
|
|
193
|
+
* Body param: The domain of the short link. If not provided, the primary domain
|
|
194
|
+
* for the project will be used (or `dub.sh` if the project has no domains).
|
|
195
|
+
*/
|
|
196
|
+
domain?: string;
|
|
184
197
|
/**
|
|
185
198
|
* Body param: The date and time when the short link will expire in ISO-8601
|
|
186
199
|
* format. Must be in the future.
|
|
@@ -188,12 +201,12 @@ export interface LinkCreateParams {
|
|
|
188
201
|
expiresAt?: string | null;
|
|
189
202
|
/**
|
|
190
203
|
* Body param: Geo targeting information for the short link in JSON format
|
|
191
|
-
* {[COUNTRY]:
|
|
204
|
+
* {[COUNTRY]: `https://example.com` }. Learn more: `https://dub.sh/geo`
|
|
192
205
|
*/
|
|
193
206
|
geo?: Record<string, string> | null;
|
|
194
207
|
/**
|
|
195
|
-
* Body param: The image of the short link generated via api.dub.co/metatags
|
|
196
|
-
* be used for Custom Social Media Cards if `proxy` is true.
|
|
208
|
+
* Body param: The image of the short link generated via `api.dub.co/metatags`.
|
|
209
|
+
* Will be used for Custom Social Media Cards if `proxy` is true.
|
|
197
210
|
*/
|
|
198
211
|
image?: string | null;
|
|
199
212
|
/**
|
|
@@ -227,15 +240,15 @@ export interface LinkCreateParams {
|
|
|
227
240
|
*/
|
|
228
241
|
tagId?: string | null;
|
|
229
242
|
/**
|
|
230
|
-
* Body param: The title of the short link generated via api.dub.co/metatags
|
|
231
|
-
* be used for Custom Social Media Cards if `proxy` is true.
|
|
243
|
+
* Body param: The title of the short link generated via `api.dub.co/metatags`.
|
|
244
|
+
* Will be used for Custom Social Media Cards if `proxy` is true.
|
|
232
245
|
*/
|
|
233
246
|
title?: string | null;
|
|
234
247
|
}
|
|
235
248
|
export interface LinkUpdateParams {
|
|
236
249
|
/**
|
|
237
250
|
* Query param: The slug for the project that the link belongs to. E.g. for
|
|
238
|
-
* app.dub.co/acme
|
|
251
|
+
* `app.dub.co/acme`, the projectSlug is `acme`.
|
|
239
252
|
*/
|
|
240
253
|
projectSlug?: string;
|
|
241
254
|
/**
|
|
@@ -252,12 +265,14 @@ export interface LinkUpdateParams {
|
|
|
252
265
|
*/
|
|
253
266
|
comments?: string | null;
|
|
254
267
|
/**
|
|
255
|
-
* Body param: The description of the short link generated via
|
|
256
|
-
* Will be used for Custom Social Media Cards if `proxy` is
|
|
268
|
+
* Body param: The description of the short link generated via
|
|
269
|
+
* `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is
|
|
270
|
+
* true.
|
|
257
271
|
*/
|
|
258
272
|
description?: string | null;
|
|
259
273
|
/**
|
|
260
|
-
* Body param: The domain of the short link.
|
|
274
|
+
* Body param: The domain of the short link. If not provided, the primary domain
|
|
275
|
+
* for the project will be used (or `dub.sh` if the project has no domains).
|
|
261
276
|
*/
|
|
262
277
|
domain?: string;
|
|
263
278
|
/**
|
|
@@ -267,12 +282,12 @@ export interface LinkUpdateParams {
|
|
|
267
282
|
expiresAt?: string | null;
|
|
268
283
|
/**
|
|
269
284
|
* Body param: Geo targeting information for the short link in JSON format
|
|
270
|
-
* {[COUNTRY]:
|
|
285
|
+
* {[COUNTRY]: `https://example.com` }. Learn more: `https://dub.sh/geo`
|
|
271
286
|
*/
|
|
272
287
|
geo?: Record<string, string> | null;
|
|
273
288
|
/**
|
|
274
|
-
* Body param: The image of the short link generated via api.dub.co/metatags
|
|
275
|
-
* be used for Custom Social Media Cards if `proxy` is true.
|
|
289
|
+
* Body param: The image of the short link generated via `api.dub.co/metatags`.
|
|
290
|
+
* Will be used for Custom Social Media Cards if `proxy` is true.
|
|
276
291
|
*/
|
|
277
292
|
image?: string | null;
|
|
278
293
|
/**
|
|
@@ -306,8 +321,8 @@ export interface LinkUpdateParams {
|
|
|
306
321
|
*/
|
|
307
322
|
tagId?: string | null;
|
|
308
323
|
/**
|
|
309
|
-
* Body param: The title of the short link generated via api.dub.co/metatags
|
|
310
|
-
* be used for Custom Social Media Cards if `proxy` is true.
|
|
324
|
+
* Body param: The title of the short link generated via `api.dub.co/metatags`.
|
|
325
|
+
* Will be used for Custom Social Media Cards if `proxy` is true.
|
|
311
326
|
*/
|
|
312
327
|
title?: string | null;
|
|
313
328
|
/**
|
|
@@ -317,12 +332,12 @@ export interface LinkUpdateParams {
|
|
|
317
332
|
}
|
|
318
333
|
export interface LinkListParams {
|
|
319
334
|
/**
|
|
320
|
-
* The slug for the project to retrieve links for. E.g. for app.dub.co/acme
|
|
321
|
-
* projectSlug is
|
|
335
|
+
* The slug for the project to retrieve links for. E.g. for `app.dub.co/acme`, the
|
|
336
|
+
* projectSlug is `acme`.
|
|
322
337
|
*/
|
|
323
338
|
projectSlug?: string;
|
|
324
339
|
/**
|
|
325
|
-
* The domain to filter the links by. E.g.
|
|
340
|
+
* The domain to filter the links by. E.g. `ac.me`. If not provided, all links for
|
|
326
341
|
* the project will be returned.
|
|
327
342
|
*/
|
|
328
343
|
domain?: string;
|
|
@@ -336,12 +351,12 @@ export interface LinkListParams {
|
|
|
336
351
|
*/
|
|
337
352
|
search?: string;
|
|
338
353
|
/**
|
|
339
|
-
* Whether to include archived links in the response. Defaults to false if not
|
|
354
|
+
* Whether to include archived links in the response. Defaults to `false` if not
|
|
340
355
|
* provided.
|
|
341
356
|
*/
|
|
342
357
|
showArchived?: true | false;
|
|
343
358
|
/**
|
|
344
|
-
* The field to sort the links by. The default is
|
|
359
|
+
* The field to sort the links by. The default is `createdAt`, and sort order is
|
|
345
360
|
* always descending.
|
|
346
361
|
*/
|
|
347
362
|
sort?: 'createdAt' | 'clicks' | 'lastClicked';
|
|
@@ -356,8 +371,8 @@ export interface LinkListParams {
|
|
|
356
371
|
}
|
|
357
372
|
export interface LinkDeleteLinkParams {
|
|
358
373
|
/**
|
|
359
|
-
* The slug for the project that the link belongs to. E.g. for app.dub.co/acme
|
|
360
|
-
* projectSlug is
|
|
374
|
+
* The slug for the project that the link belongs to. E.g. for `app.dub.co/acme`,
|
|
375
|
+
* the projectSlug is `acme`.
|
|
361
376
|
*/
|
|
362
377
|
projectSlug?: string;
|
|
363
378
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../src/resources/links/links.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,QAAQ,MAAM,2BAA2B,CAAC;AACtD,OAAO,KAAK,OAAO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EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,MAAsB,EAAE,OAA6B;QACxD,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;IAED;;OAEG;IACH,UAAU,CACR,MAAc,EACd,MAA4B,EAC5B,OAA6B;QAE7B,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;CACF;AA+aD,WAAiB,KAAK;IAON,UAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAEpB,UAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AAGpC,CAAC,EAZgB,KAAK,KAAL,KAAK,QAYrB"}
|
|
@@ -88,8 +88,8 @@ export declare namespace ProjectDetails {
|
|
|
88
88
|
export type ProjectListResponse = Array<Project>;
|
|
89
89
|
export interface ProjectRetrieveParams {
|
|
90
90
|
/**
|
|
91
|
-
* The slug for the project to retrieve. E.g. for app.dub.co/acme
|
|
92
|
-
* is
|
|
91
|
+
* The slug for the project to retrieve. E.g. for `app.dub.co/acme`, the
|
|
92
|
+
* projectSlug is `acme`.
|
|
93
93
|
*/
|
|
94
94
|
projectSlug?: string;
|
|
95
95
|
}
|
|
@@ -29,7 +29,7 @@ export type TagListResponse = Array<Tag>;
|
|
|
29
29
|
export interface TagCreateParams {
|
|
30
30
|
/**
|
|
31
31
|
* Path param: The slug for the project to create tags for. E.g. for
|
|
32
|
-
* app.dub.co/acme
|
|
32
|
+
* `app.dub.co/acme`, the projectSlug is `acme`.
|
|
33
33
|
*/
|
|
34
34
|
projectSlug?: string;
|
|
35
35
|
/**
|
|
@@ -39,8 +39,8 @@ export interface TagCreateParams {
|
|
|
39
39
|
}
|
|
40
40
|
export interface TagListParams {
|
|
41
41
|
/**
|
|
42
|
-
* The slug for the project to retrieve tags for. E.g. for app.dub.co/acme
|
|
43
|
-
* projectSlug is
|
|
42
|
+
* The slug for the project to retrieve tags for. E.g. for `app.dub.co/acme`, the
|
|
43
|
+
* projectSlug is `acme`.
|
|
44
44
|
*/
|
|
45
45
|
projectSlug?: string;
|
|
46
46
|
}
|
package/resources/qr.d.ts
CHANGED
|
@@ -1,4 +1,44 @@
|
|
|
1
|
+
import * as Core from 'dub/core';
|
|
1
2
|
import { APIResource } from 'dub/resource';
|
|
3
|
+
import { type Response } from 'dub/_shims/index';
|
|
4
|
+
import * as QrAPI from 'dub/resources/qr';
|
|
2
5
|
export declare class Qr extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Retrieve a QR code for a link.
|
|
8
|
+
*/
|
|
9
|
+
retrieve(query: QrRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<Response>;
|
|
10
|
+
}
|
|
11
|
+
export interface QrRetrieveParams {
|
|
12
|
+
/**
|
|
13
|
+
* The URL to generate a QR code for. Defaults to `https://dub.co` if not provided.
|
|
14
|
+
*/
|
|
15
|
+
url: string;
|
|
16
|
+
/**
|
|
17
|
+
* The background color of the QR code in hex format. Defaults to `#ffffff` if not
|
|
18
|
+
* provided.
|
|
19
|
+
*/
|
|
20
|
+
bgColor?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The foreground color of the QR code in hex format. Defaults to `#000000` if not
|
|
23
|
+
* provided.
|
|
24
|
+
*/
|
|
25
|
+
fgColor?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Whether to include a margin around the QR code. Defaults to `false` if not
|
|
28
|
+
* provided.
|
|
29
|
+
*/
|
|
30
|
+
includeMargin?: true | false;
|
|
31
|
+
/**
|
|
32
|
+
* The level of error correction to use for the QR code. Defaults to `L` if not
|
|
33
|
+
* provided.
|
|
34
|
+
*/
|
|
35
|
+
level?: 'L' | 'M' | 'Q' | 'H';
|
|
36
|
+
/**
|
|
37
|
+
* The size of the QR code in pixels. Defaults to `600` if not provided.
|
|
38
|
+
*/
|
|
39
|
+
size?: number;
|
|
40
|
+
}
|
|
41
|
+
export declare namespace Qr {
|
|
42
|
+
export import QrRetrieveParams = QrAPI.QrRetrieveParams;
|
|
3
43
|
}
|
|
4
44
|
//# sourceMappingURL=qr.d.ts.map
|
package/resources/qr.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qr.d.ts","sourceRoot":"","sources":["../src/resources/qr.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"qr.d.ts","sourceRoot":"","sources":["../src/resources/qr.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAE1C,qBAAa,EAAG,SAAQ,WAAW;IACjC;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;CAG5F;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,aAAa,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC;IAE7B;;;OAGG;IACH,KAAK,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAE9B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,yBAAiB,EAAE,CAAC;IAClB,MAAM,QAAQ,gBAAgB,GAAG,KAAK,CAAC,gBAAgB,CAAC;CACzD"}
|
package/resources/qr.js
CHANGED
|
@@ -4,6 +4,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Qr = void 0;
|
|
5
5
|
const resource_1 = require("dub/resource");
|
|
6
6
|
class Qr extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve a QR code for a link.
|
|
9
|
+
*/
|
|
10
|
+
retrieve(query, options) {
|
|
11
|
+
return this._client.get('/qr', { query, ...options, __binaryResponse: true });
|
|
12
|
+
}
|
|
7
13
|
}
|
|
8
14
|
exports.Qr = Qr;
|
|
15
|
+
(function (Qr) {
|
|
16
|
+
})(Qr = exports.Qr || (exports.Qr = {}));
|
|
9
17
|
//# sourceMappingURL=qr.js.map
|
package/resources/qr.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qr.js","sourceRoot":"","sources":["../src/resources/qr.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;
|
|
1
|
+
{"version":3,"file":"qr.js","sourceRoot":"","sources":["../src/resources/qr.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,2CAA2C;AAI3C,MAAa,EAAG,SAAQ,sBAAW;IACjC;;OAEG;IACH,QAAQ,CAAC,KAAuB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;IAChF,CAAC;CACF;AAPD,gBAOC;AAsCD,WAAiB,EAAE;AAEnB,CAAC,EAFgB,EAAE,GAAF,UAAE,KAAF,UAAE,QAElB"}
|
package/resources/qr.mjs
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
import { APIResource } from 'dub/resource';
|
|
3
3
|
export class Qr extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Retrieve a QR code for a link.
|
|
6
|
+
*/
|
|
7
|
+
retrieve(query, options) {
|
|
8
|
+
return this._client.get('/qr', { query, ...options, __binaryResponse: true });
|
|
9
|
+
}
|
|
4
10
|
}
|
|
11
|
+
(function (Qr) {
|
|
12
|
+
})(Qr || (Qr = {}));
|
|
5
13
|
//# sourceMappingURL=qr.mjs.map
|
package/resources/qr.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qr.mjs","sourceRoot":"","sources":["../src/resources/qr.ts"],"names":[],"mappings":"AAAA,qDAAqD;
|
|
1
|
+
{"version":3,"file":"qr.mjs","sourceRoot":"","sources":["../src/resources/qr.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,cAAc;AAI1C,MAAM,OAAO,EAAG,SAAQ,WAAW;IACjC;;OAEG;IACH,QAAQ,CAAC,KAAuB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;IAChF,CAAC;CACF;AAsCD,WAAiB,EAAE;AAEnB,CAAC,EAFgB,EAAE,KAAF,EAAE,QAElB"}
|
package/src/core.ts
CHANGED
|
@@ -48,7 +48,9 @@ async function defaultParseResponse<T>(props: APIResponseProps): Promise<T> {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
const contentType = response.headers.get('content-type');
|
|
51
|
-
|
|
51
|
+
const isJSON =
|
|
52
|
+
contentType?.includes('application/json') || contentType?.includes('application/vnd.api+json');
|
|
53
|
+
if (isJSON) {
|
|
52
54
|
const json = await response.json();
|
|
53
55
|
|
|
54
56
|
debug('response', response.status, response.url, response.headers, json);
|
package/src/index.ts
CHANGED
|
@@ -194,6 +194,7 @@ export namespace Dub {
|
|
|
194
194
|
export import LinkDeleteLinkParams = API.LinkDeleteLinkParams;
|
|
195
195
|
|
|
196
196
|
export import Qr = API.Qr;
|
|
197
|
+
export import QrRetrieveParams = API.QrRetrieveParams;
|
|
197
198
|
|
|
198
199
|
export import Projects = API.Projects;
|
|
199
200
|
export import Project = API.Project;
|
package/src/resources/index.ts
CHANGED
|
@@ -20,7 +20,7 @@ export type BulkCreateResponse = Array<LinksAPI.Link>;
|
|
|
20
20
|
export interface BulkCreateParams {
|
|
21
21
|
/**
|
|
22
22
|
* Query param: The slug for the project to create links for. E.g. for
|
|
23
|
-
* app.dub.co/acme
|
|
23
|
+
* `app.dub.co/acme`, the projectSlug is `acme`.
|
|
24
24
|
*/
|
|
25
25
|
projectSlug?: string;
|
|
26
26
|
}
|
|
@@ -43,13 +43,14 @@ export namespace BulkCreateParams {
|
|
|
43
43
|
comments?: string | null;
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
* The description of the short link generated via api.dub.co/metatags
|
|
46
|
+
* The description of the short link generated via `api.dub.co/metatags`. Will be
|
|
47
47
|
* used for Custom Social Media Cards if `proxy` is true.
|
|
48
48
|
*/
|
|
49
49
|
description?: string | null;
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
-
* The domain of the short link.
|
|
52
|
+
* The domain of the short link. If not provided, the primary domain for the
|
|
53
|
+
* project will be used (or `dub.sh` if the project has no domains).
|
|
53
54
|
*/
|
|
54
55
|
domain?: string;
|
|
55
56
|
|
|
@@ -61,13 +62,13 @@ export namespace BulkCreateParams {
|
|
|
61
62
|
|
|
62
63
|
/**
|
|
63
64
|
* Geo targeting information for the short link in JSON format {[COUNTRY]:
|
|
64
|
-
*
|
|
65
|
+
* `https://example.com` }. Learn more: `https://dub.sh/geo`
|
|
65
66
|
*/
|
|
66
67
|
geo?: Record<string, string> | null;
|
|
67
68
|
|
|
68
69
|
/**
|
|
69
|
-
* The image of the short link generated via api.dub.co/metatags
|
|
70
|
-
* Custom Social Media Cards if `proxy` is true.
|
|
70
|
+
* The image of the short link generated via `api.dub.co/metatags`. Will be used
|
|
71
|
+
* for Custom Social Media Cards if `proxy` is true.
|
|
71
72
|
*/
|
|
72
73
|
image?: string | null;
|
|
73
74
|
|
|
@@ -108,8 +109,8 @@ export namespace BulkCreateParams {
|
|
|
108
109
|
tagId?: string | null;
|
|
109
110
|
|
|
110
111
|
/**
|
|
111
|
-
* The title of the short link generated via api.dub.co/metatags
|
|
112
|
-
* Custom Social Media Cards if `proxy` is true.
|
|
112
|
+
* The title of the short link generated via `api.dub.co/metatags`. Will be used
|
|
113
|
+
* for Custom Social Media Cards if `proxy` is true.
|
|
113
114
|
*/
|
|
114
115
|
title?: string | null;
|
|
115
116
|
|
|
@@ -17,19 +17,19 @@ export class Info extends APIResource {
|
|
|
17
17
|
|
|
18
18
|
export interface InfoRetrieveParams {
|
|
19
19
|
/**
|
|
20
|
-
* The domain of the link to retrieve. E.g. for dub.sh/github
|
|
21
|
-
*
|
|
20
|
+
* The domain of the link to retrieve. E.g. for `dub.sh/github`, the domain is
|
|
21
|
+
* `dub.sh`.
|
|
22
22
|
*/
|
|
23
23
|
domain: string;
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* The key of the link to retrieve. E.g. for dub.sh/github
|
|
26
|
+
* The key of the link to retrieve. E.g. for `dub.sh/github`, the key is `github`.
|
|
27
27
|
*/
|
|
28
28
|
key: string;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* The slug for the project that the link belongs to. E.g. for app.dub.co/acme
|
|
32
|
-
* projectSlug is
|
|
31
|
+
* The slug for the project that the link belongs to. E.g. for `app.dub.co/acme`,
|
|
32
|
+
* the projectSlug is `acme`.
|
|
33
33
|
*/
|
|
34
34
|
projectSlug?: string;
|
|
35
35
|
}
|