@superdurable/dex 0.3.2 → 0.5.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.
Files changed (61) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +5 -3
  3. package/dist/src/attribute-match.d.ts +73 -0
  4. package/dist/src/attribute-match.js +106 -0
  5. package/dist/src/attribute-match.js.map +1 -0
  6. package/dist/src/attribute-store-sync.js +2 -2
  7. package/dist/src/attribute-store-sync.js.map +1 -1
  8. package/dist/src/blob-cache.js +2 -2
  9. package/dist/src/blob-cache.js.map +1 -1
  10. package/dist/src/client.d.ts +26 -9
  11. package/dist/src/client.js +66 -30
  12. package/dist/src/client.js.map +1 -1
  13. package/dist/src/codec.js +2 -2
  14. package/dist/src/codec.js.map +1 -1
  15. package/dist/src/context.js +2 -2
  16. package/dist/src/context.js.map +1 -1
  17. package/dist/src/errors.js +2 -2
  18. package/dist/src/errors.js.map +1 -1
  19. package/dist/src/flow-result.js +2 -2
  20. package/dist/src/flow-result.js.map +1 -1
  21. package/dist/src/flow.js +2 -2
  22. package/dist/src/flow.js.map +1 -1
  23. package/dist/src/gen/dex.d.ts +50 -17
  24. package/dist/src/gen/dex.js +206 -54
  25. package/dist/src/gen/dex.js.map +1 -1
  26. package/dist/src/grpc-status.js +2 -2
  27. package/dist/src/grpc-status.js.map +1 -1
  28. package/dist/src/index.d.ts +1 -0
  29. package/dist/src/index.js +3 -2
  30. package/dist/src/index.js.map +1 -1
  31. package/dist/src/invocation-context.js +2 -2
  32. package/dist/src/invocation-context.js.map +1 -1
  33. package/dist/src/options.js +2 -2
  34. package/dist/src/options.js.map +1 -1
  35. package/dist/src/persistence.js +2 -2
  36. package/dist/src/persistence.js.map +1 -1
  37. package/dist/src/retry-after.js +2 -2
  38. package/dist/src/retry-after.js.map +1 -1
  39. package/dist/src/rpc.js +2 -2
  40. package/dist/src/rpc.js.map +1 -1
  41. package/dist/src/step.js +2 -2
  42. package/dist/src/step.js.map +1 -1
  43. package/dist/src/stream.d.ts +11 -1
  44. package/dist/src/stream.js +2 -2
  45. package/dist/src/stream.js.map +1 -1
  46. package/dist/src/subflow.js +2 -2
  47. package/dist/src/subflow.js.map +1 -1
  48. package/dist/src/validation.js +2 -2
  49. package/dist/src/validation.js.map +1 -1
  50. package/dist/src/value-mapper.js +2 -2
  51. package/dist/src/value-mapper.js.map +1 -1
  52. package/dist/src/wait.js +2 -2
  53. package/dist/src/wait.js.map +1 -1
  54. package/dist/src/worker-dispatcher.js +2 -2
  55. package/dist/src/worker-dispatcher.js.map +1 -1
  56. package/dist/src/worker.js +2 -2
  57. package/dist/src/worker.js.map +1 -1
  58. package/native/linux-aarch64/dex_blob_cache_node.node +0 -0
  59. package/native/linux-x86_64/dex_blob_cache_node.node +0 -0
  60. package/native/windows-x86_64/dex_blob_cache_node.node +0 -0
  61. package/package.json +2 -2
@@ -136,6 +136,17 @@ export var FlowResetStepMethod;
136
136
  FlowResetStepMethod[FlowResetStepMethod["FLOW_RESET_STEP_METHOD_EXECUTE"] = 2] = "FLOW_RESET_STEP_METHOD_EXECUTE";
137
137
  FlowResetStepMethod[FlowResetStepMethod["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
138
138
  })(FlowResetStepMethod || (FlowResetStepMethod = {}));
