@superdurable/dex 0.2.7 → 0.2.9

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.
@@ -123,6 +123,7 @@ export declare enum ErrorSubStatus {
123
123
  ERROR_SUB_STATUS_FLOW_NOT_EXISTS = 3,
124
124
  ERROR_SUB_STATUS_WORKER_API_ERROR = 4,
125
125
  ERROR_SUB_STATUS_LONG_POLL_TIME_OUT = 5,
126
+ ERROR_SUB_STATUS_CHANNEL_MESSAGE_NOT_FOUND = 6,
126
127
  UNRECOGNIZED = -1
127
128
  }
128
129
  export declare enum CloseDecisionType {
@@ -169,6 +170,7 @@ export declare enum UpdateErrorType {
169
170
  UPDATE_ERROR_TYPE_DEADLINE_EXCEEDED = 4,
170
171
  UPDATE_ERROR_TYPE_RPC_ACQUIRE_LOCK_FAILURE = 5,
171
172
  UPDATE_ERROR_TYPE_SERVER_INTERNAL = 6,
173
+ UPDATE_ERROR_TYPE_CHANNEL_MESSAGE_NOT_FOUND = 7,
172
174
  UNRECOGNIZED = -1
173
175
  }
174
176
  export declare enum SubFlowCompletionDeliveryStatus {
@@ -332,6 +334,26 @@ export interface PublishToChannelRequest {
332
334
  export interface ChannelMessage {
333
335
  channelName: string;
334
336
  value: Value | undefined;
337
+ messageId: string;
338
+ }
339
+ export interface GetChannelMessagesRequest {
340
+ flowId: string;
341
+ runId: string;
342
+ channelName: string;
343
+ }
344
+ export interface GetChannelMessagesResponse {
345
+ messages: ChannelMessage[];
346
+ }
347
+ export interface DeleteChannelMessageRequest {
348
+ flowId: string;
349
+ runId: string;
350
+ channelName: string;
351
+ messageId: string;
352
+ requestId: string;
353
+ }
354
+ export interface ChannelMessageDeletion {
355
+ channelName: string;
356
+ messageId: string;
335
357
  }
336
358
  export interface WriteStreamRequest {
337
359
  flowId: string;
@@ -523,6 +545,9 @@ export interface FlowHistoryEvent {
523
545
  } | {
524
546
  $case: "timeTravelFork";
525
547
  value: TimeTravelForkHistoryEvent;
548
+ } | {
549
+ $case: "channelExternalDelete";
550
+ value: ChannelExternalDeleteEvent;
526
551
  } | undefined;
527
552
  }
528
553
  /** TimeTravelForkHistoryEvent identifies the preserved run whose history Time Travel forked. */
@@ -655,10 +680,14 @@ export interface RpcExecutionCompletedEvent {
655
680
  recordEvents: KV[];
656
681
  publishToChannel: ChannelMessage[];
657
682
  isSetAttributeApi: boolean;
683
+ deleteFromChannel: ChannelMessageDeletion[];
658
684
  }
659
685
  export interface ChannelExternalPublishEvent {
660
686
  messages: ChannelMessage[];
661
687
  }
688
+ export interface ChannelExternalDeleteEvent {
689
+ messages: ChannelMessageDeletion[];
690
+ }
662
691
  export interface WaitForHistoryEventRequest {
663
692
  flowId: string;
664
693
  runId: string;
@@ -728,6 +757,23 @@ export interface InvokeRPCRequest {
728
757
  lockAttributeKeys: string[];
729
758
  /** Per-call UUID, SDK-generated and future-overridable; identical retries reuse it. Temporal Update paths use it as the run-scoped Update ID; Continue-as-New resets scope. */
730
759
  requestId: string;
760
+ /**
761
+ * Requests transactional reads and writes. Attribute locking enables it
762
+ * automatically. Channel deletion alone does not; callers must opt in.
763
+ */
764
+ isTransactional: boolean;
765
+ /**
766
+ * AttributeMap instances whose entries are loaded for the RPC handler.
767
+ * A trailing slash loads every instance. The suffix names one instance.
768
+ */
769
+ loadAttributeMapInstances: string[];
770
+ /** Channel definitions whose pending messages are loaded for the RPC handler. */
771
+ loadChannelNames: string[];
772
+ /**
773
+ * ChannelMap instances whose pending messages are loaded for the RPC handler.
774
+ * A trailing slash loads every instance. The suffix names one instance.
775
+ */
776
+ loadChannelMapInstances: string[];
731
777
  }
732
778
  export interface InvokeRPCResponse {
733
779
  output: Value | undefined;
@@ -894,16 +940,27 @@ export interface InvokeWorkerRPCRequest {
894
940
  channelInfos: {
895
941
  [key: string]: ChannelInfo;
896
942
  };
943
+ loadedChannelMessages: {
944
+ [key: string]: ChannelValues;
945
+ };
946
+ loadedAttributeMapInstances: string[];
947
+ loadedChannelNames: string[];
948
+ loadedChannelMapInstances: string[];
897
949
  }
898
950
  export interface InvokeWorkerRPCRequest_ChannelInfosEntry {
899
951
  key: string;
900
952
  value: ChannelInfo | undefined;
901
953
  }
954
+ export interface InvokeWorkerRPCRequest_LoadedChannelMessagesEntry {
955
+ key: string;
956
+ value: ChannelValues | undefined;
957
+ }
902
958
  export interface InvokeWorkerRPCResponse {
903
959
  output: Value | undefined;
904
960
  stepDecision: StepDecision | undefined;
905
961
  upsertAttributes: AttributeWrite[];
906
962
  recordEvents: KV[];
963
+ deleteFromChannel: ChannelMessageDeletion[];
907
964
  publishToChannel: ChannelMessage[];
908
965
  }
909
966
  export interface StepDecision {
@@ -1012,7 +1069,7 @@ export interface ContinueAsNewDumpResponse {
1012
1069
  checksum: string;
1013
1070
  }
1014
1071
  export interface ChannelValues {
1015
- values: Value[];
1072
+ messages: ChannelMessage[];
1016
1073
  }
1017
1074
  export interface StepExecutionCompletedConditions {
1018
1075
  completedTimerConditions: {
@@ -1192,6 +1249,8 @@ export interface ExecuteRpcSignalRequest {
1192
1249
  recordEvents: KV[];
1193
1250
  publishToChannel: ChannelMessage[];
1194
1251
  isSetAttributeApi: boolean;
1252
+ deleteFromChannel: ChannelMessageDeletion[];
1253
+ isDeleteChannelMessageApi: boolean;
1195
1254
  }
1196
1255
  export interface SkipTimerSignalRequest {
1197
1256
  stepExecutionId: string;
@@ -1210,7 +1269,9 @@ export interface GetAttributesQueryResponse {
1210
1269
  attributes: KV[];
1211
1270
  }
1212
1271
  export interface PrepareRpcQueryRequest {
1213
- lockAttributeKeys: string[];
1272
+ loadAttributeMapInstances: string[];
1273
+ loadChannelNames: string[];
1274
+ loadChannelMapInstances: string[];
1214
1275
  }
1215
1276
  export interface PrepareRpcQueryResponse {
1216
1277
  attributes: KV[];
@@ -1221,11 +1282,21 @@ export interface PrepareRpcQueryResponse {
1221
1282
  channelInfos: {
1222
1283
  [key: string]: ChannelInfo;
1223
1284
  };
1285
+ loadedChannelMessages: {
1286
+ [key: string]: ChannelValues;
1287
+ };
1288
+ loadedAttributeMapInstances: string[];
1289
+ loadedChannelNames: string[];
1290
+ loadedChannelMapInstances: string[];
1224
1291
  }
1225
1292
  export interface PrepareRpcQueryResponse_ChannelInfosEntry {
1226
1293
  key: string;
1227
1294
  value: ChannelInfo | undefined;
1228
1295
  }
1296
+ export interface PrepareRpcQueryResponse_LoadedChannelMessagesEntry {
1297
+ key: string;
1298
+ value: ChannelValues | undefined;
1299
+ }
1229
1300
  export interface TimerInfo {
1230
1301
  /** Empty when the timer has no condition id. */
1231
1302
  conditionId: string;
@@ -1281,6 +1352,10 @@ export declare const StartFlowRequest: MessageFns<StartFlowRequest>;
1281
1352
  export declare const StartFlowResponse: MessageFns<StartFlowResponse>;
1282
1353
  export declare const PublishToChannelRequest: MessageFns<PublishToChannelRequest>;
1283
1354
  export declare const ChannelMessage: MessageFns<ChannelMessage>;
1355
+ export declare const GetChannelMessagesRequest: MessageFns<GetChannelMessagesRequest>;
1356
+ export declare const GetChannelMessagesResponse: MessageFns<GetChannelMessagesResponse>;
1357
+ export declare const DeleteChannelMessageRequest: MessageFns<DeleteChannelMessageRequest>;
1358
+ export declare const ChannelMessageDeletion: MessageFns<ChannelMessageDeletion>;
1284
1359
  export declare const WriteStreamRequest: MessageFns<WriteStreamRequest>;
1285
1360
  export declare const ReadStreamRequest: MessageFns<ReadStreamRequest>;
1286
1361
  export declare const ReadStreamResponse: MessageFns<ReadStreamResponse>;
@@ -1329,6 +1404,7 @@ export declare const StepExecuteCompletedEvent: MessageFns<StepExecuteCompletedE
1329
1404
  export declare const StepExecuteFailedEvent: MessageFns<StepExecuteFailedEvent>;
1330
1405
  export declare const RpcExecutionCompletedEvent: MessageFns<RpcExecutionCompletedEvent>;
1331
1406
  export declare const ChannelExternalPublishEvent: MessageFns<ChannelExternalPublishEvent>;
1407
+ export declare const ChannelExternalDeleteEvent: MessageFns<ChannelExternalDeleteEvent>;
1332
1408
  export declare const WaitForHistoryEventRequest: MessageFns<WaitForHistoryEventRequest>;
1333
1409
  export declare const WaitForHistoryEventResponse: MessageFns<WaitForHistoryEventResponse>;
1334
1410
  export declare const ActiveStepExecutionState: MessageFns<ActiveStepExecutionState>;
@@ -1364,6 +1440,7 @@ export declare const InvokeExecuteMethodResponse: MessageFns<InvokeExecuteMethod
1364
1440
  export declare const InvokeExecuteMethodOutput: MessageFns<InvokeExecuteMethodOutput>;
1365
1441
  export declare const InvokeWorkerRPCRequest: MessageFns<InvokeWorkerRPCRequest>;
1366
1442
  export declare const InvokeWorkerRPCRequest_ChannelInfosEntry: MessageFns<InvokeWorkerRPCRequest_ChannelInfosEntry>;
1443
+ export declare const InvokeWorkerRPCRequest_LoadedChannelMessagesEntry: MessageFns<InvokeWorkerRPCRequest_LoadedChannelMessagesEntry>;
1367
1444
  export declare const InvokeWorkerRPCResponse: MessageFns<InvokeWorkerRPCResponse>;
1368
1445
  export declare const StepDecision: MessageFns<StepDecision>;
1369
1446
  export declare const CloseDecision: MessageFns<CloseDecision>;
@@ -1425,6 +1502,7 @@ export declare const GetAttributesQueryResponse: MessageFns<GetAttributesQueryRe
1425
1502
  export declare const PrepareRpcQueryRequest: MessageFns<PrepareRpcQueryRequest>;
1426
1503
  export declare const PrepareRpcQueryResponse: MessageFns<PrepareRpcQueryResponse>;
1427
1504
  export declare const PrepareRpcQueryResponse_ChannelInfosEntry: MessageFns<PrepareRpcQueryResponse_ChannelInfosEntry>;
1505
+ export declare const PrepareRpcQueryResponse_LoadedChannelMessagesEntry: MessageFns<PrepareRpcQueryResponse_LoadedChannelMessagesEntry>;
1428
1506
  export declare const TimerInfo: MessageFns<TimerInfo>;
1429
1507
  export declare const TimerInfoList: MessageFns<TimerInfoList>;
1430
1508
  export declare const GetCurrentTimerInfosQueryResponse: MessageFns<GetCurrentTimerInfosQueryResponse>;
@@ -1454,6 +1532,24 @@ export declare const FlowServiceService: {
1454
1532
  readonly responseSerialize: (value: Empty) => Buffer;
1455
1533
  readonly responseDeserialize: (value: Buffer) => Empty;
1456
1534
  };
1535
+ readonly getChannelMessages: {
1536
+ readonly path: "/dex.FlowService/GetChannelMessages";
1537
+ readonly requestStream: false;
1538
+ readonly responseStream: false;
1539
+ readonly requestSerialize: (value: GetChannelMessagesRequest) => Buffer;
1540
+ readonly requestDeserialize: (value: Buffer) => GetChannelMessagesRequest;
1541
+ readonly responseSerialize: (value: GetChannelMessagesResponse) => Buffer;
1542
+ readonly responseDeserialize: (value: Buffer) => GetChannelMessagesResponse;
1543
+ };
1544
+ readonly deleteChannelMessage: {
1545
+ readonly path: "/dex.FlowService/DeleteChannelMessage";
1546
+ readonly requestStream: false;
1547
+ readonly responseStream: false;
1548
+ readonly requestSerialize: (value: DeleteChannelMessageRequest) => Buffer;
1549
+ readonly requestDeserialize: (value: Buffer) => DeleteChannelMessageRequest;
1550
+ readonly responseSerialize: (value: Empty) => Buffer;
1551
+ readonly responseDeserialize: (value: Buffer) => Empty;
1552
+ };
1457
1553
  readonly writeStream: {
1458
1554
  readonly path: "/dex.FlowService/WriteStream";
1459
1555
  readonly requestStream: false;
@@ -1647,6 +1743,8 @@ export declare const FlowServiceService: {
1647
1743
  export interface FlowServiceServer extends UntypedServiceImplementation {
1648
1744
  startFlow: handleUnaryCall<StartFlowRequest, StartFlowResponse>;
1649
1745
  publishToChannel: handleUnaryCall<PublishToChannelRequest, Empty>;
1746
+ getChannelMessages: handleUnaryCall<GetChannelMessagesRequest, GetChannelMessagesResponse>;
1747
+ deleteChannelMessage: handleUnaryCall<DeleteChannelMessageRequest, Empty>;
1650
1748
  writeStream: handleUnaryCall<WriteStreamRequest, Empty>;
1651
1749
  readStream: handleUnaryCall<ReadStreamRequest, ReadStreamResponse>;
1652
1750
  stopFlow: handleUnaryCall<StopFlowRequest, Empty>;
@@ -1676,6 +1774,12 @@ export interface FlowServiceClient extends Client {
1676
1774
  publishToChannel(request: PublishToChannelRequest, callback: (error: ServiceError | null, response: Empty) => void): ClientUnaryCall;
1677
1775
  publishToChannel(request: PublishToChannelRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Empty) => void): ClientUnaryCall;
1678
1776
  publishToChannel(request: PublishToChannelRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: Empty) => void): ClientUnaryCall;
1777
+ getChannelMessages(request: GetChannelMessagesRequest, callback: (error: ServiceError | null, response: GetChannelMessagesResponse) => void): ClientUnaryCall;
1778
+ getChannelMessages(request: GetChannelMessagesRequest, metadata: Metadata, callback: (error: ServiceError | null, response: GetChannelMessagesResponse) => void): ClientUnaryCall;
1779
+ getChannelMessages(request: GetChannelMessagesRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: GetChannelMessagesResponse) => void): ClientUnaryCall;
1780
+ deleteChannelMessage(request: DeleteChannelMessageRequest, callback: (error: ServiceError | null, response: Empty) => void): ClientUnaryCall;
1781
+ deleteChannelMessage(request: DeleteChannelMessageRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Empty) => void): ClientUnaryCall;
1782
+ deleteChannelMessage(request: DeleteChannelMessageRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: Empty) => void): ClientUnaryCall;
1679
1783
  writeStream(request: WriteStreamRequest, callback: (error: ServiceError | null, response: Empty) => void): ClientUnaryCall;
1680
1784
  writeStream(request: WriteStreamRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Empty) => void): ClientUnaryCall;
1681
1785
  writeStream(request: WriteStreamRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: Empty) => void): ClientUnaryCall;