@hatchet-dev/typescript-sdk 1.17.0 → 1.17.2

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.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
- // protoc-gen-ts_proto v2.7.7
4
+ // protoc-gen-ts_proto v2.11.4
5
5
  // protoc v3.19.1
6
6
  // source: v1/shared/condition.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -120,9 +120,15 @@ exports.BaseMatchCondition = {
120
120
  return {
121
121
  readableDataKey: isSet(object.readableDataKey)
122
122
  ? globalThis.String(object.readableDataKey)
123
- : '',
123
+ : isSet(object.readable_data_key)
124
+ ? globalThis.String(object.readable_data_key)
125
+ : '',
124
126
  action: isSet(object.action) ? actionFromJSON(object.action) : 0,
125
- orGroupId: isSet(object.orGroupId) ? globalThis.String(object.orGroupId) : '',
127
+ orGroupId: isSet(object.orGroupId)
128
+ ? globalThis.String(object.orGroupId)
129
+ : isSet(object.or_group_id)
130
+ ? globalThis.String(object.or_group_id)
131
+ : '',
126
132
  expression: isSet(object.expression) ? globalThis.String(object.expression) : '',
127
133
  };
128
134
  },
@@ -202,7 +208,9 @@ exports.ParentOverrideMatchCondition = {
202
208
  base: isSet(object.base) ? exports.BaseMatchCondition.fromJSON(object.base) : undefined,
203
209
  parentReadableId: isSet(object.parentReadableId)
204
210
  ? globalThis.String(object.parentReadableId)
205
- : '',
211
+ : isSet(object.parent_readable_id)
212
+ ? globalThis.String(object.parent_readable_id)
213
+ : '',
206
214
  };
207
215
  },
208
216
  toJSON(message) {
@@ -274,7 +282,11 @@ exports.SleepMatchCondition = {
274
282
  fromJSON(object) {
275
283
  return {
276
284
  base: isSet(object.base) ? exports.BaseMatchCondition.fromJSON(object.base) : undefined,
277
- sleepFor: isSet(object.sleepFor) ? globalThis.String(object.sleepFor) : '',
285
+ sleepFor: isSet(object.sleepFor)
286
+ ? globalThis.String(object.sleepFor)
287
+ : isSet(object.sleep_for)
288
+ ? globalThis.String(object.sleep_for)
289
+ : '',
278
290
  };
279
291
  },
280
292
  toJSON(message) {
@@ -346,7 +358,11 @@ exports.UserEventMatchCondition = {
346
358
  fromJSON(object) {
347
359
  return {
348
360
  base: isSet(object.base) ? exports.BaseMatchCondition.fromJSON(object.base) : undefined,
349
- userEventKey: isSet(object.userEventKey) ? globalThis.String(object.userEventKey) : '',
361
+ userEventKey: isSet(object.userEventKey)
362
+ ? globalThis.String(object.userEventKey)
363
+ : isSet(object.user_event_key)
364
+ ? globalThis.String(object.user_event_key)
365
+ : '',
350
366
  };
351
367
  },
352
368
  toJSON(message) {
@@ -429,13 +445,19 @@ exports.TaskConditions = {
429
445
  return {
430
446
  parentOverrideConditions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.parentOverrideConditions)
431
447
  ? object.parentOverrideConditions.map((e) => exports.ParentOverrideMatchCondition.fromJSON(e))
432
- : [],
448
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.parent_override_conditions)
449
+ ? object.parent_override_conditions.map((e) => exports.ParentOverrideMatchCondition.fromJSON(e))
450
+ : [],
433
451
  sleepConditions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.sleepConditions)
434
452
  ? object.sleepConditions.map((e) => exports.SleepMatchCondition.fromJSON(e))
435
- : [],
453
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.sleep_conditions)
454
+ ? object.sleep_conditions.map((e) => exports.SleepMatchCondition.fromJSON(e))
455
+ : [],
436
456
  userEventConditions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.userEventConditions)
437
457
  ? object.userEventConditions.map((e) => exports.UserEventMatchCondition.fromJSON(e))
438
- : [],
458
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.user_event_conditions)
459
+ ? object.user_event_conditions.map((e) => exports.UserEventMatchCondition.fromJSON(e))
460
+ : [],
439
461
  };
440
462
  },
441
463
  toJSON(message) {
@@ -514,10 +536,14 @@ exports.DurableEventListenerConditions = {
514
536
  return {
515
537
  sleepConditions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.sleepConditions)
516
538
  ? object.sleepConditions.map((e) => exports.SleepMatchCondition.fromJSON(e))
517
- : [],
539
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.sleep_conditions)
540
+ ? object.sleep_conditions.map((e) => exports.SleepMatchCondition.fromJSON(e))
541
+ : [],
518
542
  userEventConditions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.userEventConditions)
519
543
  ? object.userEventConditions.map((e) => exports.UserEventMatchCondition.fromJSON(e))
520
- : [],
544
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.user_event_conditions)
545
+ ? object.user_event_conditions.map((e) => exports.UserEventMatchCondition.fromJSON(e))
546
+ : [],
521
547
  };
522
548
  },
523
549
  toJSON(message) {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
- // protoc-gen-ts_proto v2.7.7
4
+ // protoc-gen-ts_proto v2.11.4
5
5
  // protoc v3.19.1
6
6
  // source: v1/shared/trigger.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -146,8 +146,16 @@ exports.DesiredWorkerLabels = {
146
146
  },
