@farthershore/client 0.6.0 → 0.8.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 +38 -2
- package/LICENSE +21 -0
- package/README.md +10 -10
- package/dist/index.js +326 -59
- package/dist/types/api.generated.d.ts +105 -25
- package/dist/types/generated/schemas.d.ts +147 -16
- package/dist/types/operations/audit-notifications.d.ts +4 -0
- package/dist/types/operations/auth.d.ts +193 -0
- package/dist/types/operations/backends.d.ts +76 -21
- package/dist/types/operations/businesses.d.ts +48 -0
- package/dist/types/operations/consumers.d.ts +108 -0
- package/dist/types/operations/define.d.ts +1 -1
- package/dist/types/operations/index.d.ts +493 -26
- package/dist/types/operations/organizations.d.ts +7 -0
- package/dist/types/operations/platform.d.ts +6 -6
- package/dist/types/operations/webhooks.d.ts +64 -2
- package/dist/types/surface-types.d.ts +1 -1
- package/dist/types/surface.d.ts +1 -1
- package/dist/types/types.d.ts +20 -6
- package/dist/types/version.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import type { Method } from "./surface-types.js";
|
|
2
2
|
/** The namespaced Farther Shore API (`createFartherShore`). */
|
|
3
3
|
export interface FartherShoreApi {
|
|
4
|
+
readonly account: {
|
|
5
|
+
readonly erasure: {
|
|
6
|
+
/**
|
|
7
|
+
* Read your account deletion status
|
|
8
|
+
*
|
|
9
|
+
* Read progress or refusal for your own account deletion request.
|
|
10
|
+
*
|
|
11
|
+
* Operation `account_erasure.read` · read · requires `account_erasure:read`.
|
|
12
|
+
*/
|
|
13
|
+
readonly read: Method<"account.erasure.read">;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
4
16
|
readonly agents: {
|
|
5
17
|
/**
|
|
6
18
|
* Turn the Operator off (stops runs + billing)
|
|
@@ -177,23 +189,23 @@ export interface FartherShoreApi {
|
|
|
177
189
|
};
|
|
178
190
|
readonly backends: {
|
|
179
191
|
/**
|
|
180
|
-
*
|
|
192
|
+
* Set a backend's origin (every environment unless overridden)
|
|
181
193
|
*
|
|
182
|
-
*
|
|
194
|
+
* Set the origin of a backend declared in business/. Without a scope it sets the `all` deployment, which serves every environment; with scope env:<environment> (or non-production / kind:<kind>, or an origin template with {env}) it creates or updates that override. Farther Shore keeps the default backend's webhook receiver at <origin>/_fs/webhooks, and a business without a default key gets one, returned ONCE as defaultKey.
|
|
183
195
|
*
|
|
184
|
-
* Operation `backend.bind` · write · requires `backend:bind` · supports `dryRun` · reconcile an unknown outcome with `backend.read`.
|
|
196
|
+
* Operation `backend.bind` · write · requires `backend:bind` · returns a one-time secret · supports `dryRun` · reconcile an unknown outcome with `backend.read`.
|
|
185
197
|
*/
|
|
186
198
|
readonly bind: Method<"backends.bind">;
|
|
187
199
|
/**
|
|
188
200
|
* Create a backend (default transport: direct)
|
|
189
201
|
*
|
|
190
|
-
* Create a backend
|
|
202
|
+
* Create a backend deployment for a business. Pick a transport mode: direct (public HTTPS URL, secured by request signing) or tunnel (private outbound-only connection). Mark it default to route traffic to it. With an origin, the default backend gets its webhook receiver at <origin>/_fs/webhooks automatically, and a business without a default key gets one, returned ONCE as defaultKey.
|
|
191
203
|
*
|
|
192
|
-
* Operation `backend.create` · write · requires `backend:create` · supports `dryRun` · reconcile an unknown outcome with `backend.read`.
|
|
204
|
+
* Operation `backend.create` · write · requires `backend:create` · returns a one-time secret · supports `dryRun` · reconcile an unknown outcome with `backend.read`.
|
|
193
205
|
*/
|
|
194
206
|
readonly create: Method<"backends.create">;
|
|
195
207
|
/**
|
|
196
|
-
* Delete a backend (revokes its
|
|
208
|
+
* Delete a backend (revokes its secret keys)
|
|
197
209
|
*
|
|
198
210
|
* Delete a backend (origin). Traffic routed to it stops; re-create to restore.
|
|
199
211
|
*
|
|
@@ -203,7 +215,7 @@ export interface FartherShoreApi {
|
|
|
203
215
|
/**
|
|
204
216
|
* List backends for a business (id, scope, name, transport, status)
|
|
205
217
|
*
|
|
206
|
-
* List a business's
|
|
218
|
+
* List a business's backend deployments — id, scope (all | production | non-production | kind:<kind> | env:<environment>), name, slug, transport (direct|tunnel), default flag, and derived status. A backend has one deployment per scope; each environment is served by the most specific one. Read-only.
|
|
207
219
|
*
|
|
208
220
|
* Operation `backend.read` · read · requires `backend:read` · offset pagination.
|
|
209
221
|
*/
|
|
@@ -335,7 +347,9 @@ export interface FartherShoreApi {
|
|
|
335
347
|
/**
|
|
336
348
|
* Create a new business and provision its managed GitHub repo
|
|
337
349
|
*
|
|
338
|
-
*
|
|
350
|
+
* Create a new business and provision its managed GitHub repo. Also issues the business's default key (every environment, every runtime operation) and returns it ONCE as defaultKey — set it as FS_SECRET_KEY in your backend.
|
|
351
|
+
*
|
|
352
|
+
* Operation `business.create` · write · requires `business:create` · returns a one-time secret · reconcile an unknown outcome with `business.list`.
|
|
339
353
|
*/
|
|
340
354
|
readonly create: Method<"businesses.create">;
|
|
341
355
|
readonly docs: {
|
|
@@ -542,6 +556,26 @@ export interface FartherShoreApi {
|
|
|
542
556
|
* Operation `consumer.block` · write · requires `consumer:block` · destructive · reconcile an unknown outcome with `consumer.read`.
|
|
543
557
|
*/
|
|
544
558
|
readonly block: Method<"consumers.block">;
|
|
559
|
+
readonly data: {
|
|
560
|
+
readonly erasure: {
|
|
561
|
+
/**
|
|
562
|
+
* Read customer erasure status
|
|
563
|
+
*
|
|
564
|
+
* Read the progress or refusal of customer data erasure for one business.
|
|
565
|
+
*
|
|
566
|
+
* Operation `consumer.data.erasure.read` · read · requires `consumer:read`.
|
|
567
|
+
*/
|
|
568
|
+
readonly read: Method<"consumers.data.erasure.read">;
|
|
569
|
+
};
|
|
570
|
+
/**
|
|
571
|
+
* Export a customer's data
|
|
572
|
+
*
|
|
573
|
+
* Export one customer's data for one business as JSON.
|
|
574
|
+
*
|
|
575
|
+
* Operation `consumer.data.export` · read · requires `consumer:read`.
|
|
576
|
+
*/
|
|
577
|
+
readonly export: Method<"consumers.data.export">;
|
|
578
|
+
};
|
|
545
579
|
/**
|
|
546
580
|
* Move one consumer to the active head of their plan lineage
|
|
547
581
|
*
|
|
@@ -878,6 +912,26 @@ export interface FartherShoreApi {
|
|
|
878
912
|
*/
|
|
879
913
|
readonly update: Method<"organizations.role.update">;
|
|
880
914
|
};
|
|
915
|
+
readonly sellerDetails: {
|
|
916
|
+
/**
|
|
917
|
+
* Read the organization's seller details
|
|
918
|
+
*
|
|
919
|
+
* Read the public seller details every business in the organization shows customers on its site, at checkout, on receipts and in emails. They come from the organization's payment account (legal name, support email, postal address, support URL); a business cannot go live until the account has them.
|
|
920
|
+
*
|
|
921
|
+
* Operation `organization.seller_details.read` · read · requires `organization:read`.
|
|
922
|
+
*/
|
|
923
|
+
readonly read: Method<"organizations.sellerDetails.read">;
|
|
924
|
+
};
|
|
925
|
+
};
|
|
926
|
+
readonly personalData: {
|
|
927
|
+
/**
|
|
928
|
+
* Export your personal data
|
|
929
|
+
*
|
|
930
|
+
* Download your own account data as JSON. Organization credentials cannot export personal data.
|
|
931
|
+
*
|
|
932
|
+
* Operation `personal_data.export` · read · requires `personal_data:export`.
|
|
933
|
+
*/
|
|
934
|
+
readonly export: Method<"personalData.export">;
|
|
881
935
|
};
|
|
882
936
|
readonly personas: {
|
|
883
937
|
/**
|
|
@@ -966,6 +1020,16 @@ export interface FartherShoreApi {
|
|
|
966
1020
|
*/
|
|
967
1021
|
readonly read: Method<"platform.dependents.read">;
|
|
968
1022
|
};
|
|
1023
|
+
readonly legal: {
|
|
1024
|
+
/**
|
|
1025
|
+
* Read required legal document acceptance
|
|
1026
|
+
*
|
|
1027
|
+
* Read which current platform legal documents the signed-in person has accepted and the dashboard link for outstanding documents. Acceptance is a human decision in the dashboard.
|
|
1028
|
+
*
|
|
1029
|
+
* Operation `platform_legal.read` · read · requires `platform_legal:read`.
|
|
1030
|
+
*/
|
|
1031
|
+
readonly read: Method<"platform.legal.read">;
|
|
1032
|
+
};
|
|
969
1033
|
readonly resourceCounts: {
|
|
970
1034
|
/**
|
|
971
1035
|
* Report a subscription resource count
|
|
@@ -1111,39 +1175,39 @@ export interface FartherShoreApi {
|
|
|
1111
1175
|
*/
|
|
1112
1176
|
readonly update: Method<"promoCodes.update">;
|
|
1113
1177
|
};
|
|
1114
|
-
readonly
|
|
1178
|
+
readonly secretKeys: {
|
|
1115
1179
|
/**
|
|
1116
|
-
* Create a
|
|
1180
|
+
* Create a secret key (returns it once)
|
|
1117
1181
|
*
|
|
1118
|
-
* Mint
|
|
1182
|
+
* Mint an additional secret key (fsrt_), e.g. a dedicated key for one environment (scope env:<environment>) that can act for no other. The business's default key already covers every environment. Returns the plaintext ONCE. Operations default to gateway_verification, metering, health and webhook_secrets.
|
|
1119
1183
|
*
|
|
1120
|
-
* Operation `
|
|
1184
|
+
* Operation `secret_key.mint` · write · requires `secret_key:mint` · returns a one-time secret · reconcile an unknown outcome with `secret_key.read`.
|
|
1121
1185
|
*/
|
|
1122
|
-
readonly mint: Method<"
|
|
1186
|
+
readonly mint: Method<"secretKeys.mint">;
|
|
1123
1187
|
/**
|
|
1124
|
-
* List
|
|
1188
|
+
* List secret keys for a business
|
|
1125
1189
|
*
|
|
1126
|
-
* List a business's
|
|
1190
|
+
* List a business's secret keys (fsrt_) — id, last-four, operations, status, and env scope. Read-only; secrets are never shown.
|
|
1127
1191
|
*
|
|
1128
|
-
* Operation `
|
|
1192
|
+
* Operation `secret_key.read` · read · requires `secret_key:read` · offset pagination.
|
|
1129
1193
|
*/
|
|
1130
|
-
readonly read: Method<"
|
|
1194
|
+
readonly read: Method<"secretKeys.read">;
|
|
1131
1195
|
/**
|
|
1132
|
-
* Revoke a
|
|
1196
|
+
* Revoke a secret key
|
|
1133
1197
|
*
|
|
1134
|
-
* Revoke a
|
|
1198
|
+
* Revoke a secret key. The backend using it stops verifying.
|
|
1135
1199
|
*
|
|
1136
|
-
* Operation `
|
|
1200
|
+
* Operation `secret_key.revoke` · write · requires `secret_key:revoke` · destructive · reconcile an unknown outcome with `secret_key.read`.
|
|
1137
1201
|
*/
|
|
1138
|
-
readonly revoke: Method<"
|
|
1202
|
+
readonly revoke: Method<"secretKeys.revoke">;
|
|
1139
1203
|
/**
|
|
1140
|
-
* Rotate a
|
|
1204
|
+
* Rotate a secret key (returns a fresh FS_SECRET_KEY once)
|
|
1141
1205
|
*
|
|
1142
|
-
* Rotate a
|
|
1206
|
+
* Rotate a secret key: mint a fresh secret carrying the same scope and revoke the old one. Returns the new plaintext token ONCE.
|
|
1143
1207
|
*
|
|
1144
|
-
* Operation `
|
|
1208
|
+
* Operation `secret_key.rotate` · write · requires `secret_key:rotate` · destructive · returns a one-time secret · reconcile an unknown outcome with `secret_key.read`.
|
|
1145
1209
|
*/
|
|
1146
|
-
readonly rotate: Method<"
|
|
1210
|
+
readonly rotate: Method<"secretKeys.rotate">;
|
|
1147
1211
|
};
|
|
1148
1212
|
readonly usage: {
|
|
1149
1213
|
/**
|
|
@@ -1255,6 +1319,14 @@ export interface FartherShoreApi {
|
|
|
1255
1319
|
* Operation `webhook.delivery.read` · read · requires `webhook:delivery_read` · offset pagination.
|
|
1256
1320
|
*/
|
|
1257
1321
|
readonly read: Method<"webhooks.delivery.read">;
|
|
1322
|
+
/**
|
|
1323
|
+
* Send one webhook delivery again
|
|
1324
|
+
*
|
|
1325
|
+
* Queue one delivery to be sent again right away, with the same webhook-id and payload. Works for a delivered, failed or dead delivery; one still being sent is refused. It gets a fresh 72-hour retry window.
|
|
1326
|
+
*
|
|
1327
|
+
* Operation `webhook.delivery.redeliver` · write · requires `webhook:update` · reconcile an unknown outcome with `webhook.delivery.read`.
|
|
1328
|
+
*/
|
|
1329
|
+
readonly redeliver: Method<"webhooks.delivery.redeliver">;
|
|
1258
1330
|
};
|
|
1259
1331
|
readonly eventType: {
|
|
1260
1332
|
/**
|
|
@@ -1274,6 +1346,14 @@ export interface FartherShoreApi {
|
|
|
1274
1346
|
* Operation `webhook.read` · read · requires `webhook:read` · offset pagination.
|
|
1275
1347
|
*/
|
|
1276
1348
|
readonly read: Method<"webhooks.read">;
|
|
1349
|
+
/**
|
|
1350
|
+
* Send every failed or dead delivery of a webhook endpoint in a time range again
|
|
1351
|
+
*
|
|
1352
|
+
* Queue every failed or dead delivery of one webhook endpoint created in [since, until) to be sent again right away, each with its own webhook-id and a fresh 72-hour retry window. Returns how many were queued.
|
|
1353
|
+
*
|
|
1354
|
+
* Operation `webhook.redeliver` · write · requires `webhook:update` · reconcile an unknown outcome with `webhook.delivery.read`.
|
|
1355
|
+
*/
|
|
1356
|
+
readonly redeliver: Method<"webhooks.redeliver">;
|
|
1277
1357
|
/**
|
|
1278
1358
|
* Issue a new signing secret (returned once); readable old secrets verify for 24h
|
|
1279
1359
|
*
|