139
+ export var AttributeMatchOperator;
140
+ (function (AttributeMatchOperator) {
141
+ AttributeMatchOperator[AttributeMatchOperator["ATTRIBUTE_MATCH_OPERATOR_UNSPECIFIED"] = 0] = "ATTRIBUTE_MATCH_OPERATOR_UNSPECIFIED";
142
+ AttributeMatchOperator[AttributeMatchOperator["ATTRIBUTE_MATCH_OPERATOR_EQUAL"] = 1] = "ATTRIBUTE_MATCH_OPERATOR_EQUAL";
143
+ AttributeMatchOperator[AttributeMatchOperator["ATTRIBUTE_MATCH_OPERATOR_NOT_EQUAL"] = 2] = "ATTRIBUTE_MATCH_OPERATOR_NOT_EQUAL";
144
+ AttributeMatchOperator[AttributeMatchOperator["ATTRIBUTE_MATCH_OPERATOR_GREATER_THAN"] = 3] = "ATTRIBUTE_MATCH_OPERATOR_GREATER_THAN";
145
+ AttributeMatchOperator[AttributeMatchOperator["ATTRIBUTE_MATCH_OPERATOR_GREATER_THAN_OR_EQUAL"] = 4] = "ATTRIBUTE_MATCH_OPERATOR_GREATER_THAN_OR_EQUAL";
146
+ AttributeMatchOperator[AttributeMatchOperator["ATTRIBUTE_MATCH_OPERATOR_LESS_THAN"] = 5] = "ATTRIBUTE_MATCH_OPERATOR_LESS_THAN";
147
+ AttributeMatchOperator[AttributeMatchOperator["ATTRIBUTE_MATCH_OPERATOR_LESS_THAN_OR_EQUAL"] = 6] = "ATTRIBUTE_MATCH_OPERATOR_LESS_THAN_OR_EQUAL";
148
+ AttributeMatchOperator[AttributeMatchOperator["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
149
+ })(AttributeMatchOperator || (AttributeMatchOperator = {}));
139
150
  export var ErrorSubStatus;
140
151
  (function (ErrorSubStatus) {
141
152
  ErrorSubStatus[ErrorSubStatus["ERROR_SUB_STATUS_UNSPECIFIED"] = 0] = "ERROR_SUB_STATUS_UNSPECIFIED";
@@ -2623,6 +2634,143 @@ export const ReadStreamResponse = {
2623
2634
  return message;
2624
2635
  },
2625
2636
  };
2637
+ function createBaseListStreamMessagesRequest() {
2638
+ return { flowId: "", flowType: "", streamName: "", pageSize: 0, beforePageToken: "" };
2639
+ }
2640
+ export const ListStreamMessagesRequest = {
2641
+ encode(message, writer = new BinaryWriter()) {
2642
+ if (message.flowId !== "") {
2643
+ writer.uint32(10).string(message.flowId);
2644
+ }
2645
+ if (message.flowType !== "") {
2646
+ writer.uint32(18).string(message.flowType);
2647
+ }
2648
+ if (message.streamName !== "") {
2649
+ writer.uint32(26).string(message.streamName);
2650
+ }
2651
+ if (message.pageSize !== 0) {
2652
+ writer.uint32(32).int32(message.pageSize);
2653
+ }
2654
+ if (message.beforePageToken !== "") {
2655
+ writer.uint32(42).string(message.beforePageToken);
2656
+ }
2657
+ return writer;
2658
+ },
2659
+ decode(input, length) {
2660
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2661
+ const end = length === undefined ? reader.len : reader.pos + length;
2662
+ const message = createBaseListStreamMessagesRequest();
2663
+ while (reader.pos < end) {
2664
+ const tag = reader.uint32();
2665
+ switch (tag >>> 3) {
2666
+ case 1: {
2667
+ if (tag !== 10) {
2668
+ break;
2669
+ }
2670
+ message.flowId = reader.string();
2671
+ continue;
2672
+ }
2673
+ case 2: {
2674
+ if (tag !== 18) {
2675
+ break;
2676
+ }
2677
+ message.flowType = reader.string();
2678
+ continue;
2679
+ }
2680
+ case 3: {
2681
+ if (tag !== 26) {
2682
+ break;
2683
+ }
2684
+ message.streamName = reader.string();
2685
+ continue;
2686
+ }
2687
+ case 4: {
2688
+ if (tag !== 32) {
2689
+ break;
2690
+ }
2691
+ message.pageSize = reader.int32();
2692
+ continue;
2693
+ }
2694
+ case 5: {
2695
+ if (tag !== 42) {
2696
+ break;
2697
+ }
2698
+ message.beforePageToken = reader.string();
2699
+ continue;
2700
+ }
2701
+ }
2702
+ if ((tag & 7) === 4 || tag === 0) {
2703
+ break;
2704
+ }
2705
+ reader.skip(tag & 7);
2706
+ }
2707
+ return message;
2708
+ },
2709
+ create(base) {
2710
+ return ListStreamMessagesRequest.fromPartial(base ?? {});
2711
+ },
2712
+ fromPartial(object) {
2713
+ const message = createBaseListStreamMessagesRequest();
2714
+ message.flowId = object.flowId ?? "";
2715
+ message.flowType = object.flowType ?? "";
2716
+ message.streamName = object.streamName ?? "";
2717
+ message.pageSize = object.pageSize ?? 0;
2718
+ message.beforePageToken = object.beforePageToken ?? "";
2719
+ return message;
2720
+ },
2721
+ };
2722
+ function createBaseListStreamMessagesResponse() {
2723
+ return { messages: [], nextPageToken: "" };
2724
+ }
2725
+ export const ListStreamMessagesResponse = {
2726
+ encode(message, writer = new BinaryWriter()) {
2727
+ for (const v of message.messages) {
2728
+ StreamMessage.encode(v, writer.uint32(10).fork()).join();
2729
+ }
2730
+ if (message.nextPageToken !== "") {
2731
+ writer.uint32(18).string(message.nextPageToken);
2732
+ }
2733
+ return writer;
2734
+ },
2735
+ decode(input, length) {
2736
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2737
+ const end = length === undefined ? reader.len : reader.pos + length;
2738
+ const message = createBaseListStreamMessagesResponse();
2739
+ while (reader.pos < end) {
2740
+ const tag = reader.uint32();
2741
+ switch (tag >>> 3) {
2742
+ case 1: {
2743
+ if (tag !== 10) {
2744
+ break;
2745
+ }
2746
+ message.messages.push(StreamMessage.decode(reader, reader.uint32()));
2747
+ continue;
2748
+ }
2749
+ case 2: {
2750
+ if (tag !== 18) {
2751
+ break;
2752
+ }
2753
+ message.nextPageToken = reader.string();
2754
+ continue;
2755
+ }
2756
+ }
2757
+ if ((tag & 7) === 4 || tag === 0) {
2758
+ break;
2759
+ }
2760
+ reader.skip(tag & 7);
2761
+ }
2762
+ return message;
2763
+ },
2764
+ create(base) {
2765
+ return ListStreamMessagesResponse.fromPartial(base ?? {});
2766
+ },
2767
+ fromPartial(object) {
2768
+ const message = createBaseListStreamMessagesResponse();
2769
+ message.messages = object.messages?.map((e) => StreamMessage.fromPartial(e)) || [];
2770
+ message.nextPageToken = object.nextPageToken ?? "";
2771
+ return message;
2772
+ },
2773
+ };
2626
2774
  function createBaseStreamMessage() {
2627
2775
  return { value: undefined, resumeToken: "", createdTime: undefined, source: "" };
2628
2776
  }
@@ -7415,24 +7563,21 @@ export const WaitForStepCompletionResponse = {
7415
7563
  },
7416
7564
  };
7417
7565
  function createBaseWaitForAttributeRequest() {
7418
- return { flowId: "", runId: "", condition: undefined, waitTimeSeconds: 0, requestId: "" };
7566
+ return { flowId: "", match: undefined, waitTimeSeconds: 0, requestId: "" };
7419
7567
  }
7420
7568
  export const WaitForAttributeRequest = {
7421
7569
  encode(message, writer = new BinaryWriter()) {
7422
7570
  if (message.flowId !== "") {
7423
7571
  writer.uint32(10).string(message.flowId);
7424
7572
  }
7425
- if (message.runId !== "") {
7426
- writer.uint32(18).string(message.runId);
7427
- }
7428
- if (message.condition !== undefined) {
7429
- WaitForAttributeCondition.encode(message.condition, writer.uint32(26).fork()).join();
7573
+ if (message.match !== undefined) {
7574
+ AttributeMatch.encode(message.match, writer.uint32(18).fork()).join();
7430
7575
  }
7431
7576
  if (message.waitTimeSeconds !== 0) {
7432
- writer.uint32(32).int32(message.waitTimeSeconds);
7577
+ writer.uint32(24).int32(message.waitTimeSeconds);
7433
7578
  }
7434
7579
  if (message.requestId !== "") {
7435
- writer.uint32(42).string(message.requestId);
7580
+ writer.uint32(34).string(message.requestId);
7436
7581
  }
7437
7582
  return writer;
7438
7583
  },
@@ -7454,25 +7599,18 @@ export const WaitForAttributeRequest = {
7454
7599
  if (tag !== 18) {
7455
7600
  break;
7456
7601
  }
7457
- message.runId = reader.string();
7602
+ message.match = AttributeMatch.decode(reader, reader.uint32());
7458
7603
  continue;
7459
7604
  }
7460
7605
  case 3: {
7461
- if (tag !== 26) {
7462
- break;
7463
- }
7464
- message.condition = WaitForAttributeCondition.decode(reader, reader.uint32());
7465
- continue;
7466
- }
7467
- case 4: {
7468
- if (tag !== 32) {
7606
+ if (tag !== 24) {
7469
7607
  break;
7470
7608
  }
7471
7609
  message.waitTimeSeconds = reader.int32();
7472
7610
  continue;
7473
7611
  }
7474
- case 5: {
7475
- if (tag !== 42) {
7612
+ case 4: {
7613
+ if (tag !== 34) {
7476
7614
  break;
7477
7615
  }
7478
7616
  message.requestId = reader.string();
@@ -7492,31 +7630,28 @@ export const WaitForAttributeRequest = {
7492
7630
  fromPartial(object) {
7493
7631
  const message = createBaseWaitForAttributeRequest();
7494
7632
  message.flowId = object.flowId ?? "";
7495
- message.runId = object.runId ?? "";
7496
- message.condition = (object.condition !== undefined && object.condition !== null)
7497
- ? WaitForAttributeCondition.fromPartial(object.condition)
7633
+ message.match = (object.match !== undefined && object.match !== null)
7634
+ ? AttributeMatch.fromPartial(object.match)
7498
7635
  : undefined;
7499
7636
  message.waitTimeSeconds = object.waitTimeSeconds ?? 0;
7500
7637
  message.requestId = object.requestId ?? "";
7501
7638
  return message;
7502
7639
  },
7503
7640
  };
7504
- function createBaseWaitForAttributeCondition() {
7505
- return { kind: undefined };
7641
+ function createBaseWaitForAttributeResponse() {
7642
+ return { matchedValue: undefined };
7506
7643
  }
7507
- export const WaitForAttributeCondition = {
7644
+ export const WaitForAttributeResponse = {
7508
7645
  encode(message, writer = new BinaryWriter()) {
7509
- switch (message.kind?.$case) {
7510
- case "equal":
7511
- WaitForAttributeEqual.encode(message.kind.value, writer.uint32(10).fork()).join();
7512
- break;
7646
+ if (message.matchedValue !== undefined) {
7647
+ Value.encode(message.matchedValue, writer.uint32(10).fork()).join();
7513
7648
  }
7514
7649
  return writer;
7515
7650
  },
7516
7651
  decode(input, length) {
7517
7652
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7518
7653
  const end = length === undefined ? reader.len : reader.pos + length;
7519
- const message = createBaseWaitForAttributeCondition();
7654
+ const message = createBaseWaitForAttributeResponse();
7520
7655
  while (reader.pos < end) {
7521
7656
  const tag = reader.uint32();
7522
7657
  switch (tag >>> 3) {
@@ -7524,7 +7659,7 @@ export const WaitForAttributeCondition = {
7524
7659
  if (tag !== 10) {
7525
7660
  break;
7526
7661
  }
7527
- message.kind = { $case: "equal", value: WaitForAttributeEqual.decode(reader, reader.uint32()) };
7662
+ message.matchedValue = Value.decode(reader, reader.uint32());
7528
7663
  continue;
7529
7664
  }
7530
7665
  }
@@ -7536,38 +7671,36 @@ export const WaitForAttributeCondition = {
7536
7671
  return message;
7537
7672
  },
7538
7673
  create(base) {
7539
- return WaitForAttributeCondition.fromPartial(base ?? {});
7674
+ return WaitForAttributeResponse.fromPartial(base ?? {});
7540
7675
  },
7541
7676
  fromPartial(object) {
7542
- const message = createBaseWaitForAttributeCondition();
7543
- switch (object.kind?.$case) {
7544
- case "equal": {
7545
- if (object.kind?.value !== undefined && object.kind?.value !== null) {
7546
- message.kind = { $case: "equal", value: WaitForAttributeEqual.fromPartial(object.kind.value) };
7547
- }
7548
- break;
7549
- }
7550
- }
7677
+ const message = createBaseWaitForAttributeResponse();
7678
+ message.matchedValue = (object.matchedValue !== undefined && object.matchedValue !== null)
7679
+ ? Value.fromPartial(object.matchedValue)
7680
+ : undefined;
7551
7681
  return message;
7552
7682
  },
7553
7683
  };
7554
- function createBaseWaitForAttributeEqual() {
7555
- return { key: "", value: undefined };
7684
+ function createBaseAttributeMatch() {
7685
+ return { key: "", operator: 0, operand: undefined };
7556
7686
  }
7557
- export const WaitForAttributeEqual = {
7687
+ export const AttributeMatch = {
7558
7688
  encode(message, writer = new BinaryWriter()) {
7559
7689
  if (message.key !== "") {
7560
7690
  writer.uint32(10).string(message.key);
7561
7691
  }
7562
- if (message.value !== undefined) {
7563
- Value.encode(message.value, writer.uint32(18).fork()).join();
7692
+ if (message.operator !== 0) {
7693
+ writer.uint32(16).int32(message.operator);
7694
+ }
7695
+ if (message.operand !== undefined) {
7696
+ Value.encode(message.operand, writer.uint32(26).fork()).join();
7564
7697
  }
7565
7698
  return writer;
7566
7699
  },
7567
7700
  decode(input, length) {
7568
7701
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7569
7702
  const end = length === undefined ? reader.len : reader.pos + length;
7570
- const message = createBaseWaitForAttributeEqual();
7703
+ const message = createBaseAttributeMatch();
7571
7704
  while (reader.pos < end) {
7572
7705
  const tag = reader.uint32();
7573
7706
  switch (tag >>> 3) {
@@ -7579,10 +7712,17 @@ export const WaitForAttributeEqual = {
7579
7712
  continue;
7580
7713
  }
7581
7714
  case 2: {
7582
- if (tag !== 18) {
7715
+ if (tag !== 16) {
7583
7716
  break;
7584
7717
  }
7585
- message.value = Value.decode(reader, reader.uint32());
7718
+ message.operator = reader.int32();
7719
+ continue;
7720
+ }
7721
+ case 3: {
7722
+ if (tag !== 26) {
7723
+ break;
7724
+ }
7725
+ message.operand = Value.decode(reader, reader.uint32());
7586
7726
  continue;
7587
7727
  }
7588
7728
  }
@@ -7594,12 +7734,15 @@ export const WaitForAttributeEqual = {
7594
7734
  return message;
7595
7735
  },
7596
7736
  create(base) {
7597
- return WaitForAttributeEqual.fromPartial(base ?? {});
7737
+ return AttributeMatch.fromPartial(base ?? {});
7598
7738
  },
7599
7739
  fromPartial(object) {
7600
- const message = createBaseWaitForAttributeEqual();
7740
+ const message = createBaseAttributeMatch();
7601
7741
  message.key = object.key ?? "";
7602
- message.value = (object.value !== undefined && object.value !== null) ? Value.fromPartial(object.value) : undefined;
7742
+ message.operator = object.operator ?? 0;
7743
+ message.operand = (object.operand !== undefined && object.operand !== null)
7744
+ ? Value.fromPartial(object.operand)
7745
+ : undefined;
7603
7746
  return message;
7604
7747
  },
7605
7748
  };
@@ -14256,6 +14399,15 @@ export const FlowServiceService = {
14256
14399
  responseSerialize: (value) => Buffer.from(ReadStreamResponse.encode(value).finish()),
14257
14400
  responseDeserialize: (value) => ReadStreamResponse.decode(value),
14258
14401
  },
14402
+ listStreamMessages: {
14403
+ path: "/dex.FlowService/ListStreamMessages",
14404
+ requestStream: false,
14405
+ responseStream: false,
14406
+ requestSerialize: (value) => Buffer.from(ListStreamMessagesRequest.encode(value).finish()),
14407
+ requestDeserialize: (value) => ListStreamMessagesRequest.decode(value),
14408
+ responseSerialize: (value) => Buffer.from(ListStreamMessagesResponse.encode(value).finish()),
14409
+ responseDeserialize: (value) => ListStreamMessagesResponse.decode(value),
14410
+ },
14259
14411
  stopFlow: {
14260
14412
  path: "/dex.FlowService/StopFlow",
14261
14413
  requestStream: false,
@@ -14406,8 +14558,8 @@ export const FlowServiceService = {
14406
14558
  responseStream: false,
14407
14559
  requestSerialize: (value) => Buffer.from(WaitForAttributeRequest.encode(value).finish()),
14408
14560
  requestDeserialize: (value) => WaitForAttributeRequest.decode(value),
14409
- responseSerialize: (value) => Buffer.from(Empty.encode(value).finish()),
14410
- responseDeserialize: (value) => Empty.decode(value),
14561
+ responseSerialize: (value) => Buffer.from(WaitForAttributeResponse.encode(value).finish()),
14562
+ responseDeserialize: (value) => WaitForAttributeResponse.decode(value),
14411
14563
  },
14412
14564
  triggerContinueAsNew: {
14413
14565
  path: "/dex.FlowService/TriggerContinueAsNew",