@valtown/sdk 0.1.0-alpha.1
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 +39 -0
- package/LICENSE +7 -0
- package/README.md +288 -0
- package/_shims/MultipartBody.d.ts +9 -0
- package/_shims/MultipartBody.d.ts.map +1 -0
- package/_shims/MultipartBody.js +16 -0
- package/_shims/MultipartBody.js.map +1 -0
- package/_shims/MultipartBody.mjs +12 -0
- package/_shims/MultipartBody.mjs.map +1 -0
- package/_shims/README.md +46 -0
- package/_shims/auto/runtime-bun.d.ts +5 -0
- package/_shims/auto/runtime-bun.d.ts.map +1 -0
- package/_shims/auto/runtime-bun.js +21 -0
- package/_shims/auto/runtime-bun.js.map +1 -0
- package/_shims/auto/runtime-bun.mjs +2 -0
- package/_shims/auto/runtime-bun.mjs.map +1 -0
- package/_shims/auto/runtime-node.d.ts +5 -0
- package/_shims/auto/runtime-node.d.ts.map +1 -0
- package/_shims/auto/runtime-node.js +21 -0
- package/_shims/auto/runtime-node.js.map +1 -0
- package/_shims/auto/runtime-node.mjs +2 -0
- package/_shims/auto/runtime-node.mjs.map +1 -0
- package/_shims/auto/runtime.d.ts +5 -0
- package/_shims/auto/runtime.d.ts.map +1 -0
- package/_shims/auto/runtime.js +21 -0
- package/_shims/auto/runtime.js.map +1 -0
- package/_shims/auto/runtime.mjs +2 -0
- package/_shims/auto/runtime.mjs.map +1 -0
- package/_shims/auto/types-node.d.ts +5 -0
- package/_shims/auto/types-node.d.ts.map +1 -0
- package/_shims/auto/types-node.js +21 -0
- package/_shims/auto/types-node.js.map +1 -0
- package/_shims/auto/types-node.mjs +2 -0
- package/_shims/auto/types-node.mjs.map +1 -0
- package/_shims/auto/types.d.ts +101 -0
- package/_shims/auto/types.js +3 -0
- package/_shims/auto/types.mjs +3 -0
- package/_shims/bun-runtime.d.ts +6 -0
- package/_shims/bun-runtime.d.ts.map +1 -0
- package/_shims/bun-runtime.js +14 -0
- package/_shims/bun-runtime.js.map +1 -0
- package/_shims/bun-runtime.mjs +10 -0
- package/_shims/bun-runtime.mjs.map +1 -0
- package/_shims/index.d.ts +81 -0
- package/_shims/index.js +13 -0
- package/_shims/index.mjs +7 -0
- package/_shims/manual-types.d.ts +12 -0
- package/_shims/manual-types.js +3 -0
- package/_shims/manual-types.mjs +3 -0
- package/_shims/node-runtime.d.ts +3 -0
- package/_shims/node-runtime.d.ts.map +1 -0
- package/_shims/node-runtime.js +90 -0
- package/_shims/node-runtime.js.map +1 -0
- package/_shims/node-runtime.mjs +56 -0
- package/_shims/node-runtime.mjs.map +1 -0
- package/_shims/node-types.d.ts +42 -0
- package/_shims/node-types.js +3 -0
- package/_shims/node-types.mjs +3 -0
- package/_shims/registry.d.ts +37 -0
- package/_shims/registry.d.ts.map +1 -0
- package/_shims/registry.js +41 -0
- package/_shims/registry.js.map +1 -0
- package/_shims/registry.mjs +37 -0
- package/_shims/registry.mjs.map +1 -0
- package/_shims/web-runtime.d.ts +5 -0
- package/_shims/web-runtime.d.ts.map +1 -0
- package/_shims/web-runtime.js +78 -0
- package/_shims/web-runtime.js.map +1 -0
- package/_shims/web-runtime.mjs +71 -0
- package/_shims/web-runtime.mjs.map +1 -0
- package/_shims/web-types.d.ts +83 -0
- package/_shims/web-types.js +3 -0
- package/_shims/web-types.mjs +3 -0
- package/core.d.ts +239 -0
- package/core.d.ts.map +1 -0
- package/core.js +881 -0
- package/core.js.map +1 -0
- package/core.mjs +850 -0
- package/core.mjs.map +1 -0
- package/error.d.ts +53 -0
- package/error.d.ts.map +1 -0
- package/error.js +143 -0
- package/error.js.map +1 -0
- package/error.mjs +127 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +143 -0
- package/index.d.ts +143 -0
- package/index.d.ts.map +1 -0
- package/index.js +124 -0
- package/index.js.map +1 -0
- package/index.mjs +96 -0
- package/index.mjs.map +1 -0
- package/package.json +104 -0
- package/pagination.d.ts +24 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +35 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +31 -0
- package/pagination.mjs.map +1 -0
- package/resource.d.ts +6 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +11 -0
- package/resource.js.map +1 -0
- package/resource.mjs +7 -0
- package/resource.mjs.map +1 -0
- package/resources/alias/alias.d.ts +9 -0
- package/resources/alias/alias.d.ts.map +1 -0
- package/resources/alias/alias.js +40 -0
- package/resources/alias/alias.js.map +1 -0
- package/resources/alias/alias.mjs +13 -0
- package/resources/alias/alias.mjs.map +1 -0
- package/resources/alias/index.d.ts +3 -0
- package/resources/alias/index.d.ts.map +1 -0
- package/resources/alias/index.js +9 -0
- package/resources/alias/index.js.map +1 -0
- package/resources/alias/index.mjs +4 -0
- package/resources/alias/index.mjs.map +1 -0
- package/resources/alias/username/index.d.ts +3 -0
- package/resources/alias/username/index.d.ts.map +1 -0
- package/resources/alias/username/index.js +9 -0
- package/resources/alias/username/index.js.map +1 -0
- package/resources/alias/username/index.mjs +4 -0
- package/resources/alias/username/index.mjs.map +1 -0
- package/resources/alias/username/username.d.ts +16 -0
- package/resources/alias/username/username.d.ts.map +1 -0
- package/resources/alias/username/username.js +46 -0
- package/resources/alias/username/username.js.map +1 -0
- package/resources/alias/username/username.mjs +19 -0
- package/resources/alias/username/username.mjs.map +1 -0
- package/resources/alias/username/val-name.d.ts +42 -0
- package/resources/alias/username/val-name.d.ts.map +1 -0
- package/resources/alias/username/val-name.js +17 -0
- package/resources/alias/username/val-name.js.map +1 -0
- package/resources/alias/username/val-name.mjs +13 -0
- package/resources/alias/username/val-name.mjs.map +1 -0
- package/resources/blobs.d.ts +13 -0
- package/resources/blobs.d.ts.map +1 -0
- package/resources/blobs.js +27 -0
- package/resources/blobs.js.map +1 -0
- package/resources/blobs.mjs +23 -0
- package/resources/blobs.mjs.map +1 -0
- package/resources/emails.d.ts +77 -0
- package/resources/emails.d.ts.map +1 -0
- package/resources/emails.js +18 -0
- package/resources/emails.js.map +1 -0
- package/resources/emails.mjs +14 -0
- package/resources/emails.mjs.map +1 -0
- package/resources/evals.d.ts +19 -0
- package/resources/evals.d.ts.map +1 -0
- package/resources/evals.js +18 -0
- package/resources/evals.js.map +1 -0
- package/resources/evals.mjs +14 -0
- package/resources/evals.mjs.map +1 -0
- package/resources/index.d.ts +11 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +38 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +12 -0
- package/resources/index.mjs.map +1 -0
- package/resources/me/comments.d.ts +55 -0
- package/resources/me/comments.d.ts.map +1 -0
- package/resources/me/comments.js +49 -0
- package/resources/me/comments.js.map +1 -0
- package/resources/me/comments.mjs +21 -0
- package/resources/me/comments.mjs.map +1 -0
- package/resources/me/index.d.ts +6 -0
- package/resources/me/index.d.ts.map +1 -0
- package/resources/me/index.js +18 -0
- package/resources/me/index.js.map +1 -0
- package/resources/me/index.mjs +7 -0
- package/resources/me/index.mjs.map +1 -0
- package/resources/me/likes.d.ts +46 -0
- package/resources/me/likes.d.ts.map +1 -0
- package/resources/me/likes.js +46 -0
- package/resources/me/likes.js.map +1 -0
- package/resources/me/likes.mjs +18 -0
- package/resources/me/likes.mjs.map +1 -0
- package/resources/me/me.d.ts +28 -0
- package/resources/me/me.d.ts.map +1 -0
- package/resources/me/me.js +52 -0
- package/resources/me/me.js.map +1 -0
- package/resources/me/me.mjs +25 -0
- package/resources/me/me.mjs.map +1 -0
- package/resources/me/profile.d.ts +32 -0
- package/resources/me/profile.d.ts.map +1 -0
- package/resources/me/profile.js +17 -0
- package/resources/me/profile.js.map +1 -0
- package/resources/me/profile.mjs +13 -0
- package/resources/me/profile.mjs.map +1 -0
- package/resources/me/references.d.ts +41 -0
- package/resources/me/references.d.ts.map +1 -0
- package/resources/me/references.js +49 -0
- package/resources/me/references.js.map +1 -0
- package/resources/me/references.mjs +21 -0
- package/resources/me/references.mjs.map +1 -0
- package/resources/search/index.d.ts +3 -0
- package/resources/search/index.d.ts.map +1 -0
- package/resources/search/index.js +10 -0
- package/resources/search/index.js.map +1 -0
- package/resources/search/index.mjs +4 -0
- package/resources/search/index.mjs.map +1 -0
- package/resources/search/search.d.ts +12 -0
- package/resources/search/search.d.ts.map +1 -0
- package/resources/search/search.js +41 -0
- package/resources/search/search.js.map +1 -0
- package/resources/search/search.mjs +14 -0
- package/resources/search/search.mjs.map +1 -0
- package/resources/search/vals.d.ts +51 -0
- package/resources/search/vals.d.ts.map +1 -0
- package/resources/search/vals.js +46 -0
- package/resources/search/vals.js.map +1 -0
- package/resources/search/vals.mjs +18 -0
- package/resources/search/vals.mjs.map +1 -0
- package/resources/shared.d.ts +19 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/sqlite.d.ts +54 -0
- package/resources/sqlite.d.ts.map +1 -0
- package/resources/sqlite.js +25 -0
- package/resources/sqlite.js.map +1 -0
- package/resources/sqlite.mjs +21 -0
- package/resources/sqlite.mjs.map +1 -0
- package/resources/users/index.d.ts +3 -0
- package/resources/users/index.d.ts.map +1 -0
- package/resources/users/index.js +10 -0
- package/resources/users/index.js.map +1 -0
- package/resources/users/index.mjs +4 -0
- package/resources/users/index.mjs.map +1 -0
- package/resources/users/users.d.ts +18 -0
- package/resources/users/users.d.ts.map +1 -0
- package/resources/users/users.js +47 -0
- package/resources/users/users.js.map +1 -0
- package/resources/users/users.mjs +20 -0
- package/resources/users/users.mjs.map +1 -0
- package/resources/users/vals.d.ts +46 -0
- package/resources/users/vals.d.ts.map +1 -0
- package/resources/users/vals.js +49 -0
- package/resources/users/vals.js.map +1 -0
- package/resources/users/vals.mjs +21 -0
- package/resources/users/vals.mjs.map +1 -0
- package/resources/vals/index.d.ts +3 -0
- package/resources/vals/index.d.ts.map +1 -0
- package/resources/vals/index.js +10 -0
- package/resources/vals/index.js.map +1 -0
- package/resources/vals/index.mjs +4 -0
- package/resources/vals/index.mjs.map +1 -0
- package/resources/vals/vals.d.ts +150 -0
- package/resources/vals/vals.d.ts.map +1 -0
- package/resources/vals/vals.js +109 -0
- package/resources/vals/vals.js.map +1 -0
- package/resources/vals/vals.mjs +82 -0
- package/resources/vals/vals.mjs.map +1 -0
- package/resources/vals/versions.d.ts +110 -0
- package/resources/vals/versions.d.ts.map +1 -0
- package/resources/vals/versions.js +70 -0
- package/resources/vals/versions.js.map +1 -0
- package/resources/vals/versions.mjs +42 -0
- package/resources/vals/versions.mjs.map +1 -0
- package/shims/node.d.ts +29 -0
- package/shims/node.d.ts.map +1 -0
- package/shims/node.js +31 -0
- package/shims/node.js.map +1 -0
- package/shims/node.mjs +5 -0
- package/shims/node.mjs.map +1 -0
- package/shims/web.d.ts +26 -0
- package/shims/web.d.ts.map +1 -0
- package/shims/web.js +31 -0
- package/shims/web.js.map +1 -0
- package/shims/web.mjs +5 -0
- package/shims/web.mjs.map +1 -0
- package/src/_shims/MultipartBody.ts +9 -0
- package/src/_shims/README.md +46 -0
- package/src/_shims/auto/runtime-bun.ts +4 -0
- package/src/_shims/auto/runtime-node.ts +4 -0
- package/src/_shims/auto/runtime.ts +4 -0
- package/src/_shims/auto/types-node.ts +4 -0
- package/src/_shims/auto/types.d.ts +101 -0
- package/src/_shims/auto/types.js +3 -0
- package/src/_shims/auto/types.mjs +3 -0
- package/src/_shims/bun-runtime.ts +14 -0
- package/src/_shims/index.d.ts +81 -0
- package/src/_shims/index.js +13 -0
- package/src/_shims/index.mjs +7 -0
- package/src/_shims/manual-types.d.ts +12 -0
- package/src/_shims/manual-types.js +3 -0
- package/src/_shims/manual-types.mjs +3 -0
- package/src/_shims/node-runtime.ts +83 -0
- package/src/_shims/node-types.d.ts +42 -0
- package/src/_shims/node-types.js +3 -0
- package/src/_shims/node-types.mjs +3 -0
- package/src/_shims/registry.ts +67 -0
- package/src/_shims/web-runtime.ts +103 -0
- package/src/_shims/web-types.d.ts +83 -0
- package/src/_shims/web-types.js +3 -0
- package/src/_shims/web-types.mjs +3 -0
- package/src/core.ts +1165 -0
- package/src/error.ts +146 -0
- package/src/index.ts +227 -0
- package/src/lib/.keep +4 -0
- package/src/pagination.ts +62 -0
- package/src/resource.ts +11 -0
- package/src/resources/alias/alias.ts +12 -0
- package/src/resources/alias/index.ts +4 -0
- package/src/resources/alias/username/index.ts +4 -0
- package/src/resources/alias/username/username.ts +22 -0
- package/src/resources/alias/username/val-name.ts +65 -0
- package/src/resources/blobs.ts +26 -0
- package/src/resources/emails.ts +123 -0
- package/src/resources/evals.ts +39 -0
- package/src/resources/index.ts +23 -0
- package/src/resources/me/comments.ts +83 -0
- package/src/resources/me/index.ts +17 -0
- package/src/resources/me/likes.ts +65 -0
- package/src/resources/me/me.ts +31 -0
- package/src/resources/me/profile.ts +42 -0
- package/src/resources/me/references.ts +65 -0
- package/src/resources/search/index.ts +4 -0
- package/src/resources/search/search.ts +15 -0
- package/src/resources/search/vals.ts +72 -0
- package/src/resources/shared.ts +23 -0
- package/src/resources/sqlite.ts +77 -0
- package/src/resources/users/index.ts +4 -0
- package/src/resources/users/users.ts +24 -0
- package/src/resources/users/vals.ts +69 -0
- package/src/resources/vals/index.ts +24 -0
- package/src/resources/vals/vals.ts +267 -0
- package/src/resources/vals/versions.ts +181 -0
- package/src/shims/node.ts +50 -0
- package/src/shims/web.ts +50 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +248 -0
- package/src/version.ts +1 -0
- package/uploads.d.ts +75 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +165 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +152 -0
- package/uploads.mjs.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import * as Core from "../core";
|
|
4
|
+
import { APIResource } from "../resource";
|
|
5
|
+
import { isRequestOptions } from "../core";
|
|
6
|
+
import * as EmailsAPI from "./emails";
|
|
7
|
+
|
|
8
|
+
export class Emails extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Send emails
|
|
11
|
+
*/
|
|
12
|
+
send(body?: EmailSendParams, options?: Core.RequestOptions): Core.APIPromise<EmailSendResponse>;
|
|
13
|
+
send(options?: Core.RequestOptions): Core.APIPromise<EmailSendResponse>;
|
|
14
|
+
send(
|
|
15
|
+
body: EmailSendParams | Core.RequestOptions = {},
|
|
16
|
+
options?: Core.RequestOptions,
|
|
17
|
+
): Core.APIPromise<EmailSendResponse> {
|
|
18
|
+
if (isRequestOptions(body)) {
|
|
19
|
+
return this.send({}, body);
|
|
20
|
+
}
|
|
21
|
+
return this._client.post('/v1/email', { body, ...options });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Successfully sent email
|
|
27
|
+
*/
|
|
28
|
+
export interface EmailSendResponse {
|
|
29
|
+
message: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface EmailSendParams {
|
|
33
|
+
attachments?: Array<EmailSendParams.Attachment>;
|
|
34
|
+
|
|
35
|
+
bcc?: string | EmailSendParams.EmailNameAndAddress | Array<string | EmailSendParams.EmailNameAndAddress>;
|
|
36
|
+
|
|
37
|
+
cc?: string | EmailSendParams.EmailNameAndAddress | Array<string | EmailSendParams.EmailNameAndAddress>;
|
|
38
|
+
|
|
39
|
+
from?: string | EmailSendParams.EmailNameAndAddress;
|
|
40
|
+
|
|
41
|
+
html?: string;
|
|
42
|
+
|
|
43
|
+
replyToList?: EmailSendParams.EmailNameAndAddress | Array<EmailSendParams.EmailList>;
|
|
44
|
+
|
|
45
|
+
subject?: string;
|
|
46
|
+
|
|
47
|
+
text?: string;
|
|
48
|
+
|
|
49
|
+
to?: string | EmailSendParams.EmailNameAndAddress | Array<string | EmailSendParams.EmailNameAndAddress>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export namespace EmailSendParams {
|
|
53
|
+
export interface Attachment {
|
|
54
|
+
content: string;
|
|
55
|
+
|
|
56
|
+
filename: string;
|
|
57
|
+
|
|
58
|
+
contentId?: string;
|
|
59
|
+
|
|
60
|
+
disposition?: string;
|
|
61
|
+
|
|
62
|
+
type?: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface EmailNameAndAddress {
|
|
66
|
+
email: string;
|
|
67
|
+
|
|
68
|
+
name?: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface EmailNameAndAddress {
|
|
72
|
+
email: string;
|
|
73
|
+
|
|
74
|
+
name?: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface EmailNameAndAddress {
|
|
78
|
+
email: string;
|
|
79
|
+
|
|
80
|
+
name?: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface EmailNameAndAddress {
|
|
84
|
+
email: string;
|
|
85
|
+
|
|
86
|
+
name?: string;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface EmailNameAndAddress {
|
|
90
|
+
email: string;
|
|
91
|
+
|
|
92
|
+
name?: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface EmailNameAndAddress {
|
|
96
|
+
email: string;
|
|
97
|
+
|
|
98
|
+
name?: string;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface EmailList {
|
|
102
|
+
email: string;
|
|
103
|
+
|
|
104
|
+
name?: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface EmailNameAndAddress {
|
|
108
|
+
email: string;
|
|
109
|
+
|
|
110
|
+
name?: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface EmailNameAndAddress {
|
|
114
|
+
email: string;
|
|
115
|
+
|
|
116
|
+
name?: string;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export namespace Emails {
|
|
121
|
+
export import EmailSendResponse = EmailsAPI.EmailSendResponse;
|
|
122
|
+
export import EmailSendParams = EmailsAPI.EmailSendParams;
|
|
123
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import * as Core from "../core";
|
|
4
|
+
import { APIResource } from "../resource";
|
|
5
|
+
import { isRequestOptions } from "../core";
|
|
6
|
+
import * as EvalsAPI from "./evals";
|
|
7
|
+
|
|
8
|
+
export class Evals extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Run JavaScript or TypeScript without saving it permanently as a val
|
|
11
|
+
*/
|
|
12
|
+
runCode(
|
|
13
|
+
code: string,
|
|
14
|
+
query?: EvalRunCodeParams,
|
|
15
|
+
options?: Core.RequestOptions,
|
|
16
|
+
): Core.APIPromise<EvalRunCodeResponse | null>;
|
|
17
|
+
runCode(code: string, options?: Core.RequestOptions): Core.APIPromise<EvalRunCodeResponse | null>;
|
|
18
|
+
runCode(
|
|
19
|
+
code: string,
|
|
20
|
+
query: EvalRunCodeParams | Core.RequestOptions = {},
|
|
21
|
+
options?: Core.RequestOptions,
|
|
22
|
+
): Core.APIPromise<EvalRunCodeResponse | null> {
|
|
23
|
+
if (isRequestOptions(query)) {
|
|
24
|
+
return this.runCode(code, {}, query);
|
|
25
|
+
}
|
|
26
|
+
return this._client.get(`/v1/eval/${code}`, { query, ...options });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type EvalRunCodeResponse = string | number | Record<string, unknown> | Array<unknown> | boolean;
|
|
31
|
+
|
|
32
|
+
export interface EvalRunCodeParams {
|
|
33
|
+
args?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export namespace Evals {
|
|
37
|
+
export import EvalRunCodeResponse = EvalsAPI.EvalRunCodeResponse;
|
|
38
|
+
export import EvalRunCodeParams = EvalsAPI.EvalRunCodeParams;
|
|
39
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export * from './shared';
|
|
4
|
+
export { Alias } from './alias/alias';
|
|
5
|
+
export { Blobs } from './blobs';
|
|
6
|
+
export { EmailSendResponse, EmailSendParams, Emails } from './emails';
|
|
7
|
+
export { EvalRunCodeResponse, EvalRunCodeParams, Evals } from './evals';
|
|
8
|
+
export { Me } from './me/me';
|
|
9
|
+
export { Search } from './search/search';
|
|
10
|
+
export { SqliteBatchParams, SqliteExecuteParams, Sqlite } from './sqlite';
|
|
11
|
+
export { Users } from './users/users';
|
|
12
|
+
export {
|
|
13
|
+
ValCreateResponse,
|
|
14
|
+
ValRetrieveResponse,
|
|
15
|
+
ValRunAnonymousResponse,
|
|
16
|
+
ValCreateParams,
|
|
17
|
+
ValUpdateParams,
|
|
18
|
+
ValCreateOrUpdateParams,
|
|
19
|
+
ValRunParams,
|
|
20
|
+
ValRunAnonymousParams,
|
|
21
|
+
ValRunGetParams,
|
|
22
|
+
Vals,
|
|
23
|
+
} from './vals/vals';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import * as Core from "../../core";
|
|
4
|
+
import { APIResource } from "../../resource";
|
|
5
|
+
import * as CommentsAPI from "./comments";
|
|
6
|
+
import { PageCursorURL, type PageCursorURLParams } from "../../pagination";
|
|
7
|
+
|
|
8
|
+
export class Comments extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Get comments related to current user, either given or received
|
|
11
|
+
*/
|
|
12
|
+
list(
|
|
13
|
+
query: CommentListParams,
|
|
14
|
+
options?: Core.RequestOptions,
|
|
15
|
+
): Core.PagePromise<CommentListResponsesPageCursorURL, CommentListResponse> {
|
|
16
|
+
return this._client.getAPIList('/v1/me/comments', CommentListResponsesPageCursorURL, {
|
|
17
|
+
query,
|
|
18
|
+
...options,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export class CommentListResponsesPageCursorURL extends PageCursorURL<CommentListResponse> {}
|
|
24
|
+
|
|
25
|
+
export interface CommentListResponse {
|
|
26
|
+
id: string;
|
|
27
|
+
|
|
28
|
+
author: CommentListResponse.Author;
|
|
29
|
+
|
|
30
|
+
comment: string;
|
|
31
|
+
|
|
32
|
+
createdAt: string;
|
|
33
|
+
|
|
34
|
+
val: CommentListResponse.Val;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export namespace CommentListResponse {
|
|
38
|
+
export interface Author {
|
|
39
|
+
id: string;
|
|
40
|
+
|
|
41
|
+
username: string | null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface Val {
|
|
45
|
+
id: string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The user who created this val
|
|
49
|
+
*/
|
|
50
|
+
author: Val.Author | null;
|
|
51
|
+
|
|
52
|
+
name: string;
|
|
53
|
+
|
|
54
|
+
privacy: 'public' | 'unlisted' | 'private';
|
|
55
|
+
|
|
56
|
+
version: number;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export namespace Val {
|
|
60
|
+
/**
|
|
61
|
+
* The user who created this val
|
|
62
|
+
*/
|
|
63
|
+
export interface Author {
|
|
64
|
+
id: string;
|
|
65
|
+
|
|
66
|
+
username: string | null;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface CommentListParams extends PageCursorURLParams {
|
|
72
|
+
relationship: 'any' | 'received' | 'given';
|
|
73
|
+
|
|
74
|
+
since?: string;
|
|
75
|
+
|
|
76
|
+
until?: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export namespace Comments {
|
|
80
|
+
export import CommentListResponse = CommentsAPI.CommentListResponse;
|
|
81
|
+
export import CommentListResponsesPageCursorURL = CommentsAPI.CommentListResponsesPageCursorURL;
|
|
82
|
+
export import CommentListParams = CommentsAPI.CommentListParams;
|
|
83
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
CommentListResponse,
|
|
5
|
+
CommentListParams,
|
|
6
|
+
CommentListResponsesPageCursorURL,
|
|
7
|
+
Comments,
|
|
8
|
+
} from './comments';
|
|
9
|
+
export { LikeListResponse, LikeListParams, LikeListResponsesPageCursorURL, Likes } from './likes';
|
|
10
|
+
export { Me } from './me';
|
|
11
|
+
export { ProfileRetrieveResponse, Profile } from './profile';
|
|
12
|
+
export {
|
|
13
|
+
ReferenceListResponse,
|
|
14
|
+
ReferenceListParams,
|
|
15
|
+
ReferenceListResponsesPageCursorURL,
|
|
16
|
+
References,
|
|
17
|
+
} from './references';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import * as Core from "../../core";
|
|
4
|
+
import { APIResource } from "../../resource";
|
|
5
|
+
import * as LikesAPI from "./likes";
|
|
6
|
+
import { PageCursorURL, type PageCursorURLParams } from "../../pagination";
|
|
7
|
+
|
|
8
|
+
export class Likes extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Get vals liked by the current user
|
|
11
|
+
*/
|
|
12
|
+
list(
|
|
13
|
+
query: LikeListParams,
|
|
14
|
+
options?: Core.RequestOptions,
|
|
15
|
+
): Core.PagePromise<LikeListResponsesPageCursorURL, LikeListResponse> {
|
|
16
|
+
return this._client.getAPIList('/v1/me/likes', LikeListResponsesPageCursorURL, { query, ...options });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export class LikeListResponsesPageCursorURL extends PageCursorURL<LikeListResponse> {}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* A Val
|
|
24
|
+
*/
|
|
25
|
+
export interface LikeListResponse {
|
|
26
|
+
id: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The user who created this val
|
|
30
|
+
*/
|
|
31
|
+
author: LikeListResponse.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 LikeListResponse {
|
|
49
|
+
/**
|
|
50
|
+
* The user who created this val
|
|
51
|
+
*/
|
|
52
|
+
export interface Author {
|
|
53
|
+
id: string;
|
|
54
|
+
|
|
55
|
+
username: string | null;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface LikeListParams extends PageCursorURLParams {}
|
|
60
|
+
|
|
61
|
+
export namespace Likes {
|
|
62
|
+
export import LikeListResponse = LikesAPI.LikeListResponse;
|
|
63
|
+
export import LikeListResponsesPageCursorURL = LikesAPI.LikeListResponsesPageCursorURL;
|
|
64
|
+
export import LikeListParams = LikesAPI.LikeListParams;
|
|
65
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from "../../resource";
|
|
4
|
+
import * as CommentsAPI from "./comments";
|
|
5
|
+
import * as LikesAPI from "./likes";
|
|
6
|
+
import * as ProfileAPI from "./profile";
|
|
7
|
+
import * as ReferencesAPI from "./references";
|
|
8
|
+
|
|
9
|
+
export class Me extends APIResource {
|
|
10
|
+
profile: ProfileAPI.Profile = new ProfileAPI.Profile(this._client);
|
|
11
|
+
likes: LikesAPI.Likes = new LikesAPI.Likes(this._client);
|
|
12
|
+
comments: CommentsAPI.Comments = new CommentsAPI.Comments(this._client);
|
|
13
|
+
references: ReferencesAPI.References = new ReferencesAPI.References(this._client);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export namespace Me {
|
|
17
|
+
export import Profile = ProfileAPI.Profile;
|
|
18
|
+
export import ProfileRetrieveResponse = ProfileAPI.ProfileRetrieveResponse;
|
|
19
|
+
export import Likes = LikesAPI.Likes;
|
|
20
|
+
export import LikeListResponse = LikesAPI.LikeListResponse;
|
|
21
|
+
export import LikeListResponsesPageCursorURL = LikesAPI.LikeListResponsesPageCursorURL;
|
|
22
|
+
export import LikeListParams = LikesAPI.LikeListParams;
|
|
23
|
+
export import Comments = CommentsAPI.Comments;
|
|
24
|
+
export import CommentListResponse = CommentsAPI.CommentListResponse;
|
|
25
|
+
export import CommentListResponsesPageCursorURL = CommentsAPI.CommentListResponsesPageCursorURL;
|
|
26
|
+
export import CommentListParams = CommentsAPI.CommentListParams;
|
|
27
|
+
export import References = ReferencesAPI.References;
|
|
28
|
+
export import ReferenceListResponse = ReferencesAPI.ReferenceListResponse;
|
|
29
|
+
export import ReferenceListResponsesPageCursorURL = ReferencesAPI.ReferenceListResponsesPageCursorURL;
|
|
30
|
+
export import ReferenceListParams = ReferencesAPI.ReferenceListParams;
|
|
31
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import * as Core from "../../core";
|
|
4
|
+
import { APIResource } from "../../resource";
|
|
5
|
+
import * as ProfileAPI from "./profile";
|
|
6
|
+
|
|
7
|
+
export class Profile extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get profile information for the current user
|
|
10
|
+
*/
|
|
11
|
+
retrieve(options?: Core.RequestOptions): Core.APIPromise<ProfileRetrieveResponse> {
|
|
12
|
+
return this._client.get('/v1/me/', options);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* User information, with tier included
|
|
18
|
+
*/
|
|
19
|
+
export interface ProfileRetrieveResponse {
|
|
20
|
+
id: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The user’s biography, if they have provided one
|
|
24
|
+
*/
|
|
25
|
+
bio: string | null;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* URL that points to the user’s profile image, if one exists
|
|
29
|
+
*/
|
|
30
|
+
profileImageUrl: string | null;
|
|
31
|
+
|
|
32
|
+
tier: 'free' | 'pro' | null;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The user’s handle that they chose for themselves. Does not include the @ symbol
|
|
36
|
+
*/
|
|
37
|
+
username: string | null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export namespace Profile {
|
|
41
|
+
export import ProfileRetrieveResponse = ProfileAPI.ProfileRetrieveResponse;
|
|
42
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import * as Core from "../../core";
|
|
4
|
+
import { APIResource } from "../../resource";
|
|
5
|
+
import * as ReferencesAPI from "./references";
|
|
6
|
+
import { PageCursorURL, type PageCursorURLParams } from "../../pagination";
|
|
7
|
+
|
|
8
|
+
export class References extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Get vals that depend on any of the user's vals
|
|
11
|
+
*/
|
|
12
|
+
list(
|
|
13
|
+
query: ReferenceListParams,
|
|
14
|
+
options?: Core.RequestOptions,
|
|
15
|
+
): Core.PagePromise<ReferenceListResponsesPageCursorURL, ReferenceListResponse> {
|
|
16
|
+
return this._client.getAPIList('/v1/me/references', ReferenceListResponsesPageCursorURL, {
|
|
17
|
+
query,
|
|
18
|
+
...options,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export class ReferenceListResponsesPageCursorURL extends PageCursorURL<ReferenceListResponse> {}
|
|
24
|
+
|
|
25
|
+
export interface ReferenceListResponse {
|
|
26
|
+
dependsOn: ReferenceListResponse.DependsOn;
|
|
27
|
+
|
|
28
|
+
reference: ReferenceListResponse.Reference;
|
|
29
|
+
|
|
30
|
+
referencedAt: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export namespace ReferenceListResponse {
|
|
34
|
+
export interface DependsOn {
|
|
35
|
+
id: string;
|
|
36
|
+
|
|
37
|
+
author_id: string | null;
|
|
38
|
+
|
|
39
|
+
name: string;
|
|
40
|
+
|
|
41
|
+
username: string | null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface Reference {
|
|
45
|
+
id: string;
|
|
46
|
+
|
|
47
|
+
author_id: string | null;
|
|
48
|
+
|
|
49
|
+
name: string;
|
|
50
|
+
|
|
51
|
+
username: string | null;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface ReferenceListParams extends PageCursorURLParams {
|
|
56
|
+
since?: string;
|
|
57
|
+
|
|
58
|
+
until?: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export namespace References {
|
|
62
|
+
export import ReferenceListResponse = ReferencesAPI.ReferenceListResponse;
|
|
63
|
+
export import ReferenceListResponsesPageCursorURL = ReferencesAPI.ReferenceListResponsesPageCursorURL;
|
|
64
|
+
export import ReferenceListParams = ReferencesAPI.ReferenceListParams;
|
|
65
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from "../../resource";
|
|
4
|
+
import * as ValsAPI from "./vals";
|
|
5
|
+
|
|
6
|
+
export class Search extends APIResource {
|
|
7
|
+
vals: ValsAPI.Vals = new ValsAPI.Vals(this._client);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export namespace Search {
|
|
11
|
+
export import Vals = ValsAPI.Vals;
|
|
12
|
+
export import ValListResponse = ValsAPI.ValListResponse;
|
|
13
|
+
export import ValListResponsesPageCursorURL = ValsAPI.ValListResponsesPageCursorURL;
|
|
14
|
+
export import ValListParams = ValsAPI.ValListParams;
|
|
15
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import * as Core from "../../core";
|
|
4
|
+
import { APIResource } from "../../resource";
|
|
5
|
+
import * as ValsAPI from "./vals";
|
|
6
|
+
import { PageCursorURL, type PageCursorURLParams } from "../../pagination";
|
|
7
|
+
|
|
8
|
+
export class Vals extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Search for vals across the platform
|
|
11
|
+
*/
|
|
12
|
+
list(
|
|
13
|
+
query: ValListParams,
|
|
14
|
+
options?: Core.RequestOptions,
|
|
15
|
+
): Core.PagePromise<ValListResponsesPageCursorURL, ValListResponse> {
|
|
16
|
+
return this._client.getAPIList('/v1/search/vals', ValListResponsesPageCursorURL, { query, ...options });
|
|
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;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface ValListParams extends PageCursorURLParams {
|
|
60
|
+
/**
|
|
61
|
+
* Search query
|
|
62
|
+
*/
|
|
63
|
+
query: string;
|
|
64
|
+
|
|
65
|
+
searchType?: 'exact' | 'semantic';
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export namespace Vals {
|
|
69
|
+
export import ValListResponse = ValsAPI.ValListResponse;
|
|
70
|
+
export import ValListResponsesPageCursorURL = ValsAPI.ValListResponsesPageCursorURL;
|
|
71
|
+
export import ValListParams = ValsAPI.ValListParams;
|
|
72
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* User object
|
|
5
|
+
*/
|
|
6
|
+
export interface User {
|
|
7
|
+
id: string;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The user’s biography, if they have provided one
|
|
11
|
+
*/
|
|
12
|
+
bio: string | null;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* URL that points to the user’s profile image, if one exists
|
|
16
|
+
*/
|
|
17
|
+
profileImageUrl: string | null;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The user’s handle that they chose for themselves. Does not include the @ symbol
|
|
21
|
+
*/
|
|
22
|
+
username: string | null;
|
|
23
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import * as Core from "../core";
|
|
4
|
+
import { APIResource } from "../resource";
|
|
5
|
+
import * as SqliteAPI from "./sqlite";
|
|
6
|
+
|
|
7
|
+
export class Sqlite extends APIResource {
|
|
8
|
+
batch(body: SqliteBatchParams, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
9
|
+
return this._client.post('/v1/sqlite/batch', {
|
|
10
|
+
body,
|
|
11
|
+
...options,
|
|
12
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
execute(body: SqliteExecuteParams, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
17
|
+
return this._client.post('/v1/sqlite/execute', {
|
|
18
|
+
body,
|
|
19
|
+
...options,
|
|
20
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface SqliteBatchParams {
|
|
26
|
+
statements: Array<string | SqliteBatchParams.ParameterizedQuery>;
|
|
27
|
+
|
|
28
|
+
mode?: 'write' | 'read' | 'deferred';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export namespace SqliteBatchParams {
|
|
32
|
+
/**
|
|
33
|
+
* A parameterized SQL query. See
|
|
34
|
+
* https://docs.turso.tech/sdk/ts/reference#batch-transactions for reference
|
|
35
|
+
*/
|
|
36
|
+
export interface ParameterizedQuery {
|
|
37
|
+
/**
|
|
38
|
+
* List of arguments to be used in the given statement
|
|
39
|
+
*/
|
|
40
|
+
args: Array<string | number | boolean | null> | Record<string, string | number | boolean | null>;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* SQL statement, with ? placeholders for arguments
|
|
44
|
+
*/
|
|
45
|
+
sql: string;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface SqliteExecuteParams {
|
|
50
|
+
/**
|
|
51
|
+
* Simple SQL statement to run in SQLite
|
|
52
|
+
*/
|
|
53
|
+
statement: string | SqliteExecuteParams.ParameterizedQuery;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export namespace SqliteExecuteParams {
|
|
57
|
+
/**
|
|
58
|
+
* A parameterized SQL query. See
|
|
59
|
+
* https://docs.turso.tech/sdk/ts/reference#batch-transactions for reference
|
|
60
|
+
*/
|
|
61
|
+
export interface ParameterizedQuery {
|
|
62
|
+
/**
|
|
63
|
+
* List of arguments to be used in the given statement
|
|
64
|
+
*/
|
|
65
|
+
args: Array<string | number | boolean | null> | Record<string, string | number | boolean | null>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* SQL statement, with ? placeholders for arguments
|
|
69
|
+
*/
|
|
70
|
+
sql: string;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export namespace Sqlite {
|
|
75
|
+
export import SqliteBatchParams = SqliteAPI.SqliteBatchParams;
|
|
76
|
+
export import SqliteExecuteParams = SqliteAPI.SqliteExecuteParams;
|
|
77
|
+
}
|