@superdurable/dex 0.2.4 → 0.2.6

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.
@@ -666,6 +666,7 @@ function createBaseContext() {
666
666
  attempt: 0,
667
667
  fromStepExecutionId: "",
668
668
  recoveryError: undefined,
669
+ lastHeartbeatValue: undefined,
669
670
  };
670
671
  }
671
672
  export const Context = {
@@ -700,6 +701,9 @@ export const Context = {
700
701
  if (message.recoveryError !== undefined) {
701
702
  RecoveryErrorInfo.encode(message.recoveryError, writer.uint32(66).fork()).join();
702
703
  }
704
+ if (message.lastHeartbeatValue !== undefined) {
705
+ Value.encode(message.lastHeartbeatValue, writer.uint32(74).fork()).join();
706
+ }
703
707
  return writer;
704
708
  },
705
709
  decode(input, length) {
@@ -765,6 +769,13 @@ export const Context = {
765
769
  message.recoveryError = RecoveryErrorInfo.decode(reader, reader.uint32());
766
770
  continue;
767
771
  }
772
+ case 9: {
773
+ if (tag !== 74) {
774
+ break;
775
+ }
776
+ message.lastHeartbeatValue = Value.decode(reader, reader.uint32());
777
+ continue;
778
+ }
768
779
  }
769
780
  if ((tag & 7) === 4 || tag === 0) {
770
781
  break;
@@ -793,6 +804,9 @@ export const Context = {
793
804
  message.recoveryError = (object.recoveryError !== undefined && object.recoveryError !== null)
794
805
  ? RecoveryErrorInfo.fromPartial(object.recoveryError)
795
806
  : undefined;
807
+ message.lastHeartbeatValue = (object.lastHeartbeatValue !== undefined && object.lastHeartbeatValue !== null)
808
+ ? Value.fromPartial(object.lastHeartbeatValue)
809
+ : undefined;
796
810
  return message;
797
811
  },
798
812
  };
@@ -1872,7 +1886,7 @@ export const ChannelMessage = {
1872
1886
  },
1873
1887
  };
1874
1888
  function createBaseWriteStreamRequest() {
1875
- return { flowId: "", flowType: "", streamName: "", streamCapacityBytes: 0n, value: undefined, idempotencyKey: "" };
1889
+ return { flowId: "", flowType: "", streamName: "", streamCapacityBytes: 0n, value: undefined, source: "" };
1876
1890
  }
1877
1891
  export const WriteStreamRequest = {
1878
1892
  encode(message, writer = new BinaryWriter()) {
@@ -1894,8 +1908,8 @@ export const WriteStreamRequest = {
1894
1908
  if (message.value !== undefined) {
1895
1909
  Value.encode(message.value, writer.uint32(42).fork()).join();
1896
1910
  }
1897
- if (message.idempotencyKey !== "") {
1898
- writer.uint32(50).string(message.idempotencyKey);
1911
+ if (message.source !== "") {
1912
+ writer.uint32(50).string(message.source);
1899
1913
  }
1900
1914
  return writer;
1901
1915
  },
@@ -1945,7 +1959,7 @@ export const WriteStreamRequest = {
1945
1959
  if (tag !== 50) {
1946
1960
  break;
1947
1961
  }
1948
- message.idempotencyKey = reader.string();
1962
+ message.source = reader.string();
1949
1963
  continue;
1950
1964
  }
1951
1965
  }
@@ -1968,7 +1982,7 @@ export const WriteStreamRequest = {
1968
1982
  ? BigInt(object.streamCapacityBytes)
1969
1983
  : 0n;
1970
1984
  message.value = (object.value !== undefined && object.value !== null) ? Value.fromPartial(object.value) : undefined;
1971
- message.idempotencyKey = object.idempotencyKey ?? "";
1985
+ message.source = object.source ?? "";
1972
1986
  return message;
1973
1987
  },
1974
1988
  };
@@ -2101,7 +2115,7 @@ export const ReadStreamResponse = {
2101
2115
  },
2102
2116
  };
