@sylphx/sdk 0.31.0 → 0.32.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/README.md +111 -4
- package/dist/access.d.ts +112 -17
- package/dist/access.js +101 -7
- package/dist/access.js.map +1 -1
- package/dist/ai.d.ts +1 -2
- package/dist/ai.js +2 -3
- package/dist/ai.js.map +1 -1
- package/dist/artifacts.d.ts +1 -1
- package/dist/artifacts.js +2 -2
- package/dist/assets.d.ts +447 -0
- package/dist/assets.js +266 -0
- package/dist/assets.js.map +1 -0
- package/dist/auth/client.d.ts +239 -0
- package/dist/auth/client.js +337 -0
- package/dist/auth/client.js.map +1 -0
- package/dist/auth/verify.d.ts +38 -3
- package/dist/auth/verify.js +58 -8
- package/dist/auth/verify.js.map +1 -1
- package/dist/auth.d.ts +455 -7
- package/dist/auth.js +416 -5
- package/dist/auth.js.map +1 -1
- package/dist/billing.d.ts +13 -13
- package/dist/billing.js +5 -5
- package/dist/broker.d.ts +5 -4
- package/dist/broker.js +3 -3
- package/dist/broker.js.map +1 -1
- package/dist/build.d.ts +4 -4
- package/dist/build.js +3 -3
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/config/flags.d.ts +140 -0
- package/dist/config/flags.js +462 -0
- package/dist/config/flags.js.map +1 -0
- package/dist/config.d.ts +380 -15
- package/dist/config.js +283 -5
- package/dist/config.js.map +1 -1
- package/dist/connections.d.ts +6 -6
- package/dist/connections.js +3 -3
- package/dist/data.d.ts +560 -7
- package/dist/data.js +510 -4
- package/dist/data.js.map +1 -1
- package/dist/entitlement.d.ts +10 -8
- package/dist/entitlement.js +3 -4
- package/dist/entitlement.js.map +1 -1
- package/dist/events/realtime.d.ts +69 -0
- package/dist/events/realtime.js +107 -0
- package/dist/events/realtime.js.map +1 -0
- package/dist/events/webhooks.d.ts +40 -0
- package/dist/events/webhooks.js +110 -0
- package/dist/events/webhooks.js.map +1 -0
- package/dist/events.d.ts +369 -22
- package/dist/events.js +311 -8
- package/dist/events.js.map +1 -1
- package/dist/hosting.d.ts +13 -14
- package/dist/hosting.js +3 -4
- package/dist/hosting.js.map +1 -1
- package/dist/ids.d.ts +837 -0
- package/dist/ids.js +287 -0
- package/dist/ids.js.map +1 -0
- package/dist/index.d.ts +12 -1
- package/dist/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/dist/keys.d.ts +2 -2
- package/dist/keys.js +3 -3
- package/dist/localization.d.ts +663 -0
- package/dist/localization.js +491 -0
- package/dist/localization.js.map +1 -0
- package/dist/methods.js +1719 -124
- package/dist/methods.js.map +1 -1
- package/dist/money.d.ts +1406 -0
- package/dist/money.js +1090 -0
- package/dist/money.js.map +1 -0
- package/dist/network.d.ts +4 -5
- package/dist/network.js +3 -4
- package/dist/network.js.map +1 -1
- package/dist/notify.d.ts +321 -124
- package/dist/notify.js +223 -73
- package/dist/notify.js.map +1 -1
- package/dist/observability.d.ts +184 -7
- package/dist/observability.js +156 -8
- package/dist/observability.js.map +1 -1
- package/dist/release.d.ts +14 -15
- package/dist/release.js +3 -4
- package/dist/release.js.map +1 -1
- package/dist/runners.d.ts +2 -3
- package/dist/runners.js +3 -4
- package/dist/runners.js.map +1 -1
- package/dist/runtime.d.ts +5 -1
- package/dist/runtime.js +7 -3
- package/dist/runtime.js.map +1 -1
- package/dist/sandboxes.d.ts +64 -20
- package/dist/sandboxes.js +9 -4
- package/dist/sandboxes.js.map +1 -1
- package/dist/secrets.d.ts +6 -6
- package/dist/secrets.js +4 -4
- package/dist/workflows.d.ts +850 -12
- package/dist/workflows.js +672 -3
- package/dist/workflows.js.map +1 -1
- package/package.json +1 -1
package/dist/events.d.ts
CHANGED
|
@@ -34,6 +34,35 @@ export interface CloudEvent {
|
|
|
34
34
|
/** Extension attributes, at most 64. */
|
|
35
35
|
extensions?: Record<string, string>;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* A Connector is one delivery channel of the environment, as stored: an
|
|
39
|
+
* email connector's allowed senders, a webhook's kind, and so on. It is
|
|
40
|
+
* read-only here: connectors are created and changed through
|
|
41
|
+
* `/v1/connectors`, and webhook endpoints have their own Resource. No secret
|
|
42
|
+
* or credential is ever shown.
|
|
43
|
+
*/
|
|
44
|
+
export interface Connector {
|
|
45
|
+
/**
|
|
46
|
+
* `orgs/{org}/projects/{project}/envs/{env}/connectors/{connector}`, where
|
|
47
|
+
* `{connector}` is the connector id of `/v1/connectors`.
|
|
48
|
+
*/
|
|
49
|
+
name?: string;
|
|
50
|
+
/** `con_<cell><ulid>`; never reused. */
|
|
51
|
+
readonly uid?: string;
|
|
52
|
+
/** Resource metadata; `generation` is the active revision. */
|
|
53
|
+
meta?: common.ResourceMeta;
|
|
54
|
+
/** The channel: `email`, `webhook`, `realtime`, `push`, or `sms`. */
|
|
55
|
+
readonly kind?: string;
|
|
56
|
+
/** The connector's name. */
|
|
57
|
+
readonly displayName?: string;
|
|
58
|
+
/** `active` or `disabled`. */
|
|
59
|
+
readonly state?: string;
|
|
60
|
+
/**
|
|
61
|
+
* The sender addresses an email connector may send from; empty for other
|
|
62
|
+
* kinds.
|
|
63
|
+
*/
|
|
64
|
+
readonly allowedSenders?: string[];
|
|
65
|
+
}
|
|
37
66
|
/** The request of CreateInboundEndpoint. */
|
|
38
67
|
export interface CreateInboundEndpointRequest {
|
|
39
68
|
/** The parent to create in. */
|
|
@@ -144,6 +173,11 @@ export interface DeleteRealtimeChannelRequest {
|
|
|
144
173
|
allowMissing?: boolean;
|
|
145
174
|
/** Validate without deleting anything. */
|
|
146
175
|
validateOnly?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* Also delete the channel's history. Without it, a channel with retained
|
|
178
|
+
* messages is still deleted and its history stops being readable.
|
|
179
|
+
*/
|
|
180
|
+
force?: boolean;
|
|
147
181
|
}
|
|
148
182
|
/** The request of DeleteSubscription. */
|
|
149
183
|
export interface DeleteSubscriptionRequest {
|
|
@@ -236,6 +270,11 @@ export interface Event {
|
|
|
236
270
|
/** When Events admitted it. */
|
|
237
271
|
readonly admitTime?: string;
|
|
238
272
|
}
|
|
273
|
+
/** The request of GetConnector. */
|
|
274
|
+
export interface GetConnectorRequest {
|
|
275
|
+
/** The name of the connector to get. */
|
|
276
|
+
name: string;
|
|
277
|
+
}
|
|
239
278
|
/** The request of GetEvent. */
|
|
240
279
|
export interface GetEventRequest {
|
|
241
280
|
/** The name of the event to get. */
|
|
@@ -256,6 +295,16 @@ export interface GetRealtimeChannelRequest {
|
|
|
256
295
|
/** The name of the realtime channel to get. */
|
|
257
296
|
name: string;
|
|
258
297
|
}
|
|
298
|
+
/** The request of GetRealtimeMember. */
|
|
299
|
+
export interface GetRealtimeMemberRequest {
|
|
300
|
+
/** The name of the member. */
|
|
301
|
+
name: string;
|
|
302
|
+
}
|
|
303
|
+
/** The request of GetRealtimeMessage. */
|
|
304
|
+
export interface GetRealtimeMessageRequest {
|
|
305
|
+
/** The name of the message. */
|
|
306
|
+
name: string;
|
|
307
|
+
}
|
|
259
308
|
/** The request of GetSubscription. */
|
|
260
309
|
export interface GetSubscriptionRequest {
|
|
261
310
|
/** The name of the subscription to get. */
|
|
@@ -278,9 +327,10 @@ export interface GetWebhookEndpointRequest {
|
|
|
278
327
|
}
|
|
279
328
|
/**
|
|
280
329
|
* An Inbound Endpoint receives a provider's webhooks. Events verifies the
|
|
281
|
-
* provider signature with a
|
|
282
|
-
* id, answers 2xx inside the provider's budget, persists
|
|
283
|
-
* publishes it onto a Topic. A bad signature is refused
|
|
330
|
+
* provider signature with a secret in Sylphx Secrets, dedupes by the
|
|
331
|
+
* provider's delivery id, answers 2xx inside the provider's budget, persists
|
|
332
|
+
* the raw request, then publishes it onto a Topic. A bad signature is refused
|
|
333
|
+
* and recorded.
|
|
284
334
|
*/
|
|
285
335
|
export interface InboundEndpoint {
|
|
286
336
|
/** `orgs/{org}/projects/{project}/envs/{env}/inbound_endpoints/{inbound_endpoint}`. */
|
|
@@ -298,7 +348,7 @@ export interface InboundEndpoint {
|
|
|
298
348
|
export interface InboundEndpointSpec {
|
|
299
349
|
/** The sender's signature scheme. */
|
|
300
350
|
signatureScheme?: InboundSignatureScheme;
|
|
301
|
-
/**
|
|
351
|
+
/** The provider's verification secret, held in Sylphx Secrets. */
|
|
302
352
|
verificationSecret?: string;
|
|
303
353
|
/** The Topic verified requests are published to. */
|
|
304
354
|
topic?: string;
|
|
@@ -318,6 +368,29 @@ export interface InboundEndpointStatus {
|
|
|
318
368
|
/** Requests refused for a bad signature, all time. */
|
|
319
369
|
readonly rejectedCount?: string;
|
|
320
370
|
}
|
|
371
|
+
/** The request of IssueRealtimeChannelToken. */
|
|
372
|
+
export interface IssueRealtimeChannelTokenRequest {
|
|
373
|
+
/** The name of the realtime channel. */
|
|
374
|
+
name: string;
|
|
375
|
+
/** How long the token lives; default and at most 1 hour, at least 1 minute. */
|
|
376
|
+
ttl?: string;
|
|
377
|
+
/** The client this token is for; with it, the connection enters presence. */
|
|
378
|
+
clientId?: string;
|
|
379
|
+
/** The client's presence data, at most 4 KiB as JSON. */
|
|
380
|
+
clientData?: unknown;
|
|
381
|
+
}
|
|
382
|
+
/** The response of IssueRealtimeChannelToken. */
|
|
383
|
+
export interface IssueRealtimeChannelTokenResponse {
|
|
384
|
+
/**
|
|
385
|
+
* The token (`rtt_…`); present it as `Authorization: Bearer` or the
|
|
386
|
+
* `token` query parameter of the connect URI.
|
|
387
|
+
*/
|
|
388
|
+
token?: string;
|
|
389
|
+
/** When it stops being accepted. */
|
|
390
|
+
expireTime?: string;
|
|
391
|
+
/** The URI to connect to with it. */
|
|
392
|
+
connectUri?: string;
|
|
393
|
+
}
|
|
321
394
|
/** The request of LeaseQueueMessages. */
|
|
322
395
|
export interface LeaseQueueMessagesRequest {
|
|
323
396
|
/** The name of the queue. */
|
|
@@ -347,6 +420,26 @@ export interface LeasedMessage {
|
|
|
347
420
|
/** When the lease expires and the message is ready again. */
|
|
348
421
|
readonly leaseExpireTime?: string;
|
|
349
422
|
}
|
|
423
|
+
/** The request of ListConnectors. */
|
|
424
|
+
export interface ListConnectorsRequest {
|
|
425
|
+
/** The parent to list in. */
|
|
426
|
+
parent: string;
|
|
427
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
428
|
+
pageSize?: number;
|
|
429
|
+
/** `next_page_token` of the previous page. */
|
|
430
|
+
pageToken?: string;
|
|
431
|
+
/** AIP-160 filter over filterable fields: `kind = email`, `state = active`. */
|
|
432
|
+
filter?: string;
|
|
433
|
+
/** AIP-132 ordering over filterable fields. */
|
|
434
|
+
orderBy?: string;
|
|
435
|
+
}
|
|
436
|
+
/** The response of ListConnectors. */
|
|
437
|
+
export interface ListConnectorsResponse {
|
|
438
|
+
/** The page. */
|
|
439
|
+
connectors?: Connector[];
|
|
440
|
+
/** The token of the next page; empty on the last page. */
|
|
441
|
+
nextPageToken?: string;
|
|
442
|
+
}
|
|
350
443
|
/** The request of ListEvents. */
|
|
351
444
|
export interface ListEventsRequest {
|
|
352
445
|
/** The parent to list in. */
|
|
@@ -427,6 +520,40 @@ export interface ListRealtimeChannelsResponse {
|
|
|
427
520
|
/** The token of the next page; empty on the last page. */
|
|
428
521
|
nextPageToken?: string;
|
|
429
522
|
}
|
|
523
|
+
/** The request of ListRealtimeMembers. */
|
|
524
|
+
export interface ListRealtimeMembersRequest {
|
|
525
|
+
/** The realtime channel. */
|
|
526
|
+
parent: string;
|
|
527
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
528
|
+
pageSize?: number;
|
|
529
|
+
/** `next_page_token` of the previous page. */
|
|
530
|
+
pageToken?: string;
|
|
531
|
+
}
|
|
532
|
+
/** The response of ListRealtimeMembers. */
|
|
533
|
+
export interface ListRealtimeMembersResponse {
|
|
534
|
+
/** The page, by client id. */
|
|
535
|
+
realtimeMembers?: RealtimeMember[];
|
|
536
|
+
/** The token of the next page; empty on the last page. */
|
|
537
|
+
nextPageToken?: string;
|
|
538
|
+
}
|
|
539
|
+
/** The request of ListRealtimeMessages. */
|
|
540
|
+
export interface ListRealtimeMessagesRequest {
|
|
541
|
+
/** The realtime channel. */
|
|
542
|
+
parent: string;
|
|
543
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
544
|
+
pageSize?: number;
|
|
545
|
+
/** `next_page_token` of the previous page. */
|
|
546
|
+
pageToken?: string;
|
|
547
|
+
/** Empty, or `sequence > N` to start after message N (resume). */
|
|
548
|
+
filter?: string;
|
|
549
|
+
}
|
|
550
|
+
/** The response of ListRealtimeMessages. */
|
|
551
|
+
export interface ListRealtimeMessagesResponse {
|
|
552
|
+
/** The page, oldest first. */
|
|
553
|
+
realtimeMessages?: RealtimeMessage[];
|
|
554
|
+
/** The token of the next page; empty on the last page. */
|
|
555
|
+
nextPageToken?: string;
|
|
556
|
+
}
|
|
430
557
|
/** The request of ListSubscriptions. */
|
|
431
558
|
export interface ListSubscriptionsRequest {
|
|
432
559
|
/** The parent to list in. */
|
|
@@ -540,6 +667,22 @@ export interface PublishEventsResponse {
|
|
|
540
667
|
/** The stored events, in request order. */
|
|
541
668
|
events?: Event[];
|
|
542
669
|
}
|
|
670
|
+
/** The request of PublishRealtimeMessages. */
|
|
671
|
+
export interface PublishRealtimeMessagesRequest {
|
|
672
|
+
/** The name of the realtime channel. */
|
|
673
|
+
name: string;
|
|
674
|
+
/** The message name, 1 to 255 of `[A-Za-z0-9._:-]`. */
|
|
675
|
+
messageType: string;
|
|
676
|
+
/** The payload; at most 64 KiB as JSON. */
|
|
677
|
+
data?: unknown;
|
|
678
|
+
/** The publisher's client id, shown to subscribers. */
|
|
679
|
+
clientId?: string;
|
|
680
|
+
}
|
|
681
|
+
/** The response of PublishRealtimeMessages. */
|
|
682
|
+
export interface PublishRealtimeMessagesResponse {
|
|
683
|
+
/** The message as the channel appended it. */
|
|
684
|
+
realtimeMessage?: RealtimeMessage;
|
|
685
|
+
}
|
|
543
686
|
/**
|
|
544
687
|
* A Queue holds messages for pull consumers. A consumer leases messages for a
|
|
545
688
|
* visibility timeout, then acks or nacks them; a lease is fenced, so a stale
|
|
@@ -618,10 +761,65 @@ export interface RealtimeChannelStatus {
|
|
|
618
761
|
readonly observedGeneration?: string;
|
|
619
762
|
/** Ready, Reconciling, Stalled. */
|
|
620
763
|
readonly conditions?: common.Condition[];
|
|
621
|
-
/**
|
|
764
|
+
/**
|
|
765
|
+
* The WebSocket URI clients connect to (`wss://…/subscribe`); it pushes
|
|
766
|
+
* every message after the client's cursor and carries presence.
|
|
767
|
+
*/
|
|
622
768
|
readonly connectUri?: string;
|
|
623
|
-
/** Clients connected now. */
|
|
769
|
+
/** Clients connected now (their presence heartbeat is fresh). */
|
|
624
770
|
readonly connectionCount?: string;
|
|
771
|
+
/**
|
|
772
|
+
* The Server-Sent Events URI (`https://…/stream`), for clients that only
|
|
773
|
+
* read; it resumes from `Last-Event-ID`.
|
|
774
|
+
*/
|
|
775
|
+
readonly streamUri?: string;
|
|
776
|
+
}
|
|
777
|
+
/**
|
|
778
|
+
* A Realtime Member is one client present in a channel: connected with a
|
|
779
|
+
* token that names its client id, entered, and not yet left.
|
|
780
|
+
*/
|
|
781
|
+
export interface RealtimeMember {
|
|
782
|
+
/** `…/realtime_channels/{realtime_channel}/realtime_members/{realtime_member}`. */
|
|
783
|
+
name?: string;
|
|
784
|
+
/** `rtb_<cell><ulid>`; never reused. */
|
|
785
|
+
readonly uid?: string;
|
|
786
|
+
/** Resource metadata. */
|
|
787
|
+
meta?: common.ResourceMeta;
|
|
788
|
+
/** The client id its token names. */
|
|
789
|
+
readonly clientId?: string;
|
|
790
|
+
/** The member's presence data (set at enter, changed by an update). */
|
|
791
|
+
readonly data?: unknown;
|
|
792
|
+
/** When the member entered. */
|
|
793
|
+
readonly enterTime?: string;
|
|
794
|
+
/** Open connections of this client in the channel. */
|
|
795
|
+
readonly connectionCount?: number;
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* A Realtime Message is one message in a channel's ordered history, kept
|
|
799
|
+
* for the channel's `history_retention`.
|
|
800
|
+
*/
|
|
801
|
+
export interface RealtimeMessage {
|
|
802
|
+
/** `…/realtime_channels/{realtime_channel}/realtime_messages/{realtime_message}`. */
|
|
803
|
+
name?: string;
|
|
804
|
+
/** `rtm_<cell><ulid>`; never reused. */
|
|
805
|
+
readonly uid?: string;
|
|
806
|
+
/** Resource metadata. */
|
|
807
|
+
meta?: common.ResourceMeta;
|
|
808
|
+
/**
|
|
809
|
+
* The message's place in the channel; send it back as `after_cursor` (or
|
|
810
|
+
* `Last-Event-ID`) to resume after it.
|
|
811
|
+
*/
|
|
812
|
+
readonly cursor?: string;
|
|
813
|
+
/** The position in the channel, from 1, gap-free. */
|
|
814
|
+
readonly sequence?: string;
|
|
815
|
+
/** The message name (`chat.message`, `presence.enter`, …). */
|
|
816
|
+
messageType?: string;
|
|
817
|
+
/** The payload. */
|
|
818
|
+
data?: unknown;
|
|
819
|
+
/** The publisher's client id, when it named one. */
|
|
820
|
+
clientId?: string;
|
|
821
|
+
/** When the channel appended it. */
|
|
822
|
+
readonly publishTime?: string;
|
|
625
823
|
}
|
|
626
824
|
/** The request of ReplayQueue. */
|
|
627
825
|
export interface ReplayQueueRequest {
|
|
@@ -656,6 +854,13 @@ export interface ReplayWebhookEndpointResponse {
|
|
|
656
854
|
/** Deliveries queued again. */
|
|
657
855
|
replayedCount?: string;
|
|
658
856
|
}
|
|
857
|
+
/** The request of RotateWebhookEndpointSecret. */
|
|
858
|
+
export interface RotateWebhookEndpointSecretRequest {
|
|
859
|
+
/** The name of the webhook endpoint. */
|
|
860
|
+
name: string;
|
|
861
|
+
/** Rotate only if the current etag matches. */
|
|
862
|
+
etag?: string;
|
|
863
|
+
}
|
|
659
864
|
/** The request of SendQueueMessages. */
|
|
660
865
|
export interface SendQueueMessagesRequest {
|
|
661
866
|
/** The name of the queue. */
|
|
@@ -717,6 +922,16 @@ export interface SubscriptionStatus {
|
|
|
717
922
|
/** Ready, Reconciling, Stalled. */
|
|
718
923
|
readonly conditions?: common.Condition[];
|
|
719
924
|
}
|
|
925
|
+
/** The request of TestWebhookEndpoint. */
|
|
926
|
+
export interface TestWebhookEndpointRequest {
|
|
927
|
+
/** The name of the webhook endpoint. */
|
|
928
|
+
name: string;
|
|
929
|
+
}
|
|
930
|
+
/** The response of TestWebhookEndpoint. */
|
|
931
|
+
export interface TestWebhookEndpointResponse {
|
|
932
|
+
/** The delivery of the test event; read it back for its attempts. */
|
|
933
|
+
webhookDelivery?: WebhookDelivery;
|
|
934
|
+
}
|
|
720
935
|
/**
|
|
721
936
|
* A Topic is a named stream producers publish CloudEvents into. An event is
|
|
722
937
|
* immutable and deduplicated by `source` + `id` within the Topic; a different
|
|
@@ -837,12 +1052,16 @@ export interface WebhookDelivery {
|
|
|
837
1052
|
readonly attempts?: DeliveryAttempt[];
|
|
838
1053
|
/** When the next attempt is due. */
|
|
839
1054
|
readonly nextAttemptTime?: string;
|
|
1055
|
+
/** The CloudEvents `type` of the event delivered. */
|
|
1056
|
+
readonly eventType?: string;
|
|
840
1057
|
}
|
|
841
1058
|
/**
|
|
842
|
-
* A Webhook Endpoint is an HTTPS receiver that
|
|
843
|
-
*
|
|
844
|
-
* (
|
|
845
|
-
*
|
|
1059
|
+
* A Webhook Endpoint is an HTTPS receiver that events of its environment
|
|
1060
|
+
* whose type matches `spec.event_types` are delivered to, signed per Standard
|
|
1061
|
+
* Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`). Failures
|
|
1062
|
+
* retry on the fixed schedule (immediately, 5s, 5m, 30m, 2h, 5h, 10h, 10h);
|
|
1063
|
+
* exhausted deliveries dead-letter; an endpoint whose attempts keep failing
|
|
1064
|
+
* for five days is disabled.
|
|
846
1065
|
*/
|
|
847
1066
|
export interface WebhookEndpoint {
|
|
848
1067
|
/** `orgs/{org}/projects/{project}/envs/{env}/webhook_endpoints/{webhook_endpoint}`. */
|
|
@@ -863,17 +1082,20 @@ export interface WebhookEndpointSpec {
|
|
|
863
1082
|
* address.
|
|
864
1083
|
*/
|
|
865
1084
|
uri?: string;
|
|
866
|
-
/** A Kernel Keys Key (sign-only, asymmetric) that signs deliveries. */
|
|
867
|
-
signingKey?: string;
|
|
868
|
-
/**
|
|
869
|
-
* A Kernel Secrets Secret (write-only) for symmetric Standard Webhooks
|
|
870
|
-
* signing.
|
|
871
|
-
*/
|
|
872
|
-
signingSecret?: string;
|
|
873
1085
|
/** Stop delivering; deliveries queue until enabled. */
|
|
874
1086
|
disabled?: boolean;
|
|
875
1087
|
/** At most this many deliveries in flight; default 10. */
|
|
876
1088
|
maxConcurrentDeliveries?: number;
|
|
1089
|
+
/**
|
|
1090
|
+
* Which event types the endpoint receives: an exact type (`order.paid`), a
|
|
1091
|
+
* prefix ending in `.*` (`order.*`), or `*` for every type; default `["*"]`.
|
|
1092
|
+
*/
|
|
1093
|
+
eventTypes?: string[];
|
|
1094
|
+
/**
|
|
1095
|
+
* At most this many attempts start per second; 0 is no limit. Deliveries
|
|
1096
|
+
* over the limit wait their turn; none is dropped.
|
|
1097
|
+
*/
|
|
1098
|
+
rateLimitPerSecond?: number;
|
|
877
1099
|
}
|
|
878
1100
|
/** WebhookEndpointStatus is the observed state of a WebhookEndpoint. */
|
|
879
1101
|
export interface WebhookEndpointStatus {
|
|
@@ -887,8 +1109,19 @@ export interface WebhookEndpointStatus {
|
|
|
887
1109
|
readonly disableReason?: string;
|
|
888
1110
|
/** The last 2xx answer. */
|
|
889
1111
|
readonly lastSuccessTime?: string;
|
|
890
|
-
/** Consecutive failed
|
|
1112
|
+
/** Consecutive failed delivery attempts since the last 2xx. */
|
|
891
1113
|
readonly consecutiveFailureCount?: number;
|
|
1114
|
+
/**
|
|
1115
|
+
* The Standard Webhooks signing secret (`whsec_…`). Set only in the answer
|
|
1116
|
+
* of CreateWebhookEndpoint and RotateWebhookEndpointSecret; every other
|
|
1117
|
+
* read leaves it empty, and Events never shows it again.
|
|
1118
|
+
*/
|
|
1119
|
+
readonly signingSecret?: string;
|
|
1120
|
+
/**
|
|
1121
|
+
* After a rotation, deliveries carry a second signature with the previous
|
|
1122
|
+
* secret until this time.
|
|
1123
|
+
*/
|
|
1124
|
+
readonly previousSecretExpireTime?: string;
|
|
892
1125
|
}
|
|
893
1126
|
/** How one delivery attempt ended. */
|
|
894
1127
|
export type DeliveryAttemptOutcome = 'delivered' | 'retryable_failure' | 'terminal_failure' | 'ambiguous' | (string & {});
|
|
@@ -900,8 +1133,8 @@ export type InboundSignatureScheme = 'standard_webhooks' | 'stripe' | 'shopify'
|
|
|
900
1133
|
export type WebhookEndpointState = 'enabled' | 'disabled' | 'failing_disabled' | (string & {});
|
|
901
1134
|
/**
|
|
902
1135
|
* EventsService is Sylphx Events: the event bus, queues, outbound and inbound
|
|
903
|
-
* webhooks, and realtime channels
|
|
904
|
-
*
|
|
1136
|
+
* webhooks, and realtime channels. Publish, lease, ack, and delivery run in
|
|
1137
|
+
* each cell from that cell's snapshot.
|
|
905
1138
|
*
|
|
906
1139
|
* Namespace of Sylphx Events on `Sylphx`.
|
|
907
1140
|
*/
|
|
@@ -910,6 +1143,8 @@ export declare class EventsApi {
|
|
|
910
1143
|
readonly topics: TopicsCollection;
|
|
911
1144
|
/** The `events` collection. */
|
|
912
1145
|
readonly events: EventsCollection;
|
|
1146
|
+
/** The `connectors` collection. */
|
|
1147
|
+
readonly connectors: ConnectorsCollection;
|
|
913
1148
|
/** The `subscriptions` collection. */
|
|
914
1149
|
readonly subscriptions: SubscriptionsCollection;
|
|
915
1150
|
/** The `queues` collection. */
|
|
@@ -922,6 +1157,10 @@ export declare class EventsApi {
|
|
|
922
1157
|
readonly inboundEndpoints: InboundEndpointsCollection;
|
|
923
1158
|
/** The `realtime_channels` collection. */
|
|
924
1159
|
readonly realtimeChannels: RealtimeChannelsCollection;
|
|
1160
|
+
/** The `realtime_messages` collection. */
|
|
1161
|
+
readonly realtimeMessages: RealtimeMessagesCollection;
|
|
1162
|
+
/** The `realtime_members` collection. */
|
|
1163
|
+
readonly realtimeMembers: RealtimeMembersCollection;
|
|
925
1164
|
constructor(client: runtime.Client);
|
|
926
1165
|
}
|
|
927
1166
|
/** `topics` of Sylphx Events: Resource type `events.sylphx.com/Topic`. */
|
|
@@ -1004,6 +1243,29 @@ export declare class EventsCollection {
|
|
|
1004
1243
|
/** Every item of every page of `list`. */
|
|
1005
1244
|
listAll(request: ListEventsRequest): AsyncGenerator<Event>;
|
|
1006
1245
|
}
|
|
1246
|
+
/** `connectors` of Sylphx Events: Resource type `events.sylphx.com/Connector`. */
|
|
1247
|
+
export declare class ConnectorsCollection {
|
|
1248
|
+
private readonly client;
|
|
1249
|
+
constructor(client: runtime.Client);
|
|
1250
|
+
/**
|
|
1251
|
+
* Gets a connector.
|
|
1252
|
+
*
|
|
1253
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/connectors/*}` · permission `events:read` · effect `read`
|
|
1254
|
+
*
|
|
1255
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1256
|
+
*/
|
|
1257
|
+
get(request: GetConnectorRequest): Promise<Connector>;
|
|
1258
|
+
/**
|
|
1259
|
+
* Lists connectors.
|
|
1260
|
+
*
|
|
1261
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/connectors` · permission `events:read` · effect `read`
|
|
1262
|
+
*
|
|
1263
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1264
|
+
*/
|
|
1265
|
+
list(request: ListConnectorsRequest): Promise<ListConnectorsResponse>;
|
|
1266
|
+
/** Every item of every page of `list`. */
|
|
1267
|
+
listAll(request: ListConnectorsRequest): AsyncGenerator<Connector>;
|
|
1268
|
+
}
|
|
1007
1269
|
/** `subscriptions` of Sylphx Events: Resource type `events.sylphx.com/Subscription`. */
|
|
1008
1270
|
export declare class SubscriptionsCollection {
|
|
1009
1271
|
private readonly client;
|
|
@@ -1188,14 +1450,33 @@ export declare class WebhookEndpointsCollection {
|
|
|
1188
1450
|
*/
|
|
1189
1451
|
delete(request: DeleteWebhookEndpointRequest): Promise<Record<string, never>>;
|
|
1190
1452
|
/**
|
|
1191
|
-
* Redelivers every delivery to the endpoint in a time
|
|
1192
|
-
*
|
|
1453
|
+
* Redelivers every dead-lettered delivery to the endpoint created in a time
|
|
1454
|
+
* range, each as a new attempt.
|
|
1193
1455
|
*
|
|
1194
1456
|
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/webhook_endpoints/*}:replay` · permission `events:write` · effect `write`
|
|
1195
1457
|
*
|
|
1196
1458
|
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1197
1459
|
*/
|
|
1198
1460
|
replay(request: ReplayWebhookEndpointRequest): Promise<ReplayWebhookEndpointResponse>;
|
|
1461
|
+
/**
|
|
1462
|
+
* Replaces the endpoint's signing secret and returns the new one, once
|
|
1463
|
+
* (`status.signing_secret`). For 24 hours deliveries carry a signature with
|
|
1464
|
+
* each secret, so a receiver can switch without dropping one.
|
|
1465
|
+
*
|
|
1466
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/webhook_endpoints/*}:rotateSecret` · permission `events:write` · effect `write`
|
|
1467
|
+
*
|
|
1468
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1469
|
+
*/
|
|
1470
|
+
rotateSecret(request: RotateWebhookEndpointSecretRequest): Promise<WebhookEndpoint>;
|
|
1471
|
+
/**
|
|
1472
|
+
* Sends a test event (`type` `sylphx.webhook.test`) to the endpoint alone,
|
|
1473
|
+
* through the same signing, retries, and delivery log as any other event.
|
|
1474
|
+
*
|
|
1475
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/webhook_endpoints/*}:test` · permission `events:write` · effect `write`
|
|
1476
|
+
*
|
|
1477
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1478
|
+
*/
|
|
1479
|
+
test(request: TestWebhookEndpointRequest): Promise<TestWebhookEndpointResponse>;
|
|
1199
1480
|
}
|
|
1200
1481
|
/** `webhook_deliveries` of Sylphx Events: Resource type `events.sylphx.com/WebhookDelivery`. */
|
|
1201
1482
|
export declare class WebhookDeliveriesCollection {
|
|
@@ -1313,6 +1594,26 @@ export declare class RealtimeChannelsCollection {
|
|
|
1313
1594
|
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1314
1595
|
*/
|
|
1315
1596
|
update(request: UpdateRealtimeChannelRequest): Promise<RealtimeChannel>;
|
|
1597
|
+
/**
|
|
1598
|
+
* Publishes one message to the channel: it is appended to the channel's
|
|
1599
|
+
* history and pushed to every connected client. A retry with the same
|
|
1600
|
+
* Idempotency-Key returns the first message.
|
|
1601
|
+
*
|
|
1602
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/realtime_channels/*}:publish` · permission `events:publish` · effect `write`
|
|
1603
|
+
*
|
|
1604
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1605
|
+
*/
|
|
1606
|
+
publish(request: PublishRealtimeMessagesRequest): Promise<PublishRealtimeMessagesResponse>;
|
|
1607
|
+
/**
|
|
1608
|
+
* Mints a subscribe token (`rtt_…`) for this channel alone, at most an hour
|
|
1609
|
+
* long, for a browser or device that holds no key. A token that names a
|
|
1610
|
+
* client id enters the channel's presence while it is connected.
|
|
1611
|
+
*
|
|
1612
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/realtime_channels/*}:issueToken` · permission `events:publish` · effect `write`
|
|
1613
|
+
*
|
|
1614
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `UNAVAILABLE`.
|
|
1615
|
+
*/
|
|
1616
|
+
issueToken(request: IssueRealtimeChannelTokenRequest): Promise<IssueRealtimeChannelTokenResponse>;
|
|
1316
1617
|
/**
|
|
1317
1618
|
* Deletes a realtime channel.
|
|
1318
1619
|
*
|
|
@@ -1322,3 +1623,49 @@ export declare class RealtimeChannelsCollection {
|
|
|
1322
1623
|
*/
|
|
1323
1624
|
delete(request: DeleteRealtimeChannelRequest): Promise<Record<string, never>>;
|
|
1324
1625
|
}
|
|
1626
|
+
/** `realtime_messages` of Sylphx Events: Resource type `events.sylphx.com/RealtimeMessage`. */
|
|
1627
|
+
export declare class RealtimeMessagesCollection {
|
|
1628
|
+
private readonly client;
|
|
1629
|
+
constructor(client: runtime.Client);
|
|
1630
|
+
/**
|
|
1631
|
+
* Gets one retained message of a channel.
|
|
1632
|
+
*
|
|
1633
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/realtime_channels/*\/realtime_messages/*}` · permission `events:read` · effect `read`
|
|
1634
|
+
*
|
|
1635
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1636
|
+
*/
|
|
1637
|
+
get(request: GetRealtimeMessageRequest): Promise<RealtimeMessage>;
|
|
1638
|
+
/**
|
|
1639
|
+
* Lists a channel's retained messages, oldest first.
|
|
1640
|
+
*
|
|
1641
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/realtime_channels/*}/realtime_messages` · permission `events:read` · effect `read`
|
|
1642
|
+
*
|
|
1643
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1644
|
+
*/
|
|
1645
|
+
list(request: ListRealtimeMessagesRequest): Promise<ListRealtimeMessagesResponse>;
|
|
1646
|
+
/** Every item of every page of `list`. */
|
|
1647
|
+
listAll(request: ListRealtimeMessagesRequest): AsyncGenerator<RealtimeMessage>;
|
|
1648
|
+
}
|
|
1649
|
+
/** `realtime_members` of Sylphx Events: Resource type `events.sylphx.com/RealtimeMember`. */
|
|
1650
|
+
export declare class RealtimeMembersCollection {
|
|
1651
|
+
private readonly client;
|
|
1652
|
+
constructor(client: runtime.Client);
|
|
1653
|
+
/**
|
|
1654
|
+
* Gets one client present in a channel.
|
|
1655
|
+
*
|
|
1656
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/realtime_channels/*\/realtime_members/*}` · permission `events:read` · effect `read`
|
|
1657
|
+
*
|
|
1658
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1659
|
+
*/
|
|
1660
|
+
get(request: GetRealtimeMemberRequest): Promise<RealtimeMember>;
|
|
1661
|
+
/**
|
|
1662
|
+
* Lists the clients present in a channel now.
|
|
1663
|
+
*
|
|
1664
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/realtime_channels/*}/realtime_members` · permission `events:read` · effect `read`
|
|
1665
|
+
*
|
|
1666
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1667
|
+
*/
|
|
1668
|
+
list(request: ListRealtimeMembersRequest): Promise<ListRealtimeMembersResponse>;
|
|
1669
|
+
/** Every item of every page of `list`. */
|
|
1670
|
+
listAll(request: ListRealtimeMembersRequest): AsyncGenerator<RealtimeMember>;
|
|
1671
|
+
}
|