@faable/deploy-sdk 2.0.0 → 2.2.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/dist/FaableDeployApi.d.ts +132 -122
- package/dist/FaableDeployApi.d.ts.map +1 -1
- package/dist/FaableDeployApi.js +72 -45
- package/dist/api/api-types.d.ts +46 -68
- package/dist/api/api-types.d.ts.map +1 -1
- package/dist/api/api-types.js +4 -0
- package/dist/api/custom-types.d.ts +66 -0
- package/dist/api/custom-types.d.ts.map +1 -0
- package/dist/api/custom-types.js +5 -0
- package/dist/api/generated-client.d.ts +895 -0
- package/dist/api/generated-client.d.ts.map +1 -0
- package/dist/api/generated-client.js +315 -0
- package/dist/api/types.d.ts +2 -0
- package/dist/api/types.d.ts.map +1 -1
- package/dist/helpers.d.ts +2 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/helpers.js +11 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +9 -0
- package/package.json +6 -4
- package/scripts/fetch-spec.mjs +24 -0
- package/scripts/gen-client.mjs +241 -0
- package/spec/openapi.json +6603 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FaableApi } from "@faable/sdk-base";
|
|
2
1
|
import type { ApiParams } from "@faable/sdk-base";
|
|
3
|
-
import
|
|
2
|
+
import { GeneratedFaableDeployApi } from "./api/generated-client.js";
|
|
3
|
+
import type { AppTraffic } from "./api/custom-types.js";
|
|
4
4
|
export interface AppTrafficQuery {
|
|
5
5
|
/** Unix seconds; defaults to 24h ago. */
|
|
6
6
|
from?: number;
|
|
@@ -17,9 +17,73 @@ export interface AppTrafficQuery {
|
|
|
17
17
|
/** Narrow the error-endpoints panel to one exact status code. */
|
|
18
18
|
error_status?: number;
|
|
19
19
|
}
|
|
20
|
-
export declare class DeployApi extends
|
|
20
|
+
export declare class DeployApi extends GeneratedFaableDeployApi {
|
|
21
21
|
constructor(params?: ApiParams);
|
|
22
|
-
|
|
22
|
+
updateStatus<T>(id: string, data: T): Promise<any>;
|
|
23
|
+
/**
|
|
24
|
+
* Per-app HTTP traffic metrics. Kept hand-written: the rich `AppTrafficQuery`
|
|
25
|
+
* coercion (numbers → query strings) and the curated `AppTraffic` return type
|
|
26
|
+
* (no OpenAPI schema yet) aren't expressible by the generated `appTraffic`.
|
|
27
|
+
*/
|
|
28
|
+
getAppTraffic(id: string, query?: AppTrafficQuery): Promise<AppTraffic>;
|
|
29
|
+
/**
|
|
30
|
+
* List an app's secrets. Kept hand-written because, unlike the other lists,
|
|
31
|
+
* `secrets/list_app` is not a `{ next, results }` page — the generated
|
|
32
|
+
* `secretsListApp` returns the raw response, whereas consumers expect a
|
|
33
|
+
* paginator here.
|
|
34
|
+
*/
|
|
35
|
+
listSecrets(id: string): {
|
|
36
|
+
all: () => Promise<{
|
|
37
|
+
id: string;
|
|
38
|
+
team: string;
|
|
39
|
+
app_id?: string;
|
|
40
|
+
profile_id?: string;
|
|
41
|
+
related: string;
|
|
42
|
+
related_model: string;
|
|
43
|
+
name: string;
|
|
44
|
+
value: string;
|
|
45
|
+
metadata: {
|
|
46
|
+
[key: string]: unknown;
|
|
47
|
+
};
|
|
48
|
+
createdAt: string;
|
|
49
|
+
updatedAt?: string;
|
|
50
|
+
}[]>;
|
|
51
|
+
first: () => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
|
|
52
|
+
id: string;
|
|
53
|
+
team: string;
|
|
54
|
+
app_id?: string;
|
|
55
|
+
profile_id?: string;
|
|
56
|
+
related: string;
|
|
57
|
+
related_model: string;
|
|
58
|
+
name: string;
|
|
59
|
+
value: string;
|
|
60
|
+
metadata: {
|
|
61
|
+
[key: string]: unknown;
|
|
62
|
+
};
|
|
63
|
+
createdAt: string;
|
|
64
|
+
updatedAt?: string;
|
|
65
|
+
}>>;
|
|
66
|
+
pass: (params?: {
|
|
67
|
+
cursor?: string;
|
|
68
|
+
pageSize?: string;
|
|
69
|
+
}) => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
|
|
70
|
+
id: string;
|
|
71
|
+
team: string;
|
|
72
|
+
app_id?: string;
|
|
73
|
+
profile_id?: string;
|
|
74
|
+
related: string;
|
|
75
|
+
related_model: string;
|
|
76
|
+
name: string;
|
|
77
|
+
value: string;
|
|
78
|
+
metadata: {
|
|
79
|
+
[key: string]: unknown;
|
|
80
|
+
};
|
|
81
|
+
createdAt: string;
|
|
82
|
+
updatedAt?: string;
|
|
83
|
+
}>>;
|
|
84
|
+
};
|
|
85
|
+
/** @deprecated use {@link GeneratedFaableDeployApi.deploymentGet | deploymentGet} */
|
|
86
|
+
getDeployment(...args: Parameters<GeneratedFaableDeployApi["deploymentGet"]>): Promise<{
|
|
23
87
|
id: string;
|
|
24
88
|
team: string;
|
|
25
89
|
app_id: string;
|
|
@@ -35,7 +99,8 @@ export declare class DeployApi extends FaableApi {
|
|
|
35
99
|
createdAt: string;
|
|
36
100
|
updatedAt?: string;
|
|
37
101
|
}>;
|
|
38
|
-
|
|
102
|
+
/** @deprecated use {@link GeneratedFaableDeployApi.appGet | appGet} */
|
|
103
|
+
getApp(...args: Parameters<GeneratedFaableDeployApi["appGet"]>): Promise<{
|
|
39
104
|
id: string;
|
|
40
105
|
team: string;
|
|
41
106
|
name: string;
|
|
@@ -57,13 +122,66 @@ export declare class DeployApi extends FaableApi {
|
|
|
57
122
|
createdAt: string;
|
|
58
123
|
updatedAt?: string;
|
|
59
124
|
}>;
|
|
125
|
+
/** @deprecated use {@link GeneratedFaableDeployApi.domainList | domainList} */
|
|
126
|
+
listDomains(...args: Parameters<GeneratedFaableDeployApi["domainList"]>): {
|
|
127
|
+
all: () => Promise<{
|
|
128
|
+
id: string;
|
|
129
|
+
team: string;
|
|
130
|
+
fqdn: string;
|
|
131
|
+
tls: boolean;
|
|
132
|
+
app_id: string | null;
|
|
133
|
+
verified: boolean;
|
|
134
|
+
active: boolean;
|
|
135
|
+
dns_alias: string | null;
|
|
136
|
+
status: import("./index.js").components["schemas"]["DomainStatus"];
|
|
137
|
+
metadata: {
|
|
138
|
+
[key: string]: unknown;
|
|
139
|
+
};
|
|
140
|
+
createdAt: string;
|
|
141
|
+
updatedAt?: string;
|
|
142
|
+
}[]>;
|
|
143
|
+
first: () => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
|
|
144
|
+
id: string;
|
|
145
|
+
team: string;
|
|
146
|
+
fqdn: string;
|
|
147
|
+
tls: boolean;
|
|
148
|
+
app_id: string | null;
|
|
149
|
+
verified: boolean;
|
|
150
|
+
active: boolean;
|
|
151
|
+
dns_alias: string | null;
|
|
152
|
+
status: import("./index.js").components["schemas"]["DomainStatus"];
|
|
153
|
+
metadata: {
|
|
154
|
+
[key: string]: unknown;
|
|
155
|
+
};
|
|
156
|
+
createdAt: string;
|
|
157
|
+
updatedAt?: string;
|
|
158
|
+
}>>;
|
|
159
|
+
pass: (params?: {
|
|
160
|
+
cursor?: string;
|
|
161
|
+
pageSize?: string;
|
|
162
|
+
}) => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
|
|
163
|
+
id: string;
|
|
164
|
+
team: string;
|
|
165
|
+
fqdn: string;
|
|
166
|
+
tls: boolean;
|
|
167
|
+
app_id: string | null;
|
|
168
|
+
verified: boolean;
|
|
169
|
+
active: boolean;
|
|
170
|
+
dns_alias: string | null;
|
|
171
|
+
status: import("./index.js").components["schemas"]["DomainStatus"];
|
|
172
|
+
metadata: {
|
|
173
|
+
[key: string]: unknown;
|
|
174
|
+
};
|
|
175
|
+
createdAt: string;
|
|
176
|
+
updatedAt?: string;
|
|
177
|
+
}>>;
|
|
178
|
+
};
|
|
60
179
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* by the paginator.
|
|
180
|
+
* @deprecated use {@link GeneratedFaableDeployApi.appList | appList}
|
|
181
|
+
*
|
|
182
|
+
* Convenience wrapper with a positional `(query, { expand })` signature. Kept
|
|
183
|
+
* hand-written because the generated `appList` types `expand` as an enum array
|
|
184
|
+
* rather than the legacy free-form string this accepted.
|
|
67
185
|
*/
|
|
68
186
|
listApps(query?: string, opts?: {
|
|
69
187
|
expand?: string;
|
|
@@ -138,117 +256,10 @@ export declare class DeployApi extends FaableApi {
|
|
|
138
256
|
updatedAt?: string;
|
|
139
257
|
}>>;
|
|
140
258
|
};
|
|
141
|
-
updateStatus<T>(id: string, data: T): Promise<any>;
|
|
142
|
-
listSecrets(id: string): {
|
|
143
|
-
all: () => Promise<{
|
|
144
|
-
id: string;
|
|
145
|
-
team: string;
|
|
146
|
-
app_id?: string;
|
|
147
|
-
profile_id?: string;
|
|
148
|
-
related: string;
|
|
149
|
-
related_model: string;
|
|
150
|
-
name: string;
|
|
151
|
-
value: string;
|
|
152
|
-
metadata: {
|
|
153
|
-
[key: string]: unknown;
|
|
154
|
-
};
|
|
155
|
-
createdAt: string;
|
|
156
|
-
updatedAt?: string;
|
|
157
|
-
}[]>;
|
|
158
|
-
first: () => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
|
|
159
|
-
id: string;
|
|
160
|
-
team: string;
|
|
161
|
-
app_id?: string;
|
|
162
|
-
profile_id?: string;
|
|
163
|
-
related: string;
|
|
164
|
-
related_model: string;
|
|
165
|
-
name: string;
|
|
166
|
-
value: string;
|
|
167
|
-
metadata: {
|
|
168
|
-
[key: string]: unknown;
|
|
169
|
-
};
|
|
170
|
-
createdAt: string;
|
|
171
|
-
updatedAt?: string;
|
|
172
|
-
}>>;
|
|
173
|
-
pass: (params?: {
|
|
174
|
-
cursor?: string;
|
|
175
|
-
pageSize?: string;
|
|
176
|
-
}) => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
|
|
177
|
-
id: string;
|
|
178
|
-
team: string;
|
|
179
|
-
app_id?: string;
|
|
180
|
-
profile_id?: string;
|
|
181
|
-
related: string;
|
|
182
|
-
related_model: string;
|
|
183
|
-
name: string;
|
|
184
|
-
value: string;
|
|
185
|
-
metadata: {
|
|
186
|
-
[key: string]: unknown;
|
|
187
|
-
};
|
|
188
|
-
createdAt: string;
|
|
189
|
-
updatedAt?: string;
|
|
190
|
-
}>>;
|
|
191
|
-
};
|
|
192
|
-
listDomains(): {
|
|
193
|
-
all: () => Promise<{
|
|
194
|
-
id: string;
|
|
195
|
-
team: string;
|
|
196
|
-
fqdn: string;
|
|
197
|
-
tls: boolean;
|
|
198
|
-
app_id: string | null;
|
|
199
|
-
verified: boolean;
|
|
200
|
-
active: boolean;
|
|
201
|
-
dns_alias: string | null;
|
|
202
|
-
status: import("./index.js").components["schemas"]["DomainStatus"];
|
|
203
|
-
metadata: {
|
|
204
|
-
[key: string]: unknown;
|
|
205
|
-
};
|
|
206
|
-
createdAt: string;
|
|
207
|
-
updatedAt?: string;
|
|
208
|
-
}[]>;
|
|
209
|
-
first: () => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
|
|
210
|
-
id: string;
|
|
211
|
-
team: string;
|
|
212
|
-
fqdn: string;
|
|
213
|
-
tls: boolean;
|
|
214
|
-
app_id: string | null;
|
|
215
|
-
verified: boolean;
|
|
216
|
-
active: boolean;
|
|
217
|
-
dns_alias: string | null;
|
|
218
|
-
status: import("./index.js").components["schemas"]["DomainStatus"];
|
|
219
|
-
metadata: {
|
|
220
|
-
[key: string]: unknown;
|
|
221
|
-
};
|
|
222
|
-
createdAt: string;
|
|
223
|
-
updatedAt?: string;
|
|
224
|
-
}>>;
|
|
225
|
-
pass: (params?: {
|
|
226
|
-
cursor?: string;
|
|
227
|
-
pageSize?: string;
|
|
228
|
-
}) => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
|
|
229
|
-
id: string;
|
|
230
|
-
team: string;
|
|
231
|
-
fqdn: string;
|
|
232
|
-
tls: boolean;
|
|
233
|
-
app_id: string | null;
|
|
234
|
-
verified: boolean;
|
|
235
|
-
active: boolean;
|
|
236
|
-
dns_alias: string | null;
|
|
237
|
-
status: import("./index.js").components["schemas"]["DomainStatus"];
|
|
238
|
-
metadata: {
|
|
239
|
-
[key: string]: unknown;
|
|
240
|
-
};
|
|
241
|
-
createdAt: string;
|
|
242
|
-
updatedAt?: string;
|
|
243
|
-
}>>;
|
|
244
|
-
};
|
|
245
259
|
/**
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
* paginator (use `.all()` / `.pass({ pageSize })`) — the controller fetches a
|
|
250
|
-
* bounded newest-first page per app to serve orphan-recovery + stale-cleanup
|
|
251
|
-
* from a single round-trip.
|
|
260
|
+
* @deprecated use {@link GeneratedFaableDeployApi.deploymentList | deploymentList}
|
|
261
|
+
*
|
|
262
|
+
* Convenience wrapper with a positional FaableQL `query` signature.
|
|
252
263
|
*/
|
|
253
264
|
listDeployments(query?: string): {
|
|
254
265
|
all: () => Promise<{
|
|
@@ -303,6 +314,5 @@ export declare class DeployApi extends FaableApi {
|
|
|
303
314
|
updatedAt?: string;
|
|
304
315
|
}>>;
|
|
305
316
|
};
|
|
306
|
-
getAppTraffic(id: string, query?: AppTrafficQuery): Promise<AppTraffic>;
|
|
307
317
|
}
|
|
308
318
|
//# sourceMappingURL=FaableDeployApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FaableDeployApi.d.ts","sourceRoot":"","sources":["../src/FaableDeployApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"FaableDeployApi.d.ts","sourceRoot":"","sources":["../src/FaableDeployApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAGV,UAAU,EAEX,MAAM,uBAAuB,CAAC;AAG/B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C;oBAA0B,CAAC;;;;;;;;;;oBAoHs9xB,0CAAsB;;;;;;;;IA7B/gyB;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;;;;;qBAsBu3lB,0CAAsB;;;;oBAA+d,0CAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBApH96mB,CAAC;oBAA0B,CAAC;;;;;;;;;qBAoHu4lB,0CAAsB;;;;oBAA+d,0CAAsB;;;;;;;;;;;IAZr7mB;;;;OAIG;IACH,eAAe,CAAC,KAAK,CAAC,EAAE,MAAM;;;;;;;;;;oBAOgzrB,0CAAsB;;;;;;;;;;;;;;;;;;;;;;;;kBApH71rB,CAAC;oBAA0B,CAAC;;;;;;;;;;oBAoH2yrB,0CAAsB;;;;;;;;CADr2rB"}
|
package/dist/FaableDeployApi.js
CHANGED
|
@@ -1,59 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { GeneratedFaableDeployApi } from "./api/generated-client.js";
|
|
2
|
+
import { version } from "./version.js";
|
|
3
|
+
export class DeployApi extends GeneratedFaableDeployApi {
|
|
3
4
|
constructor(params) {
|
|
4
5
|
super({
|
|
5
6
|
baseURL: "https://api.faable.com",
|
|
6
7
|
...params,
|
|
8
|
+
// Identify ourselves as a first-party client and forward any
|
|
9
|
+
// consumer-supplied name/instance for per-replica attribution in the
|
|
10
|
+
// auth audit log. Rides on the client_credentials /oauth/token call too.
|
|
11
|
+
// A caller-set `clientInfo.client` still wins.
|
|
12
|
+
clientInfo: {
|
|
13
|
+
client: `deploy-sdk/${version}`,
|
|
14
|
+
...params?.clientInfo,
|
|
15
|
+
},
|
|
7
16
|
});
|
|
8
17
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return this.fetcher.get(`/app/${id}`);
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* List apps, optionally filtered with a FaableQL `query` (e.g.
|
|
17
|
-
* `"active:true"` to fetch only enabled apps server-side) and/or expanding
|
|
18
|
-
* nested refs (e.g. `{ expand: "status.deployment" }` to inline the active
|
|
19
|
-
* Deployment object on each app — lets a caller avoid a per-app
|
|
20
|
-
* `getApp(?expand=)` round-trip). Both are threaded into every page request
|
|
21
|
-
* by the paginator.
|
|
22
|
-
*/
|
|
23
|
-
listApps(query, opts) {
|
|
24
|
-
const params = {};
|
|
25
|
-
if (query)
|
|
26
|
-
params.query = query;
|
|
27
|
-
if (opts?.expand)
|
|
28
|
-
params.expand = opts.expand;
|
|
29
|
-
return this.paginator({
|
|
30
|
-
url: "/app",
|
|
31
|
-
...(Object.keys(params).length ? { params } : {}),
|
|
32
|
-
});
|
|
33
|
-
}
|
|
18
|
+
// ── Custom-logic helpers (not plain CRUD — kept hand-written) ──────────────
|
|
19
|
+
// Internal status-reporting endpoint (`status/update` is marked x-internal in
|
|
20
|
+
// the API, so it is intentionally NOT in the generated surface). Used by the
|
|
21
|
+
// deploy controller to report deployment/app status. Generic over the body.
|
|
34
22
|
updateStatus(id, data) {
|
|
35
23
|
return this.fetcher.post(`/status/${id}`, data);
|
|
36
24
|
}
|
|
37
|
-
listSecrets(id) {
|
|
38
|
-
return this.paginator({ url: `/secret/${id}` });
|
|
39
|
-
}
|
|
40
|
-
listDomains() {
|
|
41
|
-
return this.paginator({ url: "/domain" });
|
|
42
|
-
}
|
|
43
25
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* paginator (use `.all()` / `.pass({ pageSize })`) — the controller fetches a
|
|
48
|
-
* bounded newest-first page per app to serve orphan-recovery + stale-cleanup
|
|
49
|
-
* from a single round-trip.
|
|
26
|
+
* Per-app HTTP traffic metrics. Kept hand-written: the rich `AppTrafficQuery`
|
|
27
|
+
* coercion (numbers → query strings) and the curated `AppTraffic` return type
|
|
28
|
+
* (no OpenAPI schema yet) aren't expressible by the generated `appTraffic`.
|
|
50
29
|
*/
|
|
51
|
-
listDeployments(query) {
|
|
52
|
-
return this.paginator({
|
|
53
|
-
url: "/deployment",
|
|
54
|
-
...(query ? { params: { query } } : {}),
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
30
|
getAppTraffic(id, query = {}) {
|
|
58
31
|
const params = {};
|
|
59
32
|
if (query.from != null)
|
|
@@ -72,4 +45,58 @@ export class DeployApi extends FaableApi {
|
|
|
72
45
|
params.error_status = String(query.error_status);
|
|
73
46
|
return this.fetcher.get(`/app/${id}/traffic`, { params });
|
|
74
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* List an app's secrets. Kept hand-written because, unlike the other lists,
|
|
50
|
+
* `secrets/list_app` is not a `{ next, results }` page — the generated
|
|
51
|
+
* `secretsListApp` returns the raw response, whereas consumers expect a
|
|
52
|
+
* paginator here.
|
|
53
|
+
*/
|
|
54
|
+
listSecrets(id) {
|
|
55
|
+
return this.paginator({ url: `/secret/${id}` });
|
|
56
|
+
}
|
|
57
|
+
// ── Deprecated aliases ─────────────────────────────────────────────────────
|
|
58
|
+
// Thin forwarders to the auto-generated methods, kept so existing consumers
|
|
59
|
+
// don't break. Prefer the generated names; these will be removed in a future
|
|
60
|
+
// major.
|
|
61
|
+
/** @deprecated use {@link GeneratedFaableDeployApi.deploymentGet | deploymentGet} */
|
|
62
|
+
getDeployment(...args) {
|
|
63
|
+
return this.deploymentGet(...args);
|
|
64
|
+
}
|
|
65
|
+
/** @deprecated use {@link GeneratedFaableDeployApi.appGet | appGet} */
|
|
66
|
+
getApp(...args) {
|
|
67
|
+
return this.appGet(...args);
|
|
68
|
+
}
|
|
69
|
+
/** @deprecated use {@link GeneratedFaableDeployApi.domainList | domainList} */
|
|
70
|
+
listDomains(...args) {
|
|
71
|
+
return this.domainList(...args);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @deprecated use {@link GeneratedFaableDeployApi.appList | appList}
|
|
75
|
+
*
|
|
76
|
+
* Convenience wrapper with a positional `(query, { expand })` signature. Kept
|
|
77
|
+
* hand-written because the generated `appList` types `expand` as an enum array
|
|
78
|
+
* rather than the legacy free-form string this accepted.
|
|
79
|
+
*/
|
|
80
|
+
listApps(query, opts) {
|
|
81
|
+
const params = {};
|
|
82
|
+
if (query)
|
|
83
|
+
params.query = query;
|
|
84
|
+
if (opts?.expand)
|
|
85
|
+
params.expand = opts.expand;
|
|
86
|
+
return this.paginator({
|
|
87
|
+
url: "/app",
|
|
88
|
+
...(Object.keys(params).length ? { params } : {}),
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* @deprecated use {@link GeneratedFaableDeployApi.deploymentList | deploymentList}
|
|
93
|
+
*
|
|
94
|
+
* Convenience wrapper with a positional FaableQL `query` signature.
|
|
95
|
+
*/
|
|
96
|
+
listDeployments(query) {
|
|
97
|
+
return this.paginator({
|
|
98
|
+
url: "/deployment",
|
|
99
|
+
...(query ? { params: { query } } : {}),
|
|
100
|
+
});
|
|
101
|
+
}
|
|
75
102
|
}
|
package/dist/api/api-types.d.ts
CHANGED
|
@@ -1,80 +1,58 @@
|
|
|
1
1
|
import type { components } from "./types.js";
|
|
2
|
+
export type ApiKey = components["schemas"]["ApiKey"];
|
|
3
|
+
export type ApiKeyCreate = components["schemas"]["ApiKeyCreate"];
|
|
4
|
+
export type ApiKeyUpdate = components["schemas"]["ApiKeyUpdate"];
|
|
2
5
|
export type App = components["schemas"]["App"];
|
|
3
|
-
export type
|
|
6
|
+
export type AppChecknameResponse = components["schemas"]["AppChecknameResponse"];
|
|
7
|
+
export type AppCreate = components["schemas"]["AppCreate"];
|
|
4
8
|
export type AppRuntime = components["schemas"]["AppRuntime"];
|
|
5
9
|
export type AppRuntimeStrategy = components["schemas"]["AppRuntimeStrategy"];
|
|
10
|
+
export type AppStatus = components["schemas"]["AppStatus"];
|
|
11
|
+
export type AppUpdate = components["schemas"]["AppUpdate"];
|
|
12
|
+
export type Contact = components["schemas"]["Contact"];
|
|
13
|
+
export type ContactCreate = components["schemas"]["ContactCreate"];
|
|
14
|
+
export type ContactType = components["schemas"]["ContactType"];
|
|
15
|
+
export type ContactUpdate = components["schemas"]["ContactUpdate"];
|
|
16
|
+
export type DeployWorkflowStatus = components["schemas"]["DeployWorkflowStatus"];
|
|
6
17
|
export type Deployment = components["schemas"]["Deployment"];
|
|
18
|
+
export type DeploymentCreate = components["schemas"]["DeploymentCreate"];
|
|
7
19
|
export type DeploymentStatus = components["schemas"]["DeploymentStatus"];
|
|
8
|
-
export type Secret = components["schemas"]["Secret"];
|
|
9
20
|
export type Domain = components["schemas"]["Domain"];
|
|
10
|
-
export type
|
|
11
|
-
export type
|
|
12
|
-
export type
|
|
21
|
+
export type DomainCreate = components["schemas"]["DomainCreate"];
|
|
22
|
+
export type DomainStatus = components["schemas"]["DomainStatus"];
|
|
23
|
+
export type DomainUpdate = components["schemas"]["DomainUpdate"];
|
|
24
|
+
export type EventApikeyCreate = components["schemas"]["EventApikeyCreate"];
|
|
25
|
+
export type EventApikeyDelete = components["schemas"]["EventApikeyDelete"];
|
|
26
|
+
export type EventApikeyUpdate = components["schemas"]["EventApikeyUpdate"];
|
|
13
27
|
export type EventAppCreate = components["schemas"]["EventAppCreate"];
|
|
28
|
+
export type EventAppDelete = components["schemas"]["EventAppDelete"];
|
|
29
|
+
export type EventAppStatus = components["schemas"]["EventAppStatus"];
|
|
14
30
|
export type EventAppUpdate = components["schemas"]["EventAppUpdate"];
|
|
31
|
+
export type EventContactCreate = components["schemas"]["EventContactCreate"];
|
|
32
|
+
export type EventContactDelete = components["schemas"]["EventContactDelete"];
|
|
33
|
+
export type EventContactUpdate = components["schemas"]["EventContactUpdate"];
|
|
34
|
+
export type EventDeploymentCreate = components["schemas"]["EventDeploymentCreate"];
|
|
35
|
+
export type EventDeploymentDelete = components["schemas"]["EventDeploymentDelete"];
|
|
36
|
+
export type EventDeploymentStatus = components["schemas"]["EventDeploymentStatus"];
|
|
37
|
+
export type EventDeploymentUpdate = components["schemas"]["EventDeploymentUpdate"];
|
|
15
38
|
export type EventDomainCreate = components["schemas"]["EventDomainCreate"];
|
|
16
|
-
export type EventDomainUpdate = components["schemas"]["EventDomainUpdate"];
|
|
17
39
|
export type EventDomainDelete = components["schemas"]["EventDomainDelete"];
|
|
18
|
-
export type
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
resp_bytes: number;
|
|
37
|
-
}>;
|
|
38
|
-
error_endpoints: Array<{
|
|
39
|
-
path: string;
|
|
40
|
-
status: number;
|
|
41
|
-
errors: number;
|
|
42
|
-
}>;
|
|
43
|
-
status_codes: Array<{
|
|
44
|
-
status: number;
|
|
45
|
-
requests: number;
|
|
46
|
-
}>;
|
|
47
|
-
methods: Array<{
|
|
48
|
-
method: string;
|
|
49
|
-
requests: number;
|
|
50
|
-
}>;
|
|
51
|
-
transfer: Array<{
|
|
52
|
-
ts: string;
|
|
53
|
-
inbound_bytes: number;
|
|
54
|
-
outbound_bytes: number;
|
|
55
|
-
requests: number;
|
|
56
|
-
p50_ms: number;
|
|
57
|
-
p95_ms: number;
|
|
58
|
-
}>;
|
|
59
|
-
/** Backend (origin) status codes — the app's own response, not the edge's. */
|
|
60
|
-
origin_status_codes: Array<{
|
|
61
|
-
status: number;
|
|
62
|
-
requests: number;
|
|
63
|
-
}>;
|
|
64
|
-
/** Backend latency percentiles (ms) over backend-served requests. */
|
|
65
|
-
latency: {
|
|
66
|
-
p50: number;
|
|
67
|
-
p95: number;
|
|
68
|
-
p99: number;
|
|
69
|
-
samples: number;
|
|
70
|
-
};
|
|
71
|
-
top_referrers: Array<{
|
|
72
|
-
referer: string;
|
|
73
|
-
requests: number;
|
|
74
|
-
}>;
|
|
75
|
-
top_user_agents: Array<{
|
|
76
|
-
user_agent: string;
|
|
77
|
-
requests: number;
|
|
78
|
-
}>;
|
|
79
|
-
}
|
|
40
|
+
export type EventDomainStatus = components["schemas"]["EventDomainStatus"];
|
|
41
|
+
export type EventDomainUpdate = components["schemas"]["EventDomainUpdate"];
|
|
42
|
+
export type EventProjectCreate = components["schemas"]["EventProjectCreate"];
|
|
43
|
+
export type EventProjectDelete = components["schemas"]["EventProjectDelete"];
|
|
44
|
+
export type EventProjectUpdate = components["schemas"]["EventProjectUpdate"];
|
|
45
|
+
export type EventSecretCreate_batch = components["schemas"]["EventSecretCreate_batch"];
|
|
46
|
+
export type GithubInstallation = components["schemas"]["GithubInstallation"];
|
|
47
|
+
export type GithubRepo = components["schemas"]["GithubRepo"];
|
|
48
|
+
export type Project = components["schemas"]["Project"];
|
|
49
|
+
export type ProjectCreate = components["schemas"]["ProjectCreate"];
|
|
50
|
+
export type ProjectFavorites = components["schemas"]["ProjectFavorites"];
|
|
51
|
+
export type ProjectInvite = components["schemas"]["ProjectInvite"];
|
|
52
|
+
export type ProjectUpdate = components["schemas"]["ProjectUpdate"];
|
|
53
|
+
export type Secret = components["schemas"]["Secret"];
|
|
54
|
+
export type SecretCreateBatch = components["schemas"]["SecretCreateBatch"];
|
|
55
|
+
export type SecretPage = components["schemas"]["SecretPage"];
|
|
56
|
+
export type SecretUpsert = components["schemas"]["SecretUpsert"];
|
|
57
|
+
export type StatusUpdate = components["schemas"]["StatusUpdate"];
|
|
80
58
|
//# sourceMappingURL=api-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-types.d.ts","sourceRoot":"","sources":["../../src/api/api-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api-types.d.ts","sourceRoot":"","sources":["../../src/api/api-types.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,MA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