@farthershore/client 0.7.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.
@@ -159,7 +159,7 @@ export declare const platformOperations: {
159
159
  }, {
160
160
  name: string;
161
161
  trigger: {
162
- eventType: "subscription.created" | "subscription.updated" | "subscription.canceled" | "payment.succeeded" | "payment.failed" | "entitlement.changed" | "usage.threshold_reached" | "balance.low" | "balance.exhausted" | "customer.created" | "customer.deleted" | "customer.member.added" | "customer.member.updated" | "customer.member.removed" | "rate_limit.exceeded" | "usage.recorded" | "usage.archive_checkpoint" | "gateway.request_denied" | "change_set.created" | "change_set.approved" | "change_set.applied" | "change_set.rolled_back" | "change_set.cancelled" | "billing.event_recorded" | "authz.decision" | "repo.changed" | "automation.rule_fired" | "automation.action_succeeded" | "automation.action_failed" | "automation.action_denied" | "automation.notification" | "access_request.created" | "access_request.resolved" | "build.failed" | "product.published" | "workflow.failed" | "pr.review_posted";
162
+ eventType: "subscription.created" | "subscription.updated" | "subscription.canceled" | "payment.succeeded" | "payment.failed" | "entitlement.changed" | "usage.threshold_reached" | "balance.low" | "balance.exhausted" | "customer.created" | "customer.deleted" | "customer.member.added" | "customer.member.updated" | "customer.member.removed" | "rate_limit.exceeded" | "usage.recorded" | "usage.archive_checkpoint" | "gateway.request_denied" | "change_set.created" | "change_set.approved" | "change_set.applied" | "change_set.rolled_back" | "change_set.cancelled" | "billing.event_recorded" | "authz.decision" | "repo.changed" | "automation.rule_fired" | "automation.action_succeeded" | "automation.action_failed" | "automation.action_denied" | "automation.notification" | "access_request.created" | "access_request.resolved" | "build.failed" | "product.published" | "workflow.failed" | "pr.review_posted" | "webhook_endpoint.paused";
163
163
  filter?: {
164
164
  subjectType?: string;
165
165
  subjectId?: string;
@@ -204,7 +204,7 @@ export declare const platformOperations: {
204
204
  }, {
205
205
  name: string;
206
206
  trigger: {
207
- eventType: "subscription.created" | "subscription.updated" | "subscription.canceled" | "payment.succeeded" | "payment.failed" | "entitlement.changed" | "usage.threshold_reached" | "balance.low" | "balance.exhausted" | "customer.created" | "customer.deleted" | "customer.member.added" | "customer.member.updated" | "customer.member.removed" | "rate_limit.exceeded" | "usage.recorded" | "usage.archive_checkpoint" | "gateway.request_denied" | "change_set.created" | "change_set.approved" | "change_set.applied" | "change_set.rolled_back" | "change_set.cancelled" | "billing.event_recorded" | "authz.decision" | "repo.changed" | "automation.rule_fired" | "automation.action_succeeded" | "automation.action_failed" | "automation.action_denied" | "automation.notification" | "access_request.created" | "access_request.resolved" | "build.failed" | "product.published" | "workflow.failed" | "pr.review_posted";
207
+ eventType: "subscription.created" | "subscription.updated" | "subscription.canceled" | "payment.succeeded" | "payment.failed" | "entitlement.changed" | "usage.threshold_reached" | "balance.low" | "balance.exhausted" | "customer.created" | "customer.deleted" | "customer.member.added" | "customer.member.updated" | "customer.member.removed" | "rate_limit.exceeded" | "usage.recorded" | "usage.archive_checkpoint" | "gateway.request_denied" | "change_set.created" | "change_set.approved" | "change_set.applied" | "change_set.rolled_back" | "change_set.cancelled" | "billing.event_recorded" | "authz.decision" | "repo.changed" | "automation.rule_fired" | "automation.action_succeeded" | "automation.action_failed" | "automation.action_denied" | "automation.notification" | "access_request.created" | "access_request.resolved" | "build.failed" | "product.published" | "workflow.failed" | "pr.review_posted" | "webhook_endpoint.paused";
208
208
  filter?: {
209
209
  subjectType?: string;
210
210
  subjectId?: string;
@@ -252,7 +252,7 @@ export declare const platformOperations: {
252
252
  }, {
253
253
  name: string;
254
254
  trigger: {
255
- eventType: "subscription.created" | "subscription.updated" | "subscription.canceled" | "payment.succeeded" | "payment.failed" | "entitlement.changed" | "usage.threshold_reached" | "balance.low" | "balance.exhausted" | "customer.created" | "customer.deleted" | "customer.member.added" | "customer.member.updated" | "customer.member.removed" | "rate_limit.exceeded" | "usage.recorded" | "usage.archive_checkpoint" | "gateway.request_denied" | "change_set.created" | "change_set.approved" | "change_set.applied" | "change_set.rolled_back" | "change_set.cancelled" | "billing.event_recorded" | "authz.decision" | "repo.changed" | "automation.rule_fired" | "automation.action_succeeded" | "automation.action_failed" | "automation.action_denied" | "automation.notification" | "access_request.created" | "access_request.resolved" | "build.failed" | "product.published" | "workflow.failed" | "pr.review_posted";
255
+ eventType: "subscription.created" | "subscription.updated" | "subscription.canceled" | "payment.succeeded" | "payment.failed" | "entitlement.changed" | "usage.threshold_reached" | "balance.low" | "balance.exhausted" | "customer.created" | "customer.deleted" | "customer.member.added" | "customer.member.updated" | "customer.member.removed" | "rate_limit.exceeded" | "usage.recorded" | "usage.archive_checkpoint" | "gateway.request_denied" | "change_set.created" | "change_set.approved" | "change_set.applied" | "change_set.rolled_back" | "change_set.cancelled" | "billing.event_recorded" | "authz.decision" | "repo.changed" | "automation.rule_fired" | "automation.action_succeeded" | "automation.action_failed" | "automation.action_denied" | "automation.notification" | "access_request.created" | "access_request.resolved" | "build.failed" | "product.published" | "workflow.failed" | "pr.review_posted" | "webhook_endpoint.paused";
256
256
  filter?: {
257
257
  subjectType?: string;
258
258
  subjectId?: string;
@@ -297,7 +297,7 @@ export declare const platformOperations: {
297
297
  }, {
298
298
  name: string;
299
299
  trigger: {
300
- eventType: "subscription.created" | "subscription.updated" | "subscription.canceled" | "payment.succeeded" | "payment.failed" | "entitlement.changed" | "usage.threshold_reached" | "balance.low" | "balance.exhausted" | "customer.created" | "customer.deleted" | "customer.member.added" | "customer.member.updated" | "customer.member.removed" | "rate_limit.exceeded" | "usage.recorded" | "usage.archive_checkpoint" | "gateway.request_denied" | "change_set.created" | "change_set.approved" | "change_set.applied" | "change_set.rolled_back" | "change_set.cancelled" | "billing.event_recorded" | "authz.decision" | "repo.changed" | "automation.rule_fired" | "automation.action_succeeded" | "automation.action_failed" | "automation.action_denied" | "automation.notification" | "access_request.created" | "access_request.resolved" | "build.failed" | "product.published" | "workflow.failed" | "pr.review_posted";
300
+ eventType: "subscription.created" | "subscription.updated" | "subscription.canceled" | "payment.succeeded" | "payment.failed" | "entitlement.changed" | "usage.threshold_reached" | "balance.low" | "balance.exhausted" | "customer.created" | "customer.deleted" | "customer.member.added" | "customer.member.updated" | "customer.member.removed" | "rate_limit.exceeded" | "usage.recorded" | "usage.archive_checkpoint" | "gateway.request_denied" | "change_set.created" | "change_set.approved" | "change_set.applied" | "change_set.rolled_back" | "change_set.cancelled" | "billing.event_recorded" | "authz.decision" | "repo.changed" | "automation.rule_fired" | "automation.action_succeeded" | "automation.action_failed" | "automation.action_denied" | "automation.notification" | "access_request.created" | "access_request.resolved" | "build.failed" | "product.published" | "workflow.failed" | "pr.review_posted" | "webhook_endpoint.paused";
301
301
  filter?: {
302
302
  subjectType?: string;
303
303
  subjectId?: string;
@@ -346,7 +346,7 @@ export declare const platformOperations: {
346
346
  }, {
347
347
  name: string;
348
348
  trigger: {
349
- eventType: "subscription.created" | "subscription.updated" | "subscription.canceled" | "payment.succeeded" | "payment.failed" | "entitlement.changed" | "usage.threshold_reached" | "balance.low" | "balance.exhausted" | "customer.created" | "customer.deleted" | "customer.member.added" | "customer.member.updated" | "customer.member.removed" | "rate_limit.exceeded" | "usage.recorded" | "usage.archive_checkpoint" | "gateway.request_denied" | "change_set.created" | "change_set.approved" | "change_set.applied" | "change_set.rolled_back" | "change_set.cancelled" | "billing.event_recorded" | "authz.decision" | "repo.changed" | "automation.rule_fired" | "automation.action_succeeded" | "automation.action_failed" | "automation.action_denied" | "automation.notification" | "access_request.created" | "access_request.resolved" | "build.failed" | "product.published" | "workflow.failed" | "pr.review_posted";
349
+ eventType: "subscription.created" | "subscription.updated" | "subscription.canceled" | "payment.succeeded" | "payment.failed" | "entitlement.changed" | "usage.threshold_reached" | "balance.low" | "balance.exhausted" | "customer.created" | "customer.deleted" | "customer.member.added" | "customer.member.updated" | "customer.member.removed" | "rate_limit.exceeded" | "usage.recorded" | "usage.archive_checkpoint" | "gateway.request_denied" | "change_set.created" | "change_set.approved" | "change_set.applied" | "change_set.rolled_back" | "change_set.cancelled" | "billing.event_recorded" | "authz.decision" | "repo.changed" | "automation.rule_fired" | "automation.action_succeeded" | "automation.action_failed" | "automation.action_denied" | "automation.notification" | "access_request.created" | "access_request.resolved" | "build.failed" | "product.published" | "workflow.failed" | "pr.review_posted" | "webhook_endpoint.paused";
350
350
  filter?: {
351
351
  subjectType?: string;
352
352
  subjectId?: string;
@@ -391,7 +391,7 @@ export declare const platformOperations: {
391
391
  }, {
392
392
  name: string;
393
393
  trigger: {
394
- eventType: "subscription.created" | "subscription.updated" | "subscription.canceled" | "payment.succeeded" | "payment.failed" | "entitlement.changed" | "usage.threshold_reached" | "balance.low" | "balance.exhausted" | "customer.created" | "customer.deleted" | "customer.member.added" | "customer.member.updated" | "customer.member.removed" | "rate_limit.exceeded" | "usage.recorded" | "usage.archive_checkpoint" | "gateway.request_denied" | "change_set.created" | "change_set.approved" | "change_set.applied" | "change_set.rolled_back" | "change_set.cancelled" | "billing.event_recorded" | "authz.decision" | "repo.changed" | "automation.rule_fired" | "automation.action_succeeded" | "automation.action_failed" | "automation.action_denied" | "automation.notification" | "access_request.created" | "access_request.resolved" | "build.failed" | "product.published" | "workflow.failed" | "pr.review_posted";
394
+ eventType: "subscription.created" | "subscription.updated" | "subscription.canceled" | "payment.succeeded" | "payment.failed" | "entitlement.changed" | "usage.threshold_reached" | "balance.low" | "balance.exhausted" | "customer.created" | "customer.deleted" | "customer.member.added" | "customer.member.updated" | "customer.member.removed" | "rate_limit.exceeded" | "usage.recorded" | "usage.archive_checkpoint" | "gateway.request_denied" | "change_set.created" | "change_set.approved" | "change_set.applied" | "change_set.rolled_back" | "change_set.cancelled" | "billing.event_recorded" | "authz.decision" | "repo.changed" | "automation.rule_fired" | "automation.action_succeeded" | "automation.action_failed" | "automation.action_denied" | "automation.notification" | "access_request.created" | "access_request.resolved" | "build.failed" | "product.published" | "workflow.failed" | "pr.review_posted" | "webhook_endpoint.paused";
395
395
  filter?: {
396
396
  subjectType?: string;
397
397
  subjectId?: string;
@@ -32,8 +32,18 @@ export declare const webhookOperations: {
32
32
  "webhooks.create": import("./define.js").OperationEntry<BusinessRef & {
33
33
  url: string;
34
34
  events: string[];
35
- /** One environment's events; null or omitted = every environment. */
35
+ /**
36
+ * The environments whose events it receives: all | production |
37
+ * non-production | kind:<kind> | env:<environment>. Default production.
38
+ */
39
+ scope?: string;
40
+ /** One environment directly (= scope env:<environment>). */
36
41
  environmentId?: string | null;
42
+ /**
43
+ * Make it the managed receiver of one backend deployment (slug or
44
+ * deployment id); it takes that deployment's scope.
45
+ */
46
+ backend?: string;
37
47
  }, {
38
48
  data: import("../generated/schemas.js").components["schemas"]["WebhookEndpointIssuance"];
39
49
  }, {
@@ -45,7 +55,6 @@ export declare const webhookOperations: {
45
55
  url?: string;
46
56
  events?: string[];
47
57
  enabled?: boolean;
48
- environmentId?: string | null;
49
58
  }, {
50
59
  data: import("../generated/schemas.js").components["schemas"]["WebhookEndpoint"];
51
60
  }, {
@@ -80,6 +89,22 @@ export declare const webhookOperations: {
80
89
  }, {
81
90
  data: import("../generated/schemas.js").components["schemas"]["WebhookEndpointRotation"];
82
91
  }, false>;
92
+ "webhooks.redeliver": import("./define.js").OperationEntry<BusinessRef & {
93
+ webhookId: string;
94
+ } & {
95
+ /** Redeliver deliveries created at or after this ISO time. */
96
+ since: string;
97
+ /** …and before this ISO time; omitted = now. */
98
+ until?: string;
99
+ }, {
100
+ data: {
101
+ redelivered: number;
102
+ };
103
+ }, {
104
+ data: {
105
+ redelivered: number;
106
+ };
107
+ }, false>;
83
108
  "webhooks.eventType.read": import("./define.js").OperationEntry<BusinessRef, {
84
109
  data: {
85
110
  events: {
@@ -138,6 +163,13 @@ export declare const webhookOperations: {
138
163
  createdAt: string;
139
164
  businessId: string;
140
165
  environmentId: string | null;
166
+ environment: {
167
+ id: string | null;
168
+ slug: string;
169
+ name: string;
170
+ kind: "production" | "preview";
171
+ branch: string | null;
172
+ };
141
173
  data: {
142
174
  [key: string]: unknown;
143
175
  };
@@ -161,6 +193,13 @@ export declare const webhookOperations: {
161
193
  createdAt: string;
162
194
  businessId: string;
163
195
  environmentId: string | null;
196
+ environment: {
197
+ id: string | null;
198
+ slug: string;
199
+ name: string;
200
+ kind: "production" | "preview";
201
+ branch: string | null;
202
+ };
164
203
  data: {
165
204
  [key: string]: unknown;
166
205
  };
@@ -168,6 +207,15 @@ export declare const webhookOperations: {
168
207
  responseBody?: string | null;
169
208
  };
170
209
  }, false>;
210
+ "webhooks.delivery.redeliver": import("./define.js").OperationEntry<BusinessRef & {
211
+ webhookId: string;
212
+ } & {
213
+ deliveryId: string;
214
+ }, {
215
+ data: import("../generated/schemas.js").components["schemas"]["WebhookDelivery"];
216
+ }, {
217
+ data: import("../generated/schemas.js").components["schemas"]["WebhookDelivery"];
218
+ }, false>;
171
219
  "webhooks.delivery.payload.read": import("./define.js").OperationEntry<BusinessRef & {
172
220
  webhookId: string;
173
221
  } & {
@@ -189,6 +237,13 @@ export declare const webhookOperations: {
189
237
  createdAt: string;
190
238
  businessId: string;
191
239
  environmentId: string | null;
240
+ environment: {
241
+ id: string | null;
242
+ slug: string;
243
+ name: string;
244
+ kind: "production" | "preview";
245
+ branch: string | null;
246
+ };
192
247
  data: {
193
248
  [key: string]: unknown;
194
249
  };
@@ -212,6 +267,13 @@ export declare const webhookOperations: {
212
267
  createdAt: string;
213
268
  businessId: string;
214
269
  environmentId: string | null;
270
+ environment: {
271
+ id: string | null;
272
+ slug: string;
273
+ name: string;
274
+ kind: "production" | "preview";
275
+ branch: string | null;
276
+ };
215
277
  data: {
216
278
  [key: string]: unknown;
217
279
  };
@@ -2,7 +2,7 @@ import type { CallOptions, OperationEntry } from "./operations/define.js";
2
2
  import type { MethodPath, OperationTable } from "./operations/index.js";
3
3
  /** Static metadata every namespaced method carries as `method.meta`. */
4
4
  export type OperationMeta = {
5
- /** Dotted method path, e.g. `"runtimeTokens.revoke"`. */
5
+ /** Dotted method path, e.g. `"secretKeys.revoke"`. */
6
6
  readonly path: string;
7
7
  /** The opKey, or `null` for a call without one. */
8
8
  readonly op: string | null;
@@ -27,7 +27,7 @@ export declare function listOperations(): readonly OperationMeta[];
27
27
  *
28
28
  * ```ts
29
29
  * const fs = createFartherShore({ transport });
30
- * const tokens = await fs.runtimeTokens.read({ businessId });
30
+ * const tokens = await fs.secretKeys.read({ businessId });
31
31
  * ```
32
32
  */
33
33
  export declare function createFartherShore(options: CreateFartherShoreOptions): FartherShore;
@@ -147,6 +147,10 @@ export type WebhookDeliveryList = Schemas["WebhookDeliveryList"];
147
147
  * (both can carry subscriber PII; no permission gates them yet).
148
148
  */
149
149
  export type WebhookDeliveryResult = Schemas["WebhookDeliveryResponse"];
150
+ /** One delivery, queued again (same id). */
151
+ export type WebhookDeliveryRedeliverResult = Schemas["WebhookDeliveryRedeliverResponse"];
152
+ /** How many deliveries a time-range redelivery queued again. */
153
+ export type WebhookRedeliverResult = Schemas["WebhookRedeliverResponse"];
150
154
  /** `GET /agent/v1/businesses/:id/webhook-event-types`: the subscribable events. */
151
155
  export type WebhookEventTypeList = Schemas["WebhookEventTypeList"];
152
156
  /** An operating agent of a business. Closed: only these fields. */
@@ -288,17 +292,19 @@ export type AuditLogPage = Schemas["AuditLogList"];
288
292
  export type AuditLogEntry = Schemas["AuditLogEntry"];
289
293
  /** The caller's email opt-outs for a business (`true` = opted out). */
290
294
  export type NotificationPreferences = Schemas["NotificationPreferences"];
291
- /** A runtime token as list and revoke return it: never the secret. */
292
- export type RuntimeTokenSummary = Schemas["RuntimeToken"];
295
+ /** A secret key as list and revoke return it: never the secret. */
296
+ export type SecretKeySummary = Schemas["SecretKey"];
293
297
  /**
294
- * A runtime token plus its plaintext `token`, returned by mint and rotate
298
+ * A secret key plus its plaintext `token`, returned by mint and rotate
295
299
  * exactly once. Never log or persist it anywhere but the backend's secret store.
296
300
  */
297
- export type RuntimeTokenIssuance = Schemas["RuntimeTokenIssuance"];
298
- /** `GET /businesses/:id/runtime-tokens`: one page, plus the scope it describes. */
299
- export type RuntimeTokenList = Schemas["RuntimeTokenList"];
301
+ export type SecretKeyIssuance = Schemas["SecretKeyIssuance"];
302
+ /** `GET /businesses/:id/secret-keys`: one page, plus the scope it describes. */
303
+ export type SecretKeyList = Schemas["SecretKeyList"];
300
304
  /** A backend as every backend route returns it. */
301
305
  export type BackendSummary = Schemas["Backend"];
306
+ /** A bind result: the deployment, its webhook receiver, and the default key once. */
307
+ export type BackendBindResult = Schemas["BackendBindResponse"];
302
308
  /**
303
309
  * `POST /businesses/:id/backends`: the backend. Create is an upsert keyed by
304
310
  * (environment, slug); `updated: true` marks an existing backend updated in place.
@@ -3,6 +3,6 @@
3
3
  * `package.json` by `version.test.ts` and checked in the built bundle by
4
4
  * `scripts/check-pack.mjs`.
5
5
  */
6
- export declare const CLIENT_VERSION = "0.7.0";
6
+ export declare const CLIENT_VERSION = "0.8.0";
7
7
  /** The `x-fs-client` product token for this package. */
8
- export declare const CLIENT_PRODUCT = "@farthershore/client/0.7.0";
8
+ export declare const CLIENT_PRODUCT = "@farthershore/client/0.8.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farthershore/client",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Farther Shore API client: the authenticated HTTP transport, credential sources, and typed errors shared by the CLI and agent tooling",
5
5
  "type": "module",
6
6
  "sideEffects": false,