@hatchet-dev/typescript-sdk 0.0.1 → 0.0.3

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 (109) hide show
  1. package/README.md +2 -3
  2. package/dist/{hatchet/clients → clients}/admin/admin-client.d.ts +2 -2
  3. package/dist/{hatchet/clients → clients}/admin/admin-client.js +2 -2
  4. package/dist/{hatchet/clients → clients}/dispatcher/action-listener.d.ts +3 -3
  5. package/dist/{hatchet/clients → clients}/dispatcher/action-listener.js +2 -2
  6. package/dist/{hatchet/clients → clients}/dispatcher/dispatcher-client.d.ts +3 -3
  7. package/dist/{hatchet/clients → clients}/dispatcher/dispatcher-client.js +2 -2
  8. package/dist/{hatchet/clients → clients}/event/event-client.d.ts +3 -3
  9. package/dist/{hatchet/clients → clients}/event/event-client.js +2 -2
  10. package/dist/{hatchet/clients → clients}/hatchet-client/hatchet-client.d.ts +6 -6
  11. package/dist/{hatchet/clients → clients}/hatchet-client/hatchet-client.js +6 -6
  12. package/dist/{hatchet/clients → clients}/worker/worker.d.ts +6 -6
  13. package/dist/{hatchet/clients → clients}/worker/worker.js +5 -5
  14. package/dist/index.d.ts +2 -0
  15. package/dist/{hatchet/index.js → index.js} +1 -1
  16. package/dist/protoc/events/index.js +17 -0
  17. package/dist/sdk.d.ts +2 -0
  18. package/dist/{hatchet/sdk.js → sdk.js} +1 -1
  19. package/dist/{hatchet/step.js → step.js} +1 -1
  20. package/dist/{hatchet/util → util}/config-loader/config-loader.d.ts +1 -1
  21. package/dist/{hatchet/util → util}/config-loader/config-loader.js +1 -1
  22. package/package.json +8 -5
  23. package/.eslintrc.json +0 -36
  24. package/.prettierrc.json +0 -6
  25. package/dist/hatchet/clients/admin/admin-client.test.d.ts +0 -1
  26. package/dist/hatchet/clients/admin/admin-client.test.js +0 -101
  27. package/dist/hatchet/clients/dispatcher/action-listener.test.d.ts +0 -4
  28. package/dist/hatchet/clients/dispatcher/action-listener.test.js +0 -277
  29. package/dist/hatchet/clients/dispatcher/dispatcher-client.test.d.ts +0 -1
  30. package/dist/hatchet/clients/dispatcher/dispatcher-client.test.js +0 -99
  31. package/dist/hatchet/clients/event/event-client.test.d.ts +0 -1
  32. package/dist/hatchet/clients/event/event-client.test.js +0 -60
  33. package/dist/hatchet/clients/hatchet-client/hatchet-client.test.d.ts +0 -2
  34. package/dist/hatchet/clients/hatchet-client/hatchet-client.test.js +0 -135
  35. package/dist/hatchet/clients/worker/worker.test.d.ts +0 -1
  36. package/dist/hatchet/clients/worker/worker.test.js +0 -256
  37. package/dist/hatchet/index.d.ts +0 -2
  38. package/dist/hatchet/sdk.d.ts +0 -2
  39. package/dist/hatchet/util/config-loader/config-loader.test.d.ts +0 -1
  40. package/dist/hatchet/util/config-loader/config-loader.test.js +0 -72
  41. package/dist/hatchet/util/hatchet-promise/hatchet-promise.test.d.ts +0 -1
  42. package/dist/hatchet/util/hatchet-promise/hatchet-promise.test.js +0 -40
  43. package/examples/dag-worker.ts +0 -55
  44. package/examples/example-event.ts +0 -7
  45. package/examples/simple-worker.ts +0 -39
  46. package/generate-protoc.sh +0 -10
  47. package/hatchet/clients/admin/admin-client.test.ts +0 -116
  48. package/hatchet/clients/admin/admin-client.ts +0 -43
  49. package/hatchet/clients/dispatcher/action-listener.test.ts +0 -270
  50. package/hatchet/clients/dispatcher/action-listener.ts +0 -91
  51. package/hatchet/clients/dispatcher/dispatcher-client.test.ts +0 -111
  52. package/hatchet/clients/dispatcher/dispatcher-client.ts +0 -47
  53. package/hatchet/clients/event/event-client.test.ts +0 -72
  54. package/hatchet/clients/event/event-client.ts +0 -32
  55. package/hatchet/clients/hatchet-client/client-config.ts +0 -22
  56. package/hatchet/clients/hatchet-client/fixtures/.hatchet-invalid.yaml +0 -6
  57. package/hatchet/clients/hatchet-client/fixtures/.hatchet.yaml +0 -8
  58. package/hatchet/clients/hatchet-client/hatchet-client.test.ts +0 -162
  59. package/hatchet/clients/hatchet-client/hatchet-client.ts +0 -136
  60. package/hatchet/clients/hatchet-client/index.ts +0 -2
  61. package/hatchet/clients/worker/index.ts +0 -1
  62. package/hatchet/clients/worker/worker.test.ts +0 -347
  63. package/hatchet/clients/worker/worker.ts +0 -229
  64. package/hatchet/index.ts +0 -3
  65. package/hatchet/sdk.ts +0 -3
  66. package/hatchet/step.ts +0 -48
  67. package/hatchet/util/config-loader/config-loader.test.ts +0 -79
  68. package/hatchet/util/config-loader/config-loader.ts +0 -91
  69. package/hatchet/util/config-loader/fixtures/.hatchet-invalid.yaml +0 -6
  70. package/hatchet/util/config-loader/fixtures/.hatchet.yaml +0 -8
  71. package/hatchet/util/config-loader/index.ts +0 -1
  72. package/hatchet/util/errors/hatchet-error.ts +0 -8
  73. package/hatchet/util/hatchet-promise/hatchet-promise.test.ts +0 -32
  74. package/hatchet/util/hatchet-promise/hatchet-promise.ts +0 -13
  75. package/hatchet/util/logger/index.ts +0 -1
  76. package/hatchet/util/logger/logger.ts +0 -44
  77. package/hatchet/util/sleep.ts +0 -6
  78. package/hatchet/workflow.ts +0 -30
  79. package/jest.config.ts +0 -205
  80. package/protoc/dispatcher/dispatcher.ts +0 -1101
  81. package/protoc/dispatcher/index.ts +0 -1
  82. package/protoc/events/events.ts +0 -519
  83. package/protoc/google/protobuf/timestamp.ts +0 -210
  84. package/protoc/google/protobuf/wrappers.ts +0 -657
  85. package/protoc/workflows/index.ts +0 -1
  86. package/protoc/workflows/workflows.ts +0 -2158
  87. package/tsconfig.json +0 -120
  88. /package/dist/{hatchet/clients → clients}/hatchet-client/client-config.d.ts +0 -0
  89. /package/dist/{hatchet/clients → clients}/hatchet-client/client-config.js +0 -0
  90. /package/dist/{hatchet/clients → clients}/hatchet-client/index.d.ts +0 -0
  91. /package/dist/{hatchet/clients → clients}/hatchet-client/index.js +0 -0
  92. /package/dist/{hatchet/clients → clients}/worker/index.d.ts +0 -0
  93. /package/dist/{hatchet/clients → clients}/worker/index.js +0 -0
  94. /package/{protoc/events/index.ts → dist/protoc/events/index.d.ts} +0 -0
  95. /package/dist/{hatchet/step.d.ts → step.d.ts} +0 -0
  96. /package/dist/{hatchet/util → util}/config-loader/index.d.ts +0 -0
  97. /package/dist/{hatchet/util → util}/config-loader/index.js +0 -0
  98. /package/dist/{hatchet/util → util}/errors/hatchet-error.d.ts +0 -0
  99. /package/dist/{hatchet/util → util}/errors/hatchet-error.js +0 -0
  100. /package/dist/{hatchet/util → util}/hatchet-promise/hatchet-promise.d.ts +0 -0
  101. /package/dist/{hatchet/util → util}/hatchet-promise/hatchet-promise.js +0 -0
  102. /package/dist/{hatchet/util → util}/logger/index.d.ts +0 -0
  103. /package/dist/{hatchet/util → util}/logger/index.js +0 -0
  104. /package/dist/{hatchet/util → util}/logger/logger.d.ts +0 -0
  105. /package/dist/{hatchet/util → util}/logger/logger.js +0 -0
  106. /package/dist/{hatchet/util → util}/sleep.d.ts +0 -0
  107. /package/dist/{hatchet/util → util}/sleep.js +0 -0
  108. /package/dist/{hatchet/workflow.d.ts → workflow.d.ts} +0 -0
  109. /package/dist/{hatchet/workflow.js → workflow.js} +0 -0
