@farthershore/client 0.4.0 → 0.6.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.
@@ -45,56 +45,6 @@ export interface FartherShoreApi {
45
45
  */
46
46
  readonly status: Method<"agents.status">;
47
47
  };
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
48
  readonly analytics: {
99
49
  /**
100
50
  * Request latency percentiles (p50 / p95 / p99)
@@ -262,17 +212,9 @@ export interface FartherShoreApi {
262
212
  readonly billing: {
263
213
  readonly stripe: {
264
214
  /**
265
- * Remove a business's per-business Stripe override so it bills through the org default again
215
+ * Show the organization Stripe connection a business bills through
266
216
  *
267
- * Remove a business's per-business Stripe Connect override so it bills through the organization default again. Refused while any subscription is still money-bearing. Destructive live-state operation; it does not edit repo-authored business behavior.
268
- *
269
- * Operation `stripe_connection.delete` · write · requires `stripe_connection:delete` · destructive · reconcile an unknown outcome with `stripe_connection.read`.
270
- */
271
- readonly delete: Method<"billing.stripe.delete">;
272
- /**
273
- * Show the Stripe connection a business bills through (business override or org default)
274
- *
275
- * 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.
217
+ * 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.
276
218
  *
277
219
  * Operation `stripe_connection.read` · read · requires `stripe_connection:read`.
278
220
  */
@@ -396,14 +338,6 @@ export interface FartherShoreApi {
396
338
  * Operation `business.create` · write · requires `business:create` · reconcile an unknown outcome with `business.list`.
397
339
  */
398
340
  readonly create: Method<"businesses.create">;
399
- /**
400
- * Permanently delete a business (stage only)
401
- *
402
- * (stage only) Permanently delete a business. Requires --yes. Registered only in the stage channel (`make cli-stage`); production businesses are deleted from the dashboard.
403
- *
404
- * Operation `business.delete` · write · requires `business:delete` · destructive · reconcile an unknown outcome with `business.list`.
405
- */
406
- readonly delete: Method<"businesses.delete">;
407
341
  readonly docs: {
408
342
  /**
409
343
  * Disable docs for a business (stop publishing/serving docs; scaffold kept in the repo)
@@ -498,12 +432,6 @@ export interface FartherShoreApi {
498
432
  * Operation `business.read` · read · requires `business:read`.
499
433
  */
500
434
  readonly read: Method<"businesses.read">;
501
- /**
502
- * Roll back a prior business publish workflow
503
- *
504
- * Operation `business.rollback` · write · requires `business:rollback` · destructive · reconcile an unknown outcome with `business.status`.
505
- */
506
- readonly rollback: Method<"businesses.rollback">;
507
435
  readonly routes: {
508
436
  /**
509
437
  * List a business's compiled routes
@@ -598,6 +526,14 @@ export interface FartherShoreApi {
598
526
  */
599
527
  readonly revoke: Method<"consumers.apiKeys.revoke">;
600
528
  };
529
+ readonly balance: {
530
+ /**
531
+ * Read one subscriber's usage-unit balances
532
+ *
533
+ * Operation `consumer.read` · read · requires `consumer:read`.
534
+ */
535
+ readonly read: Method<"consumers.balance.read">;
536
+ };
601
537
  /**
602
538
  * Block a consumer (revoking every API key) or revoke one of its API keys
603
539
  *
@@ -633,9 +569,9 @@ export interface FartherShoreApi {
633
569
  readonly enable: Method<"consumers.rbac.enable">;
634
570
  };
635
571
  /**
636
- * List a business's consumers, one consumer's API keys, or its Managed-RBAC roles
572
+ * List a business's consumers, or read one consumer's API keys, balances or Managed-RBAC roles
637
573
  *
638
- * 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.
574
+ * 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.
639
575
  *
640
576
  * Operation `consumer.read` · read · requires `consumer:read`.
641
577
  */
@@ -842,12 +778,6 @@ export interface FartherShoreApi {
842
778
  * Operation `organization.create` · write · requires `organization:create` · reconcile an unknown outcome with `organization.list`.
843
779
  */
844
780
  readonly create: Method<"organizations.create">;
845
- /**
846
- * Delete an organization and its managed state
847
- *
848
- * Operation `organization.delete` · write · requires `organization:delete` · destructive · reconcile an unknown outcome with `organization.list`.
849
- */
850
- readonly delete: Method<"organizations.delete">;
851
781
  readonly invitation: {
852
782
  /**
853
783
  * Accept an organization invitation
@@ -916,16 +846,6 @@ export interface FartherShoreApi {
916
846
  */
917
847
  readonly read: Method<"organizations.overview.read">;
918
848
  };
919
- readonly ownership: {
920
- /**
921
- * Transfer primary ownership of a team or company organization to another member
922
- *
923
- * Transfer primary ownership of a team or company organization to another existing member. Destructive and irreversible for the caller; requires the signed-in owner's session.
924
- *
925
- * Operation `organization.ownership.transfer` · write · requires `organization:ownership_transfer` · destructive · reconcile an unknown outcome with `organization.overview.read`.
926
- */
927
- readonly transfer: Method<"organizations.ownership.transfer">;
928
- };
929
849
  readonly role: {
930
850
  /**
931
851
  * Create a custom organization role
@@ -1070,6 +990,14 @@ export interface FartherShoreApi {
1070
990
  };
1071
991
  };
1072
992
  readonly portal: {
993
+ readonly balance: {
994
+ /**
995
+ * Read the signed-in subscriber's usage-unit balances
996
+ *
997
+ * No opKey · read.
998
+ */
999
+ readonly read: Method<"portal.balance.read">;
1000
+ };
1073
1001
  readonly serviceAccounts: {
1074
1002
  /**
1075
1003
  * List pending service-account approvals
@@ -73,6 +73,10 @@ export declare function isExchangeCredential(rawToken: string): boolean;
73
73
  * A CLI login (`fscli_…`, user-bound) or a maker token (`mk_…`,
74
74
  * organization-bound), exchanged for a short-lived access token before use
75
75
  * and re-exchanged ahead of its expiry or after a 401. Any other token is
76
- * sent as is.
76
+ * sent as is — unless `oauth` says it is an OAuth access token from the
77
+ * platform's sign-in: that exchanges too, and like a CLI login it is
78
+ * user-bound (organization from the context, else the user's last active).
77
79
  */
78
- export declare function cliExchangeCredentials(rawToken: string): CredentialSource;
80
+ export declare function cliExchangeCredentials(rawToken: string, options?: {
81
+ oauth?: boolean;
82
+ }): CredentialSource;