147
147
  fromJSON(object) {
148
148
  return {
149
- strValue: isSet(object.strValue) ? globalThis.String(object.strValue) : undefined,
150
- intValue: isSet(object.intValue) ? globalThis.Number(object.intValue) : undefined,
149
+ strValue: isSet(object.strValue)
150
+ ? globalThis.String(object.strValue)
151
+ : isSet(object.str_value)
152
+ ? globalThis.String(object.str_value)
153
+ : undefined,
154
+ intValue: isSet(object.intValue)
155
+ ? globalThis.Number(object.intValue)
156
+ : isSet(object.int_value)
157
+ ? globalThis.Number(object.int_value)
158
+ : undefined,
151
159
  required: isSet(object.required) ? globalThis.Boolean(object.required) : undefined,
152
160
  comparator: isSet(object.comparator)
153
161
  ? workerLabelComparatorFromJSON(object.comparator)
@@ -231,7 +239,7 @@ exports.TriggerWorkflowRequest = {
231
239
  if (message.priority !== undefined) {
232
240
  writer.uint32(72).int32(message.priority);
233
241
  }
234
- Object.entries(message.desiredWorkerLabels).forEach(([key, value]) => {
242
+ globalThis.Object.entries(message.desiredWorkerLabels).forEach(([key, value]) => {
235
243
  exports.TriggerWorkflowRequest_DesiredWorkerLabelsEntry.encode({ key: key, value }, writer.uint32(82).fork()).join();
236
244
  });
237
245
  return writer;
@@ -328,25 +336,48 @@ exports.TriggerWorkflowRequest = {
328
336
  return {
329
337
  name: isSet(object.name) ? globalThis.String(object.name) : '',
330
338
  input: isSet(object.input) ? globalThis.String(object.input) : '',
331
- parentId: isSet(object.parentId) ? globalThis.String(object.parentId) : undefined,
339
+ parentId: isSet(object.parentId)
340
+ ? globalThis.String(object.parentId)
341
+ : isSet(object.parent_id)
342
+ ? globalThis.String(object.parent_id)
343
+ : undefined,
332
344
  parentTaskRunExternalId: isSet(object.parentTaskRunExternalId)
333
345
  ? globalThis.String(object.parentTaskRunExternalId)
334
- : undefined,
335
- childIndex: isSet(object.childIndex) ? globalThis.Number(object.childIndex) : undefined,
336
- childKey: isSet(object.childKey) ? globalThis.String(object.childKey) : undefined,
346
+ : isSet(object.parent_task_run_external_id)
347
+ ? globalThis.String(object.parent_task_run_external_id)
348
+ : undefined,
349
+ childIndex: isSet(object.childIndex)
350
+ ? globalThis.Number(object.childIndex)
351
+ : isSet(object.child_index)
352
+ ? globalThis.Number(object.child_index)
353
+ : undefined,
354
+ childKey: isSet(object.childKey)
355
+ ? globalThis.String(object.childKey)
356
+ : isSet(object.child_key)
357
+ ? globalThis.String(object.child_key)
358
+ : undefined,
337
359
  additionalMetadata: isSet(object.additionalMetadata)
338
360
  ? globalThis.String(object.additionalMetadata)
339
- : undefined,
361
+ : isSet(object.additional_metadata)
362
+ ? globalThis.String(object.additional_metadata)
363
+ : undefined,
340
364
  desiredWorkerId: isSet(object.desiredWorkerId)
341
365
  ? globalThis.String(object.desiredWorkerId)
342
- : undefined,
366
+ : isSet(object.desired_worker_id)
367
+ ? globalThis.String(object.desired_worker_id)
368
+ : undefined,
343
369
  priority: isSet(object.priority) ? globalThis.Number(object.priority) : undefined,
344
370
  desiredWorkerLabels: isObject(object.desiredWorkerLabels)
345
- ? Object.entries(object.desiredWorkerLabels).reduce((acc, [key, value]) => {
371
+ ? globalThis.Object.entries(object.desiredWorkerLabels).reduce((acc, [key, value]) => {
346
372
  acc[key] = exports.DesiredWorkerLabels.fromJSON(value);
347
373
  return acc;
348
374
  }, {})
349
- : {},
375
+ : isObject(object.desired_worker_labels)
376
+ ? globalThis.Object.entries(object.desired_worker_labels).reduce((acc, [key, value]) => {
377
+ acc[key] = exports.DesiredWorkerLabels.fromJSON(value);
378
+ return acc;
379
+ }, {})
380
+ : {},
350
381
  };
351
382
  },
352
383
  toJSON(message) {
@@ -379,7 +410,7 @@ exports.TriggerWorkflowRequest = {
379
410
  obj.priority = Math.round(message.priority);
380
411
  }
381
412
  if (message.desiredWorkerLabels) {
382
- const entries = Object.entries(message.desiredWorkerLabels);
413
+ const entries = globalThis.Object.entries(message.desiredWorkerLabels);
383
414
  if (entries.length > 0) {
384
415
  obj.desiredWorkerLabels = {};
385
416
  entries.forEach(([k, v]) => {
@@ -404,7 +435,7 @@ exports.TriggerWorkflowRequest = {
404
435
  message.additionalMetadata = (_g = object.additionalMetadata) !== null && _g !== void 0 ? _g : undefined;
405
436
  message.desiredWorkerId = (_h = object.desiredWorkerId) !== null && _h !== void 0 ? _h : undefined;
406
437
  message.priority = (_j = object.priority) !== null && _j !== void 0 ? _j : undefined;
407
- message.desiredWorkerLabels = Object.entries((_k = object.desiredWorkerLabels) !== null && _k !== void 0 ? _k : {}).reduce((acc, [key, value]) => {
438
+ message.desiredWorkerLabels = globalThis.Object.entries((_k = object.desiredWorkerLabels) !== null && _k !== void 0 ? _k : {}).reduce((acc, [key, value]) => {
408
439
  if (value !== undefined) {
409
440
  acc[key] = exports.DesiredWorkerLabels.fromPartial(value);
410
441
  }