@spooled/sdk 1.0.37 → 1.0.38

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.
@@ -107,11 +107,11 @@ declare const DEFAULT_CONFIG: {
107
107
  successThreshold: number;
108
108
  timeout: number;
109
109
  };
110
- readonly userAgent: "@spooled/sdk-nodejs/1.0.37";
110
+ readonly userAgent: "@spooled/sdk-nodejs/1.0.38";
111
111
  readonly autoRefreshToken: true;
112
112
  };
113
113
  /** SDK version */
114
- declare const SDK_VERSION = "1.0.37";
114
+ declare const SDK_VERSION = "1.0.38";
115
115
  /** API version prefix */
116
116
  declare const API_VERSION = "v1";
117
117
  /**
@@ -107,11 +107,11 @@ declare const DEFAULT_CONFIG: {
107
107
  successThreshold: number;
108
108
  timeout: number;
109
109
  };
110
- readonly userAgent: "@spooled/sdk-nodejs/1.0.37";
110
+ readonly userAgent: "@spooled/sdk-nodejs/1.0.38";
111
111
  readonly autoRefreshToken: true;
112
112
  };
113
113
  /** SDK version */
114
- declare const SDK_VERSION = "1.0.37";
114
+ declare const SDK_VERSION = "1.0.38";
115
115
  /** API version prefix */
116
116
  declare const API_VERSION = "v1";
117
117
  /**
package/dist/index.cjs CHANGED
@@ -49,10 +49,10 @@ var DEFAULT_CONFIG = {
49
49
  successThreshold: 3,
50
50
  timeout: 3e4
51
51
  },
52
- userAgent: "@spooled/sdk-nodejs/1.0.37",
52
+ userAgent: "@spooled/sdk-nodejs/1.0.38",
53
53
  autoRefreshToken: true
54
54
  };
55
- var SDK_VERSION = "1.0.37";
55
+ var SDK_VERSION = "1.0.38";
56
56
  var API_VERSION = "v1";
57
57
  var API_BASE_PATH = `/api/${API_VERSION}`;
58
58
  function normalizeCredential(value) {
@@ -2754,7 +2754,29 @@ function decodeValue(value) {
2754
2754
  return void 0;
2755
2755
  }
2756
2756
  function encodeEnqueueRequest(params) {
2757
- return { ...params, payload: encodeStruct(params.payload) };
2757
+ const encoded = {
2758
+ queueName: params.queueName,
2759
+ payload: encodeStruct(params.payload)
2760
+ };
2761
+ if (params.priority !== void 0) {
2762
+ encoded.priority = params.priority;
2763
+ }
2764
+ if (params.maxRetries !== void 0) {
2765
+ encoded.maxRetries = params.maxRetries;
2766
+ }
2767
+ if (params.timeoutSeconds !== void 0) {
2768
+ encoded.timeoutSeconds = params.timeoutSeconds;
2769
+ }
2770
+ if (params.idempotencyKey !== void 0 && params.idempotencyKey !== "") {
2771
+ encoded.idempotencyKey = params.idempotencyKey;
2772
+ }
2773
+ if (params.scheduledAt !== void 0) {
2774
+ encoded.scheduledAt = params.scheduledAt;
2775
+ }
2776
+ if (params.tags !== void 0) {
2777
+ encoded.tags = params.tags;
2778
+ }
2779
+ return encoded;
2758
2780
  }
2759
2781
  function encodeCompleteRequest(params) {
2760
2782
  return { ...params, result: encodeStruct(params.result) };