2103
2117
  function createBaseStreamMessage() {
2104
- return { value: undefined, resumeToken: "", createdTime: undefined, idempotencyKey: "" };
2118
+ return { value: undefined, resumeToken: "", createdTime: undefined, source: "" };
2105
2119
  }
2106
2120
  export const StreamMessage = {
2107
2121
  encode(message, writer = new BinaryWriter()) {
@@ -2114,8 +2128,8 @@ export const StreamMessage = {
2114
2128
  if (message.createdTime !== undefined) {
2115
2129
  Timestamp.encode(toTimestamp(message.createdTime), writer.uint32(26).fork()).join();
2116
2130
  }
2117
- if (message.idempotencyKey !== "") {
2118
- writer.uint32(34).string(message.idempotencyKey);
2131
+ if (message.source !== "") {
2132
+ writer.uint32(34).string(message.source);
2119
2133
  }
2120
2134
  return writer;
2121
2135
  },
@@ -2151,7 +2165,7 @@ export const StreamMessage = {
2151
2165
  if (tag !== 34) {
2152
2166
  break;
2153
2167
  }
2154
- message.idempotencyKey = reader.string();
2168
+ message.source = reader.string();
2155
2169
  continue;
2156
2170
  }
2157
2171
  }
@@ -2170,7 +2184,7 @@ export const StreamMessage = {
2170
2184
  message.value = (object.value !== undefined && object.value !== null) ? Value.fromPartial(object.value) : undefined;
2171
2185
  message.resumeToken = object.resumeToken ?? "";
2172
2186
  message.createdTime = object.createdTime ?? undefined;
2173
- message.idempotencyKey = object.idempotencyKey ?? "";
2187
+ message.source = object.source ?? "";
2174
2188
  return message;
2175
2189
  },
2176
2190
  };
@@ -7642,6 +7656,197 @@ export const InvokeWaitForMethodResponse = {
7642
7656
  return message;
7643
7657
  },
7644
7658
  };
