dub 0.8.0 → 0.9.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 +8 -0
- package/README.md +27 -23
- package/index.d.mts +5 -3
- package/index.d.ts +5 -3
- package/index.d.ts.map +1 -1
- package/index.js +4 -0
- package/index.js.map +1 -1
- package/index.mjs +4 -0
- package/index.mjs.map +1 -1
- package/package.json +3 -1
- package/resources/index.d.ts +2 -2
- 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 +163 -11
- 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/index.d.ts +2 -2
- package/resources/links/index.d.ts.map +1 -1
- package/resources/links/index.js.map +1 -1
- package/resources/links/index.mjs.map +1 -1
- package/resources/links/info.d.ts +156 -5
- package/resources/links/info.d.ts.map +1 -1
- package/resources/links/info.js.map +1 -1
- package/resources/links/info.mjs.map +1 -1
- package/resources/links/links.d.ts +529 -66
- 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/index.d.ts +2 -2
- package/resources/projects/index.d.ts.map +1 -1
- package/resources/projects/index.js.map +1 -1
- package/resources/projects/index.mjs.map +1 -1
- package/resources/projects/projects.d.ts +135 -31
- package/resources/projects/projects.d.ts.map +1 -1
- package/resources/projects/projects.js.map +1 -1
- package/resources/projects/projects.mjs.map +1 -1
- package/resources/projects/tags.d.ts +0 -18
- package/resources/projects/tags.d.ts.map +1 -1
- package/resources/projects/tags.js +0 -2
- package/resources/projects/tags.js.map +1 -1
- package/resources/projects/tags.mjs +0 -2
- package/resources/projects/tags.mjs.map +1 -1
- package/resources/qr.d.ts +7 -6
- package/resources/qr.d.ts.map +1 -1
- package/resources/qr.js +5 -4
- package/resources/qr.js.map +1 -1
- package/resources/qr.mjs +5 -4
- package/resources/qr.mjs.map +1 -1
- package/src/index.ts +9 -3
- package/src/resources/index.ts +4 -3
- package/src/resources/links/bulk.ts +198 -12
- package/src/resources/links/index.ts +4 -2
- package/src/resources/links/info.ts +190 -5
- package/src/resources/links/links.ts +637 -67
- package/src/resources/projects/index.ts +2 -2
- package/src/resources/projects/projects.ts +166 -31
- package/src/resources/projects/tags.ts +0 -22
- package/src/resources/qr.ts +16 -7
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
3
|
+
export { ProjectRetrieveResponse, ProjectListResponse, ProjectRetrieveParams, Projects } from './projects';
|
|
4
|
+
export { Tags } from './tags';
|
|
@@ -11,7 +11,10 @@ export class Projects extends APIResource {
|
|
|
11
11
|
/**
|
|
12
12
|
* Retrieve a project for the authenticated user.
|
|
13
13
|
*/
|
|
14
|
-
retrieve(
|
|
14
|
+
retrieve(
|
|
15
|
+
params: ProjectRetrieveParams,
|
|
16
|
+
options?: Core.RequestOptions,
|
|
17
|
+
): Core.APIPromise<ProjectRetrieveResponse> {
|
|
15
18
|
const { projectSlug = this._client.projectSlug } = params;
|
|
16
19
|
return this._client.get(`/projects/${projectSlug}`, options);
|
|
17
20
|
}
|
|
@@ -24,93 +27,227 @@ export class Projects extends APIResource {
|
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
29
|
|
|
27
|
-
export interface
|
|
30
|
+
export interface ProjectRetrieveResponse {
|
|
28
31
|
/**
|
|
29
32
|
* The unique ID of the project.
|
|
30
33
|
*/
|
|
31
|
-
id
|
|
34
|
+
id: string;
|
|
32
35
|
|
|
33
36
|
/**
|
|
34
37
|
* The date and time when the billing cycle starts for the project.
|
|
35
38
|
*/
|
|
36
|
-
billingCycleStart
|
|
39
|
+
billingCycleStart: number;
|
|
37
40
|
|
|
38
41
|
/**
|
|
39
42
|
* The date and time when the project was created.
|
|
40
43
|
*/
|
|
41
|
-
createdAt
|
|
44
|
+
createdAt: string;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The domains of the project.
|
|
48
|
+
*/
|
|
49
|
+
domains: Array<ProjectRetrieveResponse.Domain>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The domains limit of the project.
|
|
53
|
+
*/
|
|
54
|
+
domainsLimit: number;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The links limit of the project.
|
|
58
|
+
*/
|
|
59
|
+
linksLimit: number;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The links usage of the project.
|
|
63
|
+
*/
|
|
64
|
+
linksUsage: number;
|
|
42
65
|
|
|
43
66
|
/**
|
|
44
67
|
* The logo of the project.
|
|
45
68
|
*/
|
|
46
|
-
logo
|
|
69
|
+
logo: string | null;
|
|
70
|
+
|
|
71
|
+
metadata: ProjectRetrieveResponse.Metadata;
|
|
47
72
|
|
|
48
73
|
/**
|
|
49
74
|
* The name of the project.
|
|
50
75
|
*/
|
|
51
|
-
name
|
|
76
|
+
name: string;
|
|
52
77
|
|
|
53
78
|
/**
|
|
54
79
|
* The plan of the project.
|
|
55
80
|
*/
|
|
56
|
-
plan
|
|
81
|
+
plan: 'free' | 'pro' | 'business' | 'business plus' | 'business extra' | 'business max' | 'enterprise';
|
|
57
82
|
|
|
58
83
|
/**
|
|
59
84
|
* The slug of the project.
|
|
60
85
|
*/
|
|
61
|
-
slug
|
|
86
|
+
slug: string;
|
|
62
87
|
|
|
63
88
|
/**
|
|
64
89
|
* The Stripe ID of the project.
|
|
65
90
|
*/
|
|
66
|
-
stripeId
|
|
91
|
+
stripeId: string | null;
|
|
67
92
|
|
|
68
93
|
/**
|
|
69
|
-
* The
|
|
94
|
+
* The tags limit of the project.
|
|
70
95
|
*/
|
|
71
|
-
|
|
96
|
+
tagsLimit: number;
|
|
72
97
|
|
|
73
98
|
/**
|
|
74
|
-
* The usage
|
|
99
|
+
* The usage of the project.
|
|
75
100
|
*/
|
|
76
|
-
|
|
77
|
-
}
|
|
101
|
+
usage: number;
|
|
78
102
|
|
|
79
|
-
export interface ProjectDetails extends Project {
|
|
80
103
|
/**
|
|
81
|
-
* The
|
|
104
|
+
* The usage limit of the project.
|
|
82
105
|
*/
|
|
83
|
-
|
|
106
|
+
usageLimit: number;
|
|
84
107
|
|
|
85
108
|
/**
|
|
86
109
|
* The role of the authenticated user in the project.
|
|
87
110
|
*/
|
|
88
|
-
users
|
|
89
|
-
}
|
|
111
|
+
users: Array<ProjectRetrieveResponse.User>;
|
|
90
112
|
|
|
91
|
-
export namespace ProjectDetails {
|
|
92
113
|
/**
|
|
93
|
-
* The
|
|
114
|
+
* The users limit of the project.
|
|
94
115
|
*/
|
|
116
|
+
usersLimit: number;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export namespace ProjectRetrieveResponse {
|
|
95
120
|
export interface Domain {
|
|
96
121
|
/**
|
|
97
122
|
* The domain of the project.
|
|
98
123
|
*/
|
|
99
|
-
slug
|
|
124
|
+
slug: string;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface Metadata {
|
|
128
|
+
defaultDomains: Array<string>;
|
|
100
129
|
}
|
|
101
130
|
|
|
102
|
-
/**
|
|
103
|
-
* The role of the authenticated user in the project.
|
|
104
|
-
*/
|
|
105
131
|
export interface User {
|
|
106
132
|
/**
|
|
107
133
|
* The role of the authenticated user in the project.
|
|
108
134
|
*/
|
|
109
|
-
role
|
|
135
|
+
role: 'owner' | 'member';
|
|
110
136
|
}
|
|
111
137
|
}
|
|
112
138
|
|
|
113
|
-
export type ProjectListResponse = Array<
|
|
139
|
+
export type ProjectListResponse = Array<ProjectListResponse.ProjectListResponseItem>;
|
|
140
|
+
|
|
141
|
+
export namespace ProjectListResponse {
|
|
142
|
+
export interface ProjectListResponseItem {
|
|
143
|
+
/**
|
|
144
|
+
* The unique ID of the project.
|
|
145
|
+
*/
|
|
146
|
+
id: string;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The date and time when the billing cycle starts for the project.
|
|
150
|
+
*/
|
|
151
|
+
billingCycleStart: number;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The date and time when the project was created.
|
|
155
|
+
*/
|
|
156
|
+
createdAt: string;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The domains of the project.
|
|
160
|
+
*/
|
|
161
|
+
domains: Array<ProjectListResponseItem.Domain>;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* The domains limit of the project.
|
|
165
|
+
*/
|
|
166
|
+
domainsLimit: number;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The links limit of the project.
|
|
170
|
+
*/
|
|
171
|
+
linksLimit: number;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The links usage of the project.
|
|
175
|
+
*/
|
|
176
|
+
linksUsage: number;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The logo of the project.
|
|
180
|
+
*/
|
|
181
|
+
logo: string | null;
|
|
182
|
+
|
|
183
|
+
metadata: ProjectListResponseItem.Metadata;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* The name of the project.
|
|
187
|
+
*/
|
|
188
|
+
name: string;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* The plan of the project.
|
|
192
|
+
*/
|
|
193
|
+
plan: 'free' | 'pro' | 'business' | 'business plus' | 'business extra' | 'business max' | 'enterprise';
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* The slug of the project.
|
|
197
|
+
*/
|
|
198
|
+
slug: string;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* The Stripe ID of the project.
|
|
202
|
+
*/
|
|
203
|
+
stripeId: string | null;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* The tags limit of the project.
|
|
207
|
+
*/
|
|
208
|
+
tagsLimit: number;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* The usage of the project.
|
|
212
|
+
*/
|
|
213
|
+
usage: number;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* The usage limit of the project.
|
|
217
|
+
*/
|
|
218
|
+
usageLimit: number;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* The role of the authenticated user in the project.
|
|
222
|
+
*/
|
|
223
|
+
users: Array<ProjectListResponseItem.User>;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* The users limit of the project.
|
|
227
|
+
*/
|
|
228
|
+
usersLimit: number;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export namespace ProjectListResponseItem {
|
|
232
|
+
export interface Domain {
|
|
233
|
+
/**
|
|
234
|
+
* The domain of the project.
|
|
235
|
+
*/
|
|
236
|
+
slug: string;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export interface Metadata {
|
|
240
|
+
defaultDomains: Array<string>;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export interface User {
|
|
244
|
+
/**
|
|
245
|
+
* The role of the authenticated user in the project.
|
|
246
|
+
*/
|
|
247
|
+
role: 'owner' | 'member';
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
114
251
|
|
|
115
252
|
export interface ProjectRetrieveParams {
|
|
116
253
|
/**
|
|
@@ -121,10 +258,8 @@ export interface ProjectRetrieveParams {
|
|
|
121
258
|
}
|
|
122
259
|
|
|
123
260
|
export namespace Projects {
|
|
124
|
-
export import
|
|
125
|
-
export import ProjectDetails = ProjectsAPI.ProjectDetails;
|
|
261
|
+
export import ProjectRetrieveResponse = ProjectsAPI.ProjectRetrieveResponse;
|
|
126
262
|
export import ProjectListResponse = ProjectsAPI.ProjectListResponse;
|
|
127
263
|
export import ProjectRetrieveParams = ProjectsAPI.ProjectRetrieveParams;
|
|
128
264
|
export import Tags = TagsAPI.Tags;
|
|
129
|
-
export import Tag = TagsAPI.Tag;
|
|
130
265
|
}
|
|
@@ -1,27 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from "../../resource";
|
|
4
|
-
import * as TagsAPI from "./tags";
|
|
5
4
|
|
|
6
5
|
export class Tags extends APIResource {}
|
|
7
|
-
|
|
8
|
-
export interface Tag {
|
|
9
|
-
/**
|
|
10
|
-
* The unique ID of the tag.
|
|
11
|
-
*/
|
|
12
|
-
id?: string;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* The color of the tag.
|
|
16
|
-
*/
|
|
17
|
-
color?: string;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* The name of the tag.
|
|
21
|
-
*/
|
|
22
|
-
name?: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export namespace Tags {
|
|
26
|
-
export import Tag = TagsAPI.Tag;
|
|
27
|
-
}
|
package/src/resources/qr.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as Core from "../core";
|
|
4
4
|
import { APIResource } from "../resource";
|
|
5
|
+
import { isRequestOptions } from "../core";
|
|
5
6
|
import { type Response } from "../_shims/index";
|
|
6
7
|
import * as QrAPI from "./qr";
|
|
7
8
|
|
|
@@ -9,17 +10,20 @@ export class Qr extends APIResource {
|
|
|
9
10
|
/**
|
|
10
11
|
* Retrieve a QR code for a link.
|
|
11
12
|
*/
|
|
12
|
-
retrieve(query
|
|
13
|
+
retrieve(query?: QrRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<Response>;
|
|
14
|
+
retrieve(options?: Core.RequestOptions): Core.APIPromise<Response>;
|
|
15
|
+
retrieve(
|
|
16
|
+
query: QrRetrieveParams | Core.RequestOptions = {},
|
|
17
|
+
options?: Core.RequestOptions,
|
|
18
|
+
): Core.APIPromise<Response> {
|
|
19
|
+
if (isRequestOptions(query)) {
|
|
20
|
+
return this.retrieve({}, query);
|
|
21
|
+
}
|
|
13
22
|
return this._client.get('/qr', { query, ...options, __binaryResponse: true });
|
|
14
23
|
}
|
|
15
24
|
}
|
|
16
25
|
|
|
17
26
|
export interface QrRetrieveParams {
|
|
18
|
-
/**
|
|
19
|
-
* The URL to generate a QR code for. Defaults to `https://dub.co` if not provided.
|
|
20
|
-
*/
|
|
21
|
-
url: string;
|
|
22
|
-
|
|
23
27
|
/**
|
|
24
28
|
* The background color of the QR code in hex format. Defaults to `#ffffff` if not
|
|
25
29
|
* provided.
|
|
@@ -36,7 +40,7 @@ export interface QrRetrieveParams {
|
|
|
36
40
|
* Whether to include a margin around the QR code. Defaults to `false` if not
|
|
37
41
|
* provided.
|
|
38
42
|
*/
|
|
39
|
-
includeMargin?:
|
|
43
|
+
includeMargin?: boolean;
|
|
40
44
|
|
|
41
45
|
/**
|
|
42
46
|
* The level of error correction to use for the QR code. Defaults to `L` if not
|
|
@@ -48,6 +52,11 @@ export interface QrRetrieveParams {
|
|
|
48
52
|
* The size of the QR code in pixels. Defaults to `600` if not provided.
|
|
49
53
|
*/
|
|
50
54
|
size?: number;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The URL to generate a QR code for. Defaults to `https://dub.co` if not provided.
|
|
58
|
+
*/
|
|
59
|
+
url?: string;
|
|
51
60
|
}
|
|
52
61
|
|
|
53
62
|
export namespace Qr {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.9.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.9.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.9.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|