@valtown/sdk 0.1.0-alpha.2 → 0.1.0-alpha.4
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 +21 -0
- package/index.d.mts +6 -2
- package/index.d.ts +6 -2
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +2 -2
- package/resources/blobs.d.ts +9 -1
- package/resources/blobs.d.ts.map +1 -1
- package/resources/blobs.js +9 -1
- package/resources/blobs.js.map +1 -1
- package/resources/blobs.mjs +9 -1
- package/resources/blobs.mjs.map +1 -1
- package/resources/index.d.ts +3 -3
- 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/index.d.ts +1 -1
- package/resources/me/index.d.ts.map +1 -1
- package/resources/me/index.js +1 -2
- package/resources/me/index.js.map +1 -1
- package/resources/me/index.mjs +1 -1
- package/resources/me/index.mjs.map +1 -1
- package/resources/me/likes.d.ts +5 -32
- package/resources/me/likes.d.ts.map +1 -1
- package/resources/me/likes.js +4 -31
- package/resources/me/likes.js.map +1 -1
- package/resources/me/likes.mjs +3 -6
- package/resources/me/likes.mjs.map +1 -1
- package/resources/me/me.d.ts +0 -2
- package/resources/me/me.d.ts.map +1 -1
- package/resources/me/me.js +0 -1
- package/resources/me/me.js.map +1 -1
- package/resources/me/me.mjs +0 -1
- package/resources/me/me.mjs.map +1 -1
- package/resources/search/index.d.ts +1 -1
- package/resources/search/index.d.ts.map +1 -1
- package/resources/search/index.js +1 -2
- package/resources/search/index.js.map +1 -1
- package/resources/search/index.mjs +1 -1
- package/resources/search/index.mjs.map +1 -1
- package/resources/search/search.d.ts +0 -2
- package/resources/search/search.d.ts.map +1 -1
- package/resources/search/search.js +0 -1
- package/resources/search/search.js.map +1 -1
- package/resources/search/search.mjs +0 -1
- package/resources/search/search.mjs.map +1 -1
- package/resources/search/vals.d.ts +5 -32
- package/resources/search/vals.d.ts.map +1 -1
- package/resources/search/vals.js +4 -31
- package/resources/search/vals.js.map +1 -1
- package/resources/search/vals.mjs +3 -6
- package/resources/search/vals.mjs.map +1 -1
- package/resources/shared.d.ts +114 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/shared.js +5 -0
- package/resources/shared.js.map +1 -1
- package/resources/shared.mjs +3 -1
- package/resources/shared.mjs.map +1 -1
- package/resources/sqlite.d.ts +14 -2
- package/resources/sqlite.d.ts.map +1 -1
- package/resources/sqlite.js +8 -10
- package/resources/sqlite.js.map +1 -1
- package/resources/sqlite.mjs +8 -10
- package/resources/sqlite.mjs.map +1 -1
- package/resources/users/index.d.ts +1 -1
- package/resources/users/index.d.ts.map +1 -1
- package/resources/users/index.js +1 -2
- package/resources/users/index.js.map +1 -1
- package/resources/users/index.mjs +1 -1
- package/resources/users/index.mjs.map +1 -1
- package/resources/users/users.d.ts +0 -2
- package/resources/users/users.d.ts.map +1 -1
- package/resources/users/users.js +0 -1
- package/resources/users/users.js.map +1 -1
- package/resources/users/users.mjs +0 -1
- package/resources/users/users.mjs.map +1 -1
- package/resources/users/vals.d.ts +5 -32
- package/resources/users/vals.d.ts.map +1 -1
- package/resources/users/vals.js +4 -34
- package/resources/users/vals.js.map +1 -1
- package/resources/users/vals.mjs +3 -9
- package/resources/users/vals.mjs.map +1 -1
- package/resources/vals/index.d.ts +2 -2
- 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 +3 -64
- package/resources/vals/vals.d.ts.map +1 -1
- package/resources/vals/vals.js.map +1 -1
- package/resources/vals/vals.mjs.map +1 -1
- package/resources/vals/versions.d.ts +3 -62
- package/resources/vals/versions.d.ts.map +1 -1
- package/resources/vals/versions.js.map +1 -1
- package/resources/vals/versions.mjs.map +1 -1
- package/src/index.ts +6 -2
- package/src/resources/blobs.ts +15 -1
- package/src/resources/index.ts +2 -4
- package/src/resources/me/index.ts +1 -1
- package/src/resources/me/likes.ts +7 -44
- package/src/resources/me/me.ts +0 -2
- package/src/resources/search/index.ts +1 -1
- package/src/resources/search/search.ts +0 -2
- package/src/resources/search/vals.ts +7 -44
- package/src/resources/shared.ts +148 -0
- package/src/resources/sqlite.ts +17 -12
- package/src/resources/users/index.ts +1 -1
- package/src/resources/users/users.ts +0 -2
- package/src/resources/users/vals.ts +7 -47
- package/src/resources/vals/index.ts +0 -4
- package/src/resources/vals/vals.ts +3 -92
- package/src/resources/vals/versions.ts +3 -90
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
import * as Core from "../../core";
|
|
4
4
|
import { APIResource } from "../../resource";
|
|
5
5
|
import * as ValsAPI from "./vals";
|
|
6
|
-
import
|
|
6
|
+
import * as Shared from "../shared";
|
|
7
|
+
import { BasicValsPageCursorURL } from "../shared";
|
|
8
|
+
import { type PageCursorURLParams } from "../../pagination";
|
|
7
9
|
|
|
8
10
|
export class Vals extends APIResource {
|
|
9
11
|
/**
|
|
@@ -12,47 +14,8 @@ export class Vals extends APIResource {
|
|
|
12
14
|
list(
|
|
13
15
|
query: ValListParams,
|
|
14
16
|
options?: Core.RequestOptions,
|
|
15
|
-
): Core.PagePromise<
|
|
16
|
-
return this._client.getAPIList('/v1/search/vals',
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export class ValListResponsesPageCursorURL extends PageCursorURL<ValListResponse> {}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* A Val
|
|
24
|
-
*/
|
|
25
|
-
export interface ValListResponse {
|
|
26
|
-
id: string;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* The user who created this val
|
|
30
|
-
*/
|
|
31
|
-
author: ValListResponse.Author | null;
|
|
32
|
-
|
|
33
|
-
code: string | null;
|
|
34
|
-
|
|
35
|
-
createdAt: string;
|
|
36
|
-
|
|
37
|
-
name: string;
|
|
38
|
-
|
|
39
|
-
privacy: 'public' | 'unlisted' | 'private';
|
|
40
|
-
|
|
41
|
-
public: boolean;
|
|
42
|
-
|
|
43
|
-
type: 'interval' | 'http' | 'express' | 'email' | 'script' | 'rpc';
|
|
44
|
-
|
|
45
|
-
version: number;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export namespace ValListResponse {
|
|
49
|
-
/**
|
|
50
|
-
* The user who created this val
|
|
51
|
-
*/
|
|
52
|
-
export interface Author {
|
|
53
|
-
id: string;
|
|
54
|
-
|
|
55
|
-
username: string | null;
|
|
17
|
+
): Core.PagePromise<BasicValsPageCursorURL, Shared.BasicVal> {
|
|
18
|
+
return this._client.getAPIList('/v1/search/vals', BasicValsPageCursorURL, { query, ...options });
|
|
56
19
|
}
|
|
57
20
|
}
|
|
58
21
|
|
|
@@ -66,7 +29,7 @@ export interface ValListParams extends PageCursorURLParams {
|
|
|
66
29
|
}
|
|
67
30
|
|
|
68
31
|
export namespace Vals {
|
|
69
|
-
export import ValListResponse = ValsAPI.ValListResponse;
|
|
70
|
-
export import ValListResponsesPageCursorURL = ValsAPI.ValListResponsesPageCursorURL;
|
|
71
32
|
export import ValListParams = ValsAPI.ValListParams;
|
|
72
33
|
}
|
|
34
|
+
|
|
35
|
+
export { BasicValsPageCursorURL };
|
package/src/resources/shared.ts
CHANGED
|
@@ -1,5 +1,151 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
import { PageCursorURL } from "../pagination";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A Val
|
|
7
|
+
*/
|
|
8
|
+
export interface BasicVal {
|
|
9
|
+
id: string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The user who created this val
|
|
13
|
+
*/
|
|
14
|
+
author: BasicVal.Author | null;
|
|
15
|
+
|
|
16
|
+
code: string | null;
|
|
17
|
+
|
|
18
|
+
createdAt: string;
|
|
19
|
+
|
|
20
|
+
name: string;
|
|
21
|
+
|
|
22
|
+
privacy: 'public' | 'unlisted' | 'private';
|
|
23
|
+
|
|
24
|
+
public: boolean;
|
|
25
|
+
|
|
26
|
+
type: 'interval' | 'http' | 'express' | 'email' | 'script' | 'rpc';
|
|
27
|
+
|
|
28
|
+
version: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export namespace BasicVal {
|
|
32
|
+
/**
|
|
33
|
+
* The user who created this val
|
|
34
|
+
*/
|
|
35
|
+
export interface Author {
|
|
36
|
+
id: string;
|
|
37
|
+
|
|
38
|
+
username: string | null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* A Val
|
|
44
|
+
*/
|
|
45
|
+
export interface ExtendedVal {
|
|
46
|
+
id: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The user who created this val
|
|
50
|
+
*/
|
|
51
|
+
author: ExtendedVal.Author | null;
|
|
52
|
+
|
|
53
|
+
code: string | null;
|
|
54
|
+
|
|
55
|
+
createdAt: string;
|
|
56
|
+
|
|
57
|
+
likeCount: number;
|
|
58
|
+
|
|
59
|
+
name: string;
|
|
60
|
+
|
|
61
|
+
privacy: 'public' | 'unlisted' | 'private';
|
|
62
|
+
|
|
63
|
+
public: boolean;
|
|
64
|
+
|
|
65
|
+
readme: string | null;
|
|
66
|
+
|
|
67
|
+
referenceCount: number;
|
|
68
|
+
|
|
69
|
+
type: 'interval' | 'http' | 'express' | 'email' | 'script' | 'rpc';
|
|
70
|
+
|
|
71
|
+
version: number;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export namespace ExtendedVal {
|
|
75
|
+
/**
|
|
76
|
+
* The user who created this val
|
|
77
|
+
*/
|
|
78
|
+
export interface Author {
|
|
79
|
+
id: string;
|
|
80
|
+
|
|
81
|
+
username: string | null;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Links to use for pagination
|
|
87
|
+
*/
|
|
88
|
+
export interface PaginationLinks {
|
|
89
|
+
/**
|
|
90
|
+
* URL of this page
|
|
91
|
+
*/
|
|
92
|
+
self: string;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* URL of the next page, if any
|
|
96
|
+
*/
|
|
97
|
+
next?: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* URL of the previous page, if any
|
|
101
|
+
*/
|
|
102
|
+
prev?: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Result of executing an SQL statement.
|
|
107
|
+
*/
|
|
108
|
+
export interface ResultSet {
|
|
109
|
+
/**
|
|
110
|
+
* Names of columns.
|
|
111
|
+
*
|
|
112
|
+
* Names of columns can be defined using the `AS` keyword in SQL:
|
|
113
|
+
*
|
|
114
|
+
* ```sql
|
|
115
|
+
* SELECT author AS author, COUNT(*) AS count FROM books GROUP BY author
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
columns: Array<string>;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Types of columns.
|
|
122
|
+
*
|
|
123
|
+
* The types are currently shown for types declared in a SQL table. For column
|
|
124
|
+
* types of function calls, for example, an empty string is returned.
|
|
125
|
+
*/
|
|
126
|
+
columnTypes: Array<string>;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Rows produced by the statement.
|
|
130
|
+
*/
|
|
131
|
+
rows: Array<unknown>;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Number of rows that were affected by an UPDATE, INSERT or DELETE operation.
|
|
135
|
+
*
|
|
136
|
+
* This value is not specified for other SQL statements.
|
|
137
|
+
*/
|
|
138
|
+
rowsAffected: number;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* ROWID of the last inserted row.
|
|
142
|
+
*
|
|
143
|
+
* This value is not specified if the SQL statement was not an INSERT or if the
|
|
144
|
+
* table was not a ROWID table.
|
|
145
|
+
*/
|
|
146
|
+
lastInsertRowid?: string | number | null;
|
|
147
|
+
}
|
|
148
|
+
|
|
3
149
|
/**
|
|
4
150
|
* User object
|
|
5
151
|
*/
|
|
@@ -21,3 +167,5 @@ export interface User {
|
|
|
21
167
|
*/
|
|
22
168
|
username: string | null;
|
|
23
169
|
}
|
|
170
|
+
|
|
171
|
+
export class BasicValsPageCursorURL extends PageCursorURL<BasicVal> {}
|
package/src/resources/sqlite.ts
CHANGED
|
@@ -3,25 +3,29 @@
|
|
|
3
3
|
import * as Core from "../core";
|
|
4
4
|
import { APIResource } from "../resource";
|
|
5
5
|
import * as SqliteAPI from "./sqlite";
|
|
6
|
+
import * as Shared from "./shared";
|
|
6
7
|
|
|
7
8
|
export class Sqlite extends APIResource {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
9
|
+
/**
|
|
10
|
+
* Execute a batch of SQLite statements and return results for all of them
|
|
11
|
+
*/
|
|
12
|
+
batch(body: SqliteBatchParams, options?: Core.RequestOptions): Core.APIPromise<SqliteBatchResponse> {
|
|
13
|
+
return this._client.post('/v1/sqlite/batch', { body, ...options });
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
});
|
|
16
|
+
/**
|
|
17
|
+
* Execute a single SQLite statement and return results
|
|
18
|
+
*/
|
|
19
|
+
execute(body: SqliteExecuteParams, options?: Core.RequestOptions): Core.APIPromise<Shared.ResultSet> {
|
|
20
|
+
return this._client.post('/v1/sqlite/execute', { body, ...options });
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Array of result sets from each of the queries in order
|
|
26
|
+
*/
|
|
27
|
+
export type SqliteBatchResponse = Array<Shared.ResultSet>;
|
|
28
|
+
|
|
25
29
|
export interface SqliteBatchParams {
|
|
26
30
|
statements: Array<string | SqliteBatchParams.ParameterizedQuery>;
|
|
27
31
|
|
|
@@ -72,6 +76,7 @@ export namespace SqliteExecuteParams {
|
|
|
72
76
|
}
|
|
73
77
|
|
|
74
78
|
export namespace Sqlite {
|
|
79
|
+
export import SqliteBatchResponse = SqliteAPI.SqliteBatchResponse;
|
|
75
80
|
export import SqliteBatchParams = SqliteAPI.SqliteBatchParams;
|
|
76
81
|
export import SqliteExecuteParams = SqliteAPI.SqliteExecuteParams;
|
|
77
82
|
}
|
|
@@ -18,7 +18,5 @@ export class Users extends APIResource {
|
|
|
18
18
|
|
|
19
19
|
export namespace Users {
|
|
20
20
|
export import Vals = ValsAPI.Vals;
|
|
21
|
-
export import ValListResponse = ValsAPI.ValListResponse;
|
|
22
|
-
export import ValListResponsesPageCursorURL = ValsAPI.ValListResponsesPageCursorURL;
|
|
23
21
|
export import ValListParams = ValsAPI.ValListParams;
|
|
24
22
|
}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
import * as Core from "../../core";
|
|
4
4
|
import { APIResource } from "../../resource";
|
|
5
5
|
import * as ValsAPI from "./vals";
|
|
6
|
-
import
|
|
6
|
+
import * as Shared from "../shared";
|
|
7
|
+
import { BasicValsPageCursorURL } from "../shared";
|
|
8
|
+
import { type PageCursorURLParams } from "../../pagination";
|
|
7
9
|
|
|
8
10
|
export class Vals extends APIResource {
|
|
9
11
|
/**
|
|
@@ -13,57 +15,15 @@ export class Vals extends APIResource {
|
|
|
13
15
|
userId: string,
|
|
14
16
|
query: ValListParams,
|
|
15
17
|
options?: Core.RequestOptions,
|
|
16
|
-
): Core.PagePromise<
|
|
17
|
-
return this._client.getAPIList(`/v1/users/${userId}/vals`,
|
|
18
|
-
query,
|
|
19
|
-
...options,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export class ValListResponsesPageCursorURL extends PageCursorURL<ValListResponse> {}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* A Val
|
|
28
|
-
*/
|
|
29
|
-
export interface ValListResponse {
|
|
30
|
-
id: string;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* The user who created this val
|
|
34
|
-
*/
|
|
35
|
-
author: ValListResponse.Author | null;
|
|
36
|
-
|
|
37
|
-
code: string | null;
|
|
38
|
-
|
|
39
|
-
createdAt: string;
|
|
40
|
-
|
|
41
|
-
name: string;
|
|
42
|
-
|
|
43
|
-
privacy: 'public' | 'unlisted' | 'private';
|
|
44
|
-
|
|
45
|
-
public: boolean;
|
|
46
|
-
|
|
47
|
-
type: 'interval' | 'http' | 'express' | 'email' | 'script' | 'rpc';
|
|
48
|
-
|
|
49
|
-
version: number;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export namespace ValListResponse {
|
|
53
|
-
/**
|
|
54
|
-
* The user who created this val
|
|
55
|
-
*/
|
|
56
|
-
export interface Author {
|
|
57
|
-
id: string;
|
|
58
|
-
|
|
59
|
-
username: string | null;
|
|
18
|
+
): Core.PagePromise<BasicValsPageCursorURL, Shared.BasicVal> {
|
|
19
|
+
return this._client.getAPIList(`/v1/users/${userId}/vals`, BasicValsPageCursorURL, { query, ...options });
|
|
60
20
|
}
|
|
61
21
|
}
|
|
62
22
|
|
|
63
23
|
export interface ValListParams extends PageCursorURLParams {}
|
|
64
24
|
|
|
65
25
|
export namespace Vals {
|
|
66
|
-
export import ValListResponse = ValsAPI.ValListResponse;
|
|
67
|
-
export import ValListResponsesPageCursorURL = ValsAPI.ValListResponsesPageCursorURL;
|
|
68
26
|
export import ValListParams = ValsAPI.ValListParams;
|
|
69
27
|
}
|
|
28
|
+
|
|
29
|
+
export { BasicValsPageCursorURL };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
|
-
ValCreateResponse,
|
|
5
|
-
ValRetrieveResponse,
|
|
6
4
|
ValRunAnonymousResponse,
|
|
7
5
|
ValCreateParams,
|
|
8
6
|
ValUpdateParams,
|
|
@@ -13,8 +11,6 @@ export {
|
|
|
13
11
|
Vals,
|
|
14
12
|
} from './vals';
|
|
15
13
|
export {
|
|
16
|
-
VersionCreateResponse,
|
|
17
|
-
VersionRetrieveResponse,
|
|
18
14
|
VersionListResponse,
|
|
19
15
|
VersionCreateParams,
|
|
20
16
|
VersionRetrieveParams,
|
|
@@ -4,6 +4,7 @@ import * as Core from "../../core";
|
|
|
4
4
|
import { APIResource } from "../../resource";
|
|
5
5
|
import { isRequestOptions } from "../../core";
|
|
6
6
|
import * as ValsAPI from "./vals";
|
|
7
|
+
import * as Shared from "../shared";
|
|
7
8
|
import * as VersionsAPI from "./versions";
|
|
8
9
|
|
|
9
10
|
export class Vals extends APIResource {
|
|
@@ -12,14 +13,14 @@ export class Vals extends APIResource {
|
|
|
12
13
|
/**
|
|
13
14
|
* Create a new val
|
|
14
15
|
*/
|
|
15
|
-
create(body: ValCreateParams, options?: Core.RequestOptions): Core.APIPromise<
|
|
16
|
+
create(body: ValCreateParams, options?: Core.RequestOptions): Core.APIPromise<Shared.ExtendedVal> {
|
|
16
17
|
return this._client.post('/v1/vals/', { body, ...options });
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
21
|
* Get a val by id
|
|
21
22
|
*/
|
|
22
|
-
retrieve(valId: string, options?: Core.RequestOptions): Core.APIPromise<
|
|
23
|
+
retrieve(valId: string, options?: Core.RequestOptions): Core.APIPromise<Shared.ExtendedVal> {
|
|
23
24
|
return this._client.get(`/v1/vals/${valId}`, options);
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -115,92 +116,6 @@ export class Vals extends APIResource {
|
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
118
|
|
|
118
|
-
/**
|
|
119
|
-
* A Val
|
|
120
|
-
*/
|
|
121
|
-
export interface ValCreateResponse {
|
|
122
|
-
id: string;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* The user who created this val
|
|
126
|
-
*/
|
|
127
|
-
author: ValCreateResponse.Author | null;
|
|
128
|
-
|
|
129
|
-
code: string | null;
|
|
130
|
-
|
|
131
|
-
createdAt: string;
|
|
132
|
-
|
|
133
|
-
likeCount: number;
|
|
134
|
-
|
|
135
|
-
name: string;
|
|
136
|
-
|
|
137
|
-
privacy: 'public' | 'unlisted' | 'private';
|
|
138
|
-
|
|
139
|
-
public: boolean;
|
|
140
|
-
|
|
141
|
-
readme: string | null;
|
|
142
|
-
|
|
143
|
-
referenceCount: number;
|
|
144
|
-
|
|
145
|
-
type: 'interval' | 'http' | 'express' | 'email' | 'script' | 'rpc';
|
|
146
|
-
|
|
147
|
-
version: number;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export namespace ValCreateResponse {
|
|
151
|
-
/**
|
|
152
|
-
* The user who created this val
|
|
153
|
-
*/
|
|
154
|
-
export interface Author {
|
|
155
|
-
id: string;
|
|
156
|
-
|
|
157
|
-
username: string | null;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* A Val
|
|
163
|
-
*/
|
|
164
|
-
export interface ValRetrieveResponse {
|
|
165
|
-
id: string;
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* The user who created this val
|
|
169
|
-
*/
|
|
170
|
-
author: ValRetrieveResponse.Author | null;
|
|
171
|
-
|
|
172
|
-
code: string | null;
|
|
173
|
-
|
|
174
|
-
createdAt: string;
|
|
175
|
-
|
|
176
|
-
likeCount: number;
|
|
177
|
-
|
|
178
|
-
name: string;
|
|
179
|
-
|
|
180
|
-
privacy: 'public' | 'unlisted' | 'private';
|
|
181
|
-
|
|
182
|
-
public: boolean;
|
|
183
|
-
|
|
184
|
-
readme: string | null;
|
|
185
|
-
|
|
186
|
-
referenceCount: number;
|
|
187
|
-
|
|
188
|
-
type: 'interval' | 'http' | 'express' | 'email' | 'script' | 'rpc';
|
|
189
|
-
|
|
190
|
-
version: number;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export namespace ValRetrieveResponse {
|
|
194
|
-
/**
|
|
195
|
-
* The user who created this val
|
|
196
|
-
*/
|
|
197
|
-
export interface Author {
|
|
198
|
-
id: string;
|
|
199
|
-
|
|
200
|
-
username: string | null;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
119
|
export type ValRunAnonymousResponse = string | number | Record<string, unknown> | Array<unknown> | boolean;
|
|
205
120
|
|
|
206
121
|
export interface ValCreateParams {
|
|
@@ -247,8 +162,6 @@ export interface ValRunGetParams {
|
|
|
247
162
|
}
|
|
248
163
|
|
|
249
164
|
export namespace Vals {
|
|
250
|
-
export import ValCreateResponse = ValsAPI.ValCreateResponse;
|
|
251
|
-
export import ValRetrieveResponse = ValsAPI.ValRetrieveResponse;
|
|
252
165
|
export import ValRunAnonymousResponse = ValsAPI.ValRunAnonymousResponse;
|
|
253
166
|
export import ValCreateParams = ValsAPI.ValCreateParams;
|
|
254
167
|
export import ValUpdateParams = ValsAPI.ValUpdateParams;
|
|
@@ -257,8 +170,6 @@ export namespace Vals {
|
|
|
257
170
|
export import ValRunAnonymousParams = ValsAPI.ValRunAnonymousParams;
|
|
258
171
|
export import ValRunGetParams = ValsAPI.ValRunGetParams;
|
|
259
172
|
export import Versions = VersionsAPI.Versions;
|
|
260
|
-
export import VersionCreateResponse = VersionsAPI.VersionCreateResponse;
|
|
261
|
-
export import VersionRetrieveResponse = VersionsAPI.VersionRetrieveResponse;
|
|
262
173
|
export import VersionListResponse = VersionsAPI.VersionListResponse;
|
|
263
174
|
export import VersionListResponsesPageCursorURL = VersionsAPI.VersionListResponsesPageCursorURL;
|
|
264
175
|
export import VersionCreateParams = VersionsAPI.VersionCreateParams;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as Core from "../../core";
|
|
4
4
|
import { APIResource } from "../../resource";
|
|
5
5
|
import * as VersionsAPI from "./versions";
|
|
6
|
+
import * as Shared from "../shared";
|
|
6
7
|
import { PageCursorURL, type PageCursorURLParams } from "../../pagination";
|
|
7
8
|
|
|
8
9
|
export class Versions extends APIResource {
|
|
@@ -13,7 +14,7 @@ export class Versions extends APIResource {
|
|
|
13
14
|
valId: string,
|
|
14
15
|
body: VersionCreateParams,
|
|
15
16
|
options?: Core.RequestOptions,
|
|
16
|
-
): Core.APIPromise<
|
|
17
|
+
): Core.APIPromise<Shared.ExtendedVal> {
|
|
17
18
|
return this._client.post(`/v1/vals/${valId}/versions`, { body, ...options });
|
|
18
19
|
}
|
|
19
20
|
|
|
@@ -25,7 +26,7 @@ export class Versions extends APIResource {
|
|
|
25
26
|
version: number,
|
|
26
27
|
query: VersionRetrieveParams,
|
|
27
28
|
options?: Core.RequestOptions,
|
|
28
|
-
): Core.APIPromise<
|
|
29
|
+
): Core.APIPromise<Shared.ExtendedVal> {
|
|
29
30
|
return this._client.get(`/v1/vals/${valId}/versions/${version}`, { query, ...options });
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -56,92 +57,6 @@ export class Versions extends APIResource {
|
|
|
56
57
|
|
|
57
58
|
export class VersionListResponsesPageCursorURL extends PageCursorURL<VersionListResponse> {}
|
|
58
59
|
|
|
59
|
-
/**
|
|
60
|
-
* A Val
|
|
61
|
-
*/
|
|
62
|
-
export interface VersionCreateResponse {
|
|
63
|
-
id: string;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* The user who created this val
|
|
67
|
-
*/
|
|
68
|
-
author: VersionCreateResponse.Author | null;
|
|
69
|
-
|
|
70
|
-
code: string | null;
|
|
71
|
-
|
|
72
|
-
createdAt: string;
|
|
73
|
-
|
|
74
|
-
likeCount: number;
|
|
75
|
-
|
|
76
|
-
name: string;
|
|
77
|
-
|
|
78
|
-
privacy: 'public' | 'unlisted' | 'private';
|
|
79
|
-
|
|
80
|
-
public: boolean;
|
|
81
|
-
|
|
82
|
-
readme: string | null;
|
|
83
|
-
|
|
84
|
-
referenceCount: number;
|
|
85
|
-
|
|
86
|
-
type: 'interval' | 'http' | 'express' | 'email' | 'script' | 'rpc';
|
|
87
|
-
|
|
88
|
-
version: number;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export namespace VersionCreateResponse {
|
|
92
|
-
/**
|
|
93
|
-
* The user who created this val
|
|
94
|
-
*/
|
|
95
|
-
export interface Author {
|
|
96
|
-
id: string;
|
|
97
|
-
|
|
98
|
-
username: string | null;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* A Val
|
|
104
|
-
*/
|
|
105
|
-
export interface VersionRetrieveResponse {
|
|
106
|
-
id: string;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* The user who created this val
|
|
110
|
-
*/
|
|
111
|
-
author: VersionRetrieveResponse.Author | null;
|
|
112
|
-
|
|
113
|
-
code: string | null;
|
|
114
|
-
|
|
115
|
-
createdAt: string;
|
|
116
|
-
|
|
117
|
-
likeCount: number;
|
|
118
|
-
|
|
119
|
-
name: string;
|
|
120
|
-
|
|
121
|
-
privacy: 'public' | 'unlisted' | 'private';
|
|
122
|
-
|
|
123
|
-
public: boolean;
|
|
124
|
-
|
|
125
|
-
readme: string | null;
|
|
126
|
-
|
|
127
|
-
referenceCount: number;
|
|
128
|
-
|
|
129
|
-
type: 'interval' | 'http' | 'express' | 'email' | 'script' | 'rpc';
|
|
130
|
-
|
|
131
|
-
version: number;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export namespace VersionRetrieveResponse {
|
|
135
|
-
/**
|
|
136
|
-
* The user who created this val
|
|
137
|
-
*/
|
|
138
|
-
export interface Author {
|
|
139
|
-
id: string;
|
|
140
|
-
|
|
141
|
-
username: string | null;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
60
|
export interface VersionListResponse {
|
|
146
61
|
createdAt: string;
|
|
147
62
|
|
|
@@ -171,8 +86,6 @@ export interface VersionRetrieveParams {
|
|
|
171
86
|
export interface VersionListParams extends PageCursorURLParams {}
|
|
172
87
|
|
|
173
88
|
export namespace Versions {
|
|
174
|
-
export import VersionCreateResponse = VersionsAPI.VersionCreateResponse;
|
|
175
|
-
export import VersionRetrieveResponse = VersionsAPI.VersionRetrieveResponse;
|
|
176
89
|
export import VersionListResponse = VersionsAPI.VersionListResponse;
|
|
177
90
|
export import VersionListResponsesPageCursorURL = VersionsAPI.VersionListResponsesPageCursorURL;
|
|
178
91
|
export import VersionCreateParams = VersionsAPI.VersionCreateParams;
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.4'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.1.0-alpha.4";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
|
-
exports.VERSION = '0.1.0-alpha.
|
|
4
|
+
exports.VERSION = '0.1.0-alpha.4'; // x-release-please-version
|
|
5
5
|
//# sourceMappingURL=version.js.map
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.4'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|