@farthershore/client 0.7.0 → 0.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.
@@ -2,7 +2,7 @@ type BusinessRef = {
2
2
  businessId: string;
3
3
  };
4
4
  /**
5
- * Backends and runtime tokens are per-(business, environment) rows.
5
+ * Backends and secret keys are per-(business, environment) rows.
6
6
  * `environmentId` filters a listing: an environment id, `"production"` for the
7
7
  * production rows, or omitted for every scope.
8
8
  */
@@ -36,16 +36,24 @@ export declare const backendOperations: {
36
36
  "backends.create": import("./define.js").OperationEntry<BusinessRef & {
37
37
  name: string;
38
38
  slug?: string;
39
- /** `null` (or omitted) is the production scope. */
39
+ /**
40
+ * The environments this deployment serves: all | production |
41
+ * non-production | kind:<kind> | env:<environment>. Default all.
42
+ */
43
+ scope?: string;
44
+ /** One environment directly (= scope env:<environment>). */
40
45
  environmentId?: string | null;
41
46
  transportMode?: "direct" | "tunnel";
42
47
  runner?: "embedded" | "sidecar" | null;
43
48
  runtime?: string | null;
44
49
  originUrl?: string | null;
50
+ /** Per-environment origin (`{env}`) of a non-production / kind: deployment. */
51
+ originTemplate?: string | null;
45
52
  isDefault?: boolean;
46
53
  }, {
47
54
  id: string;
48
55
  businessId: string;
56
+ scope: string;
49
57
  environmentId: string | null;
50
58
  name: string;
51
59
  slug: string;
@@ -53,15 +61,24 @@ export declare const backendOperations: {
53
61
  runner: ("embedded" | "sidecar") | null;
54
62
  runtime: string | null;
55
63
  originUrl: string | null;
64
+ originTemplate: string | null;
56
65
  isDefault: boolean;
57
66
  status: "registered" | "building" | "deployed" | "tunnel_connected" | "healthy" | "unhealthy" | "verification_failed" | "provision_failed" | "disabled";
58
67
  lastSeenAt: string | null;
59
68
  createdAt: string;
60
69
  updated?: true;
70
+ webhookReceiver?: "created" | "kept" | "skipped_at_limit" | "none";
71
+ defaultKey?: {
72
+ id: string;
73
+ lastFour: string;
74
+ envVars: ["FS_SECRET_KEY"];
75
+ token: string;
76
+ };
61
77
  }, {
62
78
  action: "create" | "update";
63
79
  backend: {
64
80
  businessId: string;
81
+ scope: string;
65
82
  environmentId: string | null;
66
83
  name: string;
67
84
  slug: string;
@@ -69,17 +86,30 @@ export declare const backendOperations: {
69
86
  runner: ("embedded" | "sidecar") | null;
70
87
  runtime: string | null;
71
88
  originUrl: string | null;
89
+ originTemplate: string | null;
72
90
  isDefault: boolean;
73
91
  };
74
92
  }, true>;
75
- "backends.bind": import("./define.js").OperationEntry<BusinessRef & {
76
- /** The logical backend slug or id. */
93
+ "backends.bind": import("./define.js").OperationEntry<BusinessRef & ({
94
+ /** The backend slug, or one deployment's id. */
77
95
  backend: string;
96
+ /**
97
+ * Which deployment: all (default for a fixed origin) | production |
98
+ * non-production (default for a template) | kind:<kind> |
99
+ * env:<environment>. Created when the backend has none of that scope.
100
+ */
101
+ scope?: string;
78
102
  environmentId?: string | null;
103
+ } & ({
79
104
  originUrl: string;
80
- }, {
105
+ originTemplate?: never;
106
+ } | {
107
+ originTemplate: string;
108
+ originUrl?: never;
109
+ })), {
81
110
  id: string;
82
111
  businessId: string;
112
+ scope: string;
83
113
  environmentId: string | null;
84
114
  name: string;
85
115
  slug: string;
@@ -87,13 +117,22 @@ export declare const backendOperations: {
87
117
  runner: ("embedded" | "sidecar") | null;
88
118
  runtime: string | null;
89
119
  originUrl: string | null;
120
+ originTemplate: string | null;
90
121
  isDefault: boolean;
91
122
  status: "registered" | "building" | "deployed" | "tunnel_connected" | "healthy" | "unhealthy" | "verification_failed" | "provision_failed" | "disabled";
92
123
  lastSeenAt: string | null;
93
124
  createdAt: string;
125
+ webhookReceiver?: "created" | "kept" | "skipped_at_limit" | "none";
126
+ defaultKey?: {
127
+ id: string;
128
+ lastFour: string;
129
+ envVars: ["FS_SECRET_KEY"];
130
+ token: string;
131
+ };
94
132
  }, {
95
133
  id: string;
96
134
  businessId: string;
135
+ scope: string;
97
136
  environmentId: string | null;
98
137
  name: string;
99
138
  slug: string;
@@ -101,6 +140,7 @@ export declare const backendOperations: {
101
140
  runner: ("embedded" | "sidecar") | null;
102
141
  runtime: string | null;
103
142
  originUrl: string | null;
143
+ originTemplate: string | null;
104
144
  isDefault: boolean;
105
145
  status: "registered" | "building" | "deployed" | "tunnel_connected" | "healthy" | "unhealthy" | "verification_failed" | "provision_failed" | "disabled";
106
146
  lastSeenAt: string | null;
@@ -115,8 +155,8 @@ export declare const backendOperations: {
115
155
  id: string;
116
156
  deleted: true;
117
157
  }, false>;
118
- "runtimeTokens.read": import("./define.js").OperationEntry<ScopeFilter, {
119
- data: import("../generated/schemas.js").components["schemas"]["RuntimeToken"][];
158
+ "secretKeys.read": import("./define.js").OperationEntry<ScopeFilter, {
159
+ data: import("../generated/schemas.js").components["schemas"]["SecretKey"][];
120
160
  pagination: {
121
161
  total: number;
122
162
  limit: number;
@@ -126,7 +166,7 @@ export declare const backendOperations: {
126
166
  scope: "all" | "production" | "environment";
127
167
  environmentId: string | null;
128
168
  }, {
129
- data: import("../generated/schemas.js").components["schemas"]["RuntimeToken"][];
169
+ data: import("../generated/schemas.js").components["schemas"]["SecretKey"][];
130
170
  pagination: {
131
171
  total: number;
132
172
  limit: number;
@@ -136,7 +176,10 @@ export declare const backendOperations: {
136
176
  scope: "all" | "production" | "environment";
137
177
  environmentId: string | null;
138
178
  }, false>;
139
- "runtimeTokens.mint": import("./define.js").OperationEntry<BusinessRef & {
179
+ "secretKeys.mint": import("./define.js").OperationEntry<BusinessRef & {
180
+ /** The environments the key may act for. Default all. */
181
+ scope?: string;
182
+ /** One environment directly (= scope env:<environment>). */
140
183
  environmentId?: string | null;
141
184
  backendId?: string | null;
142
185
  kind?: "live" | "test";
@@ -146,11 +189,13 @@ export declare const backendOperations: {
146
189
  }, {
147
190
  id: string;
148
191
  businessId: string;
192
+ scope: string;
149
193
  environmentId: string | null;
150
194
  backendId: string | null;
195
+ isDefault: boolean;
151
196
  kind: "live" | "test";
152
197
  lastFour: string;
153
- operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report")[];
198
+ operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report" | "webhook_secrets")[];
154
199
  allowedMeters: string[];
155
200
  allowedRoutes: string[];
156
201
  status: "active" | "revoked";
@@ -158,16 +203,18 @@ export declare const backendOperations: {
158
203
  createdAt: string;
159
204
  revokedAt: string | null;
160
205
  lastUsedAt: string | null;
161
- envVar: "FS_RUNTIME_TOKEN";
206
+ envVar: "FS_SECRET_KEY";
162
207
  token: string;
163
208
  }, {
164
209
  id: string;
165
210
  businessId: string;
211
+ scope: string;
166
212
  environmentId: string | null;
167
213
  backendId: string | null;
214
+ isDefault: boolean;
168
215
  kind: "live" | "test";
169
216
  lastFour: string;
170
- operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report")[];
217
+ operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report" | "webhook_secrets")[];
171
218
  allowedMeters: string[];
172
219
  allowedRoutes: string[];
173
220
  status: "active" | "revoked";
@@ -175,19 +222,21 @@ export declare const backendOperations: {
175
222
  createdAt: string;
176
223
  revokedAt: string | null;
177
224
  lastUsedAt: string | null;
178
- envVar: "FS_RUNTIME_TOKEN";
225
+ envVar: "FS_SECRET_KEY";
179
226
  token: string;
180
227
  }, false>;
181
- "runtimeTokens.rotate": import("./define.js").OperationEntry<BusinessRef & {
228
+ "secretKeys.rotate": import("./define.js").OperationEntry<BusinessRef & {
182
229
  tokenId: string;
183
230
  }, {
184
231
  id: string;
185
232
  businessId: string;
233
+ scope: string;
186
234
  environmentId: string | null;
187
235
  backendId: string | null;
236
+ isDefault: boolean;
188
237
  kind: "live" | "test";
189
238
  lastFour: string;
190
- operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report")[];
239
+ operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report" | "webhook_secrets")[];
191
240
  allowedMeters: string[];
192
241
  allowedRoutes: string[];
193
242
  status: "active" | "revoked";
@@ -195,16 +244,18 @@ export declare const backendOperations: {
195
244
  createdAt: string;
196
245
  revokedAt: string | null;
197
246
  lastUsedAt: string | null;
198
- envVar: "FS_RUNTIME_TOKEN";
247
+ envVar: "FS_SECRET_KEY";
199
248
  token: string;
200
249
  }, {
201
250
  id: string;
202
251
  businessId: string;
252
+ scope: string;
203
253
  environmentId: string | null;
204
254
  backendId: string | null;
255
+ isDefault: boolean;
205
256
  kind: "live" | "test";
206
257
  lastFour: string;
207
- operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report")[];
258
+ operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report" | "webhook_secrets")[];
208
259
  allowedMeters: string[];
209
260
  allowedRoutes: string[];
210
261
  status: "active" | "revoked";
@@ -212,19 +263,21 @@ export declare const backendOperations: {
212
263
  createdAt: string;
213
264
  revokedAt: string | null;
214
265
  lastUsedAt: string | null;
215
- envVar: "FS_RUNTIME_TOKEN";
266
+ envVar: "FS_SECRET_KEY";
216
267
  token: string;
217
268
  }, false>;
218
- "runtimeTokens.revoke": import("./define.js").OperationEntry<BusinessRef & {
269
+ "secretKeys.revoke": import("./define.js").OperationEntry<BusinessRef & {
219
270
  tokenId: string;
220
271
  }, {
221
272
  id: string;
222
273
  businessId: string;
274
+ scope: string;
223
275
  environmentId: string | null;
224
276
  backendId: string | null;
277
+ isDefault: boolean;
225
278
  kind: "live" | "test";
226
279
  lastFour: string;
227
- operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report")[];
280
+ operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report" | "webhook_secrets")[];
228
281
  allowedMeters: string[];
229
282
  allowedRoutes: string[];
230
283
  status: "active" | "revoked";
@@ -235,11 +288,13 @@ export declare const backendOperations: {
235
288
  }, {
236
289
  id: string;
237
290
  businessId: string;
291
+ scope: string;
238
292
  environmentId: string | null;
239
293
  backendId: string | null;
294
+ isDefault: boolean;
240
295
  kind: "live" | "test";
241
296
  lastFour: string;
242
- operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report")[];
297
+ operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report" | "webhook_secrets")[];
243
298
  allowedMeters: string[];
244
299
  allowedRoutes: string[];
245
300
  status: "active" | "revoked";