@relayfile/client 0.10.20 → 0.10.22

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/dist/client.d.ts CHANGED
@@ -11,7 +11,7 @@ import type { components } from './generated/control-plane.js';
11
11
  * rename in the contract is a compile error here.
12
12
  */
13
13
  /** Control-plane API version this client speaks. Bump when adding required endpoint support. */
14
- export declare const RELAYFILE_API_VERSION = 2;
14
+ export declare const RELAYFILE_API_VERSION = 3;
15
15
  /**
16
16
  * Minimum `relayfile` daemon version this client requires. The control-plane
17
17
  * first shipped in 0.10.17, so anything that answers `/v1/hello` is already >=
@@ -50,6 +50,8 @@ export type WebhookSubscriptionRequestBody = Schemas['WebhookSubscriptionRequest
50
50
  export type WebhookSubscriptionResult = Schemas['WebhookSubscriptionResponse'];
51
51
  export type DeleteWebhookSubscriptionRequestBody = Schemas['DeleteWebhookSubscriptionRequest'];
52
52
  export type DeleteWebhookSubscriptionResult = Schemas['DeleteWebhookSubscriptionResponse'];
53
+ export type ListWebhookSubscriptionsResult = Schemas['ListWebhookSubscriptionsResponse'];
54
+ export type WebhookSubscriptionSummary = Schemas['WebhookSubscriptionSummary'];
53
55
  export interface RelayfileClientOptions {
54
56
  /** Socket to connect to. Defaults to defaultRelayfileSocketPath(). */
55
57
  socketPath?: string;
