telnyx 7.8.0 → 7.9.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 +8 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai/ai.d.mts +6 -2
- package/resources/ai/ai.d.mts.map +1 -1
- package/resources/ai/ai.d.ts +6 -2
- package/resources/ai/ai.d.ts.map +1 -1
- package/resources/ai/ai.js +4 -0
- package/resources/ai/ai.js.map +1 -1
- package/resources/ai/ai.mjs +4 -0
- package/resources/ai/ai.mjs.map +1 -1
- package/resources/ai/anthropic/anthropic.d.mts +10 -0
- package/resources/ai/anthropic/anthropic.d.mts.map +1 -0
- package/resources/ai/anthropic/anthropic.d.ts +10 -0
- package/resources/ai/anthropic/anthropic.d.ts.map +1 -0
- package/resources/ai/anthropic/anthropic.js +17 -0
- package/resources/ai/anthropic/anthropic.js.map +1 -0
- package/resources/ai/anthropic/anthropic.mjs +12 -0
- package/resources/ai/anthropic/anthropic.mjs.map +1 -0
- package/resources/ai/anthropic/index.d.mts +3 -0
- package/resources/ai/anthropic/index.d.mts.map +1 -0
- package/resources/ai/anthropic/index.d.ts +3 -0
- package/resources/ai/anthropic/index.d.ts.map +1 -0
- package/resources/ai/anthropic/index.js +9 -0
- package/resources/ai/anthropic/index.js.map +1 -0
- package/resources/ai/anthropic/index.mjs +4 -0
- package/resources/ai/anthropic/index.mjs.map +1 -0
- package/resources/ai/anthropic/v1.d.mts +148 -0
- package/resources/ai/anthropic/v1.d.mts.map +1 -0
- package/resources/ai/anthropic/v1.d.ts +148 -0
- package/resources/ai/anthropic/v1.d.ts.map +1 -0
- package/resources/ai/anthropic/v1.js +35 -0
- package/resources/ai/anthropic/v1.js.map +1 -0
- package/resources/ai/anthropic/v1.mjs +31 -0
- package/resources/ai/anthropic/v1.mjs.map +1 -0
- package/resources/ai/anthropic.d.mts +2 -0
- package/resources/ai/anthropic.d.mts.map +1 -0
- package/resources/ai/anthropic.d.ts +2 -0
- package/resources/ai/anthropic.d.ts.map +1 -0
- package/resources/ai/anthropic.js +6 -0
- package/resources/ai/anthropic.js.map +1 -0
- package/resources/ai/anthropic.mjs +3 -0
- package/resources/ai/anthropic.mjs.map +1 -0
- package/resources/ai/assistants/assistants.d.mts +16 -5
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +16 -5
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/assistants/assistants.js +2 -2
- package/resources/ai/assistants/assistants.js.map +1 -1
- package/resources/ai/assistants/assistants.mjs +2 -2
- package/resources/ai/assistants/assistants.mjs.map +1 -1
- package/resources/ai/conversations/conversation-insights.d.mts +105 -0
- package/resources/ai/conversations/conversation-insights.d.mts.map +1 -0
- package/resources/ai/conversations/conversation-insights.d.ts +105 -0
- package/resources/ai/conversations/conversation-insights.d.ts.map +1 -0
- package/resources/ai/conversations/conversation-insights.js +24 -0
- package/resources/ai/conversations/conversation-insights.js.map +1 -0
- package/resources/ai/conversations/conversation-insights.mjs +20 -0
- package/resources/ai/conversations/conversation-insights.mjs.map +1 -0
- package/resources/ai/conversations/conversations.d.mts +4 -0
- package/resources/ai/conversations/conversations.d.mts.map +1 -1
- package/resources/ai/conversations/conversations.d.ts +4 -0
- package/resources/ai/conversations/conversations.d.ts.map +1 -1
- package/resources/ai/conversations/conversations.js +4 -0
- package/resources/ai/conversations/conversations.js.map +1 -1
- package/resources/ai/conversations/conversations.mjs +4 -0
- package/resources/ai/conversations/conversations.mjs.map +1 -1
- package/resources/ai/conversations/index.d.mts +1 -0
- package/resources/ai/conversations/index.d.mts.map +1 -1
- package/resources/ai/conversations/index.d.ts +1 -0
- package/resources/ai/conversations/index.d.ts.map +1 -1
- package/resources/ai/conversations/index.js +3 -1
- package/resources/ai/conversations/index.js.map +1 -1
- package/resources/ai/conversations/index.mjs +1 -0
- package/resources/ai/conversations/index.mjs.map +1 -1
- package/resources/ai/index.d.mts +2 -1
- package/resources/ai/index.d.mts.map +1 -1
- package/resources/ai/index.d.ts +2 -1
- package/resources/ai/index.d.ts.map +1 -1
- package/resources/ai/index.js +17 -15
- package/resources/ai/index.js.map +1 -1
- package/resources/ai/index.mjs +1 -0
- package/resources/ai/index.mjs.map +1 -1
- package/resources/ai/tools.d.mts +22 -1
- package/resources/ai/tools.d.mts.map +1 -1
- package/resources/ai/tools.d.ts +22 -1
- package/resources/ai/tools.d.ts.map +1 -1
- package/resources/calls/actions.d.mts +8 -4
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +8 -4
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/calls/calls.d.mts +8 -0
- package/resources/calls/calls.d.mts.map +1 -1
- package/resources/calls/calls.d.ts +8 -0
- package/resources/calls/calls.d.ts.map +1 -1
- package/resources/calls/calls.js.map +1 -1
- package/resources/calls/calls.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/managed-accounts/managed-accounts.d.mts +11 -2
- package/resources/managed-accounts/managed-accounts.d.mts.map +1 -1
- package/resources/managed-accounts/managed-accounts.d.ts +11 -2
- package/resources/managed-accounts/managed-accounts.d.ts.map +1 -1
- package/resources/managed-accounts/managed-accounts.js.map +1 -1
- package/resources/managed-accounts/managed-accounts.mjs.map +1 -1
- package/resources/requirements.d.mts +28 -3
- package/resources/requirements.d.mts.map +1 -1
- package/resources/requirements.d.ts +28 -3
- package/resources/requirements.d.ts.map +1 -1
- package/resources/requirements.js +2 -2
- package/resources/requirements.js.map +1 -1
- package/resources/requirements.mjs +2 -2
- package/resources/requirements.mjs.map +1 -1
- package/resources/speech-to-text/speech-to-text.d.mts +1 -1
- package/resources/speech-to-text/speech-to-text.d.mts.map +1 -1
- package/resources/speech-to-text/speech-to-text.d.ts +1 -1
- package/resources/speech-to-text/speech-to-text.d.ts.map +1 -1
- package/resources/storage/cloudfs/actions.d.mts +43 -0
- package/resources/storage/cloudfs/actions.d.mts.map +1 -0
- package/resources/storage/cloudfs/actions.d.ts +43 -0
- package/resources/storage/cloudfs/actions.d.ts.map +1 -0
- package/resources/storage/cloudfs/actions.js +39 -0
- package/resources/storage/cloudfs/actions.js.map +1 -0
- package/resources/storage/cloudfs/actions.mjs +35 -0
- package/resources/storage/cloudfs/actions.mjs.map +1 -0
- package/resources/storage/cloudfs/cloudfs.d.mts +345 -0
- package/resources/storage/cloudfs/cloudfs.d.mts.map +1 -0
- package/resources/storage/cloudfs/cloudfs.d.ts +345 -0
- package/resources/storage/cloudfs/cloudfs.d.ts.map +1 -0
- package/resources/storage/cloudfs/cloudfs.js +116 -0
- package/resources/storage/cloudfs/cloudfs.js.map +1 -0
- package/resources/storage/cloudfs/cloudfs.mjs +111 -0
- package/resources/storage/cloudfs/cloudfs.mjs.map +1 -0
- package/resources/storage/cloudfs/index.d.mts +3 -0
- package/resources/storage/cloudfs/index.d.mts.map +1 -0
- package/resources/storage/cloudfs/index.d.ts +3 -0
- package/resources/storage/cloudfs/index.d.ts.map +1 -0
- package/resources/storage/cloudfs/index.js +9 -0
- package/resources/storage/cloudfs/index.js.map +1 -0
- package/resources/storage/cloudfs/index.mjs +4 -0
- package/resources/storage/cloudfs/index.mjs.map +1 -0
- package/resources/storage/cloudfs.d.mts +2 -0
- package/resources/storage/cloudfs.d.mts.map +1 -0
- package/resources/storage/cloudfs.d.ts +2 -0
- package/resources/storage/cloudfs.d.ts.map +1 -0
- package/resources/storage/cloudfs.js +6 -0
- package/resources/storage/cloudfs.js.map +1 -0
- package/resources/storage/cloudfs.mjs +3 -0
- package/resources/storage/cloudfs.mjs.map +1 -0
- package/resources/storage/index.d.mts +1 -0
- package/resources/storage/index.d.mts.map +1 -1
- package/resources/storage/index.d.ts +1 -0
- package/resources/storage/index.d.ts.map +1 -1
- package/resources/storage/index.js +7 -5
- 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/storage.d.mts +4 -0
- package/resources/storage/storage.d.mts.map +1 -1
- package/resources/storage/storage.d.ts +4 -0
- 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/verify-profiles.d.mts +3 -3
- package/resources/verify-profiles.d.ts +3 -3
- package/resources/webhooks.d.mts +125 -19
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +125 -19
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +2 -0
- package/src/resources/ai/ai.ts +8 -0
- package/src/resources/ai/anthropic/anthropic.ts +19 -0
- package/src/resources/ai/anthropic/index.ts +4 -0
- package/src/resources/ai/anthropic/v1.ts +157 -0
- package/src/resources/ai/anthropic.ts +3 -0
- package/src/resources/ai/assistants/assistants.ts +19 -5
- package/src/resources/ai/conversations/conversation-insights.ts +125 -0
- package/src/resources/ai/conversations/conversations.ts +15 -0
- package/src/resources/ai/conversations/index.ts +5 -0
- package/src/resources/ai/index.ts +2 -0
- package/src/resources/ai/tools.ts +28 -0
- package/src/resources/calls/actions.ts +8 -4
- package/src/resources/calls/calls.ts +9 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/managed-accounts/managed-accounts.ts +13 -2
- package/src/resources/requirements.ts +38 -3
- package/src/resources/speech-to-text/speech-to-text.ts +1 -1
- package/src/resources/storage/cloudfs/actions.ts +59 -0
- package/src/resources/storage/cloudfs/cloudfs.ts +446 -0
- package/src/resources/storage/cloudfs/index.ts +13 -0
- package/src/resources/storage/cloudfs.ts +3 -0
- package/src/resources/storage/index.ts +10 -0
- package/src/resources/storage/storage.ts +24 -0
- package/src/resources/verify-profiles.ts +3 -3
- package/src/resources/webhooks.ts +152 -11
- 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,345 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import * as CloudfsAPI from "./cloudfs.js";
|
|
3
|
+
import * as ActionsAPI from "./actions.js";
|
|
4
|
+
import { ActionRotateMetaTokenParams, Actions } from "./actions.js";
|
|
5
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
6
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
7
|
+
/**
|
|
8
|
+
* Manage CloudFS filesystems — JuiceFS-compatible filesystems backed by Telnyx Cloud Storage
|
|
9
|
+
*/
|
|
10
|
+
export declare class Cloudfs extends APIResource {
|
|
11
|
+
actions: ActionsAPI.Actions;
|
|
12
|
+
/**
|
|
13
|
+
* Lists the CloudFS filesystems for the authenticated user's organization. Results
|
|
14
|
+
* use cursor-based pagination: fetch the next page by passing `meta.cursors.after`
|
|
15
|
+
* as `page[after]`, or follow the `meta.next` URL.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const cloudfs = await client.storage.cloudfs.list();
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
list(query?: CloudfListParams | null | undefined, options?: RequestOptions): APIPromise<CloudfListResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* Creates a CloudFS filesystem. Provisioning is synchronous — typically a few
|
|
25
|
+
* seconds, up to a few minutes — and the filesystem is returned with status
|
|
26
|
+
* `ready`, together with its S3 bucket and metadata connection details. This
|
|
27
|
+
* response is the only time the filesystem's `meta_token` — and the
|
|
28
|
+
* credential-bearing `meta_url` — are returned; store them securely. If the token
|
|
29
|
+
* is lost, issue a new one with the rotate-meta-token action. Names are unique
|
|
30
|
+
* within your organization: creating with an existing name returns a `422`.
|
|
31
|
+
* Requests are idempotent: retrying with the same `Idempotency-Key` within 24
|
|
32
|
+
* hours replays the original response instead of creating another filesystem.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const cloudfsFilesystemResponseWrapper =
|
|
37
|
+
* await client.storage.cloudfs.create({
|
|
38
|
+
* name: 'agent-fs',
|
|
39
|
+
* region: 'us-east-1',
|
|
40
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
create(params: CloudfCreateParams, options?: RequestOptions): APIPromise<CloudfsFilesystemResponseWrapper>;
|
|
45
|
+
/**
|
|
46
|
+
* Permanently deletes a CloudFS filesystem, removing its S3 bucket and its
|
|
47
|
+
* metadata database. Deletion is synchronous: the response returns the
|
|
48
|
+
* filesystem's final state with status `deleted`. There is no restore. A
|
|
49
|
+
* filesystem that is still `provisioning` returns a `409`. If the filesystem still
|
|
50
|
+
* contains data, the request may be rejected with a `409` — drain the bucket and
|
|
51
|
+
* retry.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* const cloudfsFilesystemDetailResponseWrapper =
|
|
56
|
+
* await client.storage.cloudfs.delete(
|
|
57
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
58
|
+
* );
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
delete(id: string, options?: RequestOptions): APIPromise<CloudfsFilesystemDetailResponseWrapper>;
|
|
62
|
+
/**
|
|
63
|
+
* Retrieves a CloudFS filesystem by its ID. The returned `meta_url` omits the
|
|
64
|
+
* credential — the metadata token is only ever returned by create and
|
|
65
|
+
* rotate-meta-token. A filesystem whose last lifecycle action failed includes a
|
|
66
|
+
* customer-safe `error` message.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* const cloudfsFilesystemDetailResponseWrapper =
|
|
71
|
+
* await client.storage.cloudfs.retrieve(
|
|
72
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
73
|
+
* );
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<CloudfsFilesystemDetailResponseWrapper>;
|
|
77
|
+
/**
|
|
78
|
+
* Updates a CloudFS filesystem. Only `name` can be changed; other fields are
|
|
79
|
+
* immutable and unknown fields are rejected with a `400`. Renaming to a name that
|
|
80
|
+
* already exists in your organization returns a `422`.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* const cloudfsFilesystemDetailResponseWrapper =
|
|
85
|
+
* await client.storage.cloudfs.update(
|
|
86
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
87
|
+
* );
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
update(id: string, body: CloudfUpdateParams, options?: RequestOptions): APIPromise<CloudfsFilesystemDetailResponseWrapper>;
|
|
91
|
+
}
|
|
92
|
+
export interface CloudfsFilesystemDetailResponseWrapper {
|
|
93
|
+
/**
|
|
94
|
+
* A CloudFS filesystem as returned by get, update, and delete. `meta_url` omits
|
|
95
|
+
* the credential and there is no `meta_token` field — the token is only returned
|
|
96
|
+
* by create and rotate-meta-token.
|
|
97
|
+
*/
|
|
98
|
+
data?: CloudfsFilesystemDetailResponseWrapper.Data;
|
|
99
|
+
}
|
|
100
|
+
export declare namespace CloudfsFilesystemDetailResponseWrapper {
|
|
101
|
+
/**
|
|
102
|
+
* A CloudFS filesystem as returned by get, update, and delete. `meta_url` omits
|
|
103
|
+
* the credential and there is no `meta_token` field — the token is only returned
|
|
104
|
+
* by create and rotate-meta-token.
|
|
105
|
+
*/
|
|
106
|
+
interface Data {
|
|
107
|
+
id?: string;
|
|
108
|
+
created_at?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Explanation of the most recent failed lifecycle action. Present only when the
|
|
111
|
+
* filesystem is in a `failed` state.
|
|
112
|
+
*/
|
|
113
|
+
error?: string;
|
|
114
|
+
/**
|
|
115
|
+
* PostgreSQL connection URL for the filesystem's metadata database, without the
|
|
116
|
+
* credential. Combine it with your stored metadata token, or issue a new token
|
|
117
|
+
* with rotate-meta-token.
|
|
118
|
+
*/
|
|
119
|
+
meta_url?: string;
|
|
120
|
+
name?: string;
|
|
121
|
+
record_type?: string;
|
|
122
|
+
region?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Name of the bucket that stores this filesystem's data. Created during
|
|
125
|
+
* provisioning.
|
|
126
|
+
*/
|
|
127
|
+
s3_bucket?: string;
|
|
128
|
+
/**
|
|
129
|
+
* URL of the Telnyx Cloud Storage endpoint backing this filesystem.
|
|
130
|
+
*/
|
|
131
|
+
s3_endpoint?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Lifecycle status of the filesystem. `ready` means it is fully provisioned and
|
|
134
|
+
* usable. `needs_format` means the storage bucket and metadata database were
|
|
135
|
+
* provisioned but the filesystem has not yet been formatted — run `juicefs format`
|
|
136
|
+
* with the filesystem's `meta_url` before mounting. `failed` means the last
|
|
137
|
+
* lifecycle action failed — see the filesystem's `error` message. `deleted`
|
|
138
|
+
* appears only in the delete response: deleted filesystems are excluded from list
|
|
139
|
+
* results and return a `404` on retrieval.
|
|
140
|
+
*/
|
|
141
|
+
status?: CloudfsAPI.CloudfsFilesystemStatus;
|
|
142
|
+
updated_at?: string;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
export interface CloudfsFilesystemResponseWrapper {
|
|
146
|
+
/**
|
|
147
|
+
* A CloudFS filesystem, including its metadata credential. This shape is returned
|
|
148
|
+
* only by create and rotate-meta-token.
|
|
149
|
+
*/
|
|
150
|
+
data?: CloudfsFilesystemResponseWrapper.Data;
|
|
151
|
+
}
|
|
152
|
+
export declare namespace CloudfsFilesystemResponseWrapper {
|
|
153
|
+
/**
|
|
154
|
+
* A CloudFS filesystem, including its metadata credential. This shape is returned
|
|
155
|
+
* only by create and rotate-meta-token.
|
|
156
|
+
*/
|
|
157
|
+
interface Data {
|
|
158
|
+
id?: string;
|
|
159
|
+
created_at?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Metadata access token, in cleartext. Returned only by create and
|
|
162
|
+
* rotate-meta-token and not retrievable afterwards — store it securely.
|
|
163
|
+
*/
|
|
164
|
+
meta_token?: string;
|
|
165
|
+
/**
|
|
166
|
+
* PostgreSQL connection URL for the filesystem's metadata database. In create and
|
|
167
|
+
* rotate-meta-token responses it embeds the metadata token as the password:
|
|
168
|
+
* `postgres://<database>:<meta_token>@us-east-1.telnyxcloudfs.com:5432/<database>?sslmode=require`
|
|
169
|
+
* (the example below is shown without the credential; the actual response includes
|
|
170
|
+
* it). Pass it to `juicefs mount`: the storage configuration is baked in at
|
|
171
|
+
* provisioning, so the metadata URL is all a client needs to mount the filesystem.
|
|
172
|
+
*/
|
|
173
|
+
meta_url?: string;
|
|
174
|
+
name?: string;
|
|
175
|
+
record_type?: string;
|
|
176
|
+
region?: string;
|
|
177
|
+
/**
|
|
178
|
+
* Name of the bucket that stores this filesystem's data. Created during
|
|
179
|
+
* provisioning.
|
|
180
|
+
*/
|
|
181
|
+
s3_bucket?: string;
|
|
182
|
+
/**
|
|
183
|
+
* URL of the Telnyx Cloud Storage endpoint backing this filesystem.
|
|
184
|
+
*/
|
|
185
|
+
s3_endpoint?: string;
|
|
186
|
+
/**
|
|
187
|
+
* Lifecycle status of the filesystem. `ready` means it is fully provisioned and
|
|
188
|
+
* usable. `needs_format` means the storage bucket and metadata database were
|
|
189
|
+
* provisioned but the filesystem has not yet been formatted — run `juicefs format`
|
|
190
|
+
* with the filesystem's `meta_url` before mounting. `failed` means the last
|
|
191
|
+
* lifecycle action failed — see the filesystem's `error` message. `deleted`
|
|
192
|
+
* appears only in the delete response: deleted filesystems are excluded from list
|
|
193
|
+
* results and return a `404` on retrieval.
|
|
194
|
+
*/
|
|
195
|
+
status?: CloudfsAPI.CloudfsFilesystemStatus;
|
|
196
|
+
updated_at?: string;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Lifecycle status of the filesystem. `ready` means it is fully provisioned and
|
|
201
|
+
* usable. `needs_format` means the storage bucket and metadata database were
|
|
202
|
+
* provisioned but the filesystem has not yet been formatted — run `juicefs format`
|
|
203
|
+
* with the filesystem's `meta_url` before mounting. `failed` means the last
|
|
204
|
+
* lifecycle action failed — see the filesystem's `error` message. `deleted`
|
|
205
|
+
* appears only in the delete response: deleted filesystems are excluded from list
|
|
206
|
+
* results and return a `404` on retrieval.
|
|
207
|
+
*/
|
|
208
|
+
export type CloudfsFilesystemStatus = 'provisioning' | 'ready' | 'needs_format' | 'deleting' | 'failed' | 'deleted';
|
|
209
|
+
export interface CloudfListResponse {
|
|
210
|
+
data?: Array<CloudfListResponse.Data>;
|
|
211
|
+
meta?: CloudfListResponse.Meta;
|
|
212
|
+
}
|
|
213
|
+
export declare namespace CloudfListResponse {
|
|
214
|
+
/**
|
|
215
|
+
* A CloudFS filesystem as returned in list results. Connection details
|
|
216
|
+
* (`meta_url`, `meta_token`) are omitted — retrieve the filesystem by ID for its
|
|
217
|
+
* redacted `meta_url`.
|
|
218
|
+
*/
|
|
219
|
+
interface Data {
|
|
220
|
+
id?: string;
|
|
221
|
+
created_at?: string;
|
|
222
|
+
name?: string;
|
|
223
|
+
record_type?: string;
|
|
224
|
+
region?: string;
|
|
225
|
+
/**
|
|
226
|
+
* Name of the bucket that stores this filesystem's data. Created during
|
|
227
|
+
* provisioning.
|
|
228
|
+
*/
|
|
229
|
+
s3_bucket?: string;
|
|
230
|
+
/**
|
|
231
|
+
* URL of the Telnyx Cloud Storage endpoint backing this filesystem.
|
|
232
|
+
*/
|
|
233
|
+
s3_endpoint?: string;
|
|
234
|
+
/**
|
|
235
|
+
* Lifecycle status of the filesystem. `ready` means it is fully provisioned and
|
|
236
|
+
* usable. `needs_format` means the storage bucket and metadata database were
|
|
237
|
+
* provisioned but the filesystem has not yet been formatted — run `juicefs format`
|
|
238
|
+
* with the filesystem's `meta_url` before mounting. `failed` means the last
|
|
239
|
+
* lifecycle action failed — see the filesystem's `error` message. `deleted`
|
|
240
|
+
* appears only in the delete response: deleted filesystems are excluded from list
|
|
241
|
+
* results and return a `404` on retrieval.
|
|
242
|
+
*/
|
|
243
|
+
status?: CloudfsAPI.CloudfsFilesystemStatus;
|
|
244
|
+
updated_at?: string;
|
|
245
|
+
}
|
|
246
|
+
interface Meta {
|
|
247
|
+
/**
|
|
248
|
+
* Opaque cursors for the adjacent pages. Empty when there are no adjacent pages.
|
|
249
|
+
*/
|
|
250
|
+
cursors?: Meta.Cursors;
|
|
251
|
+
/**
|
|
252
|
+
* Relative URL (path and query) of the next page. Omitted when there are no
|
|
253
|
+
* further results.
|
|
254
|
+
*/
|
|
255
|
+
next?: string;
|
|
256
|
+
/**
|
|
257
|
+
* Relative URL (path and query) of the previous page. Omitted on the first page.
|
|
258
|
+
*/
|
|
259
|
+
previous?: string;
|
|
260
|
+
}
|
|
261
|
+
namespace Meta {
|
|
262
|
+
/**
|
|
263
|
+
* Opaque cursors for the adjacent pages. Empty when there are no adjacent pages.
|
|
264
|
+
*/
|
|
265
|
+
interface Cursors {
|
|
266
|
+
/**
|
|
267
|
+
* Cursor for the next page; pass it as `page[after]`. Omitted on the last page.
|
|
268
|
+
*/
|
|
269
|
+
after?: string;
|
|
270
|
+
/**
|
|
271
|
+
* Cursor for the previous page; pass it as `page[before]`. Omitted on the first
|
|
272
|
+
* page.
|
|
273
|
+
*/
|
|
274
|
+
before?: string;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
export interface CloudfListParams {
|
|
279
|
+
/**
|
|
280
|
+
* Return only the filesystem whose name matches exactly.
|
|
281
|
+
*/
|
|
282
|
+
'filter[name]'?: string;
|
|
283
|
+
/**
|
|
284
|
+
* Return only filesystems in this region.
|
|
285
|
+
*/
|
|
286
|
+
'filter[region]'?: string;
|
|
287
|
+
/**
|
|
288
|
+
* Return only filesystems with this status. Unrecognized values are ignored.
|
|
289
|
+
*/
|
|
290
|
+
'filter[status]'?: 'provisioning' | 'ready' | 'needs_format' | 'deleting' | 'failed';
|
|
291
|
+
/**
|
|
292
|
+
* Opaque cursor from a previous response's `meta.cursors.after`; returns the page
|
|
293
|
+
* after it. Mutually exclusive with `page[before]`.
|
|
294
|
+
*/
|
|
295
|
+
'page[after]'?: string;
|
|
296
|
+
/**
|
|
297
|
+
* Opaque cursor from a previous response's `meta.cursors.before`; returns the page
|
|
298
|
+
* before it. Mutually exclusive with `page[after]`.
|
|
299
|
+
*/
|
|
300
|
+
'page[before]'?: string;
|
|
301
|
+
/**
|
|
302
|
+
* The number of filesystems to return per page. Values above 250 are treated
|
|
303
|
+
* as 250.
|
|
304
|
+
*/
|
|
305
|
+
'page[limit]'?: number;
|
|
306
|
+
/**
|
|
307
|
+
* Sort order for the results: a field name for ascending, or the field name
|
|
308
|
+
* prefixed with `-` for descending.
|
|
309
|
+
*/
|
|
310
|
+
sort?: 'created_at' | '-created_at' | 'updated_at' | '-updated_at' | 'name' | '-name';
|
|
311
|
+
}
|
|
312
|
+
export interface CloudfCreateParams {
|
|
313
|
+
/**
|
|
314
|
+
* Body param: Filesystem name, unique within your organization. Names are trimmed
|
|
315
|
+
* and lowercased; after normalization they may contain lowercase letters, numbers,
|
|
316
|
+
* `.`, `_`, and `-` only.
|
|
317
|
+
*/
|
|
318
|
+
name: string;
|
|
319
|
+
/**
|
|
320
|
+
* Body param: Region where the filesystem's storage and metadata are provisioned.
|
|
321
|
+
*/
|
|
322
|
+
region: 'us-central-1' | 'us-east-1' | 'us-west-1';
|
|
323
|
+
/**
|
|
324
|
+
* Header param: Unique key that makes the request idempotent (1-255 characters:
|
|
325
|
+
* letters, numbers, `_`, and `-`). Retrying with the same key within 24 hours
|
|
326
|
+
* replays the original response (marked with an `Idempotent-Replayed: true`
|
|
327
|
+
* header) instead of repeating the action. Reusing a key with a different request
|
|
328
|
+
* returns a `422`; sending a key while the original request is still being
|
|
329
|
+
* processed returns a `409`.
|
|
330
|
+
*/
|
|
331
|
+
'Idempotency-Key': string;
|
|
332
|
+
}
|
|
333
|
+
export interface CloudfUpdateParams {
|
|
334
|
+
/**
|
|
335
|
+
* New filesystem name, unique within your organization. Names are trimmed and
|
|
336
|
+
* lowercased; after normalization they may contain lowercase letters, numbers,
|
|
337
|
+
* `.`, `_`, and `-` only.
|
|
338
|
+
*/
|
|
339
|
+
name?: string;
|
|
340
|
+
}
|
|
341
|
+
export declare namespace Cloudfs {
|
|
342
|
+
export { type CloudfsFilesystemDetailResponseWrapper as CloudfsFilesystemDetailResponseWrapper, type CloudfsFilesystemResponseWrapper as CloudfsFilesystemResponseWrapper, type CloudfsFilesystemStatus as CloudfsFilesystemStatus, type CloudfListResponse as CloudfListResponse, type CloudfListParams as CloudfListParams, type CloudfCreateParams as CloudfCreateParams, type CloudfUpdateParams as CloudfUpdateParams, };
|
|
343
|
+
export { Actions as Actions, type ActionRotateMetaTokenParams as ActionRotateMetaTokenParams };
|
|
344
|
+
}
|
|
345
|
+
//# sourceMappingURL=cloudfs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudfs.d.ts","sourceRoot":"","sources":["../../../src/resources/storage/cloudfs/cloudfs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,UAAU,qBAAkB;AACxC,OAAO,KAAK,UAAU,qBAAkB;AACxC,OAAO,EAAE,2BAA2B,EAAE,OAAO,EAAE,qBAAkB;AACjE,OAAO,EAAE,UAAU,EAAE,qCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAGnE;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IAEnE;;;;;;;;;OASG;IACH,IAAI,CACF,KAAK,GAA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OG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAID,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,sCAAsC,IAAI,sCAAsC,EACrF,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;IAEF,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,KAAK,2BAA2B,IAAI,2BAA2B,EAAE,CAAC;CAChG"}
|
|
@@ -0,0 +1,116 @@
|
|
|
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.Cloudfs = 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 headers_1 = require("../../../internal/headers.js");
|
|
10
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
11
|
+
/**
|
|
12
|
+
* Manage CloudFS filesystems — JuiceFS-compatible filesystems backed by Telnyx Cloud Storage
|
|
13
|
+
*/
|
|
14
|
+
class Cloudfs extends resource_1.APIResource {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.actions = new ActionsAPI.Actions(this._client);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Lists the CloudFS filesystems for the authenticated user's organization. Results
|
|
21
|
+
* use cursor-based pagination: fetch the next page by passing `meta.cursors.after`
|
|
22
|
+
* as `page[after]`, or follow the `meta.next` URL.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const cloudfs = await client.storage.cloudfs.list();
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
list(query = {}, options) {
|
|
30
|
+
return this._client.get('/storage/cloudfs', { query, ...options });
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Creates a CloudFS filesystem. Provisioning is synchronous — typically a few
|
|
34
|
+
* seconds, up to a few minutes — and the filesystem is returned with status
|
|
35
|
+
* `ready`, together with its S3 bucket and metadata connection details. This
|
|
36
|
+
* response is the only time the filesystem's `meta_token` — and the
|
|
37
|
+
* credential-bearing `meta_url` — are returned; store them securely. If the token
|
|
38
|
+
* is lost, issue a new one with the rotate-meta-token action. Names are unique
|
|
39
|
+
* within your organization: creating with an existing name returns a `422`.
|
|
40
|
+
* Requests are idempotent: retrying with the same `Idempotency-Key` within 24
|
|
41
|
+
* hours replays the original response instead of creating another filesystem.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const cloudfsFilesystemResponseWrapper =
|
|
46
|
+
* await client.storage.cloudfs.create({
|
|
47
|
+
* name: 'agent-fs',
|
|
48
|
+
* region: 'us-east-1',
|
|
49
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
create(params, options) {
|
|
54
|
+
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
55
|
+
return this._client.post('/storage/cloudfs', {
|
|
56
|
+
body,
|
|
57
|
+
...options,
|
|
58
|
+
headers: (0, headers_1.buildHeaders)([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Permanently deletes a CloudFS filesystem, removing its S3 bucket and its
|
|
63
|
+
* metadata database. Deletion is synchronous: the response returns the
|
|
64
|
+
* filesystem's final state with status `deleted`. There is no restore. A
|
|
65
|
+
* filesystem that is still `provisioning` returns a `409`. If the filesystem still
|
|
66
|
+
* contains data, the request may be rejected with a `409` — drain the bucket and
|
|
67
|
+
* retry.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* const cloudfsFilesystemDetailResponseWrapper =
|
|
72
|
+
* await client.storage.cloudfs.delete(
|
|
73
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
74
|
+
* );
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
delete(id, options) {
|
|
78
|
+
return this._client.delete((0, path_1.path) `/storage/cloudfs/${id}`, options);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Retrieves a CloudFS filesystem by its ID. The returned `meta_url` omits the
|
|
82
|
+
* credential — the metadata token is only ever returned by create and
|
|
83
|
+
* rotate-meta-token. A filesystem whose last lifecycle action failed includes a
|
|
84
|
+
* customer-safe `error` message.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* const cloudfsFilesystemDetailResponseWrapper =
|
|
89
|
+
* await client.storage.cloudfs.retrieve(
|
|
90
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
91
|
+
* );
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
retrieve(id, options) {
|
|
95
|
+
return this._client.get((0, path_1.path) `/storage/cloudfs/${id}`, options);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Updates a CloudFS filesystem. Only `name` can be changed; other fields are
|
|
99
|
+
* immutable and unknown fields are rejected with a `400`. Renaming to a name that
|
|
100
|
+
* already exists in your organization returns a `422`.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* const cloudfsFilesystemDetailResponseWrapper =
|
|
105
|
+
* await client.storage.cloudfs.update(
|
|
106
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
107
|
+
* );
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
update(id, body, options) {
|
|
111
|
+
return this._client.patch((0, path_1.path) `/storage/cloudfs/${id}`, { body, ...options });
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
exports.Cloudfs = Cloudfs;
|
|
115
|
+
Cloudfs.Actions = actions_1.Actions;
|
|
116
|
+
//# sourceMappingURL=cloudfs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudfs.js","sourceRoot":"","sources":["../../../src/resources/storage/cloudfs/cloudfs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AAErD,iEAAwC;AACxC,0CAAiE;AAEjE,0DAAyD;AAEzD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA2GrE,CAAC;IAzGC;;;;;;;;;OASG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,MAA0B,EAAE,OAAwB;QACzD,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE;YAC3C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACjF,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,oBAAoB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,oBAAoB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,EAAU,EACV,IAAwB,EACxB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,oBAAoB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;CACF;AA5GD,0BA4GC;AAqTD,OAAO,CAAC,OAAO,GAAG,iBAAO,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
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 { buildHeaders } from "../../../internal/headers.mjs";
|
|
6
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
7
|
+
/**
|
|
8
|
+
* Manage CloudFS filesystems — JuiceFS-compatible filesystems backed by Telnyx Cloud Storage
|
|
9
|
+
*/
|
|
10
|
+
export class Cloudfs extends APIResource {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.actions = new ActionsAPI.Actions(this._client);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Lists the CloudFS filesystems for the authenticated user's organization. Results
|
|
17
|
+
* use cursor-based pagination: fetch the next page by passing `meta.cursors.after`
|
|
18
|
+
* as `page[after]`, or follow the `meta.next` URL.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const cloudfs = await client.storage.cloudfs.list();
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
list(query = {}, options) {
|
|
26
|
+
return this._client.get('/storage/cloudfs', { query, ...options });
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Creates a CloudFS filesystem. Provisioning is synchronous — typically a few
|
|
30
|
+
* seconds, up to a few minutes — and the filesystem is returned with status
|
|
31
|
+
* `ready`, together with its S3 bucket and metadata connection details. This
|
|
32
|
+
* response is the only time the filesystem's `meta_token` — and the
|
|
33
|
+
* credential-bearing `meta_url` — are returned; store them securely. If the token
|
|
34
|
+
* is lost, issue a new one with the rotate-meta-token action. Names are unique
|
|
35
|
+
* within your organization: creating with an existing name returns a `422`.
|
|
36
|
+
* Requests are idempotent: retrying with the same `Idempotency-Key` within 24
|
|
37
|
+
* hours replays the original response instead of creating another filesystem.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const cloudfsFilesystemResponseWrapper =
|
|
42
|
+
* await client.storage.cloudfs.create({
|
|
43
|
+
* name: 'agent-fs',
|
|
44
|
+
* region: 'us-east-1',
|
|
45
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
create(params, options) {
|
|
50
|
+
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
51
|
+
return this._client.post('/storage/cloudfs', {
|
|
52
|
+
body,
|
|
53
|
+
...options,
|
|
54
|
+
headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Permanently deletes a CloudFS filesystem, removing its S3 bucket and its
|
|
59
|
+
* metadata database. Deletion is synchronous: the response returns the
|
|
60
|
+
* filesystem's final state with status `deleted`. There is no restore. A
|
|
61
|
+
* filesystem that is still `provisioning` returns a `409`. If the filesystem still
|
|
62
|
+
* contains data, the request may be rejected with a `409` — drain the bucket and
|
|
63
|
+
* retry.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const cloudfsFilesystemDetailResponseWrapper =
|
|
68
|
+
* await client.storage.cloudfs.delete(
|
|
69
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
70
|
+
* );
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
delete(id, options) {
|
|
74
|
+
return this._client.delete(path `/storage/cloudfs/${id}`, options);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Retrieves a CloudFS filesystem by its ID. The returned `meta_url` omits the
|
|
78
|
+
* credential — the metadata token is only ever returned by create and
|
|
79
|
+
* rotate-meta-token. A filesystem whose last lifecycle action failed includes a
|
|
80
|
+
* customer-safe `error` message.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* const cloudfsFilesystemDetailResponseWrapper =
|
|
85
|
+
* await client.storage.cloudfs.retrieve(
|
|
86
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
87
|
+
* );
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
retrieve(id, options) {
|
|
91
|
+
return this._client.get(path `/storage/cloudfs/${id}`, options);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Updates a CloudFS filesystem. Only `name` can be changed; other fields are
|
|
95
|
+
* immutable and unknown fields are rejected with a `400`. Renaming to a name that
|
|
96
|
+
* already exists in your organization returns a `422`.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* const cloudfsFilesystemDetailResponseWrapper =
|
|
101
|
+
* await client.storage.cloudfs.update(
|
|
102
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
103
|
+
* );
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
update(id, body, options) {
|
|
107
|
+
return this._client.patch(path `/storage/cloudfs/${id}`, { body, ...options });
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
Cloudfs.Actions = Actions;
|
|
111
|
+
//# sourceMappingURL=cloudfs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudfs.mjs","sourceRoot":"","sources":["../../../src/resources/storage/cloudfs/cloudfs.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAAO,KAAK,UAAU,sBAAkB;AACxC,OAAO,EAA+B,OAAO,EAAE,sBAAkB;AAEjE,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA2GrE,CAAC;IAzGC;;;;;;;;;OASG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,MAA0B,EAAE,OAAwB;QACzD,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE;YAC3C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACjF,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,oBAAoB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,oBAAoB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,EAAU,EACV,IAAwB,EACxB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,oBAAoB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;CACF;AAqTD,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Actions, type ActionRotateMetaTokenParams } from "./actions.mjs";
|
|
2
|
+
export { Cloudfs, type CloudfsFilesystemDetailResponseWrapper, type CloudfsFilesystemResponseWrapper, type CloudfsFilesystemStatus, type CloudfListResponse, type CloudfListParams, type CloudfCreateParams, type CloudfUpdateParams, } from "./cloudfs.mjs";
|
|
3
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/storage/cloudfs/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,2BAA2B,EAAE,sBAAkB;AACtE,OAAO,EACL,OAAO,EACP,KAAK,sCAAsC,EAC3C,KAAK,gCAAgC,EACrC,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,sBAAkB"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Actions, type ActionRotateMetaTokenParams } from "./actions.js";
|
|
2
|
+
export { Cloudfs, type CloudfsFilesystemDetailResponseWrapper, type CloudfsFilesystemResponseWrapper, type CloudfsFilesystemStatus, type CloudfListResponse, type CloudfListParams, type CloudfCreateParams, type CloudfUpdateParams, } from "./cloudfs.js";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/storage/cloudfs/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,2BAA2B,EAAE,qBAAkB;AACtE,OAAO,EACL,OAAO,EACP,KAAK,sCAAsC,EAC3C,KAAK,gCAAgC,EACrC,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,qBAAkB"}
|
|
@@ -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.Cloudfs = 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 cloudfs_1 = require("./cloudfs.js");
|
|
8
|
+
Object.defineProperty(exports, "Cloudfs", { enumerable: true, get: function () { return cloudfs_1.Cloudfs; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/storage/cloudfs/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAAsE;AAA7D,kGAAA,OAAO,OAAA;AAChB,wCASmB;AARjB,kGAAA,OAAO,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/storage/cloudfs/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,OAAO,EAAoC,sBAAkB;AACtE,OAAO,EACL,OAAO,GAQR,sBAAkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudfs.d.mts","sourceRoot":"","sources":["../../src/resources/storage/cloudfs.ts"],"names":[],"mappings":"AAEA,oCAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudfs.d.ts","sourceRoot":"","sources":["../../src/resources/storage/cloudfs.ts"],"names":[],"mappings":"AAEA,mCAAgC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
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
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./cloudfs/index.js"), exports);
|
|
6
|
+
//# sourceMappingURL=cloudfs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudfs.js","sourceRoot":"","sources":["../../src/resources/storage/cloudfs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6DAAgC"}
|