7659
+ function createBaseStepMethodHeartbeat() {
7660
+ return { value: undefined };
7661
+ }
7662
+ export const StepMethodHeartbeat = {
7663
+ encode(message, writer = new BinaryWriter()) {
7664
+ if (message.value !== undefined) {
7665
+ Value.encode(message.value, writer.uint32(10).fork()).join();
7666
+ }
7667
+ return writer;
7668
+ },
7669
+ decode(input, length) {
7670
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7671
+ const end = length === undefined ? reader.len : reader.pos + length;
7672
+ const message = createBaseStepMethodHeartbeat();
7673
+ while (reader.pos < end) {
7674
+ const tag = reader.uint32();
7675
+ switch (tag >>> 3) {
7676
+ case 1: {
7677
+ if (tag !== 10) {
7678
+ break;
7679
+ }
7680
+ message.value = Value.decode(reader, reader.uint32());
7681
+ continue;
7682
+ }
7683
+ }
7684
+ if ((tag & 7) === 4 || tag === 0) {
7685
+ break;
7686
+ }
7687
+ reader.skip(tag & 7);
7688
+ }
7689
+ return message;
7690
+ },
7691
+ create(base) {
7692
+ return StepMethodHeartbeat.fromPartial(base ?? {});
7693
+ },
7694
+ fromPartial(object) {
7695
+ const message = createBaseStepMethodHeartbeat();
7696
+ message.value = (object.value !== undefined && object.value !== null) ? Value.fromPartial(object.value) : undefined;
7697
+ return message;
7698
+ },
7699
+ };
7700
+ function createBaseStepStreamWrite() {
7701
+ return { streamName: "", streamCapacityBytes: 0n, value: undefined };
7702
+ }
7703
+ export const StepStreamWrite = {
7704
+ encode(message, writer = new BinaryWriter()) {
7705
+ if (message.streamName !== "") {
7706
+ writer.uint32(10).string(message.streamName);
7707
+ }
7708
+ if (message.streamCapacityBytes !== 0n) {
7709
+ if (BigInt.asIntN(64, message.streamCapacityBytes) !== message.streamCapacityBytes) {
7710
+ throw new globalThis.Error("value provided for field message.streamCapacityBytes of type int64 too large");
7711
+ }
7712
+ writer.uint32(16).int64(message.streamCapacityBytes);
7713
+ }
7714
+ if (message.value !== undefined) {
7715
+ Value.encode(message.value, writer.uint32(26).fork()).join();
7716
+ }
7717
+ return writer;
7718
+ },
7719
+ decode(input, length) {
7720
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7721
+ const end = length === undefined ? reader.len : reader.pos + length;
7722
+ const message = createBaseStepStreamWrite();
7723
+ while (reader.pos < end) {
7724
+ const tag = reader.uint32();
7725
+ switch (tag >>> 3) {
7726
+ case 1: {
7727
+ if (tag !== 10) {
7728
+ break;
7729
+ }
7730
+ message.streamName = reader.string();
7731
+ continue;
7732
+ }
7733
+ case 2: {
7734
+ if (tag !== 16) {
7735
+ break;
7736
+ }
7737
+ message.streamCapacityBytes = reader.int64();
7738
+ continue;
7739
+ }
7740
+ case 3: {
7741
+ if (tag !== 26) {
7742
+ break;
7743
+ }
7744
+ message.value = Value.decode(reader, reader.uint32());
7745
+ continue;
7746
+ }
7747
+ }
7748
+ if ((tag & 7) === 4 || tag === 0) {
7749
+ break;
7750
+ }
7751
+ reader.skip(tag & 7);
7752
+ }
7753
+ return message;
7754
+ },
7755
+ create(base) {
7756
+ return StepStreamWrite.fromPartial(base ?? {});
7757
+ },
7758
+ fromPartial(object) {
7759
+ const message = createBaseStepStreamWrite();
7760
+ message.streamName = object.streamName ?? "";
7761
+ message.streamCapacityBytes = (object.streamCapacityBytes !== undefined && object.streamCapacityBytes !== null)
7762
+ ? BigInt(object.streamCapacityBytes)
7763
+ : 0n;
7764
+ message.value = (object.value !== undefined && object.value !== null) ? Value.fromPartial(object.value) : undefined;
7765
+ return message;
7766
+ },
7767
+ };
7768
+ function createBaseInvokeWaitForMethodOutput() {
7769
+ return { output: undefined };
7770
+ }
7771
+ export const InvokeWaitForMethodOutput = {
7772
+ encode(message, writer = new BinaryWriter()) {
7773
+ switch (message.output?.$case) {
7774
+ case "heartbeat":
7775
+ StepMethodHeartbeat.encode(message.output.value, writer.uint32(10).fork()).join();
7776
+ break;
7777
+ case "streamWrite":
7778
+ StepStreamWrite.encode(message.output.value, writer.uint32(18).fork()).join();
7779
+ break;
7780
+ case "result":
7781
+ InvokeWaitForMethodResponse.encode(message.output.value, writer.uint32(26).fork()).join();
7782
+ break;
7783
+ }
7784
+ return writer;
7785
+ },
7786
+ decode(input, length) {
7787
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7788
+ const end = length === undefined ? reader.len : reader.pos + length;
7789
+ const message = createBaseInvokeWaitForMethodOutput();
7790
+ while (reader.pos < end) {
7791
+ const tag = reader.uint32();
7792
+ switch (tag >>> 3) {
7793
+ case 1: {
7794
+ if (tag !== 10) {
7795
+ break;
7796
+ }
7797
+ message.output = { $case: "heartbeat", value: StepMethodHeartbeat.decode(reader, reader.uint32()) };
7798
+ continue;
7799
+ }
7800
+ case 2: {
7801
+ if (tag !== 18) {
7802
+ break;
7803
+ }
7804
+ message.output = { $case: "streamWrite", value: StepStreamWrite.decode(reader, reader.uint32()) };
7805
+ continue;
7806
+ }
7807
+ case 3: {
7808
+ if (tag !== 26) {
7809
+ break;
7810
+ }
7811
+ message.output = { $case: "result", value: InvokeWaitForMethodResponse.decode(reader, reader.uint32()) };
7812
+ continue;
7813
+ }
7814
+ }
7815
+ if ((tag & 7) === 4 || tag === 0) {
7816
+ break;
7817
+ }
7818
+ reader.skip(tag & 7);
7819
+ }
7820
+ return message;
7821
+ },
7822
+ create(base) {
7823
+ return InvokeWaitForMethodOutput.fromPartial(base ?? {});
7824
+ },
7825
+ fromPartial(object) {
7826
+ const message = createBaseInvokeWaitForMethodOutput();
7827
+ switch (object.output?.$case) {
7828
+ case "heartbeat": {
7829
+ if (object.output?.value !== undefined && object.output?.value !== null) {
7830
+ message.output = { $case: "heartbeat", value: StepMethodHeartbeat.fromPartial(object.output.value) };
7831
+ }
7832
+ break;
7833
+ }
7834
+ case "streamWrite": {
7835
+ if (object.output?.value !== undefined && object.output?.value !== null) {
7836
+ message.output = { $case: "streamWrite", value: StepStreamWrite.fromPartial(object.output.value) };
7837
+ }
7838
+ break;
7839
+ }
7840
+ case "result": {
7841
+ if (object.output?.value !== undefined && object.output?.value !== null) {
7842
+ message.output = { $case: "result", value: InvokeWaitForMethodResponse.fromPartial(object.output.value) };
7843
+ }
7844
+ break;
7845
+ }
7846
+ }
7847
+ return message;
7848
+ },
7849
+ };
7645
7850
  function createBaseInvokeExecuteMethodRequest() {
7646
7851
  return {
7647
7852
  context: undefined,
@@ -7871,6 +8076,88 @@ export const InvokeExecuteMethodResponse = {
7871
8076
  return message;
7872
8077
  },
7873
8078
  };
8079
+ function createBaseInvokeExecuteMethodOutput() {
8080
+ return { output: undefined };
8081
+ }
8082
+ export const InvokeExecuteMethodOutput = {
8083
+ encode(message, writer = new BinaryWriter()) {
8084
+ switch (message.output?.$case) {
8085
+ case "heartbeat":
8086
+ StepMethodHeartbeat.encode(message.output.value, writer.uint32(10).fork()).join();
8087
+ break;
8088
+ case "streamWrite":
8089
+ StepStreamWrite.encode(message.output.value, writer.uint32(18).fork()).join();
8090
+ break;
8091
+ case "result":
8092
+ InvokeExecuteMethodResponse.encode(message.output.value, writer.uint32(26).fork()).join();
8093
+ break;
8094
+ }
8095
+ return writer;
8096
+ },
8097
+ decode(input, length) {
8098
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8099
+ const end = length === undefined ? reader.len : reader.pos + length;
8100
+ const message = createBaseInvokeExecuteMethodOutput();
8101
+ while (reader.pos < end) {
8102
+ const tag = reader.uint32();
8103
+ switch (tag >>> 3) {
8104
+ case 1: {
8105
+ if (tag !== 10) {
8106
+ break;
8107
+ }
8108
+ message.output = { $case: "heartbeat", value: StepMethodHeartbeat.decode(reader, reader.uint32()) };
8109
+ continue;
8110
+ }
8111
+ case 2: {
8112
+ if (tag !== 18) {
8113
+ break;
8114
+ }
8115
+ message.output = { $case: "streamWrite", value: StepStreamWrite.decode(reader, reader.uint32()) };
8116
+ continue;
8117
+ }
8118
+ case 3: {
8119
+ if (tag !== 26) {
8120
+ break;
8121
+ }
8122
+ message.output = { $case: "result", value: InvokeExecuteMethodResponse.decode(reader, reader.uint32()) };
8123
+ continue;
8124
+ }
8125
+ }
8126
+ if ((tag & 7) === 4 || tag === 0) {
8127
+ break;
8128
+ }
8129
+ reader.skip(tag & 7);
8130
+ }
8131
+ return message;
8132
+ },
8133
+ create(base) {
8134
+ return InvokeExecuteMethodOutput.fromPartial(base ?? {});
8135
+ },
8136
+ fromPartial(object) {
8137
+ const message = createBaseInvokeExecuteMethodOutput();
8138
+ switch (object.output?.$case) {
8139
+ case "heartbeat": {
8140
+ if (object.output?.value !== undefined && object.output?.value !== null) {
8141
+ message.output = { $case: "heartbeat", value: StepMethodHeartbeat.fromPartial(object.output.value) };
8142
+ }
8143
+ break;
8144
+ }
8145
+ case "streamWrite": {
8146
+ if (object.output?.value !== undefined && object.output?.value !== null) {
8147
+ message.output = { $case: "streamWrite", value: StepStreamWrite.fromPartial(object.output.value) };
8148
+ }
8149
+ break;
8150
+ }
8151
+ case "result": {
8152
+ if (object.output?.value !== undefined && object.output?.value !== null) {
8153
+ message.output = { $case: "result", value: InvokeExecuteMethodResponse.fromPartial(object.output.value) };
8154
+ }
8155
+ break;
8156
+ }
8157
+ }
8158
+ return message;
8159
+ },
8160
+ };
7874
8161
  function createBaseInvokeWorkerRPCRequest() {
7875
8162
  return { context: undefined, flowType: "", rpcName: "", input: undefined, attributes: [], channelInfos: {} };
7876
8163
  }
@@ -12730,20 +13017,20 @@ export const WorkerServiceService = {
12730
13017
  invokeWaitForMethod: {
12731
13018
  path: "/dex.WorkerService/InvokeWaitForMethod",
12732
13019
  requestStream: false,
12733
- responseStream: false,
13020
+ responseStream: true,
12734
13021
  requestSerialize: (value) => Buffer.from(InvokeWaitForMethodRequest.encode(value).finish()),
12735
13022
  requestDeserialize: (value) => InvokeWaitForMethodRequest.decode(value),
12736
- responseSerialize: (value) => Buffer.from(InvokeWaitForMethodResponse.encode(value).finish()),
12737
- responseDeserialize: (value) => InvokeWaitForMethodResponse.decode(value),
13023
+ responseSerialize: (value) => Buffer.from(InvokeWaitForMethodOutput.encode(value).finish()),
13024
+ responseDeserialize: (value) => InvokeWaitForMethodOutput.decode(value),
12738
13025
  },
12739
13026
  invokeExecuteMethod: {
12740
13027
  path: "/dex.WorkerService/InvokeExecuteMethod",
12741
13028
  requestStream: false,
12742
- responseStream: false,
13029
+ responseStream: true,
12743
13030
  requestSerialize: (value) => Buffer.from(InvokeExecuteMethodRequest.encode(value).finish()),
12744
13031
  requestDeserialize: (value) => InvokeExecuteMethodRequest.decode(value),
12745
- responseSerialize: (value) => Buffer.from(InvokeExecuteMethodResponse.encode(value).finish()),
12746
- responseDeserialize: (value) => InvokeExecuteMethodResponse.decode(value),
13032
+ responseSerialize: (value) => Buffer.from(InvokeExecuteMethodOutput.encode(value).finish()),
13033
+ responseDeserialize: (value) => InvokeExecuteMethodOutput.decode(value),
12747
13034
  },
12748
13035
  invokeWorkerRpc: {
12749
13036
  path: "/dex.WorkerService/InvokeWorkerRPC",