@valtown/sdk 0.1.0-alpha.3 → 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 +12 -0
- package/index.d.mts +5 -3
- package/index.d.ts +5 -3
- 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 +4 -1
- package/resources/blobs.d.ts.map +1 -1
- package/resources/blobs.js +3 -1
- package/resources/blobs.js.map +1 -1
- package/resources/blobs.mjs +3 -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 +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 +8 -82
- package/resources/sqlite.d.ts.map +1 -1
- package/resources/sqlite.js +6 -0
- package/resources/sqlite.js.map +1 -1
- package/resources/sqlite.mjs +6 -0
- 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 +5 -3
- package/src/resources/blobs.ts +7 -1
- package/src/resources/index.ts +2 -10
- 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 +9 -93
- 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
|
@@ -9,7 +9,5 @@ export class Search extends APIResource {
|
|
|
9
9
|
|
|
10
10
|
export namespace Search {
|
|
11
11
|
export import Vals = ValsAPI.Vals;
|
|
12
|
-
export import ValListResponse = ValsAPI.ValListResponse;
|
|
13
|
-
export import ValListResponsesPageCursorURL = ValsAPI.ValListResponsesPageCursorURL;
|
|
14
12
|
export import ValListParams = ValsAPI.ValListParams;
|
|
15
13
|
}
|
|
@@ -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,111 +3,28 @@
|
|
|
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 {
|
|
9
|
+
/**
|
|
10
|
+
* Execute a batch of SQLite statements and return results for all of them
|
|
11
|
+
*/
|
|
8
12
|
batch(body: SqliteBatchParams, options?: Core.RequestOptions): Core.APIPromise<SqliteBatchResponse> {
|
|
9
13
|
return this._client.post('/v1/sqlite/batch', { body, ...options });
|
|
10
14
|
}
|
|
11
15
|
|
|
12
|
-
execute(body: SqliteExecuteParams, options?: Core.RequestOptions): Core.APIPromise<SqliteExecuteResponse> {
|
|
13
|
-
return this._client.post('/v1/sqlite/execute', { body, ...options });
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Array of result sets from each of the queries in order
|
|
19
|
-
*/
|
|
20
|
-
export type SqliteBatchResponse = Array<SqliteBatchResponse.SqliteBatchResponseItem>;
|
|
21
|
-
|
|
22
|
-
export namespace SqliteBatchResponse {
|
|
23
16
|
/**
|
|
24
|
-
*
|
|
17
|
+
* Execute a single SQLite statement and return results
|
|
25
18
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
* Names of columns.
|
|
29
|
-
*
|
|
30
|
-
* Names of columns can be defined using the `AS` keyword in SQL:
|
|
31
|
-
*
|
|
32
|
-
* ```sql
|
|
33
|
-
* SELECT author AS author, COUNT(*) AS count FROM books GROUP BY author
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
columns: Array<string>;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Types of columns.
|
|
40
|
-
*
|
|
41
|
-
* The types are currently shown for types declared in a SQL table. For column
|
|
42
|
-
* types of function calls, for example, an empty string is returned.
|
|
43
|
-
*/
|
|
44
|
-
columnTypes: Array<string>;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Rows produced by the statement.
|
|
48
|
-
*/
|
|
49
|
-
rows: Array<unknown>;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Number of rows that were affected by an UPDATE, INSERT or DELETE operation.
|
|
53
|
-
*
|
|
54
|
-
* This value is not specified for other SQL statements.
|
|
55
|
-
*/
|
|
56
|
-
rowsAffected: number;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* ROWID of the last inserted row.
|
|
60
|
-
*
|
|
61
|
-
* This value is not specified if the SQL statement was not an INSERT or if the
|
|
62
|
-
* table was not a ROWID table.
|
|
63
|
-
*/
|
|
64
|
-
lastInsertRowid?: string | number | null;
|
|
19
|
+
execute(body: SqliteExecuteParams, options?: Core.RequestOptions): Core.APIPromise<Shared.ResultSet> {
|
|
20
|
+
return this._client.post('/v1/sqlite/execute', { body, ...options });
|
|
65
21
|
}
|
|
66
22
|
}
|
|
67
23
|
|
|
68
24
|
/**
|
|
69
|
-
*
|
|
25
|
+
* Array of result sets from each of the queries in order
|
|
70
26
|
*/
|
|
71
|
-
export
|
|
72
|
-
/**
|
|
73
|
-
* Names of columns.
|
|
74
|
-
*
|
|
75
|
-
* Names of columns can be defined using the `AS` keyword in SQL:
|
|
76
|
-
*
|
|
77
|
-
* ```sql
|
|
78
|
-
* SELECT author AS author, COUNT(*) AS count FROM books GROUP BY author
|
|
79
|
-
* ```
|
|
80
|
-
*/
|
|
81
|
-
columns: Array<string>;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Types of columns.
|
|
85
|
-
*
|
|
86
|
-
* The types are currently shown for types declared in a SQL table. For column
|
|
87
|
-
* types of function calls, for example, an empty string is returned.
|
|
88
|
-
*/
|
|
89
|
-
columnTypes: Array<string>;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Rows produced by the statement.
|
|
93
|
-
*/
|
|
94
|
-
rows: Array<unknown>;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Number of rows that were affected by an UPDATE, INSERT or DELETE operation.
|
|
98
|
-
*
|
|
99
|
-
* This value is not specified for other SQL statements.
|
|
100
|
-
*/
|
|
101
|
-
rowsAffected: number;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* ROWID of the last inserted row.
|
|
105
|
-
*
|
|
106
|
-
* This value is not specified if the SQL statement was not an INSERT or if the
|
|
107
|
-
* table was not a ROWID table.
|
|
108
|
-
*/
|
|
109
|
-
lastInsertRowid?: string | number | null;
|
|
110
|
-
}
|
|
27
|
+
export type SqliteBatchResponse = Array<Shared.ResultSet>;
|
|
111
28
|
|
|
112
29
|
export interface SqliteBatchParams {
|
|
113
30
|
statements: Array<string | SqliteBatchParams.ParameterizedQuery>;
|
|
@@ -160,7 +77,6 @@ export namespace SqliteExecuteParams {
|
|
|
160
77
|
|
|
161
78
|
export namespace Sqlite {
|
|
162
79
|
export import SqliteBatchResponse = SqliteAPI.SqliteBatchResponse;
|
|
163
|
-
export import SqliteExecuteResponse = SqliteAPI.SqliteExecuteResponse;
|
|
164
80
|
export import SqliteBatchParams = SqliteAPI.SqliteBatchParams;
|
|
165
81
|
export import SqliteExecuteParams = SqliteAPI.SqliteExecuteParams;
|
|
166
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;
|