@farthershore/client 0.5.0 → 0.7.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.
@@ -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)
@@ -45,56 +57,6 @@ export interface FartherShoreApi {
45
57
  */
46
58
  readonly status: Method<"agents.status">;
47
59
  };
48
- readonly agreements: {
49
- /**
50
- * Amend an agreement's contract terms (append-only; previews first; commits with the confirmation token)
51
- *
52
- * Amend an agreement's contract terms (append-only; confirm-gated: previews first; pass --confirm <token> to commit)
53
- *
54
- * Operation `agreement.amend` · write · requires `agreement:amend` · reconcile an unknown outcome with `agreement.read`.
55
- */
56
- readonly amend: Method<"agreements.amend">;
57
- /**
58
- * Create an economic agreement (previews first; commits with the confirmation token)
59
- *
60
- * Create an economic agreement (confirm-gated: previews first; pass --confirm <token> to commit)
61
- *
62
- * Operation `agreement.create` · write · requires `agreement:create` · reconcile an unknown outcome with `agreement.read`.
63
- */
64
- readonly create: Method<"agreements.create">;
65
- /**
66
- * Show one economic agreement
67
- *
68
- * Operation `agreement.read` · read · requires `agreement:read`.
69
- */
70
- readonly get: Method<"agreements.get">;
71
- /**
72
- * Show the price pins in force for one subject
73
- *
74
- * Operation `agreement.read` · read · requires `agreement:read`.
75
- */
76
- readonly pins: Method<"agreements.pins">;
77
- /**
78
- * Preview an amendment's effect and get its confirmation token
79
- *
80
- * Operation `agreement.amend` · read · requires `agreement:amend` · reconcile an unknown outcome with `agreement.read`.
81
- */
82
- readonly previewAmend: Method<"agreements.previewAmend">;
83
- /**
84
- * Preview a new agreement's effect and get its confirmation token
85
- *
86
- * Operation `agreement.create` · read · requires `agreement:create` · reconcile an unknown outcome with `agreement.read`.
87
- */
88
- readonly previewCreate: Method<"agreements.previewCreate">;
89
- /**
90
- * List or show a business's economic agreements and their pins
91
- *
92
- * Lists a business's economic agreements, shows one agreement with its terms, and shows the agreement pins that bind subscribers to a version.
93
- *
94
- * Operation `agreement.read` · read · requires `agreement:read` · offset pagination.
95
- */
96
- readonly read: Method<"agreements.read">;
97
- };
98
60
  readonly analytics: {
99
61
  /**
100
62
  * Request latency percentiles (p50 / p95 / p99)
@@ -262,9 +224,9 @@ export interface FartherShoreApi {
262
224
  readonly billing: {
263
225
  readonly stripe: {
264
226
  /**
265
- * Show the Stripe connection a business bills through (business override or org default)
227
+ * Show the organization Stripe connection a business bills through
266
228
  *
267
- * Read whether a business bills through a connected Stripe account — a per-business override when present, otherwise the organization default — and whether that account can take charges and card payments. Read-only. Connecting Stripe is browser-only and has no tool.
229
+ * Read whether a business bills through its organization connected Stripe account and whether that account can take charges and card payments. Read-only. Connecting Stripe is browser-only and has no tool.
268
230
  *
269
231
  * Operation `stripe_connection.read` · read · requires `stripe_connection:read`.
270
232
  */
@@ -482,14 +444,6 @@ export interface FartherShoreApi {
482
444
  * Operation `business.read` · read · requires `business:read`.
483
445
  */
484
446
  readonly read: Method<"businesses.read">;
485
- /**
486
- * Roll back a prior business publish
487
- *
488
- * Roll back a prior business publish. Pass the prior publish id as publishId; the receipt returns rollbackPublishId for the new rollback.
489
- *
490
- * Operation `business.rollback` · write · requires `business:rollback` · destructive · reconcile an unknown outcome with `business.status`.
491
- */
492
- readonly rollback: Method<"businesses.rollback">;
493
447
  readonly routes: {
494
448
  /**
495
449
  * List a business's compiled routes
@@ -584,6 +538,14 @@ export interface FartherShoreApi {
584
538
  */
585
539
  readonly revoke: Method<"consumers.apiKeys.revoke">;
586
540
  };
541
+ readonly balance: {
542
+ /**
543
+ * Read one subscriber's usage-unit balances
544
+ *
545
+ * Operation `consumer.read` · read · requires `consumer:read`.
546
+ */
547
+ readonly read: Method<"consumers.balance.read">;
548
+ };
587
549
  /**
588
550
  * Block a consumer (revoking every API key) or revoke one of its API keys
589
551
  *
@@ -592,6 +554,26 @@ export interface FartherShoreApi {
592
554
  * Operation `consumer.block` · write · requires `consumer:block` · destructive · reconcile an unknown outcome with `consumer.read`.
593
555
  */
594
556
  readonly block: Method<"consumers.block">;
557
+ readonly data: {
558
+ readonly erasure: {
559
+ /**
560
+ * Read customer erasure status
561
+ *
562
+ * Read the progress or refusal of customer data erasure for one business.
563
+ *
564
+ * Operation `consumer.data.erasure.read` · read · requires `consumer:read`.
565
+ */
566
+ readonly read: Method<"consumers.data.erasure.read">;
567
+ };
568
+ /**
569
+ * Export a customer's data
570
+ *
571
+ * Export one customer's data for one business as JSON.
572
+ *
573
+ * Operation `consumer.data.export` · read · requires `consumer:read`.
574
+ */
575
+ readonly export: Method<"consumers.data.export">;
576
+ };
595
577
  /**
596
578
  * Move one consumer to the active head of their plan lineage
597
579
  *
@@ -619,9 +601,9 @@ export interface FartherShoreApi {
619
601
  readonly enable: Method<"consumers.rbac.enable">;
620
602
  };
621
603
  /**
622
- * List a business's consumers, one consumer's API keys, or its Managed-RBAC roles
604
+ * List a business's consumers, or read one consumer's API keys, balances or Managed-RBAC roles
623
605
  *
624
- * Reads a business's consumers (subscribers). The same capability lists one consumer's API keys (metadata only; key material is never returned) and one subscriber's Managed-RBAC roles.
606
+ * Reads a business's consumers (subscribers). The same capability lists one consumer's API keys (metadata only; key material is never returned), reads its usage-unit balances (exact amounts, with whether each read is live or an estimate), and lists one subscriber's Managed-RBAC roles.
625
607
  *
626
608
  * Operation `consumer.read` · read · requires `consumer:read`.
627
609
  */
@@ -928,6 +910,26 @@ export interface FartherShoreApi {
928
910
  */
929
911
  readonly update: Method<"organizations.role.update">;
930
912
  };
913
+ readonly sellerDetails: {
914
+ /**
915
+ * Read the organization's seller details
916
+ *
917
+ * 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.
918
+ *
919
+ * Operation `organization.seller_details.read` · read · requires `organization:read`.
920
+ */
921
+ readonly read: Method<"organizations.sellerDetails.read">;
922
+ };
923
+ };
924
+ readonly personalData: {
925
+ /**
926
+ * Export your personal data
927
+ *
928
+ * Download your own account data as JSON. Organization credentials cannot export personal data.
929
+ *
930
+ * Operation `personal_data.export` · read · requires `personal_data:export`.
931
+ */
932
+ readonly export: Method<"personalData.export">;
931
933
  };
932
934
  readonly personas: {
933
935
  /**
@@ -1016,6 +1018,16 @@ export interface FartherShoreApi {
1016
1018
  */
1017
1019
  readonly read: Method<"platform.dependents.read">;
1018
1020
  };
1021
+ readonly legal: {
1022
+ /**
1023
+ * Read required legal document acceptance
1024
+ *
1025
+ * 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.
1026
+ *
1027
+ * Operation `platform_legal.read` · read · requires `platform_legal:read`.
1028
+ */
1029
+ readonly read: Method<"platform.legal.read">;
1030
+ };
1019
1031
  readonly resourceCounts: {
1020
1032
  /**
1021
1033
  * Report a subscription resource count
@@ -1040,6 +1052,14 @@ export interface FartherShoreApi {
1040
1052
  };
1041
1053
  };
1042
1054
  readonly portal: {
1055
+ readonly balance: {
1056
+ /**
1057
+ * Read the signed-in subscriber's usage-unit balances
1058
+ *
1059
+ * No opKey · read.
1060
+ */
1061
+ readonly read: Method<"portal.balance.read">;
1062
+ };
1043
1063
  readonly serviceAccounts: {
1044
1064
  /**
1045
1065
  * List pending service-account approvals