@valtown/sdk 0.35.0 → 0.37.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 +32 -0
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +8 -29
- package/resources/alias/username/val-name.d.ts +1 -0
- package/resources/alias/username/val-name.d.ts.map +1 -1
- package/resources/alias/username.d.ts +2 -0
- package/resources/alias/username.d.ts.map +1 -0
- package/resources/alias/username.js +19 -0
- package/resources/alias/username.js.map +1 -0
- package/resources/alias/username.mjs +3 -0
- package/resources/alias/username.mjs.map +1 -0
- package/resources/alias.d.ts +2 -0
- package/resources/alias.d.ts.map +1 -0
- package/resources/alias.js +19 -0
- package/resources/alias.js.map +1 -0
- package/resources/alias.mjs +3 -0
- package/resources/alias.mjs.map +1 -0
- 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/me.d.ts +2 -0
- package/resources/me.d.ts.map +1 -0
- package/resources/me.js +19 -0
- package/resources/me.js.map +1 -0
- package/resources/me.mjs +3 -0
- package/resources/me.mjs.map +1 -0
- package/resources/projects/branches.d.ts +4 -0
- package/resources/projects/branches.d.ts.map +1 -1
- package/resources/projects/branches.js +9 -0
- package/resources/projects/branches.js.map +1 -1
- package/resources/projects/branches.mjs +9 -0
- package/resources/projects/branches.mjs.map +1 -1
- package/resources/projects/files.d.ts +48 -59
- package/resources/projects/files.d.ts.map +1 -1
- package/resources/projects/files.js +29 -30
- package/resources/projects/files.js.map +1 -1
- package/resources/projects/files.mjs +28 -28
- package/resources/projects/files.mjs.map +1 -1
- package/resources/projects/index.d.ts +1 -1
- package/resources/projects/index.d.ts.map +1 -1
- package/resources/projects/index.js +1 -2
- package/resources/projects/index.js.map +1 -1
- package/resources/projects/index.mjs +1 -1
- package/resources/projects/index.mjs.map +1 -1
- package/resources/projects/projects.d.ts +6 -3
- package/resources/projects/projects.d.ts.map +1 -1
- package/resources/projects/projects.js +9 -1
- package/resources/projects/projects.js.map +1 -1
- package/resources/projects/projects.mjs +10 -2
- package/resources/projects/projects.mjs.map +1 -1
- package/resources/projects.d.ts +2 -0
- package/resources/projects.d.ts.map +1 -0
- package/resources/projects.js +19 -0
- package/resources/projects.js.map +1 -0
- package/resources/projects.mjs +3 -0
- package/resources/projects.mjs.map +1 -0
- package/resources/search.d.ts +2 -0
- package/resources/search.d.ts.map +1 -0
- package/resources/search.js +19 -0
- package/resources/search.js.map +1 -0
- package/resources/search.mjs +3 -0
- package/resources/search.mjs.map +1 -0
- package/resources/shared.d.ts +2 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/shared.js.map +1 -1
- package/resources/shared.mjs.map +1 -1
- package/resources/users.d.ts +2 -0
- package/resources/users.d.ts.map +1 -0
- package/resources/users.js +19 -0
- package/resources/users.js.map +1 -0
- package/resources/users.mjs +3 -0
- package/resources/users.mjs.map +1 -0
- package/resources/vals/index.d.ts +1 -1
- package/resources/vals/index.d.ts.map +1 -1
- package/resources/vals/index.js.map +1 -1
- package/resources/vals/index.mjs.map +1 -1
- package/resources/vals/vals.d.ts +34 -1
- package/resources/vals/vals.d.ts.map +1 -1
- package/resources/vals/vals.js +6 -0
- package/resources/vals/vals.js.map +1 -1
- package/resources/vals/vals.mjs +6 -0
- package/resources/vals/vals.mjs.map +1 -1
- package/resources/vals.d.ts +2 -0
- package/resources/vals.d.ts.map +1 -0
- package/resources/vals.js +19 -0
- package/resources/vals.js.map +1 -0
- package/resources/vals.mjs +3 -0
- package/resources/vals.mjs.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +18 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/index.ts +4 -0
- package/src/resources/alias/username/val-name.ts +2 -0
- package/src/resources/alias/username.ts +3 -0
- package/src/resources/alias.ts +3 -0
- package/src/resources/index.ts +2 -0
- package/src/resources/me.ts +3 -0
- package/src/resources/projects/branches.ts +10 -0
- package/src/resources/projects/files.ts +64 -110
- package/src/resources/projects/index.ts +1 -3
- package/src/resources/projects/projects.ts +12 -9
- package/src/resources/projects.ts +3 -0
- package/src/resources/search.ts +3 -0
- package/src/resources/shared.ts +4 -0
- package/src/resources/users.ts +3 -0
- package/src/resources/vals/index.ts +2 -0
- package/src/resources/vals/vals.ts +44 -0
- package/src/resources/vals.ts +3 -0
- package/src/resources.ts +1 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
|
-
import { isRequestOptions } from '../../core';
|
|
5
4
|
import * as Core from '../../core';
|
|
6
5
|
import * as Shared from '../shared';
|
|
7
|
-
import { PageCursorURL, type PageCursorURLParams } from '../../pagination';
|
|
8
6
|
import { type Response } from '../../_shims/index';
|
|
9
7
|
|
|
10
8
|
export class Files extends APIResource {
|
|
@@ -13,28 +11,27 @@ export class Files extends APIResource {
|
|
|
13
11
|
*/
|
|
14
12
|
create(
|
|
15
13
|
projectId: string,
|
|
16
|
-
path: string,
|
|
17
14
|
params: FileCreateParams,
|
|
18
15
|
options?: Core.RequestOptions,
|
|
19
16
|
): Core.APIPromise<FileCreateResponse> {
|
|
20
|
-
const { branch_id, ...body } = params;
|
|
21
|
-
return this._client.post(`/v1/projects/${projectId}/files
|
|
22
|
-
query: { branch_id },
|
|
17
|
+
const { path, branch_id, ...body } = params;
|
|
18
|
+
return this._client.post(`/v1/projects/${projectId}/files`, {
|
|
19
|
+
query: { path, branch_id },
|
|
23
20
|
body,
|
|
24
21
|
...options,
|
|
25
22
|
});
|
|
26
23
|
}
|
|
27
24
|
|
|
28
25
|
/**
|
|
29
|
-
* Get metadata for files and directories in a project
|
|
26
|
+
* Get metadata for files and directories in a project. If path is an empty string,
|
|
27
|
+
* returns files at the root directory.
|
|
30
28
|
*/
|
|
31
29
|
retrieve(
|
|
32
30
|
projectId: string,
|
|
33
|
-
path: string,
|
|
34
31
|
query: FileRetrieveParams,
|
|
35
32
|
options?: Core.RequestOptions,
|
|
36
33
|
): Core.APIPromise<FileRetrieveResponse> {
|
|
37
|
-
return this._client.get(`/v1/projects/${projectId}/files
|
|
34
|
+
return this._client.get(`/v1/projects/${projectId}/files`, { query, ...options });
|
|
38
35
|
}
|
|
39
36
|
|
|
40
37
|
/**
|
|
@@ -42,39 +39,28 @@ export class Files extends APIResource {
|
|
|
42
39
|
*/
|
|
43
40
|
update(
|
|
44
41
|
projectId: string,
|
|
45
|
-
|
|
46
|
-
params?: FileUpdateParams,
|
|
47
|
-
options?: Core.RequestOptions,
|
|
48
|
-
): Core.APIPromise<FileUpdateResponse>;
|
|
49
|
-
update(projectId: string, path: string, options?: Core.RequestOptions): Core.APIPromise<FileUpdateResponse>;
|
|
50
|
-
update(
|
|
51
|
-
projectId: string,
|
|
52
|
-
path: string,
|
|
53
|
-
params: FileUpdateParams | Core.RequestOptions = {},
|
|
42
|
+
params: FileUpdateParams,
|
|
54
43
|
options?: Core.RequestOptions,
|
|
55
44
|
): Core.APIPromise<FileUpdateResponse> {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const { branch_id, ...body } = params;
|
|
60
|
-
return this._client.put(`/v1/projects/${projectId}/files/${path}`, {
|
|
61
|
-
query: { branch_id },
|
|
45
|
+
const { path, branch_id, ...body } = params;
|
|
46
|
+
return this._client.put(`/v1/projects/${projectId}/files`, {
|
|
47
|
+
query: { path, branch_id },
|
|
62
48
|
body,
|
|
63
49
|
...options,
|
|
64
50
|
});
|
|
65
51
|
}
|
|
66
52
|
|
|
67
53
|
/**
|
|
68
|
-
*
|
|
54
|
+
* [BETA] Deletes a file or a directory. To delete a directory and all of its
|
|
55
|
+
* children, use the recursive flag. To delete all files, pass in an empty path and
|
|
56
|
+
* the recursive flag.
|
|
69
57
|
*/
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
): Core.PagePromise<FileListResponsesPageCursorURL, FileListResponse> {
|
|
75
|
-
return this._client.getAPIList(`/v1/projects/${projectId}/files`, FileListResponsesPageCursorURL, {
|
|
76
|
-
query,
|
|
58
|
+
delete(projectId: string, params: FileDeleteParams, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
59
|
+
const { path, branch_id, recursive } = params;
|
|
60
|
+
return this._client.delete(`/v1/projects/${projectId}/files`, {
|
|
61
|
+
query: { path, branch_id, recursive },
|
|
77
62
|
...options,
|
|
63
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
78
64
|
});
|
|
79
65
|
}
|
|
80
66
|
|
|
@@ -83,20 +69,9 @@ export class Files extends APIResource {
|
|
|
83
69
|
*/
|
|
84
70
|
getContent(
|
|
85
71
|
projectId: string,
|
|
86
|
-
|
|
87
|
-
params?: FileGetContentParams,
|
|
88
|
-
options?: Core.RequestOptions,
|
|
89
|
-
): Core.APIPromise<Response>;
|
|
90
|
-
getContent(projectId: string, path: string, options?: Core.RequestOptions): Core.APIPromise<Response>;
|
|
91
|
-
getContent(
|
|
92
|
-
projectId: string,
|
|
93
|
-
path: string,
|
|
94
|
-
params: FileGetContentParams | Core.RequestOptions = {},
|
|
72
|
+
params: FileGetContentParams,
|
|
95
73
|
options?: Core.RequestOptions,
|
|
96
74
|
): Core.APIPromise<Response> {
|
|
97
|
-
if (isRequestOptions(params)) {
|
|
98
|
-
return this.getContent(projectId, path, {}, params);
|
|
99
|
-
}
|
|
100
75
|
const {
|
|
101
76
|
'Cache-Control': cacheControl,
|
|
102
77
|
'If-Match': ifMatch,
|
|
@@ -105,7 +80,7 @@ export class Files extends APIResource {
|
|
|
105
80
|
'If-Unmodified-Since': ifUnmodifiedSince,
|
|
106
81
|
...query
|
|
107
82
|
} = params;
|
|
108
|
-
return this._client.get(`/v1/projects/${projectId}/files
|
|
83
|
+
return this._client.get(`/v1/projects/${projectId}/files/content`, {
|
|
109
84
|
query,
|
|
110
85
|
...options,
|
|
111
86
|
headers: {
|
|
@@ -122,8 +97,6 @@ export class Files extends APIResource {
|
|
|
122
97
|
}
|
|
123
98
|
}
|
|
124
99
|
|
|
125
|
-
export class FileListResponsesPageCursorURL extends PageCursorURL<FileListResponse> {}
|
|
126
|
-
|
|
127
100
|
/**
|
|
128
101
|
* A File or Directory's Metadata
|
|
129
102
|
*/
|
|
@@ -291,61 +264,16 @@ export namespace FileUpdateResponse {
|
|
|
291
264
|
}
|
|
292
265
|
}
|
|
293
266
|
|
|
294
|
-
/**
|
|
295
|
-
* A File or Directory's Metadata
|
|
296
|
-
*/
|
|
297
|
-
export interface FileListResponse {
|
|
298
|
-
/**
|
|
299
|
-
* The id of the resource
|
|
300
|
-
*/
|
|
301
|
-
id: string;
|
|
302
|
-
|
|
303
|
-
links: FileListResponse.Links;
|
|
304
|
-
|
|
305
|
-
name: string;
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* The id of the parent resource
|
|
309
|
-
*/
|
|
310
|
-
parentId: string | null;
|
|
311
|
-
|
|
312
|
-
path: string;
|
|
313
|
-
|
|
314
|
-
type: 'directory' | 'file' | 'interval' | 'http' | 'email' | 'script';
|
|
315
|
-
|
|
316
|
-
updatedAt: string;
|
|
317
|
-
|
|
318
|
-
version: number;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
export namespace FileListResponse {
|
|
322
|
-
export interface Links {
|
|
323
|
-
/**
|
|
324
|
-
* The URL of this resource on Val Town
|
|
325
|
-
*/
|
|
326
|
-
html: string;
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* The URL of this resource's source code as a module
|
|
330
|
-
*/
|
|
331
|
-
module: string;
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* The URL of this resource on this API
|
|
335
|
-
*/
|
|
336
|
-
self: string;
|
|
337
|
-
|
|
338
|
-
/**
|
|
339
|
-
* This resource's web endpoint, where it serves a website or API
|
|
340
|
-
*/
|
|
341
|
-
endpoint?: string;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
267
|
export type FileCreateParams = FileCreateParams.Variant0 | FileCreateParams.Variant1;
|
|
346
268
|
|
|
347
269
|
export declare namespace FileCreateParams {
|
|
348
270
|
export interface Variant0 {
|
|
271
|
+
/**
|
|
272
|
+
* Query param: Path to a file or directory (e.g. 'dir/subdir/file.ts'). Pass in an
|
|
273
|
+
* empty string to represent the root directory.
|
|
274
|
+
*/
|
|
275
|
+
path: string;
|
|
276
|
+
|
|
349
277
|
/**
|
|
350
278
|
* Body param:
|
|
351
279
|
*/
|
|
@@ -364,6 +292,12 @@ export declare namespace FileCreateParams {
|
|
|
364
292
|
}
|
|
365
293
|
|
|
366
294
|
export interface Variant1 {
|
|
295
|
+
/**
|
|
296
|
+
* Query param: Path to a file or directory (e.g. 'dir/subdir/file.ts'). Pass in an
|
|
297
|
+
* empty string to represent the root directory.
|
|
298
|
+
*/
|
|
299
|
+
path: string;
|
|
300
|
+
|
|
367
301
|
/**
|
|
368
302
|
* Body param: Project file and val content. An empty string will create an empty
|
|
369
303
|
* file. When creating a directory, the content should be null or undefined.
|
|
@@ -394,11 +328,22 @@ export interface FileRetrieveParams {
|
|
|
394
328
|
*/
|
|
395
329
|
offset: number;
|
|
396
330
|
|
|
331
|
+
/**
|
|
332
|
+
* Path to a file or directory (e.g. 'dir/subdir/file.ts'). Pass in an empty string
|
|
333
|
+
* to represent the root directory.
|
|
334
|
+
*/
|
|
335
|
+
path: string;
|
|
336
|
+
|
|
397
337
|
/**
|
|
398
338
|
* Id to query
|
|
399
339
|
*/
|
|
400
340
|
branch_id?: string;
|
|
401
341
|
|
|
342
|
+
/**
|
|
343
|
+
* Whether to recursively act on all files in the project
|
|
344
|
+
*/
|
|
345
|
+
recursive?: boolean;
|
|
346
|
+
|
|
402
347
|
/**
|
|
403
348
|
* Specific branch version to query
|
|
404
349
|
*/
|
|
@@ -406,6 +351,12 @@ export interface FileRetrieveParams {
|
|
|
406
351
|
}
|
|
407
352
|
|
|
408
353
|
export interface FileUpdateParams {
|
|
354
|
+
/**
|
|
355
|
+
* Query param: Path to a file or directory (e.g. 'dir/subdir/file.ts'). Pass in an
|
|
356
|
+
* empty string to represent the root directory.
|
|
357
|
+
*/
|
|
358
|
+
path: string;
|
|
359
|
+
|
|
409
360
|
/**
|
|
410
361
|
* Query param: The specified branch of the resource. Defaults to main if not
|
|
411
362
|
* provided.
|
|
@@ -434,24 +385,31 @@ export interface FileUpdateParams {
|
|
|
434
385
|
type?: 'file' | 'interval' | 'http' | 'email' | 'script';
|
|
435
386
|
}
|
|
436
387
|
|
|
437
|
-
export interface
|
|
388
|
+
export interface FileDeleteParams {
|
|
438
389
|
/**
|
|
439
|
-
*
|
|
390
|
+
* Path to a file or directory (e.g. 'dir/subdir/file.ts'). Pass in an empty string
|
|
391
|
+
* to represent the root directory.
|
|
440
392
|
*/
|
|
441
|
-
|
|
393
|
+
path: string;
|
|
442
394
|
|
|
443
395
|
/**
|
|
444
|
-
*
|
|
396
|
+
* The specified branch of the resource. Defaults to main if not provided.
|
|
445
397
|
*/
|
|
446
|
-
|
|
398
|
+
branch_id?: string;
|
|
447
399
|
|
|
448
400
|
/**
|
|
449
|
-
*
|
|
401
|
+
* Whether to recursively act on all files in the project
|
|
450
402
|
*/
|
|
451
|
-
|
|
403
|
+
recursive?: boolean;
|
|
452
404
|
}
|
|
453
405
|
|
|
454
406
|
export interface FileGetContentParams {
|
|
407
|
+
/**
|
|
408
|
+
* Query param: Path to a file or directory (e.g. 'dir/subdir/file.ts'). Pass in an
|
|
409
|
+
* empty string to represent the root directory.
|
|
410
|
+
*/
|
|
411
|
+
path: string;
|
|
412
|
+
|
|
455
413
|
/**
|
|
456
414
|
* Query param: Id to query
|
|
457
415
|
*/
|
|
@@ -488,19 +446,15 @@ export interface FileGetContentParams {
|
|
|
488
446
|
'If-Unmodified-Since'?: string;
|
|
489
447
|
}
|
|
490
448
|
|
|
491
|
-
Files.FileListResponsesPageCursorURL = FileListResponsesPageCursorURL;
|
|
492
|
-
|
|
493
449
|
export declare namespace Files {
|
|
494
450
|
export {
|
|
495
451
|
type FileCreateResponse as FileCreateResponse,
|
|
496
452
|
type FileRetrieveResponse as FileRetrieveResponse,
|
|
497
453
|
type FileUpdateResponse as FileUpdateResponse,
|
|
498
|
-
type FileListResponse as FileListResponse,
|
|
499
|
-
FileListResponsesPageCursorURL as FileListResponsesPageCursorURL,
|
|
500
454
|
type FileCreateParams as FileCreateParams,
|
|
501
455
|
type FileRetrieveParams as FileRetrieveParams,
|
|
502
456
|
type FileUpdateParams as FileUpdateParams,
|
|
503
|
-
type
|
|
457
|
+
type FileDeleteParams as FileDeleteParams,
|
|
504
458
|
type FileGetContentParams as FileGetContentParams,
|
|
505
459
|
};
|
|
506
460
|
}
|
|
@@ -10,16 +10,14 @@ export {
|
|
|
10
10
|
type BranchListParams,
|
|
11
11
|
} from './branches';
|
|
12
12
|
export {
|
|
13
|
-
FileListResponsesPageCursorURL,
|
|
14
13
|
Files,
|
|
15
14
|
type FileCreateResponse,
|
|
16
15
|
type FileRetrieveResponse,
|
|
17
16
|
type FileUpdateResponse,
|
|
18
|
-
type FileListResponse,
|
|
19
17
|
type FileCreateParams,
|
|
20
18
|
type FileRetrieveParams,
|
|
21
19
|
type FileUpdateParams,
|
|
22
|
-
type
|
|
20
|
+
type FileDeleteParams,
|
|
23
21
|
type FileGetContentParams,
|
|
24
22
|
} from './files';
|
|
25
23
|
export {
|
|
@@ -16,10 +16,8 @@ import * as FilesAPI from './files';
|
|
|
16
16
|
import {
|
|
17
17
|
FileCreateParams,
|
|
18
18
|
FileCreateResponse,
|
|
19
|
+
FileDeleteParams,
|
|
19
20
|
FileGetContentParams,
|
|
20
|
-
FileListParams,
|
|
21
|
-
FileListResponse,
|
|
22
|
-
FileListResponsesPageCursorURL,
|
|
23
21
|
FileRetrieveParams,
|
|
24
22
|
FileRetrieveResponse,
|
|
25
23
|
FileUpdateParams,
|
|
@@ -58,6 +56,16 @@ export class Projects extends APIResource {
|
|
|
58
56
|
): Core.PagePromise<ProjectListResponsesPageCursorURL, ProjectListResponse> {
|
|
59
57
|
return this._client.getAPIList('/v1/projects', ProjectListResponsesPageCursorURL, { query, ...options });
|
|
60
58
|
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* [BETA] Delete a project
|
|
62
|
+
*/
|
|
63
|
+
delete(projectId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
64
|
+
return this._client.delete(`/v1/projects/${projectId}`, {
|
|
65
|
+
...options,
|
|
66
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
67
|
+
});
|
|
68
|
+
}
|
|
61
69
|
}
|
|
62
70
|
|
|
63
71
|
export class ProjectListResponsesPageCursorURL extends PageCursorURL<ProjectListResponse> {}
|
|
@@ -221,8 +229,6 @@ export interface ProjectCreateParams {
|
|
|
221
229
|
privacy: 'public' | 'unlisted' | 'private';
|
|
222
230
|
|
|
223
231
|
description?: string;
|
|
224
|
-
|
|
225
|
-
imageUrl?: string;
|
|
226
232
|
}
|
|
227
233
|
|
|
228
234
|
export interface ProjectListParams extends PageCursorURLParams {}
|
|
@@ -231,7 +237,6 @@ Projects.ProjectListResponsesPageCursorURL = ProjectListResponsesPageCursorURL;
|
|
|
231
237
|
Projects.Branches = Branches;
|
|
232
238
|
Projects.BranchListResponsesPageCursorURL = BranchListResponsesPageCursorURL;
|
|
233
239
|
Projects.Files = Files;
|
|
234
|
-
Projects.FileListResponsesPageCursorURL = FileListResponsesPageCursorURL;
|
|
235
240
|
|
|
236
241
|
export declare namespace Projects {
|
|
237
242
|
export {
|
|
@@ -258,12 +263,10 @@ export declare namespace Projects {
|
|
|
258
263
|
type FileCreateResponse as FileCreateResponse,
|
|
259
264
|
type FileRetrieveResponse as FileRetrieveResponse,
|
|
260
265
|
type FileUpdateResponse as FileUpdateResponse,
|
|
261
|
-
type FileListResponse as FileListResponse,
|
|
262
|
-
FileListResponsesPageCursorURL as FileListResponsesPageCursorURL,
|
|
263
266
|
type FileCreateParams as FileCreateParams,
|
|
264
267
|
type FileRetrieveParams as FileRetrieveParams,
|
|
265
268
|
type FileUpdateParams as FileUpdateParams,
|
|
266
|
-
type
|
|
269
|
+
type FileDeleteParams as FileDeleteParams,
|
|
267
270
|
type FileGetContentParams as FileGetContentParams,
|
|
268
271
|
};
|
|
269
272
|
}
|
package/src/resources/shared.ts
CHANGED
|
@@ -47,6 +47,8 @@ export interface BasicVal {
|
|
|
47
47
|
*/
|
|
48
48
|
type: 'interval' | 'http' | 'express' | 'email' | 'script' | 'rpc' | 'httpnext';
|
|
49
49
|
|
|
50
|
+
updatedAt: string;
|
|
51
|
+
|
|
50
52
|
/**
|
|
51
53
|
* The URL of this resource on the Val Town website
|
|
52
54
|
*/
|
|
@@ -148,6 +150,8 @@ export interface ExtendedVal {
|
|
|
148
150
|
*/
|
|
149
151
|
type: 'interval' | 'http' | 'express' | 'email' | 'script' | 'rpc' | 'httpnext';
|
|
150
152
|
|
|
153
|
+
updatedAt: string;
|
|
154
|
+
|
|
151
155
|
/**
|
|
152
156
|
* The URL of this resource on the Val Town website
|
|
153
157
|
*/
|
|
@@ -54,6 +54,13 @@ export class Vals extends APIResource {
|
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
/**
|
|
58
|
+
* List all vals including all public vals and your unlisted and private vals
|
|
59
|
+
*/
|
|
60
|
+
list(query: ValListParams, options?: Core.RequestOptions): Core.APIPromise<ValListResponse> {
|
|
61
|
+
return this._client.get('/v1/vals', { query, ...options });
|
|
62
|
+
}
|
|
63
|
+
|
|
57
64
|
/**
|
|
58
65
|
* Delete a val
|
|
59
66
|
*/
|
|
@@ -87,6 +94,18 @@ export class Vals extends APIResource {
|
|
|
87
94
|
}
|
|
88
95
|
}
|
|
89
96
|
|
|
97
|
+
/**
|
|
98
|
+
* A paginated result set
|
|
99
|
+
*/
|
|
100
|
+
export interface ValListResponse {
|
|
101
|
+
data: Array<Shared.ExtendedVal>;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Links to use for pagination
|
|
105
|
+
*/
|
|
106
|
+
links: Shared.PaginationLinks;
|
|
107
|
+
}
|
|
108
|
+
|
|
90
109
|
/**
|
|
91
110
|
* The evaluation_id was successfully searched for and the evaluation was either
|
|
92
111
|
* already done or now has been cancelled
|
|
@@ -151,6 +170,29 @@ export interface ValUpdateParams {
|
|
|
151
170
|
type?: 'httpnext' | 'http' | 'script' | 'email';
|
|
152
171
|
}
|
|
153
172
|
|
|
173
|
+
export interface ValListParams {
|
|
174
|
+
/**
|
|
175
|
+
* Maximum items to return in each paginated response
|
|
176
|
+
*/
|
|
177
|
+
limit: number;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Cursor to start the pagination from
|
|
181
|
+
*/
|
|
182
|
+
cursor?: string;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* This resource's privacy setting. Unlisted resources do not appear on profile
|
|
186
|
+
* pages or elsewhere, but you can link to them.
|
|
187
|
+
*/
|
|
188
|
+
privacy?: 'public' | 'unlisted' | 'private';
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* User ID to filter by
|
|
192
|
+
*/
|
|
193
|
+
userId?: string;
|
|
194
|
+
}
|
|
195
|
+
|
|
154
196
|
export interface ValCreateOrUpdateParams {
|
|
155
197
|
/**
|
|
156
198
|
* Val source code as TypeScript
|
|
@@ -168,9 +210,11 @@ Vals.VersionListResponsesPageCursorURL = VersionListResponsesPageCursorURL;
|
|
|
168
210
|
|
|
169
211
|
export declare namespace Vals {
|
|
170
212
|
export {
|
|
213
|
+
type ValListResponse as ValListResponse,
|
|
171
214
|
type ValCancelEvaluationResponse as ValCancelEvaluationResponse,
|
|
172
215
|
type ValCreateParams as ValCreateParams,
|
|
173
216
|
type ValUpdateParams as ValUpdateParams,
|
|
217
|
+
type ValListParams as ValListParams,
|
|
174
218
|
type ValCreateOrUpdateParams as ValCreateOrUpdateParams,
|
|
175
219
|
};
|
|
176
220
|
|
package/src/resources.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './resources/index';
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.37.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.37.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.37.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|