telnyx 7.14.0 → 7.16.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 +25 -0
- package/client.d.mts +8 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -2
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/calls/actions.d.mts +10 -8
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +10 -8
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/calls/calls.d.mts +5 -5
- package/resources/calls/calls.d.mts.map +1 -1
- package/resources/calls/calls.d.ts +5 -5
- package/resources/calls/calls.d.ts.map +1 -1
- package/resources/index.d.mts +3 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/meeting-sessions/actions.d.mts +82 -0
- package/resources/meeting-sessions/actions.d.mts.map +1 -0
- package/resources/meeting-sessions/actions.d.ts +82 -0
- package/resources/meeting-sessions/actions.d.ts.map +1 -0
- package/resources/meeting-sessions/actions.js +59 -0
- package/resources/meeting-sessions/actions.js.map +1 -0
- package/resources/meeting-sessions/actions.mjs +55 -0
- package/resources/meeting-sessions/actions.mjs.map +1 -0
- package/resources/meeting-sessions/artifacts.d.mts +92 -0
- package/resources/meeting-sessions/artifacts.d.mts.map +1 -0
- package/resources/meeting-sessions/artifacts.d.ts +92 -0
- package/resources/meeting-sessions/artifacts.d.ts.map +1 -0
- package/resources/meeting-sessions/artifacts.js +62 -0
- package/resources/meeting-sessions/artifacts.js.map +1 -0
- package/resources/meeting-sessions/artifacts.mjs +58 -0
- package/resources/meeting-sessions/artifacts.mjs.map +1 -0
- package/resources/meeting-sessions/index.d.mts +4 -0
- package/resources/meeting-sessions/index.d.mts.map +1 -0
- package/resources/meeting-sessions/index.d.ts +4 -0
- package/resources/meeting-sessions/index.d.ts.map +1 -0
- package/resources/meeting-sessions/index.js +11 -0
- package/resources/meeting-sessions/index.js.map +1 -0
- package/resources/meeting-sessions/index.mjs +5 -0
- package/resources/meeting-sessions/index.mjs.map +1 -0
- package/resources/meeting-sessions/meeting-sessions.d.mts +580 -0
- package/resources/meeting-sessions/meeting-sessions.d.mts.map +1 -0
- package/resources/meeting-sessions/meeting-sessions.d.ts +580 -0
- package/resources/meeting-sessions/meeting-sessions.d.ts.map +1 -0
- package/resources/meeting-sessions/meeting-sessions.js +175 -0
- package/resources/meeting-sessions/meeting-sessions.js.map +1 -0
- package/resources/meeting-sessions/meeting-sessions.mjs +170 -0
- package/resources/meeting-sessions/meeting-sessions.mjs.map +1 -0
- package/resources/meeting-sessions.d.mts +2 -0
- package/resources/meeting-sessions.d.mts.map +1 -0
- package/resources/meeting-sessions.d.ts +2 -0
- package/resources/meeting-sessions.d.ts.map +1 -0
- package/resources/meeting-sessions.js +6 -0
- package/resources/meeting-sessions.js.map +1 -0
- package/resources/meeting-sessions.mjs +3 -0
- package/resources/meeting-sessions.mjs.map +1 -0
- package/resources/messaging-profiles/messaging-profiles.d.mts +1 -1
- package/resources/messaging-profiles/messaging-profiles.d.ts +1 -1
- package/resources/messaging-profiles/messaging-profiles.js +1 -1
- package/resources/messaging-profiles/messaging-profiles.mjs +1 -1
- package/resources/phone-numbers/voicemail.d.mts +132 -2
- package/resources/phone-numbers/voicemail.d.mts.map +1 -1
- package/resources/phone-numbers/voicemail.d.ts +132 -2
- package/resources/phone-numbers/voicemail.d.ts.map +1 -1
- package/resources/phone-numbers/voicemail.js +8 -2
- package/resources/phone-numbers/voicemail.js.map +1 -1
- package/resources/phone-numbers/voicemail.mjs +8 -2
- package/resources/phone-numbers/voicemail.mjs.map +1 -1
- package/resources/private-wireless-gateways.d.mts +1 -1
- package/resources/private-wireless-gateways.d.ts +1 -1
- package/resources/sim-cards/actions.d.mts +69 -3
- package/resources/sim-cards/actions.d.mts.map +1 -1
- package/resources/sim-cards/actions.d.ts +69 -3
- package/resources/sim-cards/actions.d.ts.map +1 -1
- package/resources/sim-cards/actions.js +38 -0
- package/resources/sim-cards/actions.js.map +1 -1
- package/resources/sim-cards/actions.mjs +38 -0
- package/resources/sim-cards/actions.mjs.map +1 -1
- package/resources/sim-cards/index.d.mts +1 -1
- package/resources/sim-cards/index.d.mts.map +1 -1
- package/resources/sim-cards/index.d.ts +1 -1
- package/resources/sim-cards/index.d.ts.map +1 -1
- package/resources/sim-cards/index.js.map +1 -1
- package/resources/sim-cards/index.mjs.map +1 -1
- package/resources/sim-cards/sim-cards.d.mts +2 -2
- package/resources/sim-cards/sim-cards.d.mts.map +1 -1
- package/resources/sim-cards/sim-cards.d.ts +2 -2
- package/resources/sim-cards/sim-cards.d.ts.map +1 -1
- package/resources/sim-cards/sim-cards.js.map +1 -1
- package/resources/sim-cards/sim-cards.mjs.map +1 -1
- package/resources/storage/index.d.mts +2 -1
- package/resources/storage/index.d.mts.map +1 -1
- package/resources/storage/index.d.ts +2 -1
- package/resources/storage/index.d.ts.map +1 -1
- package/resources/storage/index.js +3 -1
- package/resources/storage/index.js.map +1 -1
- package/resources/storage/index.mjs +1 -0
- package/resources/storage/index.mjs.map +1 -1
- package/resources/storage/kvs/index.d.mts +1 -1
- package/resources/storage/kvs/index.d.mts.map +1 -1
- package/resources/storage/kvs/index.d.ts +1 -1
- package/resources/storage/kvs/index.d.ts.map +1 -1
- package/resources/storage/kvs/index.js.map +1 -1
- package/resources/storage/kvs/index.mjs.map +1 -1
- package/resources/storage/kvs/kvs.d.mts +7 -1
- package/resources/storage/kvs/kvs.d.mts.map +1 -1
- package/resources/storage/kvs/kvs.d.ts +7 -1
- package/resources/storage/kvs/kvs.d.ts.map +1 -1
- package/resources/storage/kvs/kvs.js.map +1 -1
- package/resources/storage/kvs/kvs.mjs.map +1 -1
- package/resources/storage/sqldbs/actions.d.mts +84 -0
- package/resources/storage/sqldbs/actions.d.mts.map +1 -0
- package/resources/storage/sqldbs/actions.d.ts +84 -0
- package/resources/storage/sqldbs/actions.d.ts.map +1 -0
- package/resources/storage/sqldbs/actions.js +29 -0
- package/resources/storage/sqldbs/actions.js.map +1 -0
- package/resources/storage/sqldbs/actions.mjs +25 -0
- package/resources/storage/sqldbs/actions.mjs.map +1 -0
- package/resources/storage/sqldbs/index.d.mts +3 -0
- package/resources/storage/sqldbs/index.d.mts.map +1 -0
- package/resources/storage/sqldbs/index.d.ts +3 -0
- package/resources/storage/sqldbs/index.d.ts.map +1 -0
- package/resources/storage/sqldbs/index.js +9 -0
- package/resources/storage/sqldbs/index.js.map +1 -0
- package/resources/storage/sqldbs/index.mjs +4 -0
- package/resources/storage/sqldbs/index.mjs.map +1 -0
- package/resources/storage/sqldbs/sqldbs.d.mts +116 -0
- package/resources/storage/sqldbs/sqldbs.d.mts.map +1 -0
- package/resources/storage/sqldbs/sqldbs.d.ts +116 -0
- package/resources/storage/sqldbs/sqldbs.d.ts.map +1 -0
- package/resources/storage/sqldbs/sqldbs.js +94 -0
- package/resources/storage/sqldbs/sqldbs.js.map +1 -0
- package/resources/storage/sqldbs/sqldbs.mjs +89 -0
- package/resources/storage/sqldbs/sqldbs.mjs.map +1 -0
- package/resources/storage/sqldbs.d.mts +2 -0
- package/resources/storage/sqldbs.d.mts.map +1 -0
- package/resources/storage/sqldbs.d.ts +2 -0
- package/resources/storage/sqldbs.d.ts.map +1 -0
- package/resources/storage/sqldbs.js +6 -0
- package/resources/storage/sqldbs.js.map +1 -0
- package/resources/storage/sqldbs.mjs +3 -0
- package/resources/storage/sqldbs.mjs.map +1 -0
- package/resources/storage/storage.d.mts +6 -2
- package/resources/storage/storage.d.mts.map +1 -1
- package/resources/storage/storage.d.ts +6 -2
- package/resources/storage/storage.d.ts.map +1 -1
- package/resources/storage/storage.js +4 -0
- package/resources/storage/storage.js.map +1 -1
- package/resources/storage/storage.mjs +4 -0
- package/resources/storage/storage.mjs.map +1 -1
- package/resources/web-search/index.d.mts +3 -0
- package/resources/web-search/index.d.mts.map +1 -0
- package/resources/web-search/index.d.ts +3 -0
- package/resources/web-search/index.d.ts.map +1 -0
- package/resources/web-search/index.js +9 -0
- package/resources/web-search/index.js.map +1 -0
- package/resources/web-search/index.mjs +4 -0
- package/resources/web-search/index.mjs.map +1 -0
- package/resources/web-search/research.d.mts +148 -0
- package/resources/web-search/research.d.mts.map +1 -0
- package/resources/web-search/research.d.ts +148 -0
- package/resources/web-search/research.d.ts.map +1 -0
- package/resources/web-search/research.js +57 -0
- package/resources/web-search/research.js.map +1 -0
- package/resources/web-search/research.mjs +53 -0
- package/resources/web-search/research.mjs.map +1 -0
- package/resources/web-search/web-search.d.mts +204 -0
- package/resources/web-search/web-search.d.mts.map +1 -0
- package/resources/web-search/web-search.d.ts +204 -0
- package/resources/web-search/web-search.d.ts.map +1 -0
- package/resources/web-search/web-search.js +59 -0
- package/resources/web-search/web-search.js.map +1 -0
- package/resources/web-search/web-search.mjs +54 -0
- package/resources/web-search/web-search.mjs.map +1 -0
- package/resources/web-search.d.mts +2 -0
- package/resources/web-search.d.mts.map +1 -0
- package/resources/web-search.d.ts +2 -0
- package/resources/web-search.d.ts.map +1 -0
- package/resources/web-search.js +6 -0
- package/resources/web-search.js.map +1 -0
- package/resources/web-search.mjs +3 -0
- package/resources/web-search.mjs.map +1 -0
- package/resources/webhooks.d.mts +475 -3
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +475 -3
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +62 -0
- package/src/resources/calls/actions.ts +10 -8
- package/src/resources/calls/calls.ts +5 -5
- package/src/resources/index.ts +28 -0
- package/src/resources/meeting-sessions/actions.ts +108 -0
- package/src/resources/meeting-sessions/artifacts.ts +135 -0
- package/src/resources/meeting-sessions/index.ts +31 -0
- package/src/resources/meeting-sessions/meeting-sessions.ts +771 -0
- package/src/resources/meeting-sessions.ts +3 -0
- package/src/resources/messaging-profiles/messaging-profiles.ts +1 -1
- package/src/resources/phone-numbers/voicemail.ts +144 -2
- package/src/resources/private-wireless-gateways.ts +1 -1
- package/src/resources/sim-cards/actions.ts +93 -2
- package/src/resources/sim-cards/index.ts +3 -0
- package/src/resources/sim-cards/sim-cards.ts +6 -0
- package/src/resources/storage/index.ts +10 -0
- package/src/resources/storage/kvs/index.ts +1 -0
- package/src/resources/storage/kvs/kvs.ts +11 -0
- package/src/resources/storage/sqldbs/actions.ts +101 -0
- package/src/resources/storage/sqldbs/index.ts +12 -0
- package/src/resources/storage/sqldbs/sqldbs.ts +179 -0
- package/src/resources/storage/sqldbs.ts +3 -0
- package/src/resources/storage/storage.ts +24 -0
- package/src/resources/web-search/index.ts +17 -0
- package/src/resources/web-search/research.ts +180 -0
- package/src/resources/web-search/web-search.ts +266 -0
- package/src/resources/web-search.ts +3 -0
- package/src/resources/webhooks.ts +579 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* Manage SQL databases and run SQL against them
|
|
6
|
+
*/
|
|
7
|
+
export declare class Actions extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Runs SQL against the database and returns the resulting rows — empty for
|
|
10
|
+
* statements that return none, such as DDL. Bind positional `?` placeholders with
|
|
11
|
+
* `params` rather than interpolating values into the SQL string.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const response = await client.storage.sqldbs.actions.query(
|
|
16
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
17
|
+
* { sql: 'SELECT * FROM users WHERE name = ?' },
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
query(id: string, body: ActionQueryParams, options?: RequestOptions): APIPromise<ActionQueryResponse>;
|
|
22
|
+
}
|
|
23
|
+
export interface ActionQueryResponse {
|
|
24
|
+
data?: ActionQueryResponse.Data;
|
|
25
|
+
}
|
|
26
|
+
export declare namespace ActionQueryResponse {
|
|
27
|
+
interface Data {
|
|
28
|
+
/**
|
|
29
|
+
* Number of rows returned.
|
|
30
|
+
*/
|
|
31
|
+
count?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Wall-clock duration of the request, in milliseconds.
|
|
34
|
+
*/
|
|
35
|
+
duration?: number;
|
|
36
|
+
meta?: Data.Meta;
|
|
37
|
+
/**
|
|
38
|
+
* The result rows, each a map of column name to value. Empty for statements that
|
|
39
|
+
* return no rows.
|
|
40
|
+
*/
|
|
41
|
+
results?: Array<{
|
|
42
|
+
[key: string]: unknown;
|
|
43
|
+
}>;
|
|
44
|
+
success?: boolean;
|
|
45
|
+
}
|
|
46
|
+
namespace Data {
|
|
47
|
+
interface Meta {
|
|
48
|
+
/**
|
|
49
|
+
* Number of rows added, changed, or removed by the statement.
|
|
50
|
+
*/
|
|
51
|
+
changes?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Wall-clock duration of the statement, in milliseconds.
|
|
54
|
+
*/
|
|
55
|
+
duration?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Rowid of the last inserted row, when applicable.
|
|
58
|
+
*/
|
|
59
|
+
last_row_id?: number;
|
|
60
|
+
rows_read?: number;
|
|
61
|
+
rows_written?: number;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export interface ActionQueryParams {
|
|
66
|
+
/**
|
|
67
|
+
* The SQL to run. Use positional `?` placeholders and supply the values in
|
|
68
|
+
* `params` rather than interpolating them into this string.
|
|
69
|
+
*/
|
|
70
|
+
sql: string;
|
|
71
|
+
/**
|
|
72
|
+
* Positional bind parameters, in placeholder order. Each value is a string, a
|
|
73
|
+
* number, a boolean, or null; booleans are cast to `1`/`0`. The count must match
|
|
74
|
+
* the number of `?` placeholders exactly — a mismatch is rejected with 422 rather
|
|
75
|
+
* than binding null for the ones you left out. (Not enforced for multi-statement
|
|
76
|
+
* scripts or named parameters, where the placeholder count is not the number
|
|
77
|
+
* bound.)
|
|
78
|
+
*/
|
|
79
|
+
params?: Array<string | number | boolean | null>;
|
|
80
|
+
}
|
|
81
|
+
export declare namespace Actions {
|
|
82
|
+
export { type ActionQueryResponse as ActionQueryResponse, type ActionQueryParams as ActionQueryParams };
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/resources/storage/sqldbs/actions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,qCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAGnE;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAGtG;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,mBAAmB,CAAC,IAAI,CAAC;CACjC;AAED,yBAAiB,mBAAmB,CAAC;IACnC,UAAiB,IAAI;QACnB;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;QAEjB;;;WAGG;QACH,OAAO,CAAC,EAAE,KAAK,CAAC;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;SAAE,CAAC,CAAC;QAE5C,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB;IAED,UAAiB,IAAI,CAAC;QACpB,UAAiB,IAAI;YACnB;;eAEG;YACH,OAAO,CAAC,EAAE,MAAM,CAAC;YAEjB;;eAEG;YACH,QAAQ,CAAC,EAAE,MAAM,CAAC;YAElB;;eAEG;YACH,WAAW,CAAC,EAAE,MAAM,CAAC;YAErB,SAAS,CAAC,EAAE,MAAM,CAAC;YAEnB,YAAY,CAAC,EAAE,MAAM,CAAC;SACvB;KACF;CACF;AAED,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC,CAAC;CAClD;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACzG"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Actions = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
7
|
+
/**
|
|
8
|
+
* Manage SQL databases and run SQL against them
|
|
9
|
+
*/
|
|
10
|
+
class Actions extends resource_1.APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Runs SQL against the database and returns the resulting rows — empty for
|
|
13
|
+
* statements that return none, such as DDL. Bind positional `?` placeholders with
|
|
14
|
+
* `params` rather than interpolating values into the SQL string.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const response = await client.storage.sqldbs.actions.query(
|
|
19
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
20
|
+
* { sql: 'SELECT * FROM users WHERE name = ?' },
|
|
21
|
+
* );
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
query(id, body, options) {
|
|
25
|
+
return this._client.post((0, path_1.path) `/storage/sqldbs/${id}/actions/query`, { body, ...options });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.Actions = Actions;
|
|
29
|
+
//# sourceMappingURL=actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../src/resources/storage/sqldbs/actions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,EAAU,EAAE,IAAuB,EAAE,OAAwB;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,mBAAmB,EAAE,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5F,CAAC;CACF;AAjBD,0BAiBC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Manage SQL databases and run SQL against them
|
|
6
|
+
*/
|
|
7
|
+
export class Actions extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Runs SQL against the database and returns the resulting rows — empty for
|
|
10
|
+
* statements that return none, such as DDL. Bind positional `?` placeholders with
|
|
11
|
+
* `params` rather than interpolating values into the SQL string.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const response = await client.storage.sqldbs.actions.query(
|
|
16
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
17
|
+
* { sql: 'SELECT * FROM users WHERE name = ?' },
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
query(id, body, options) {
|
|
22
|
+
return this._client.post(path `/storage/sqldbs/${id}/actions/query`, { body, ...options });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=actions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.mjs","sourceRoot":"","sources":["../../../src/resources/storage/sqldbs/actions.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAGrD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,EAAU,EAAE,IAAuB,EAAE,OAAwB;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,mBAAmB,EAAE,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5F,CAAC;CACF"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Actions, type ActionQueryResponse, type ActionQueryParams } from "./actions.mjs";
|
|
2
|
+
export { Sqldbs, type SqlDatabase, type SqlDatabaseResponseWrapper, type SqldbListParams, type SqldbCreateParams, type SqldbDeleteParams, type SqlDatabasesDefaultFlatPagination, } from "./sqldbs.mjs";
|
|
3
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/storage/sqldbs/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,sBAAkB;AACtF,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,0BAA0B,EAC/B,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,iCAAiC,GACvC,qBAAiB"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Actions, type ActionQueryResponse, type ActionQueryParams } from "./actions.js";
|
|
2
|
+
export { Sqldbs, type SqlDatabase, type SqlDatabaseResponseWrapper, type SqldbListParams, type SqldbCreateParams, type SqldbDeleteParams, type SqlDatabasesDefaultFlatPagination, } from "./sqldbs.js";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/storage/sqldbs/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,qBAAkB;AACtF,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,0BAA0B,EAC/B,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,iCAAiC,GACvC,oBAAiB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Sqldbs = exports.Actions = void 0;
|
|
5
|
+
var actions_1 = require("./actions.js");
|
|
6
|
+
Object.defineProperty(exports, "Actions", { enumerable: true, get: function () { return actions_1.Actions; } });
|
|
7
|
+
var sqldbs_1 = require("./sqldbs.js");
|
|
8
|
+
Object.defineProperty(exports, "Sqldbs", { enumerable: true, get: function () { return sqldbs_1.Sqldbs; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/storage/sqldbs/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAAsF;AAA7E,kGAAA,OAAO,OAAA;AAChB,sCAQkB;AAPhB,gGAAA,MAAM,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/storage/sqldbs/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,OAAO,EAAoD,sBAAkB;AACtF,OAAO,EACL,MAAM,GAOP,qBAAiB"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import * as ActionsAPI from "./actions.mjs";
|
|
3
|
+
import { ActionQueryParams, ActionQueryResponse, Actions } from "./actions.mjs";
|
|
4
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
5
|
+
import { DefaultFlatPagination, type DefaultFlatPaginationParams, PagePromise } from "../../../core/pagination.mjs";
|
|
6
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
7
|
+
/**
|
|
8
|
+
* Manage SQL databases and run SQL against them
|
|
9
|
+
*/
|
|
10
|
+
export declare class Sqldbs extends APIResource {
|
|
11
|
+
actions: ActionsAPI.Actions;
|
|
12
|
+
/**
|
|
13
|
+
* Lists the SQL databases for the authenticated user's organization. Results use
|
|
14
|
+
* page-based pagination (`page[number]`/`page[size]`) and can be filtered and
|
|
15
|
+
* sorted.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* // Automatically fetches more pages as needed.
|
|
20
|
+
* for await (const sqlDatabase of client.storage.sqldbs.list()) {
|
|
21
|
+
* // ...
|
|
22
|
+
* }
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
list(query?: SqldbListParams | null | undefined, options?: RequestOptions): PagePromise<SqlDatabasesDefaultFlatPagination, SqlDatabase>;
|
|
26
|
+
/**
|
|
27
|
+
* Creates a new SQL database. Provisioning is asynchronous: the database is
|
|
28
|
+
* returned with status `pending` and becomes usable once it reaches
|
|
29
|
+
* `provision_ok`.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const sqlDatabaseResponseWrapper =
|
|
34
|
+
* await client.storage.sqldbs.create({
|
|
35
|
+
* name: 'my-database',
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
create(body: SqldbCreateParams, options?: RequestOptions): APIPromise<SqlDatabaseResponseWrapper>;
|
|
40
|
+
/**
|
|
41
|
+
* Deletes a SQL database and all of the data it holds. Deletion is asynchronous
|
|
42
|
+
* and returns `202` with an empty body — the record is not removed synchronously.
|
|
43
|
+
* Poll `GET /storage/sqldbs/{id}`, which returns `404` once the database has been
|
|
44
|
+
* purged; there is no durable `deleted` state. A database still bound by a
|
|
45
|
+
* function is refused with `409` unless `force=true`.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* await client.storage.sqldbs.delete(
|
|
50
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
51
|
+
* );
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
delete(id: string, params?: SqldbDeleteParams | null | undefined, options?: RequestOptions): APIPromise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Retrieves a SQL database by its ID, including its provisioning status.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const sqlDatabaseResponseWrapper =
|
|
61
|
+
* await client.storage.sqldbs.retrieve(
|
|
62
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
63
|
+
* );
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<SqlDatabaseResponseWrapper>;
|
|
67
|
+
}
|
|
68
|
+
export type SqlDatabasesDefaultFlatPagination = DefaultFlatPagination<SqlDatabase>;
|
|
69
|
+
export interface SqlDatabase {
|
|
70
|
+
id?: string;
|
|
71
|
+
created_at?: string;
|
|
72
|
+
name?: string;
|
|
73
|
+
record_type?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Provisioning status. A database is usable once `status` is `provision_ok`. Once
|
|
76
|
+
* deletion completes, the database no longer appears in the API.
|
|
77
|
+
*/
|
|
78
|
+
status?: 'pending' | 'provision_ok' | 'provision_failed' | 'deleting' | 'delete_failed';
|
|
79
|
+
updated_at?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface SqlDatabaseResponseWrapper {
|
|
82
|
+
data?: SqlDatabase;
|
|
83
|
+
}
|
|
84
|
+
export interface SqldbListParams extends DefaultFlatPaginationParams {
|
|
85
|
+
/**
|
|
86
|
+
* Filter by exact name match.
|
|
87
|
+
*/
|
|
88
|
+
'filter[name]'?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Filter by provisioning status.
|
|
91
|
+
*/
|
|
92
|
+
'filter[status]'?: 'pending' | 'provision_ok' | 'provision_failed' | 'deleting' | 'delete_failed';
|
|
93
|
+
/**
|
|
94
|
+
* Sort field; prefix with `-` for descending order.
|
|
95
|
+
*/
|
|
96
|
+
sort?: 'name' | '-name' | 'status' | '-status' | 'created_at' | '-created_at';
|
|
97
|
+
}
|
|
98
|
+
export interface SqldbCreateParams {
|
|
99
|
+
/**
|
|
100
|
+
* Database name. Lowercase letters, numbers, and hyphens only; must start and end
|
|
101
|
+
* with a letter or number.
|
|
102
|
+
*/
|
|
103
|
+
name: string;
|
|
104
|
+
}
|
|
105
|
+
export interface SqldbDeleteParams {
|
|
106
|
+
/**
|
|
107
|
+
* Delete the database even when functions still bind it. Their bindings stop
|
|
108
|
+
* resolving.
|
|
109
|
+
*/
|
|
110
|
+
force?: boolean;
|
|
111
|
+
}
|
|
112
|
+
export declare namespace Sqldbs {
|
|
113
|
+
export { type SqlDatabase as SqlDatabase, type SqlDatabaseResponseWrapper as SqlDatabaseResponseWrapper, type SqlDatabasesDefaultFlatPagination as SqlDatabasesDefaultFlatPagination, type SqldbListParams as SqldbListParams, type SqldbCreateParams as SqldbCreateParams, type SqldbDeleteParams as SqldbDeleteParams, };
|
|
114
|
+
export { Actions as Actions, type ActionQueryResponse as ActionQueryResponse, type ActionQueryParams as ActionQueryParams, };
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=sqldbs.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqldbs.d.mts","sourceRoot":"","sources":["../../../src/resources/storage/sqldbs/sqldbs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,UAAU,sBAAkB;AACxC,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,OAAO,EAAE,sBAAkB;AAC5E,OAAO,EAAE,UAAU,EAAE,sCAAkC;AACvD,OAAO,EACL,qBAAqB,EACrB,KAAK,2BAA2B,EAChC,WAAW,EACZ,qCAAiC;AAElC,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAGnE;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IAEnE;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,iCAAiC,EAAE,WAAW,CAAC;IAO9D;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAIjG;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,IAAI,CAAC;IASnB;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;CAGvF;AAED,MAAM,MAAM,iCAAiC,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAC;AAEnF,MAAM,WAAW,WAAW;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,cAAc,GAAG,kBAAkB,GAAG,UAAU,GAAG,eAAe,CAAC;IAExF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAED,MAAM,WAAW,eAAgB,SAAQ,2BAA2B;IAClE;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,gBAAgB,CAAC,EAAE,SAAS,GAAG,cAAc,GAAG,kBAAkB,GAAG,UAAU,GAAG,eAAe,CAAC;IAElG;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,GAAG,aAAa,CAAC;CAC/E;AAED,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAID,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import * as ActionsAPI from "./actions.js";
|
|
3
|
+
import { ActionQueryParams, ActionQueryResponse, Actions } from "./actions.js";
|
|
4
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
5
|
+
import { DefaultFlatPagination, type DefaultFlatPaginationParams, PagePromise } from "../../../core/pagination.js";
|
|
6
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
7
|
+
/**
|
|
8
|
+
* Manage SQL databases and run SQL against them
|
|
9
|
+
*/
|
|
10
|
+
export declare class Sqldbs extends APIResource {
|
|
11
|
+
actions: ActionsAPI.Actions;
|
|
12
|
+
/**
|
|
13
|
+
* Lists the SQL databases for the authenticated user's organization. Results use
|
|
14
|
+
* page-based pagination (`page[number]`/`page[size]`) and can be filtered and
|
|
15
|
+
* sorted.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* // Automatically fetches more pages as needed.
|
|
20
|
+
* for await (const sqlDatabase of client.storage.sqldbs.list()) {
|
|
21
|
+
* // ...
|
|
22
|
+
* }
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
list(query?: SqldbListParams | null | undefined, options?: RequestOptions): PagePromise<SqlDatabasesDefaultFlatPagination, SqlDatabase>;
|
|
26
|
+
/**
|
|
27
|
+
* Creates a new SQL database. Provisioning is asynchronous: the database is
|
|
28
|
+
* returned with status `pending` and becomes usable once it reaches
|
|
29
|
+
* `provision_ok`.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const sqlDatabaseResponseWrapper =
|
|
34
|
+
* await client.storage.sqldbs.create({
|
|
35
|
+
* name: 'my-database',
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
create(body: SqldbCreateParams, options?: RequestOptions): APIPromise<SqlDatabaseResponseWrapper>;
|
|
40
|
+
/**
|
|
41
|
+
* Deletes a SQL database and all of the data it holds. Deletion is asynchronous
|
|
42
|
+
* and returns `202` with an empty body — the record is not removed synchronously.
|
|
43
|
+
* Poll `GET /storage/sqldbs/{id}`, which returns `404` once the database has been
|
|
44
|
+
* purged; there is no durable `deleted` state. A database still bound by a
|
|
45
|
+
* function is refused with `409` unless `force=true`.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* await client.storage.sqldbs.delete(
|
|
50
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
51
|
+
* );
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
delete(id: string, params?: SqldbDeleteParams | null | undefined, options?: RequestOptions): APIPromise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Retrieves a SQL database by its ID, including its provisioning status.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const sqlDatabaseResponseWrapper =
|
|
61
|
+
* await client.storage.sqldbs.retrieve(
|
|
62
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
63
|
+
* );
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<SqlDatabaseResponseWrapper>;
|
|
67
|
+
}
|
|
68
|
+
export type SqlDatabasesDefaultFlatPagination = DefaultFlatPagination<SqlDatabase>;
|
|
69
|
+
export interface SqlDatabase {
|
|
70
|
+
id?: string;
|
|
71
|
+
created_at?: string;
|
|
72
|
+
name?: string;
|
|
73
|
+
record_type?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Provisioning status. A database is usable once `status` is `provision_ok`. Once
|
|
76
|
+
* deletion completes, the database no longer appears in the API.
|
|
77
|
+
*/
|
|
78
|
+
status?: 'pending' | 'provision_ok' | 'provision_failed' | 'deleting' | 'delete_failed';
|
|
79
|
+
updated_at?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface SqlDatabaseResponseWrapper {
|
|
82
|
+
data?: SqlDatabase;
|
|
83
|
+
}
|
|
84
|
+
export interface SqldbListParams extends DefaultFlatPaginationParams {
|
|
85
|
+
/**
|
|
86
|
+
* Filter by exact name match.
|
|
87
|
+
*/
|
|
88
|
+
'filter[name]'?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Filter by provisioning status.
|
|
91
|
+
*/
|
|
92
|
+
'filter[status]'?: 'pending' | 'provision_ok' | 'provision_failed' | 'deleting' | 'delete_failed';
|
|
93
|
+
/**
|
|
94
|
+
* Sort field; prefix with `-` for descending order.
|
|
95
|
+
*/
|
|
96
|
+
sort?: 'name' | '-name' | 'status' | '-status' | 'created_at' | '-created_at';
|
|
97
|
+
}
|
|
98
|
+
export interface SqldbCreateParams {
|
|
99
|
+
/**
|
|
100
|
+
* Database name. Lowercase letters, numbers, and hyphens only; must start and end
|
|
101
|
+
* with a letter or number.
|
|
102
|
+
*/
|
|
103
|
+
name: string;
|
|
104
|
+
}
|
|
105
|
+
export interface SqldbDeleteParams {
|
|
106
|
+
/**
|
|
107
|
+
* Delete the database even when functions still bind it. Their bindings stop
|
|
108
|
+
* resolving.
|
|
109
|
+
*/
|
|
110
|
+
force?: boolean;
|
|
111
|
+
}
|
|
112
|
+
export declare namespace Sqldbs {
|
|
113
|
+
export { type SqlDatabase as SqlDatabase, type SqlDatabaseResponseWrapper as SqlDatabaseResponseWrapper, type SqlDatabasesDefaultFlatPagination as SqlDatabasesDefaultFlatPagination, type SqldbListParams as SqldbListParams, type SqldbCreateParams as SqldbCreateParams, type SqldbDeleteParams as SqldbDeleteParams, };
|
|
114
|
+
export { Actions as Actions, type ActionQueryResponse as ActionQueryResponse, type ActionQueryParams as ActionQueryParams, };
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=sqldbs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqldbs.d.ts","sourceRoot":"","sources":["../../../src/resources/storage/sqldbs/sqldbs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,UAAU,qBAAkB;AACxC,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,OAAO,EAAE,qBAAkB;AAC5E,OAAO,EAAE,UAAU,EAAE,qCAAkC;AACvD,OAAO,EACL,qBAAqB,EACrB,KAAK,2BAA2B,EAChC,WAAW,EACZ,oCAAiC;AAElC,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAGnE;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IAEnE;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,iCAAiC,EAAE,WAAW,CAAC;IAO9D;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAIjG;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,IAAI,CAAC;IASnB;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;CAGvF;AAED,MAAM,MAAM,iCAAiC,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAC;AAEnF,MAAM,WAAW,WAAW;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,cAAc,GAAG,kBAAkB,GAAG,UAAU,GAAG,eAAe,CAAC;IAExF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAED,MAAM,WAAW,eAAgB,SAAQ,2BAA2B;IAClE;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,gBAAgB,CAAC,EAAE,SAAS,GAAG,cAAc,GAAG,kBAAkB,GAAG,UAAU,GAAG,eAAe,CAAC;IAElG;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,GAAG,aAAa,CAAC;CAC/E;AAED,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAID,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Sqldbs = void 0;
|
|
5
|
+
const tslib_1 = require("../../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../../core/resource.js");
|
|
7
|
+
const ActionsAPI = tslib_1.__importStar(require("./actions.js"));
|
|
8
|
+
const actions_1 = require("./actions.js");
|
|
9
|
+
const pagination_1 = require("../../../core/pagination.js");
|
|
10
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
11
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
12
|
+
/**
|
|
13
|
+
* Manage SQL databases and run SQL against them
|
|
14
|
+
*/
|
|
15
|
+
class Sqldbs extends resource_1.APIResource {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.actions = new ActionsAPI.Actions(this._client);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Lists the SQL databases for the authenticated user's organization. Results use
|
|
22
|
+
* page-based pagination (`page[number]`/`page[size]`) and can be filtered and
|
|
23
|
+
* sorted.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* // Automatically fetches more pages as needed.
|
|
28
|
+
* for await (const sqlDatabase of client.storage.sqldbs.list()) {
|
|
29
|
+
* // ...
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
list(query = {}, options) {
|
|
34
|
+
return this._client.getAPIList('/storage/sqldbs', (pagination_1.DefaultFlatPagination), {
|
|
35
|
+
query,
|
|
36
|
+
...options,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Creates a new SQL database. Provisioning is asynchronous: the database is
|
|
41
|
+
* returned with status `pending` and becomes usable once it reaches
|
|
42
|
+
* `provision_ok`.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const sqlDatabaseResponseWrapper =
|
|
47
|
+
* await client.storage.sqldbs.create({
|
|
48
|
+
* name: 'my-database',
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
create(body, options) {
|
|
53
|
+
return this._client.post('/storage/sqldbs', { body, ...options });
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Deletes a SQL database and all of the data it holds. Deletion is asynchronous
|
|
57
|
+
* and returns `202` with an empty body — the record is not removed synchronously.
|
|
58
|
+
* Poll `GET /storage/sqldbs/{id}`, which returns `404` once the database has been
|
|
59
|
+
* purged; there is no durable `deleted` state. A database still bound by a
|
|
60
|
+
* function is refused with `409` unless `force=true`.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* await client.storage.sqldbs.delete(
|
|
65
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
66
|
+
* );
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
delete(id, params = {}, options) {
|
|
70
|
+
const { force } = params ?? {};
|
|
71
|
+
return this._client.delete((0, path_1.path) `/storage/sqldbs/${id}`, {
|
|
72
|
+
query: { force },
|
|
73
|
+
...options,
|
|
74
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Retrieves a SQL database by its ID, including its provisioning status.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* const sqlDatabaseResponseWrapper =
|
|
83
|
+
* await client.storage.sqldbs.retrieve(
|
|
84
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
85
|
+
* );
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
retrieve(id, options) {
|
|
89
|
+
return this._client.get((0, path_1.path) `/storage/sqldbs/${id}`, options);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.Sqldbs = Sqldbs;
|
|
93
|
+
Sqldbs.Actions = actions_1.Actions;
|
|
94
|
+
//# sourceMappingURL=sqldbs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqldbs.js","sourceRoot":"","sources":["../../../src/resources/storage/sqldbs/sqldbs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,iEAAwC;AACxC,0CAA4E;AAE5E,4DAIkC;AAClC,0DAAyD;AAEzD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAmFrE,CAAC;IAjFC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAA,kCAAkC,CAAA,EAAE;YACpF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,EAAU,EACV,SAA+C,EAAE,EACjD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,mBAAmB,EAAE,EAAE,EAAE;YACtD,KAAK,EAAE,EAAE,KAAK,EAAE;YAChB,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,mBAAmB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF;AApFD,wBAoFC;AA2DD,MAAM,CAAC,OAAO,GAAG,iBAAO,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import * as ActionsAPI from "./actions.mjs";
|
|
4
|
+
import { Actions } from "./actions.mjs";
|
|
5
|
+
import { DefaultFlatPagination, } from "../../../core/pagination.mjs";
|
|
6
|
+
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
7
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
8
|
+
/**
|
|
9
|
+
* Manage SQL databases and run SQL against them
|
|
10
|
+
*/
|
|
11
|
+
export class Sqldbs extends APIResource {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.actions = new ActionsAPI.Actions(this._client);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Lists the SQL databases for the authenticated user's organization. Results use
|
|
18
|
+
* page-based pagination (`page[number]`/`page[size]`) and can be filtered and
|
|
19
|
+
* sorted.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* // Automatically fetches more pages as needed.
|
|
24
|
+
* for await (const sqlDatabase of client.storage.sqldbs.list()) {
|
|
25
|
+
* // ...
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
list(query = {}, options) {
|
|
30
|
+
return this._client.getAPIList('/storage/sqldbs', (DefaultFlatPagination), {
|
|
31
|
+
query,
|
|
32
|
+
...options,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Creates a new SQL database. Provisioning is asynchronous: the database is
|
|
37
|
+
* returned with status `pending` and becomes usable once it reaches
|
|
38
|
+
* `provision_ok`.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const sqlDatabaseResponseWrapper =
|
|
43
|
+
* await client.storage.sqldbs.create({
|
|
44
|
+
* name: 'my-database',
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
create(body, options) {
|
|
49
|
+
return this._client.post('/storage/sqldbs', { body, ...options });
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Deletes a SQL database and all of the data it holds. Deletion is asynchronous
|
|
53
|
+
* and returns `202` with an empty body — the record is not removed synchronously.
|
|
54
|
+
* Poll `GET /storage/sqldbs/{id}`, which returns `404` once the database has been
|
|
55
|
+
* purged; there is no durable `deleted` state. A database still bound by a
|
|
56
|
+
* function is refused with `409` unless `force=true`.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* await client.storage.sqldbs.delete(
|
|
61
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
62
|
+
* );
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
delete(id, params = {}, options) {
|
|
66
|
+
const { force } = params ?? {};
|
|
67
|
+
return this._client.delete(path `/storage/sqldbs/${id}`, {
|
|
68
|
+
query: { force },
|
|
69
|
+
...options,
|
|
70
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Retrieves a SQL database by its ID, including its provisioning status.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* const sqlDatabaseResponseWrapper =
|
|
79
|
+
* await client.storage.sqldbs.retrieve(
|
|
80
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
81
|
+
* );
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
retrieve(id, options) {
|
|
85
|
+
return this._client.get(path `/storage/sqldbs/${id}`, options);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
Sqldbs.Actions = Actions;
|
|
89
|
+
//# sourceMappingURL=sqldbs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqldbs.mjs","sourceRoot":"","sources":["../../../src/resources/storage/sqldbs/sqldbs.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,UAAU,sBAAkB;AACxC,OAAO,EAA0C,OAAO,EAAE,sBAAkB;AAE5E,OAAO,EACL,qBAAqB,GAGtB,qCAAiC;AAClC,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAmFrE,CAAC;IAjFC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAA,qBAAkC,CAAA,EAAE;YACpF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,EAAU,EACV,SAA+C,EAAE,EACjD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,mBAAmB,EAAE,EAAE,EAAE;YACtD,KAAK,EAAE,EAAE,KAAK,EAAE;YAChB,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,mBAAmB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF;AA2DD,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqldbs.d.mts","sourceRoot":"","sources":["../../src/resources/storage/sqldbs.ts"],"names":[],"mappings":"AAEA,mCAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqldbs.d.ts","sourceRoot":"","sources":["../../src/resources/storage/sqldbs.ts"],"names":[],"mappings":"AAEA,kCAA+B"}
|