@@ -1,657 +0,0 @@
1
- /* eslint-disable */
2
- import * as _m0 from "protobufjs/minimal";
3
- import Long = require("long");
4
-
5
- export const protobufPackage = "google.protobuf";
6
-
7
- /**
8
- * Wrapper message for `double`.
9
- *
10
- * The JSON representation for `DoubleValue` is JSON number.
11
- */
12
- export interface DoubleValue {
13
- /** The double value. */
14
- value: number;
15
- }
16
-
17
- /**
18
- * Wrapper message for `float`.
19
- *
20
- * The JSON representation for `FloatValue` is JSON number.
21
- */
22
- export interface FloatValue {
23
- /** The float value. */
24
- value: number;
25
- }
26
-
27
- /**
28
- * Wrapper message for `int64`.
29
- *
30
- * The JSON representation for `Int64Value` is JSON string.
31
- */
32
- export interface Int64Value {
33
- /** The int64 value. */
34
- value: number;
35
- }
36
-
37
- /**
38
- * Wrapper message for `uint64`.
39
- *
40
- * The JSON representation for `UInt64Value` is JSON string.
41
- */
42
- export interface UInt64Value {
43
- /** The uint64 value. */
44
- value: number;
45
- }
46
-
47
- /**
48
- * Wrapper message for `int32`.
49
- *
50
- * The JSON representation for `Int32Value` is JSON number.
51
- */
52
- export interface Int32Value {
53
- /** The int32 value. */
54
- value: number;
55
- }
56
-
57
- /**
58
- * Wrapper message for `uint32`.
59
- *
60
- * The JSON representation for `UInt32Value` is JSON number.
61
- */
62
- export interface UInt32Value {
63
- /** The uint32 value. */
64
- value: number;
65
- }
66
-
67
- /**
68
- * Wrapper message for `bool`.
69
- *
70
- * The JSON representation for `BoolValue` is JSON `true` and `false`.
71
- */
72
- export interface BoolValue {
73
- /** The bool value. */
74
- value: boolean;
75
- }
76
-
77
- /**
78
- * Wrapper message for `string`.
79
- *
80
- * The JSON representation for `StringValue` is JSON string.
81
- */
82
- export interface StringValue {
83
- /** The string value. */
84
- value: string;
85
- }
86
-
87
- /**
88
- * Wrapper message for `bytes`.
89
- *
90
- * The JSON representation for `BytesValue` is JSON string.
91
- */
92
- export interface BytesValue {
93
- /** The bytes value. */
94
- value: Uint8Array;
95
- }
96
-
97
- function createBaseDoubleValue(): DoubleValue {
98
- return { value: 0 };
99
- }
100
-
101
- export const DoubleValue = {
102
- encode(message: DoubleValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
103
- if (message.value !== 0) {
104
- writer.uint32(9).double(message.value);
105
- }
106
- return writer;
107
- },
108
-
109
- decode(input: _m0.Reader | Uint8Array, length?: number): DoubleValue {
110
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
111
- let end = length === undefined ? reader.len : reader.pos + length;
112
- const message = createBaseDoubleValue();
113
- while (reader.pos < end) {
114
- const tag = reader.uint32();
115
- switch (tag >>> 3) {
116
- case 1:
117
- if (tag !== 9) {
118
- break;
119
- }
120
-
121
- message.value = reader.double();
122
- continue;
123
- }
124
- if ((tag & 7) === 4 || tag === 0) {
125
- break;
126
- }
127
- reader.skipType(tag & 7);
128
- }
129
- return message;
130
- },
131
-
132
- fromJSON(object: any): DoubleValue {
133
- return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
134
- },
135
-
136
- toJSON(message: DoubleValue): unknown {
137
- const obj: any = {};
138
- if (message.value !== 0) {
139
- obj.value = message.value;
140
- }
141
- return obj;
142
- },
143
-
144
- create(base?: DeepPartial<DoubleValue>): DoubleValue {
145
- return DoubleValue.fromPartial(base ?? {});
146
- },
147
- fromPartial(object: DeepPartial<DoubleValue>): DoubleValue {
148
- const message = createBaseDoubleValue();
149
- message.value = object.value ?? 0;
150
- return message;
151
- },
152
- };
153
-
154
- function createBaseFloatValue(): FloatValue {
155
- return { value: 0 };
156
- }
157
-
158
- export const FloatValue = {
159
- encode(message: FloatValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
160
- if (message.value !== 0) {
161
- writer.uint32(13).float(message.value);
162
- }
163
- return writer;
164
- },
165
-
166
- decode(input: _m0.Reader | Uint8Array, length?: number): FloatValue {
167
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
168
- let end = length === undefined ? reader.len : reader.pos + length;
169
- const message = createBaseFloatValue();
170
- while (reader.pos < end) {
171
- const tag = reader.uint32();
172
- switch (tag >>> 3) {
173
- case 1:
174
- if (tag !== 13) {
175
- break;
176
- }
177
-
178
- message.value = reader.float();
179
- continue;
180
- }
181
- if ((tag & 7) === 4 || tag === 0) {
182
- break;
183
- }
184
- reader.skipType(tag & 7);
185
- }
186
- return message;
187
- },
188
-
189
- fromJSON(object: any): FloatValue {
190
- return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
191
- },
192
-
193
- toJSON(message: FloatValue): unknown {
194
- const obj: any = {};
195
- if (message.value !== 0) {
196
- obj.value = message.value;
197
- }
198
- return obj;
199
- },
200
-
201
- create(base?: DeepPartial<FloatValue>): FloatValue {
202
- return FloatValue.fromPartial(base ?? {});
203
- },
204
- fromPartial(object: DeepPartial<FloatValue>): FloatValue {
205
- const message = createBaseFloatValue();
206
- message.value = object.value ?? 0;
207
- return message;
208
- },
209
- };
210
-
211
- function createBaseInt64Value(): Int64Value {
212
- return { value: 0 };
213
- }
214
-
215
- export const Int64Value = {
216
- encode(message: Int64Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
217
- if (message.value !== 0) {
218
- writer.uint32(8).int64(message.value);
219
- }
220
- return writer;
221
- },
222
-
223
- decode(input: _m0.Reader | Uint8Array, length?: number): Int64Value {
224
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
225
- let end = length === undefined ? reader.len : reader.pos + length;
226
- const message = createBaseInt64Value();
227
- while (reader.pos < end) {
228
- const tag = reader.uint32();
229
- switch (tag >>> 3) {
230
- case 1:
231
- if (tag !== 8) {
232
- break;
233
- }
234
-
235
- message.value = longToNumber(reader.int64() as Long);
236
- continue;
237
- }
238
- if ((tag & 7) === 4 || tag === 0) {
239
- break;
240
- }
241
- reader.skipType(tag & 7);
242
- }
243
- return message;
244
- },
245
-
246
- fromJSON(object: any): Int64Value {
247
- return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
248
- },
249
-
250
- toJSON(message: Int64Value): unknown {
251
- const obj: any = {};
252
- if (message.value !== 0) {
253
- obj.value = Math.round(message.value);
254
- }
255
- return obj;
256
- },
257
-
258
- create(base?: DeepPartial<Int64Value>): Int64Value {
259
- return Int64Value.fromPartial(base ?? {});
260
- },
261
- fromPartial(object: DeepPartial<Int64Value>): Int64Value {
262
- const message = createBaseInt64Value();
263
- message.value = object.value ?? 0;
264
- return message;
265
- },
266
- };
267
-
268
- function createBaseUInt64Value(): UInt64Value {
269
- return { value: 0 };
270
- }
271
-
272
- export const UInt64Value = {
273
- encode(message: UInt64Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
274
- if (message.value !== 0) {
275
- writer.uint32(8).uint64(message.value);
276
- }
277
- return writer;
278
- },
279
-
280
- decode(input: _m0.Reader | Uint8Array, length?: number): UInt64Value {
281
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
282
- let end = length === undefined ? reader.len : reader.pos + length;
283
- const message = createBaseUInt64Value();
284
- while (reader.pos < end) {
285
- const tag = reader.uint32();
286
- switch (tag >>> 3) {
287
- case 1:
288
- if (tag !== 8) {
289
- break;
290
- }
291
-
292
- message.value = longToNumber(reader.uint64() as Long);
293
- continue;
294
- }
295
- if ((tag & 7) === 4 || tag === 0) {
296
- break;
297
- }
298
- reader.skipType(tag & 7);
299
- }
300
- return message;
301
- },
302
-
303
- fromJSON(object: any): UInt64Value {
304
- return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
305
- },
306
-
307
- toJSON(message: UInt64Value): unknown {
308
- const obj: any = {};
309
- if (message.value !== 0) {
310
- obj.value = Math.round(message.value);
311
- }
312
- return obj;
313
- },
314
-
315
- create(base?: DeepPartial<UInt64Value>): UInt64Value {
316
- return UInt64Value.fromPartial(base ?? {});
317
- },
318
- fromPartial(object: DeepPartial<UInt64Value>): UInt64Value {
319
- const message = createBaseUInt64Value();
320
- message.value = object.value ?? 0;
321
- return message;
322
- },
323
- };
324
-
325
- function createBaseInt32Value(): Int32Value {
326
- return { value: 0 };
327
- }
328
-
329
- export const Int32Value = {
330
- encode(message: Int32Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
331
- if (message.value !== 0) {
332
- writer.uint32(8).int32(message.value);
333
- }
334
- return writer;
335
- },
336
-
337
- decode(input: _m0.Reader | Uint8Array, length?: number): Int32Value {
338
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
339
- let end = length === undefined ? reader.len : reader.pos + length;
340
- const message = createBaseInt32Value();
341
- while (reader.pos < end) {
342
- const tag = reader.uint32();
343
- switch (tag >>> 3) {
344
- case 1:
345
- if (tag !== 8) {
346
- break;
347
- }
348
-
349
- message.value = reader.int32();
350
- continue;
351
- }
352
- if ((tag & 7) === 4 || tag === 0) {
353
- break;
354
- }
355
- reader.skipType(tag & 7);
356
- }
357
- return message;
358
- },
359
-
360
- fromJSON(object: any): Int32Value {
361
- return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
362
- },
363
-
364
- toJSON(message: Int32Value): unknown {
365
- const obj: any = {};
366
- if (message.value !== 0) {
367
- obj.value = Math.round(message.value);
368
- }
369
- return obj;
370
- },
371
-
372
- create(base?: DeepPartial<Int32Value>): Int32Value {
373
- return Int32Value.fromPartial(base ?? {});
374
- },
375
- fromPartial(object: DeepPartial<Int32Value>): Int32Value {
376
- const message = createBaseInt32Value();
377
- message.value = object.value ?? 0;
378
- return message;
379
- },
380
- };
381
-
382
- function createBaseUInt32Value(): UInt32Value {
383
- return { value: 0 };
384
- }
385
-
386
- export const UInt32Value = {
387
- encode(message: UInt32Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
388
- if (message.value !== 0) {
389
- writer.uint32(8).uint32(message.value);
390
- }
391
- return writer;
392
- },
393
-
394
- decode(input: _m0.Reader | Uint8Array, length?: number): UInt32Value {
395
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
396
- let end = length === undefined ? reader.len : reader.pos + length;
397
- const message = createBaseUInt32Value();
398
- while (reader.pos < end) {
399
- const tag = reader.uint32();
400
- switch (tag >>> 3) {
401
- case 1:
402
- if (tag !== 8) {
403
- break;
404
- }
405
-
406
- message.value = reader.uint32();
407
- continue;
408
- }
409
- if ((tag & 7) === 4 || tag === 0) {
410
- break;
411
- }
412
- reader.skipType(tag & 7);
413
- }
414
- return message;
415
- },
416
-
417
- fromJSON(object: any): UInt32Value {
418
- return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
419
- },
420
-
421
- toJSON(message: UInt32Value): unknown {
422
- const obj: any = {};
423
- if (message.value !== 0) {
424
- obj.value = Math.round(message.value);
425
- }
426
- return obj;
427
- },
428
-
429
- create(base?: DeepPartial<UInt32Value>): UInt32Value {
430
- return UInt32Value.fromPartial(base ?? {});
431
- },
432
- fromPartial(object: DeepPartial<UInt32Value>): UInt32Value {
433
- const message = createBaseUInt32Value();
434
- message.value = object.value ?? 0;
435
- return message;
436
- },
437
- };
438
-
439
- function createBaseBoolValue(): BoolValue {
440
- return { value: false };
441
- }
442
-
443
- export const BoolValue = {
444
- encode(message: BoolValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
445
- if (message.value === true) {
446
- writer.uint32(8).bool(message.value);
447
- }
448
- return writer;
449
- },
450
-
451
- decode(input: _m0.Reader | Uint8Array, length?: number): BoolValue {
452
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
453
- let end = length === undefined ? reader.len : reader.pos + length;
454
- const message = createBaseBoolValue();
455
- while (reader.pos < end) {
456
- const tag = reader.uint32();
457
- switch (tag >>> 3) {
458
- case 1:
459
- if (tag !== 8) {
460
- break;
461
- }
462
-
463
- message.value = reader.bool();
464
- continue;
465
- }
466
- if ((tag & 7) === 4 || tag === 0) {
467
- break;
468
- }
469
- reader.skipType(tag & 7);
470
- }
471
- return message;
472
- },
473
-
474
- fromJSON(object: any): BoolValue {
475
- return { value: isSet(object.value) ? globalThis.Boolean(object.value) : false };
476
- },
477
-
478
- toJSON(message: BoolValue): unknown {
479
- const obj: any = {};
480
- if (message.value === true) {
481
- obj.value = message.value;
482
- }
483
- return obj;
484
- },
485
-
486
- create(base?: DeepPartial<BoolValue>): BoolValue {
487
- return BoolValue.fromPartial(base ?? {});
488
- },
489
- fromPartial(object: DeepPartial<BoolValue>): BoolValue {
490
- const message = createBaseBoolValue();
491
- message.value = object.value ?? false;
492
- return message;
493
- },
494
- };
495
-
496
- function createBaseStringValue(): StringValue {
497
- return { value: "" };
498
- }
499
-
500
- export const StringValue = {
501
- encode(message: StringValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
502
- if (message.value !== "") {
503
- writer.uint32(10).string(message.value);
504
- }
505
- return writer;
506
- },
507
-
508
- decode(input: _m0.Reader | Uint8Array, length?: number): StringValue {
509
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
510
- let end = length === undefined ? reader.len : reader.pos + length;
511
- const message = createBaseStringValue();
512
- while (reader.pos < end) {
513
- const tag = reader.uint32();
514
- switch (tag >>> 3) {
515
- case 1:
516
- if (tag !== 10) {
517
- break;
518
- }
519
-
520
- message.value = reader.string();
521
- continue;
522
- }
523
- if ((tag & 7) === 4 || tag === 0) {
524
- break;
525
- }
526
- reader.skipType(tag & 7);
527
- }
528
- return message;
529
- },
530
-
531
- fromJSON(object: any): StringValue {
532
- return { value: isSet(object.value) ? globalThis.String(object.value) : "" };
533
- },
534
-
535
- toJSON(message: StringValue): unknown {
536
- const obj: any = {};
537
- if (message.value !== "") {
538
- obj.value = message.value;
539
- }
540
- return obj;
541
- },
542
-
543
- create(base?: DeepPartial<StringValue>): StringValue {
544
- return StringValue.fromPartial(base ?? {});
545
- },
546
- fromPartial(object: DeepPartial<StringValue>): StringValue {
547
- const message = createBaseStringValue();
548
- message.value = object.value ?? "";
549
- return message;
550
- },
551
- };
552
-
553
- function createBaseBytesValue(): BytesValue {
554
- return { value: new Uint8Array(0) };
555
- }
556
-
557
- export const BytesValue = {
558
- encode(message: BytesValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
559
- if (message.value.length !== 0) {
560
- writer.uint32(10).bytes(message.value);
561
- }
562
- return writer;
563
- },
564
-
565
- decode(input: _m0.Reader | Uint8Array, length?: number): BytesValue {
566
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
567
- let end = length === undefined ? reader.len : reader.pos + length;
568
- const message = createBaseBytesValue();
569
- while (reader.pos < end) {
570
- const tag = reader.uint32();
571
- switch (tag >>> 3) {
572
- case 1:
573
- if (tag !== 10) {
574
- break;
575
- }
576
-
577
- message.value = reader.bytes();
578
- continue;
579
- }
580
- if ((tag & 7) === 4 || tag === 0) {
581
- break;
582
- }
583
- reader.skipType(tag & 7);
584
- }
585
- return message;
586
- },
587
-
588
- fromJSON(object: any): BytesValue {
589
- return { value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0) };
590
- },
591
-
592
- toJSON(message: BytesValue): unknown {
593
- const obj: any = {};
594
- if (message.value.length !== 0) {
595
- obj.value = base64FromBytes(message.value);
596
- }
597
- return obj;
598
- },
599
-
600
- create(base?: DeepPartial<BytesValue>): BytesValue {
601
- return BytesValue.fromPartial(base ?? {});
602
- },
603
- fromPartial(object: DeepPartial<BytesValue>): BytesValue {
604
- const message = createBaseBytesValue();
605
- message.value = object.value ?? new Uint8Array(0);
606
- return message;
607
- },
608
- };
609
-
610
- function bytesFromBase64(b64: string): Uint8Array {
611
- if (globalThis.Buffer) {
612
- return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
613
- } else {
614
- const bin = globalThis.atob(b64);
615
- const arr = new Uint8Array(bin.length);
616
- for (let i = 0; i < bin.length; ++i) {
617
- arr[i] = bin.charCodeAt(i);
618
- }
619
- return arr;
620
- }
621
- }
622
-
623
- function base64FromBytes(arr: Uint8Array): string {
624
- if (globalThis.Buffer) {
625
- return globalThis.Buffer.from(arr).toString("base64");
626
- } else {
627
- const bin: string[] = [];
628
- arr.forEach((byte) => {
629
- bin.push(globalThis.String.fromCharCode(byte));
630
- });
631
- return globalThis.btoa(bin.join(""));
632
- }
633
- }
634
-
635
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
636
-
637
- export type DeepPartial<T> = T extends Builtin ? T
638
- : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
639
- : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
640
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
641
- : Partial<T>;
642
-
643
- function longToNumber(long: Long): number {
644
- if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
645
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
646
- }
647
- return long.toNumber();
648
- }
649
-
650
- if (_m0.util.Long !== Long) {
651
- _m0.util.Long = Long as any;
652
- _m0.configure();
653
- }
654
-
655
- function isSet(value: any): boolean {
656
- return value !== null && value !== undefined;
657
- }
@@ -1 +0,0 @@
1
- export * from './workflows';