@@ -88,6 +90,12 @@ export declare class RelayfileControlPlaneClient {
88
90
  providerStatus(provider: string): Promise<ProviderStatusResult | null>;
89
91
  connect(input: ConnectRequestBody): Promise<ConnectResult>;
90
92
  writebackSecret(channel: string, workspace?: string): Promise<WritebackSecretResult>;
93
+ /**
94
+ * Lists the workspace's inbound webhook subscriptions so callers can
95
+ * reconcile subscriptions created by runs that crashed before persisting
96
+ * the server-assigned id.
97
+ */
98
+ listWebhookSubscriptions(workspace?: string): Promise<ListWebhookSubscriptionsResult>;
91
99
  createWebhookSubscription(input: WebhookSubscriptionRequestBody): Promise<WebhookSubscriptionResult>;
92
100
  deleteWebhookSubscription(subscriptionId: DeleteWebhookSubscriptionRequestBody['subscriptionId'], workspace?: DeleteWebhookSubscriptionRequestBody['workspace']): Promise<DeleteWebhookSubscriptionResult>;
93
101
  /** Endpoint request that ensures the daemon is up + version-compatible first. */
package/dist/client.js CHANGED
@@ -14,7 +14,7 @@ import { join } from 'node:path';
14
14
  * rename in the contract is a compile error here.
15
15
  */
16
16
  /** Control-plane API version this client speaks. Bump when adding required endpoint support. */
17
- export const RELAYFILE_API_VERSION = 2;
17
+ export const RELAYFILE_API_VERSION = 3;
18
18
  /**
19
19
  * Minimum `relayfile` daemon version this client requires. The control-plane
20
20
  * first shipped in 0.10.17, so anything that answers `/v1/hello` is already >=
@@ -285,6 +285,18 @@ export class RelayfileControlPlaneClient {
285
285
  body: { channel, ...(workspace ? { workspace } : {}) },
286
286
  });
287
287
  }
288
+ /**
289
+ * Lists the workspace's inbound webhook subscriptions so callers can
290
+ * reconcile subscriptions created by runs that crashed before persisting
291
+ * the server-assigned id.
292
+ */
293
+ listWebhookSubscriptions(workspace) {
294
+ return this.request({
295
+ method: 'GET',
296
+ path: '/v1/integrations/webhook-subscriptions',
297
+ ...(workspace ? { query: { workspace } } : {}),
298
+ });
299
+ }
288
300
  createWebhookSubscription(input) {
289
301
  return this.request({
290
302
  method: 'POST',
@@ -165,11 +165,18 @@ export interface paths {
165
165
  path?: never;
166
166
  cookie?: never;
167
167
  };
168
- get?: never;
168
+ /**
169
+ * List server-side relayfile webhook subscriptions
170
+ * @description Lists the workspace's inbound webhook subscriptions so callers can reconcile subscriptions created by runs that crashed before persisting the server-assigned id.
171
+ */
172
+ get: operations["listWebhookSubscriptions"];
169
173
  put?: never;
170
174
  /** Create a server-side relayfile webhook subscription */
171
175
  post: operations["createWebhookSubscription"];
172
- /** Delete a server-side relayfile webhook subscription */
176
+ /**
177
+ * Delete a server-side relayfile webhook subscription
178
+ * @description Idempotent: deleting a subscription that no longer exists succeeds, so retried cleanups of a known-deleted id observe progress instead of an error.
179
+ */
173
180
  delete: operations["deleteWebhookSubscription"];
174
181
  options?: never;
175
182
  head?: never;
@@ -248,6 +255,8 @@ export interface components {
248
255
  webhookId: string;
249
256
  webhookToken: string;
250
257
  subscriptionId?: string;
258
+ webhookSubscriptionId?: string;
259
+ webhookSubscriptionWorkspaceId?: string;
251
260
  };
252
261
  BindResponse: {
253
262
  binding: components["schemas"]["Binding"];
@@ -261,6 +270,8 @@ export interface components {
261
270
  webhookId: string;
262
271
  webhookToken: string;
263
272
  subscriptionId?: string;
273
+ webhookSubscriptionId?: string;
274
+ webhookSubscriptionWorkspaceId?: string;
264
275
  createdAt?: string;
265
276
  updatedAt?: string;
266
277
  };
@@ -282,6 +293,7 @@ export interface components {
282
293
  channel: string;
283
294
  };
284
295
  WritebackSecret: {
296
+ workspaceId?: string;
285
297
  url: string;
286
298
  secret: string;
287
299
  };
@@ -293,6 +305,8 @@ export interface components {
293
305
  secret: string;
294
306
  };
295
307
  WebhookSubscriptionResponse: {
308
+ /** @description Workspace the subscription was created in, so callers can pin later delete/list calls to the same workspace. */
309
+ workspaceId?: string;
296
310
  subscriptionId: string;
297
311
  secret?: string;
298
312
  };
@@ -303,6 +317,16 @@ export interface components {
303
317
  DeleteWebhookSubscriptionResponse: {
304
318
  ok: boolean;
305
319
  };
320
+ ListWebhookSubscriptionsResponse: {
321
+ workspaceId?: string;
322
+ subscriptions: components["schemas"]["WebhookSubscriptionSummary"][];
323
+ };
324
+ WebhookSubscriptionSummary: {
325
+ subscriptionId: string;
326
+ /** Format: uri */
327
+ url: string;
328
+ pathGlobs: string[];
329
+ };
306
330
  ErrorEnvelope: {
307
331
  error: {
308
332
  /** @enum {string} */
@@ -341,7 +365,7 @@ export interface components {
341
365
  };
342
366
  };
343
367
  parameters: {
344
- ApiVersionHeader: 2;
368
+ ApiVersionHeader: 3;
345
369
  ApiVersionQuery: number;
346
370
  };
347
371
  requestBodies: never;
@@ -634,6 +658,30 @@ export interface operations {
634
658
  };
635
659
  };
636
660
  };
661
+ listWebhookSubscriptions: {
662
+ parameters: {
663
+ query?: {
664
+ workspace?: string;
665
+ };
666
+ header?: {
667
+ "X-Relayfile-API-Version"?: components["parameters"]["ApiVersionHeader"];
668
+ };
669
+ path?: never;
670
+ cookie?: never;
671
+ };
672
+ requestBody?: never;
673
+ responses: {
674
+ /** @description Webhook subscriptions for the workspace */
675
+ 200: {
676
+ headers: {
677
+ [name: string]: unknown;
678
+ };
679
+ content: {
680
+ "application/json": components["schemas"]["ListWebhookSubscriptionsResponse"];
681
+ };
682
+ };
683
+ };
684
+ };
637
685
  createWebhookSubscription: {
638
686
  parameters: {
639
687
  query?: never;
@@ -675,7 +723,7 @@ export interface operations {
675
723
  };
676
724
  };
677
725
  responses: {
678
- /** @description Subscription deleted */
726
+ /** @description Subscription deleted (or already absent) */
679
727
  200: {
680
728
  headers: {
681
729
  [name: string]: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relayfile/client",
3
- "version": "0.10.20",
3
+ "version": "0.10.22",
4
4
  "description": "Typed client for the relayfile local control-plane (unix-socket HTTP/JSON), generated from the authoritative OpenAPI contract",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",