@fluid-app/fluid-cli-mist 0.1.1 → 0.1.3
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/dist/index.d.mts +161 -14
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +867 -137
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -24,6 +24,16 @@ interface Droplet {
|
|
|
24
24
|
name: string;
|
|
25
25
|
uuid: string;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Managed env keys the backend writes onto a Mist once a droplet is
|
|
29
|
+
* attached (backfill + redeploy). The CLI VERIFIES these appear with
|
|
30
|
+
* `managed_by: "mist"` — it never sets them (the API 422s on write).
|
|
31
|
+
*
|
|
32
|
+
* Source: settled backend contract (#19685 auto-provisions the droplet
|
|
33
|
+
* env on integration-point create).
|
|
34
|
+
*/
|
|
35
|
+
declare const MANAGED_DROPLET_ENV_KEYS: readonly ["FLUID_DROPLET_UUID", "FLUID_DROPLET_SECRET", "FLUID_WEBHOOK_AUTH_TOKEN"];
|
|
36
|
+
type ManagedDropletEnvKey = (typeof MANAGED_DROPLET_ENV_KEYS)[number];
|
|
27
37
|
interface Mist {
|
|
28
38
|
id: string;
|
|
29
39
|
slug: string;
|
|
@@ -32,8 +42,14 @@ interface Mist {
|
|
|
32
42
|
name: string | null;
|
|
33
43
|
state: MistState;
|
|
34
44
|
kind: MistKind;
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Hostable is retired (#19684/#19687). Droplet attach now
|
|
47
|
+
* lives on integration points. These fields remain optional so reads of
|
|
48
|
+
* older serializer payloads don't break, but nothing writes them anymore.
|
|
49
|
+
*/
|
|
50
|
+
hostable_type?: HostableType | null;
|
|
51
|
+
/** @deprecated see `hostable_type`. */
|
|
52
|
+
hostable_id?: number | null;
|
|
37
53
|
vendor_name: string;
|
|
38
54
|
public_url: string | null;
|
|
39
55
|
/** ISO-8601 when state === "pending_destroy"; null otherwise. */
|
|
@@ -71,27 +87,158 @@ type MistShowResponse = {
|
|
|
71
87
|
interface MistCreateRequest {
|
|
72
88
|
mist: {
|
|
73
89
|
name?: string;
|
|
74
|
-
kind?: MistKind;
|
|
75
|
-
hostable_type?: HostableType;
|
|
76
|
-
hostable_id?: number;
|
|
90
|
+
kind?: MistKind;
|
|
77
91
|
};
|
|
78
92
|
}
|
|
79
93
|
/**
|
|
80
|
-
* `PATCH /api/v202604/mists/:id` body.
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* - **Attach / replace** — pass both `hostable_type` and `hostable_id`
|
|
84
|
-
* - **Detach** — pass both as **explicit `null`**. `maybe(...)` on the Rails
|
|
85
|
-
* side means absent keys leave attachment alone; explicit nulls clear it.
|
|
94
|
+
* `PATCH /api/v202604/mists/:id` body. Rename only — attach/detach moved
|
|
95
|
+
* off the Mist record onto integration points (#19684/#19687), so hostable
|
|
96
|
+
* fields no longer belong here.
|
|
86
97
|
*/
|
|
87
98
|
interface MistUpdateRequest {
|
|
88
99
|
mist: {
|
|
89
100
|
name?: string;
|
|
90
101
|
kind?: MistKind;
|
|
91
|
-
hostable_type?: HostableType | null;
|
|
92
|
-
hostable_id?: number | null;
|
|
93
102
|
};
|
|
94
103
|
}
|
|
104
|
+
interface DropletCreateInput {
|
|
105
|
+
name: string;
|
|
106
|
+
/** The Mist's `public_url`. Optional so we can create before first deploy
|
|
107
|
+
* finishes and PATCH the embed URL in once it's ready. */
|
|
108
|
+
embed_url?: string;
|
|
109
|
+
install_webhook_url?: string;
|
|
110
|
+
uninstall_webhook_url?: string;
|
|
111
|
+
requested_scopes?: string[];
|
|
112
|
+
settings?: Record<string, unknown>;
|
|
113
|
+
}
|
|
114
|
+
interface DropletUpdateInput {
|
|
115
|
+
embed_url?: string;
|
|
116
|
+
install_webhook_url?: string;
|
|
117
|
+
uninstall_webhook_url?: string;
|
|
118
|
+
}
|
|
119
|
+
interface DropletCreateRequest {
|
|
120
|
+
droplet: DropletCreateInput;
|
|
121
|
+
}
|
|
122
|
+
interface DropletUpdateRequest {
|
|
123
|
+
droplet: DropletUpdateInput;
|
|
124
|
+
}
|
|
125
|
+
interface DropletRecord {
|
|
126
|
+
/**
|
|
127
|
+
* Numeric id is NOT returned by `POST /api/droplets` and isn't exposed
|
|
128
|
+
* anywhere the CLI can read it — attach by `uuid` instead (see
|
|
129
|
+
* `IntegrationPointCreateInput.integratable_uuid`).
|
|
130
|
+
*/
|
|
131
|
+
id?: number;
|
|
132
|
+
uuid: string;
|
|
133
|
+
name: string;
|
|
134
|
+
embed_url?: string | null;
|
|
135
|
+
}
|
|
136
|
+
interface DropletCreateResponse {
|
|
137
|
+
droplet: DropletRecord;
|
|
138
|
+
/** Returned exactly once on create. We do NOT forward it — the backend
|
|
139
|
+
* reads it server-side during env backfill. */
|
|
140
|
+
webhook_secret?: string;
|
|
141
|
+
meta?: ApiMeta;
|
|
142
|
+
status?: number;
|
|
143
|
+
}
|
|
144
|
+
interface DropletShowResponse {
|
|
145
|
+
droplet: DropletRecord;
|
|
146
|
+
meta?: ApiMeta;
|
|
147
|
+
status?: number;
|
|
148
|
+
}
|
|
149
|
+
/** Hyphenated wire kinds the integration-points API speaks. */
|
|
150
|
+
type IntegrationPointKind = "droplet" | "drop-zone" | "mobile-embed";
|
|
151
|
+
interface IntegrationPoint {
|
|
152
|
+
/** The integration point's own id — a uuid string on the wire. */
|
|
153
|
+
id: string;
|
|
154
|
+
kind: IntegrationPointKind | string;
|
|
155
|
+
/** Numeric id of the attached resource (server-resolved; present in reads). */
|
|
156
|
+
integratable_id?: number;
|
|
157
|
+
/**
|
|
158
|
+
* Public uuid of the attached surface (drp_/dz_ for droplets/drop-zones;
|
|
159
|
+
* a synthetic uuid for mobile embeds). Echoed on every row since #19689 —
|
|
160
|
+
* the read path uses it for display + resolution.
|
|
161
|
+
*/
|
|
162
|
+
integratable_uuid?: string | null;
|
|
163
|
+
integratable_type?: string | null;
|
|
164
|
+
mist_id?: string;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Attach input. Name the surface by EXACTLY ONE identifier:
|
|
168
|
+
* - droplet + drop-zone attach by `integratable_uuid` (their records carry a
|
|
169
|
+
* drp_/dz_ uuid and no readable numeric id).
|
|
170
|
+
* - mobile-embed attaches by `integratable_id` (a mobile widget has a numeric
|
|
171
|
+
* id and no uuid — `integratable_uuid` 404s for it).
|
|
172
|
+
* The API rejects neither/both with a 400. The link is immutable (no update
|
|
173
|
+
* route, no `active`): toggling is destroy + create.
|
|
174
|
+
*/
|
|
175
|
+
interface IntegrationPointCreateInput {
|
|
176
|
+
kind: IntegrationPointKind;
|
|
177
|
+
integratable_uuid?: string;
|
|
178
|
+
integratable_id?: number;
|
|
179
|
+
}
|
|
180
|
+
interface IntegrationPointCreateRequest {
|
|
181
|
+
integration_point: IntegrationPointCreateInput;
|
|
182
|
+
}
|
|
183
|
+
interface IntegrationPointsListResponse {
|
|
184
|
+
integration_points: IntegrationPoint[];
|
|
185
|
+
meta: ApiMeta;
|
|
186
|
+
status: number;
|
|
187
|
+
}
|
|
188
|
+
interface IntegrationPointShowResponse {
|
|
189
|
+
integration_point: IntegrationPoint;
|
|
190
|
+
meta: ApiMeta;
|
|
191
|
+
status: number;
|
|
192
|
+
}
|
|
193
|
+
interface DropZoneCreateInput {
|
|
194
|
+
name: string;
|
|
195
|
+
embed_url?: string;
|
|
196
|
+
/** Slot placement: { page, zone, height }. Without it the zone won't render. */
|
|
197
|
+
settings?: {
|
|
198
|
+
page?: string;
|
|
199
|
+
zone?: string;
|
|
200
|
+
height?: number;
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
interface DropZoneCreateRequest {
|
|
204
|
+
drop_zone: DropZoneCreateInput;
|
|
205
|
+
}
|
|
206
|
+
interface DropZoneRecord {
|
|
207
|
+
uuid: string;
|
|
208
|
+
name: string;
|
|
209
|
+
embed_url?: string | null;
|
|
210
|
+
active?: boolean;
|
|
211
|
+
settings?: Record<string, unknown>;
|
|
212
|
+
}
|
|
213
|
+
interface DropZoneCreateResponse {
|
|
214
|
+
drop_zone: DropZoneRecord;
|
|
215
|
+
meta?: ApiMeta;
|
|
216
|
+
status?: number;
|
|
217
|
+
}
|
|
218
|
+
interface MobileWidgetCreateInput {
|
|
219
|
+
name: string;
|
|
220
|
+
embed_url: string;
|
|
221
|
+
/** REQUIRED by the API (422 without it). */
|
|
222
|
+
cover_image_url: string;
|
|
223
|
+
/** REQUIRED by the API (422 without it). */
|
|
224
|
+
height: number;
|
|
225
|
+
scrollable?: boolean;
|
|
226
|
+
}
|
|
227
|
+
interface MobileWidgetCreateRequest {
|
|
228
|
+
mobile_widget: MobileWidgetCreateInput;
|
|
229
|
+
}
|
|
230
|
+
interface MobileWidgetRecord {
|
|
231
|
+
id: number;
|
|
232
|
+
name: string;
|
|
233
|
+
embed_url?: string | null;
|
|
234
|
+
cover_image_url?: string | null;
|
|
235
|
+
height?: number;
|
|
236
|
+
}
|
|
237
|
+
interface MobileWidgetCreateResponse {
|
|
238
|
+
mobile_widget: MobileWidgetRecord;
|
|
239
|
+
meta?: ApiMeta;
|
|
240
|
+
status?: number;
|
|
241
|
+
}
|
|
95
242
|
interface EnvVar {
|
|
96
243
|
key: string;
|
|
97
244
|
value: string;
|
|
@@ -154,5 +301,5 @@ interface MistFile {
|
|
|
154
301
|
//#region src/index.d.ts
|
|
155
302
|
declare const plugin: FluidPlugin;
|
|
156
303
|
//#endregion
|
|
157
|
-
export { ApiCollection, ApiMeta, Deployment, DeploymentShowResponse, DeploymentState, DeploymentsListResponse, Droplet, EnvVar, EnvVarsListResponse, GitCredential, GitCredentialResponse, HostableType, LogEntry, LogsResponse, Mist, MistCreateRequest, MistFile, MistKind, MistListResponse, MistShowResponse, MistState, MistUpdateRequest, PaginationCursor, plugin as default };
|
|
304
|
+
export { ApiCollection, ApiMeta, Deployment, DeploymentShowResponse, DeploymentState, DeploymentsListResponse, DropZoneCreateInput, DropZoneCreateRequest, DropZoneCreateResponse, DropZoneRecord, Droplet, DropletCreateInput, DropletCreateRequest, DropletCreateResponse, DropletRecord, DropletShowResponse, DropletUpdateInput, DropletUpdateRequest, EnvVar, EnvVarsListResponse, GitCredential, GitCredentialResponse, HostableType, IntegrationPoint, IntegrationPointCreateInput, IntegrationPointCreateRequest, IntegrationPointKind, IntegrationPointShowResponse, IntegrationPointsListResponse, LogEntry, LogsResponse, MANAGED_DROPLET_ENV_KEYS, ManagedDropletEnvKey, Mist, MistCreateRequest, MistFile, MistKind, MistListResponse, MistShowResponse, MistState, MistUpdateRequest, MobileWidgetCreateInput, MobileWidgetCreateRequest, MobileWidgetCreateResponse, MobileWidgetRecord, PaginationCursor, plugin as default };
|
|
158
305
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts","../src/index.ts"],"mappings":";;;;;;AASA;;;;;KAAY,QAAA;AAAA,KAEA,SAAA;;;;AAeZ;;;;KAAY,YAAA;AAAA,UAEK,OAAA;EACf,EAAA;EACA,IAAA;EACA,IAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts","../src/index.ts"],"mappings":";;;;;;AASA;;;;;KAAY,QAAA;AAAA,KAEA,SAAA;;;;AAeZ;;;;KAAY,YAAA;AAAA,UAEK,OAAA;EACf,EAAA;EACA,IAAA;EACA,IAAA;AAAA;;;;;AAWF;;;;cAAa,wBAAA;AAAA,KAMD,oBAAA,WAA+B,wBAAA;AAAA,UAE1B,IAAA;EACf,EAAA;EACA,IAAA;EAJyC;AAE3C;EAKE,IAAA;EACA,KAAA,EAAO,SAAA;EACP,IAAA,EAAM,QAAA;;;;;;EAMN,aAAA,GAAgB,YAAA;;EAEhB,WAAA;EACA,WAAA;EACA,UAAA;;EAEA,oBAAA;EACA,OAAA,EAAS,OAAA;EACT,c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