@stinkycomputing/sesame-api-client 1.4.1-beta.2 → 1.4.1-beta.4

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.
package/dist/index.cjs CHANGED
@@ -4120,8 +4120,7 @@ var sesame = $root.sesame = (() => {
4120
4120
  values[valuesById[1] = "EVENT_TOPIC_ERROR"] = 1;
4121
4121
  values[valuesById[2] = "EVENT_TOPIC_TRANSPORT"] = 2;
4122
4122
  values[valuesById[3] = "EVENT_TOPIC_CALLBACK"] = 3;
4123
- values[valuesById[4] = "EVENT_TOPIC_PLAYLIST_EXPORT"] = 4;
4124
- values[valuesById[5] = "EVENT_TOPIC_CLIP_IMPORT"] = 5;
4123
+ values[valuesById[4] = "EVENT_TOPIC_JOB"] = 4;
4125
4124
  values[valuesById[6] = "EVENT_TOPIC_RECORDER"] = 6;
4126
4125
  return values;
4127
4126
  }();
@@ -13912,12 +13911,11 @@ var sesame = $root.sesame = (() => {
13912
13911
  Event2.prototype.errorEvent = null;
13913
13912
  Event2.prototype.transportEvent = null;
13914
13913
  Event2.prototype.callbackEvent = null;
13915
- Event2.prototype.playlistExportEvent = null;
13916
- Event2.prototype.clipImportEvent = null;
13914
+ Event2.prototype.jobEvent = null;
13917
13915
  Event2.prototype.recorderEvent = null;
13918
13916
  let $oneOfFields;
13919
13917
  Object.defineProperty(Event2.prototype, "event", {
13920
- get: $util.oneOfGetter($oneOfFields = ["errorEvent", "transportEvent", "callbackEvent", "playlistExportEvent", "clipImportEvent", "recorderEvent"]),
13918
+ get: $util.oneOfGetter($oneOfFields = ["errorEvent", "transportEvent", "callbackEvent", "jobEvent", "recorderEvent"]),
13921
13919
  set: $util.oneOfSetter($oneOfFields)
13922
13920
  });
13923
13921
  Event2.create = function create(properties) {
@@ -13941,16 +13939,11 @@ var sesame = $root.sesame = (() => {
13941
13939
  /* id 3, wireType 2 =*/
13942
13940
  26
13943
13941
  ).fork()).ldelim();
13944
- if (message.playlistExportEvent != null && Object.hasOwnProperty.call(message, "playlistExportEvent"))
13945
- $root.sesame.v1.jobs.JobEvent.encode(message.playlistExportEvent, writer.uint32(
13942
+ if (message.jobEvent != null && Object.hasOwnProperty.call(message, "jobEvent"))
13943
+ $root.sesame.v1.jobs.JobList.encode(message.jobEvent, writer.uint32(
13946
13944
  /* id 4, wireType 2 =*/
13947
13945
  34
13948
13946
  ).fork()).ldelim();
13949
- if (message.clipImportEvent != null && Object.hasOwnProperty.call(message, "clipImportEvent"))
13950
- $root.sesame.v1.jobs.JobEvent.encode(message.clipImportEvent, writer.uint32(
13951
- /* id 5, wireType 2 =*/
13952
- 42
13953
- ).fork()).ldelim();
13954
13947
  if (message.recorderEvent != null && Object.hasOwnProperty.call(message, "recorderEvent"))
13955
13948
  $root.sesame.v1.recorder.RecorderEvent.encode(message.recorderEvent, writer.uint32(
13956
13949
  /* id 6, wireType 2 =*/
@@ -13983,11 +13976,7 @@ var sesame = $root.sesame = (() => {
13983
13976
  break;
13984
13977
  }
13985
13978
  case 4: {
13986
- message.playlistExportEvent = $root.sesame.v1.jobs.JobEvent.decode(reader, reader.uint32());
13987
- break;
13988
- }
13989
- case 5: {
13990
- message.clipImportEvent = $root.sesame.v1.jobs.JobEvent.decode(reader, reader.uint32());
13979
+ message.jobEvent = $root.sesame.v1.jobs.JobList.decode(reader, reader.uint32());
13991
13980
  break;
13992
13981
  }
13993
13982
  case 6: {
@@ -14038,24 +14027,14 @@ var sesame = $root.sesame = (() => {
14038
14027
  return "callbackEvent." + error;
14039
14028
  }
14040
14029
  }
14041
- if (message.playlistExportEvent != null && message.hasOwnProperty("playlistExportEvent")) {
14042
- if (properties.event === 1)
14043
- return "event: multiple values";
14044
- properties.event = 1;
14045
- {
14046
- let error = $root.sesame.v1.jobs.JobEvent.verify(message.playlistExportEvent);
14047
- if (error)
14048
- return "playlistExportEvent." + error;
14049
- }
14050
- }
14051
- if (message.clipImportEvent != null && message.hasOwnProperty("clipImportEvent")) {
14030
+ if (message.jobEvent != null && message.hasOwnProperty("jobEvent")) {
14052
14031
  if (properties.event === 1)
14053
14032
  return "event: multiple values";
14054
14033
  properties.event = 1;
14055
14034
  {
14056
- let error = $root.sesame.v1.jobs.JobEvent.verify(message.clipImportEvent);
14035
+ let error = $root.sesame.v1.jobs.JobList.verify(message.jobEvent);
14057
14036
  if (error)
14058
- return "clipImportEvent." + error;
14037
+ return "jobEvent." + error;
14059
14038
  }
14060
14039
  }
14061
14040
  if (message.recorderEvent != null && message.hasOwnProperty("recorderEvent")) {
@@ -14089,15 +14068,10 @@ var sesame = $root.sesame = (() => {
14089
14068
  throw TypeError(".sesame.v1.status.Event.callbackEvent: object expected");
14090
14069
  message.callbackEvent = $root.sesame.v1.common.Callback.fromObject(object.callbackEvent);
14091
14070
  }
14092
- if (object.playlistExportEvent != null) {
14093
- if (typeof object.playlistExportEvent !== "object")
14094
- throw TypeError(".sesame.v1.status.Event.playlistExportEvent: object expected");
14095
- message.playlistExportEvent = $root.sesame.v1.jobs.JobEvent.fromObject(object.playlistExportEvent);
14096
- }
14097
- if (object.clipImportEvent != null) {
14098
- if (typeof object.clipImportEvent !== "object")
14099
- throw TypeError(".sesame.v1.status.Event.clipImportEvent: object expected");
14100
- message.clipImportEvent = $root.sesame.v1.jobs.JobEvent.fromObject(object.clipImportEvent);
14071
+ if (object.jobEvent != null) {
14072
+ if (typeof object.jobEvent !== "object")
14073
+ throw TypeError(".sesame.v1.status.Event.jobEvent: object expected");
14074
+ message.jobEvent = $root.sesame.v1.jobs.JobList.fromObject(object.jobEvent);
14101
14075
  }
14102
14076
  if (object.recorderEvent != null) {
14103
14077
  if (typeof object.recorderEvent !== "object")
@@ -14125,15 +14099,10 @@ var sesame = $root.sesame = (() => {
14125
14099
  if (options.oneofs)
14126
14100
  object.event = "callbackEvent";
14127
14101
  }
14128
- if (message.playlistExportEvent != null && message.hasOwnProperty("playlistExportEvent")) {
14129
- object.playlistExportEvent = $root.sesame.v1.jobs.JobEvent.toObject(message.playlistExportEvent, options);
14130
- if (options.oneofs)
14131
- object.event = "playlistExportEvent";
14132
- }
14133
- if (message.clipImportEvent != null && message.hasOwnProperty("clipImportEvent")) {
14134
- object.clipImportEvent = $root.sesame.v1.jobs.JobEvent.toObject(message.clipImportEvent, options);
14102
+ if (message.jobEvent != null && message.hasOwnProperty("jobEvent")) {
14103
+ object.jobEvent = $root.sesame.v1.jobs.JobList.toObject(message.jobEvent, options);
14135
14104
  if (options.oneofs)
14136
- object.event = "clipImportEvent";
14105
+ object.event = "jobEvent";
14137
14106
  }
14138
14107
  if (message.recorderEvent != null && message.hasOwnProperty("recorderEvent")) {
14139
14108
  object.recorderEvent = $root.sesame.v1.recorder.RecorderEvent.toObject(message.recorderEvent, options);
@@ -14244,7 +14213,6 @@ var sesame = $root.sesame = (() => {
14244
14213
  case 2:
14245
14214
  case 3:
14246
14215
  case 4:
14247
- case 5:
14248
14216
  case 6:
14249
14217
  break;
14250
14218
  }
@@ -14289,14 +14257,10 @@ var sesame = $root.sesame = (() => {
14289
14257
  case 3:
14290
14258
  message.eventTopics[i] = 3;
14291
14259
  break;
14292
- case "EVENT_TOPIC_PLAYLIST_EXPORT":
14260
+ case "EVENT_TOPIC_JOB":
14293
14261
  case 4:
14294
14262
  message.eventTopics[i] = 4;
14295
14263
  break;
14296
- case "EVENT_TOPIC_CLIP_IMPORT":
14297
- case 5:
14298
- message.eventTopics[i] = 5;
14299
- break;
14300
14264
  case "EVENT_TOPIC_RECORDER":
14301
14265
  case 6:
14302
14266
  message.eventTopics[i] = 6;
@@ -18204,6 +18168,13 @@ var sesame = $root.sesame = (() => {
18204
18168
  }();
18205
18169
  v1.jobs = function() {
18206
18170
  const jobs = {};
18171
+ jobs.JobType = function() {
18172
+ const valuesById = {}, values = Object.create(valuesById);
18173
+ values[valuesById[0] = "JOB_TYPE_UNSPECIFIED"] = 0;
18174
+ values[valuesById[1] = "JOB_TYPE_EXPORT"] = 1;
18175
+ values[valuesById[2] = "JOB_TYPE_IMPORT"] = 2;
18176
+ return values;
18177
+ }();
18207
18178
  jobs.JobStatus = function() {
18208
18179
  const valuesById = {}, values = Object.create(valuesById);
18209
18180
  values[valuesById[0] = "JOB_STATUS_UNSPECIFIED"] = 0;
@@ -18378,107 +18349,131 @@ var sesame = $root.sesame = (() => {
18378
18349
  };
18379
18350
  return TimingInfo;
18380
18351
  }();
18381
- jobs.JobStatusResponse = function() {
18382
- function JobStatusResponse(properties) {
18352
+ jobs.Job = function() {
18353
+ function Job(properties) {
18383
18354
  if (properties) {
18384
18355
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
18385
18356
  if (properties[keys[i]] != null)
18386
18357
  this[keys[i]] = properties[keys[i]];
18387
18358
  }
18388
18359
  }
18389
- JobStatusResponse.prototype.jobId = 0;
18390
- JobStatusResponse.prototype.name = "";
18391
- JobStatusResponse.prototype.description = "";
18392
- JobStatusResponse.prototype.status = 0;
18393
- JobStatusResponse.prototype.error = null;
18394
- JobStatusResponse.prototype.progress = 0;
18395
- JobStatusResponse.prototype.total = 0;
18360
+ Job.prototype.id = 0;
18361
+ Job.prototype.type = 0;
18362
+ Job.prototype.status = 0;
18363
+ Job.prototype.name = "";
18364
+ Job.prototype.description = "";
18365
+ Job.prototype.error = null;
18366
+ Job.prototype.progress = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
18367
+ Job.prototype.total = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
18368
+ Job.prototype.timingInfo = null;
18396
18369
  let $oneOfFields;
18397
- Object.defineProperty(JobStatusResponse.prototype, "_error", {
18370
+ Object.defineProperty(Job.prototype, "_error", {
18398
18371
  get: $util.oneOfGetter($oneOfFields = ["error"]),
18399
18372
  set: $util.oneOfSetter($oneOfFields)
18400
18373
  });
18401
- JobStatusResponse.create = function create(properties) {
18402
- return new JobStatusResponse(properties);
18374
+ Object.defineProperty(Job.prototype, "_timingInfo", {
18375
+ get: $util.oneOfGetter($oneOfFields = ["timingInfo"]),
18376
+ set: $util.oneOfSetter($oneOfFields)
18377
+ });
18378
+ Job.create = function create(properties) {
18379
+ return new Job(properties);
18403
18380
  };
18404
- JobStatusResponse.encode = function encode(message, writer) {
18381
+ Job.encode = function encode(message, writer) {
18405
18382
  if (!writer)
18406
18383
  writer = $Writer.create();
18407
- if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
18384
+ if (message.id != null && Object.hasOwnProperty.call(message, "id"))
18408
18385
  writer.uint32(
18409
18386
  /* id 1, wireType 0 =*/
18410
18387
  8
18411
- ).uint32(message.jobId);
18388
+ ).uint32(message.id);
18389
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
18390
+ writer.uint32(
18391
+ /* id 2, wireType 0 =*/
18392
+ 16
18393
+ ).int32(message.type);
18394
+ if (message.status != null && Object.hasOwnProperty.call(message, "status"))
18395
+ writer.uint32(
18396
+ /* id 3, wireType 0 =*/
18397
+ 24
18398
+ ).int32(message.status);
18412
18399
  if (message.name != null && Object.hasOwnProperty.call(message, "name"))
18413
18400
  writer.uint32(
18414
- /* id 2, wireType 2 =*/
18415
- 18
18401
+ /* id 4, wireType 2 =*/
18402
+ 34
18416
18403
  ).string(message.name);
18417
18404
  if (message.description != null && Object.hasOwnProperty.call(message, "description"))
18418
18405
  writer.uint32(
18419
- /* id 3, wireType 2 =*/
18420
- 26
18406
+ /* id 5, wireType 2 =*/
18407
+ 42
18421
18408
  ).string(message.description);
18422
- if (message.status != null && Object.hasOwnProperty.call(message, "status"))
18423
- writer.uint32(
18424
- /* id 4, wireType 0 =*/
18425
- 32
18426
- ).int32(message.status);
18427
18409
  if (message.error != null && Object.hasOwnProperty.call(message, "error"))
18428
18410
  writer.uint32(
18429
- /* id 5, wireType 2 =*/
18430
- 42
18411
+ /* id 6, wireType 2 =*/
18412
+ 50
18431
18413
  ).string(message.error);
18432
18414
  if (message.progress != null && Object.hasOwnProperty.call(message, "progress"))
18433
- writer.uint32(
18434
- /* id 6, wireType 0 =*/
18435
- 48
18436
- ).uint32(message.progress);
18437
- if (message.total != null && Object.hasOwnProperty.call(message, "total"))
18438
18415
  writer.uint32(
18439
18416
  /* id 7, wireType 0 =*/
18440
18417
  56
18441
- ).uint32(message.total);
18418
+ ).int64(message.progress);
18419
+ if (message.total != null && Object.hasOwnProperty.call(message, "total"))
18420
+ writer.uint32(
18421
+ /* id 8, wireType 0 =*/
18422
+ 64
18423
+ ).int64(message.total);
18424
+ if (message.timingInfo != null && Object.hasOwnProperty.call(message, "timingInfo"))
18425
+ $root.sesame.v1.jobs.TimingInfo.encode(message.timingInfo, writer.uint32(
18426
+ /* id 9, wireType 2 =*/
18427
+ 74
18428
+ ).fork()).ldelim();
18442
18429
  return writer;
18443
18430
  };
18444
- JobStatusResponse.encodeDelimited = function encodeDelimited(message, writer) {
18431
+ Job.encodeDelimited = function encodeDelimited(message, writer) {
18445
18432
  return this.encode(message, writer).ldelim();
18446
18433
  };
18447
- JobStatusResponse.decode = function decode(reader, length, error) {
18434
+ Job.decode = function decode(reader, length, error) {
18448
18435
  if (!(reader instanceof $Reader))
18449
18436
  reader = $Reader.create(reader);
18450
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobStatusResponse();
18437
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.Job();
18451
18438
  while (reader.pos < end) {
18452
18439
  let tag = reader.uint32();
18453
18440
  if (tag === error)
18454
18441
  break;
18455
18442
  switch (tag >>> 3) {
18456
18443
  case 1: {
18457
- message.jobId = reader.uint32();
18444
+ message.id = reader.uint32();
18458
18445
  break;
18459
18446
  }
18460
18447
  case 2: {
18461
- message.name = reader.string();
18448
+ message.type = reader.int32();
18462
18449
  break;
18463
18450
  }
18464
18451
  case 3: {
18465
- message.description = reader.string();
18452
+ message.status = reader.int32();
18466
18453
  break;
18467
18454
  }
18468
18455
  case 4: {
18469
- message.status = reader.int32();
18456
+ message.name = reader.string();
18470
18457
  break;
18471
18458
  }
18472
18459
  case 5: {
18473
- message.error = reader.string();
18460
+ message.description = reader.string();
18474
18461
  break;
18475
18462
  }
18476
18463
  case 6: {
18477
- message.progress = reader.uint32();
18464
+ message.error = reader.string();
18478
18465
  break;
18479
18466
  }
18480
18467
  case 7: {
18481
- message.total = reader.uint32();
18468
+ message.progress = reader.int64();
18469
+ break;
18470
+ }
18471
+ case 8: {
18472
+ message.total = reader.int64();
18473
+ break;
18474
+ }
18475
+ case 9: {
18476
+ message.timingInfo = $root.sesame.v1.jobs.TimingInfo.decode(reader, reader.uint32());
18482
18477
  break;
18483
18478
  }
18484
18479
  default:
@@ -18488,27 +18483,28 @@ var sesame = $root.sesame = (() => {
18488
18483
  }
18489
18484
  return message;
18490
18485
  };
18491
- JobStatusResponse.decodeDelimited = function decodeDelimited(reader) {
18486
+ Job.decodeDelimited = function decodeDelimited(reader) {
18492
18487
  if (!(reader instanceof $Reader))
18493
18488
  reader = new $Reader(reader);
18494
18489
  return this.decode(reader, reader.uint32());
18495
18490
  };
18496
- JobStatusResponse.verify = function verify(message) {
18491
+ Job.verify = function verify(message) {
18497
18492
  if (typeof message !== "object" || message === null)
18498
18493
  return "object expected";
18499
18494
  let properties = {};
18500
- if (message.jobId != null && message.hasOwnProperty("jobId")) {
18501
- if (!$util.isInteger(message.jobId))
18502
- return "jobId: integer expected";
18503
- }
18504
- if (message.name != null && message.hasOwnProperty("name")) {
18505
- if (!$util.isString(message.name))
18506
- return "name: string expected";
18507
- }
18508
- if (message.description != null && message.hasOwnProperty("description")) {
18509
- if (!$util.isString(message.description))
18510
- return "description: string expected";
18495
+ if (message.id != null && message.hasOwnProperty("id")) {
18496
+ if (!$util.isInteger(message.id))
18497
+ return "id: integer expected";
18511
18498
  }
18499
+ if (message.type != null && message.hasOwnProperty("type"))
18500
+ switch (message.type) {
18501
+ default:
18502
+ return "type: enum value expected";
18503
+ case 0:
18504
+ case 1:
18505
+ case 2:
18506
+ break;
18507
+ }
18512
18508
  if (message.status != null && message.hasOwnProperty("status"))
18513
18509
  switch (message.status) {
18514
18510
  default:
@@ -18521,31 +18517,63 @@ var sesame = $root.sesame = (() => {
18521
18517
  case 5:
18522
18518
  break;
18523
18519
  }
18520
+ if (message.name != null && message.hasOwnProperty("name")) {
18521
+ if (!$util.isString(message.name))
18522
+ return "name: string expected";
18523
+ }
18524
+ if (message.description != null && message.hasOwnProperty("description")) {
18525
+ if (!$util.isString(message.description))
18526
+ return "description: string expected";
18527
+ }
18524
18528
  if (message.error != null && message.hasOwnProperty("error")) {
18525
18529
  properties._error = 1;
18526
18530
  if (!$util.isString(message.error))
18527
18531
  return "error: string expected";
18528
18532
  }
18529
18533
  if (message.progress != null && message.hasOwnProperty("progress")) {
18530
- if (!$util.isInteger(message.progress))
18531
- return "progress: integer expected";
18534
+ if (!$util.isInteger(message.progress) && !(message.progress && $util.isInteger(message.progress.low) && $util.isInteger(message.progress.high)))
18535
+ return "progress: integer|Long expected";
18532
18536
  }
18533
18537
  if (message.total != null && message.hasOwnProperty("total")) {
18534
- if (!$util.isInteger(message.total))
18535
- return "total: integer expected";
18538
+ if (!$util.isInteger(message.total) && !(message.total && $util.isInteger(message.total.low) && $util.isInteger(message.total.high)))
18539
+ return "total: integer|Long expected";
18540
+ }
18541
+ if (message.timingInfo != null && message.hasOwnProperty("timingInfo")) {
18542
+ properties._timingInfo = 1;
18543
+ {
18544
+ let error = $root.sesame.v1.jobs.TimingInfo.verify(message.timingInfo);
18545
+ if (error)
18546
+ return "timingInfo." + error;
18547
+ }
18536
18548
  }
18537
18549
  return null;
18538
18550
  };
18539
- JobStatusResponse.fromObject = function fromObject(object) {
18540
- if (object instanceof $root.sesame.v1.jobs.JobStatusResponse)
18551
+ Job.fromObject = function fromObject(object) {
18552
+ if (object instanceof $root.sesame.v1.jobs.Job)
18541
18553
  return object;
18542
- let message = new $root.sesame.v1.jobs.JobStatusResponse();
18543
- if (object.jobId != null)
18544
- message.jobId = object.jobId >>> 0;
18545
- if (object.name != null)
18546
- message.name = String(object.name);
18547
- if (object.description != null)
18548
- message.description = String(object.description);
18554
+ let message = new $root.sesame.v1.jobs.Job();
18555
+ if (object.id != null)
18556
+ message.id = object.id >>> 0;
18557
+ switch (object.type) {
18558
+ default:
18559
+ if (typeof object.type === "number") {
18560
+ message.type = object.type;
18561
+ break;
18562
+ }
18563
+ break;
18564
+ case "JOB_TYPE_UNSPECIFIED":
18565
+ case 0:
18566
+ message.type = 0;
18567
+ break;
18568
+ case "JOB_TYPE_EXPORT":
18569
+ case 1:
18570
+ message.type = 1;
18571
+ break;
18572
+ case "JOB_TYPE_IMPORT":
18573
+ case 2:
18574
+ message.type = 2;
18575
+ break;
18576
+ }
18549
18577
  switch (object.status) {
18550
18578
  default:
18551
18579
  if (typeof object.status === "number") {
@@ -18578,58 +18606,105 @@ var sesame = $root.sesame = (() => {
18578
18606
  message.status = 5;
18579
18607
  break;
18580
18608
  }
18609
+ if (object.name != null)
18610
+ message.name = String(object.name);
18611
+ if (object.description != null)
18612
+ message.description = String(object.description);
18581
18613
  if (object.error != null)
18582
18614
  message.error = String(object.error);
18583
- if (object.progress != null)
18584
- message.progress = object.progress >>> 0;
18585
- if (object.total != null)
18586
- message.total = object.total >>> 0;
18615
+ if (object.progress != null) {
18616
+ if ($util.Long)
18617
+ (message.progress = $util.Long.fromValue(object.progress)).unsigned = false;
18618
+ else if (typeof object.progress === "string")
18619
+ message.progress = parseInt(object.progress, 10);
18620
+ else if (typeof object.progress === "number")
18621
+ message.progress = object.progress;
18622
+ else if (typeof object.progress === "object")
18623
+ message.progress = new $util.LongBits(object.progress.low >>> 0, object.progress.high >>> 0).toNumber();
18624
+ }
18625
+ if (object.total != null) {
18626
+ if ($util.Long)
18627
+ (message.total = $util.Long.fromValue(object.total)).unsigned = false;
18628
+ else if (typeof object.total === "string")
18629
+ message.total = parseInt(object.total, 10);
18630
+ else if (typeof object.total === "number")
18631
+ message.total = object.total;
18632
+ else if (typeof object.total === "object")
18633
+ message.total = new $util.LongBits(object.total.low >>> 0, object.total.high >>> 0).toNumber();
18634
+ }
18635
+ if (object.timingInfo != null) {
18636
+ if (typeof object.timingInfo !== "object")
18637
+ throw TypeError(".sesame.v1.jobs.Job.timingInfo: object expected");
18638
+ message.timingInfo = $root.sesame.v1.jobs.TimingInfo.fromObject(object.timingInfo);
18639
+ }
18587
18640
  return message;
18588
18641
  };
18589
- JobStatusResponse.toObject = function toObject(message, options) {
18642
+ Job.toObject = function toObject(message, options) {
18590
18643
  if (!options)
18591
18644
  options = {};
18592
18645
  let object = {};
18593
18646
  if (options.defaults) {
18594
- object.jobId = 0;
18647
+ object.id = 0;
18648
+ object.type = options.enums === String ? "JOB_TYPE_UNSPECIFIED" : 0;
18649
+ object.status = options.enums === String ? "JOB_STATUS_UNSPECIFIED" : 0;
18595
18650
  object.name = "";
18596
18651
  object.description = "";
18597
- object.status = options.enums === String ? "JOB_STATUS_UNSPECIFIED" : 0;
18598
- object.progress = 0;
18599
- object.total = 0;
18652
+ if ($util.Long) {
18653
+ let long = new $util.Long(0, 0, false);
18654
+ object.progress = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
18655
+ } else
18656
+ object.progress = options.longs === String ? "0" : 0;
18657
+ if ($util.Long) {
18658
+ let long = new $util.Long(0, 0, false);
18659
+ object.total = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
18660
+ } else
18661
+ object.total = options.longs === String ? "0" : 0;
18600
18662
  }
18601
- if (message.jobId != null && message.hasOwnProperty("jobId"))
18602
- object.jobId = message.jobId;
18663
+ if (message.id != null && message.hasOwnProperty("id"))
18664
+ object.id = message.id;
18665
+ if (message.type != null && message.hasOwnProperty("type"))
18666
+ object.type = options.enums === String ? $root.sesame.v1.jobs.JobType[message.type] === void 0 ? message.type : $root.sesame.v1.jobs.JobType[message.type] : message.type;
18667
+ if (message.status != null && message.hasOwnProperty("status"))
18668
+ object.status = options.enums === String ? $root.sesame.v1.jobs.JobStatus[message.status] === void 0 ? message.status : $root.sesame.v1.jobs.JobStatus[message.status] : message.status;
18603
18669
  if (message.name != null && message.hasOwnProperty("name"))
18604
18670
  object.name = message.name;
18605
18671
  if (message.description != null && message.hasOwnProperty("description"))
18606
18672
  object.description = message.description;
18607
- if (message.status != null && message.hasOwnProperty("status"))
18608
- object.status = options.enums === String ? $root.sesame.v1.jobs.JobStatus[message.status] === void 0 ? message.status : $root.sesame.v1.jobs.JobStatus[message.status] : message.status;
18609
18673
  if (message.error != null && message.hasOwnProperty("error")) {
18610
18674
  object.error = message.error;
18611
18675
  if (options.oneofs)
18612
18676
  object._error = "error";
18613
18677
  }
18614
18678
  if (message.progress != null && message.hasOwnProperty("progress"))
18615
- object.progress = message.progress;
18679
+ if (typeof message.progress === "number")
18680
+ object.progress = options.longs === String ? String(message.progress) : message.progress;
18681
+ else
18682
+ object.progress = options.longs === String ? $util.Long.prototype.toString.call(message.progress) : options.longs === Number ? new $util.LongBits(message.progress.low >>> 0, message.progress.high >>> 0).toNumber() : message.progress;
18616
18683
  if (message.total != null && message.hasOwnProperty("total"))
18617
- object.total = message.total;
18684
+ if (typeof message.total === "number")
18685
+ object.total = options.longs === String ? String(message.total) : message.total;
18686
+ else
18687
+ object.total = options.longs === String ? $util.Long.prototype.toString.call(message.total) : options.longs === Number ? new $util.LongBits(message.total.low >>> 0, message.total.high >>> 0).toNumber() : message.total;
18688
+ if (message.timingInfo != null && message.hasOwnProperty("timingInfo")) {
18689
+ object.timingInfo = $root.sesame.v1.jobs.TimingInfo.toObject(message.timingInfo, options);
18690
+ if (options.oneofs)
18691
+ object._timingInfo = "timingInfo";
18692
+ }
18618
18693
  return object;
18619
18694
  };
18620
- JobStatusResponse.prototype.toJSON = function toJSON() {
18695
+ Job.prototype.toJSON = function toJSON() {
18621
18696
  return this.constructor.toObject(this, import_minimal.default.util.toJSONOptions);
18622
18697
  };
18623
- JobStatusResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
18698
+ Job.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
18624
18699
  if (typeUrlPrefix === void 0) {
18625
18700
  typeUrlPrefix = "type.googleapis.com";
18626
18701
  }
18627
- return typeUrlPrefix + "/sesame.v1.jobs.JobStatusResponse";
18702
+ return typeUrlPrefix + "/sesame.v1.jobs.Job";
18628
18703
  };
18629
- return JobStatusResponse;
18704
+ return Job;
18630
18705
  }();
18631
- jobs.JobListResponse = function() {
18632
- function JobListResponse(properties) {
18706
+ jobs.JobList = function() {
18707
+ function JobList(properties) {
18633
18708
  this.jobs = [];
18634
18709
  if (properties) {
18635
18710
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
@@ -18637,28 +18712,28 @@ var sesame = $root.sesame = (() => {
18637
18712
  this[keys[i]] = properties[keys[i]];
18638
18713
  }
18639
18714
  }
18640
- JobListResponse.prototype.jobs = $util.emptyArray;
18641
- JobListResponse.create = function create(properties) {
18642
- return new JobListResponse(properties);
18715
+ JobList.prototype.jobs = $util.emptyArray;
18716
+ JobList.create = function create(properties) {
18717
+ return new JobList(properties);
18643
18718
  };
18644
- JobListResponse.encode = function encode(message, writer) {
18719
+ JobList.encode = function encode(message, writer) {
18645
18720
  if (!writer)
18646
18721
  writer = $Writer.create();
18647
18722
  if (message.jobs != null && message.jobs.length)
18648
18723
  for (let i = 0; i < message.jobs.length; ++i)
18649
- $root.sesame.v1.jobs.JobStatusResponse.encode(message.jobs[i], writer.uint32(
18724
+ $root.sesame.v1.jobs.Job.encode(message.jobs[i], writer.uint32(
18650
18725
  /* id 1, wireType 2 =*/
18651
18726
  10
18652
18727
  ).fork()).ldelim();
18653
18728
  return writer;
18654
18729
  };
18655
- JobListResponse.encodeDelimited = function encodeDelimited(message, writer) {
18730
+ JobList.encodeDelimited = function encodeDelimited(message, writer) {
18656
18731
  return this.encode(message, writer).ldelim();
18657
18732
  };
18658
- JobListResponse.decode = function decode(reader, length, error) {
18733
+ JobList.decode = function decode(reader, length, error) {
18659
18734
  if (!(reader instanceof $Reader))
18660
18735
  reader = $Reader.create(reader);
18661
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobListResponse();
18736
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobList();
18662
18737
  while (reader.pos < end) {
18663
18738
  let tag = reader.uint32();
18664
18739
  if (tag === error)
@@ -18667,7 +18742,7 @@ var sesame = $root.sesame = (() => {
18667
18742
  case 1: {
18668
18743
  if (!(message.jobs && message.jobs.length))
18669
18744
  message.jobs = [];
18670
- message.jobs.push($root.sesame.v1.jobs.JobStatusResponse.decode(reader, reader.uint32()));
18745
+ message.jobs.push($root.sesame.v1.jobs.Job.decode(reader, reader.uint32()));
18671
18746
  break;
18672
18747
  }
18673
18748
  default:
@@ -18677,42 +18752,42 @@ var sesame = $root.sesame = (() => {
18677
18752
  }
18678
18753
  return message;
18679
18754
  };
18680
- JobListResponse.decodeDelimited = function decodeDelimited(reader) {
18755
+ JobList.decodeDelimited = function decodeDelimited(reader) {
18681
18756
  if (!(reader instanceof $Reader))
18682
18757
  reader = new $Reader(reader);
18683
18758
  return this.decode(reader, reader.uint32());
18684
18759
  };
18685
- JobListResponse.verify = function verify(message) {
18760
+ JobList.verify = function verify(message) {
18686
18761
  if (typeof message !== "object" || message === null)
18687
18762
  return "object expected";
18688
18763
  if (message.jobs != null && message.hasOwnProperty("jobs")) {
18689
18764
  if (!Array.isArray(message.jobs))
18690
18765
  return "jobs: array expected";
18691
18766
  for (let i = 0; i < message.jobs.length; ++i) {
18692
- let error = $root.sesame.v1.jobs.JobStatusResponse.verify(message.jobs[i]);
18767
+ let error = $root.sesame.v1.jobs.Job.verify(message.jobs[i]);
18693
18768
  if (error)
18694
18769
  return "jobs." + error;
18695
18770
  }
18696
18771
  }
18697
18772
  return null;
18698
18773
  };
18699
- JobListResponse.fromObject = function fromObject(object) {
18700
- if (object instanceof $root.sesame.v1.jobs.JobListResponse)
18774
+ JobList.fromObject = function fromObject(object) {
18775
+ if (object instanceof $root.sesame.v1.jobs.JobList)
18701
18776
  return object;
18702
- let message = new $root.sesame.v1.jobs.JobListResponse();
18777
+ let message = new $root.sesame.v1.jobs.JobList();
18703
18778
  if (object.jobs) {
18704
18779
  if (!Array.isArray(object.jobs))
18705
- throw TypeError(".sesame.v1.jobs.JobListResponse.jobs: array expected");
18780
+ throw TypeError(".sesame.v1.jobs.JobList.jobs: array expected");
18706
18781
  message.jobs = [];
18707
18782
  for (let i = 0; i < object.jobs.length; ++i) {
18708
18783
  if (typeof object.jobs[i] !== "object")
18709
- throw TypeError(".sesame.v1.jobs.JobListResponse.jobs: object expected");
18710
- message.jobs[i] = $root.sesame.v1.jobs.JobStatusResponse.fromObject(object.jobs[i]);
18784
+ throw TypeError(".sesame.v1.jobs.JobList.jobs: object expected");
18785
+ message.jobs[i] = $root.sesame.v1.jobs.Job.fromObject(object.jobs[i]);
18711
18786
  }
18712
18787
  }
18713
18788
  return message;
18714
18789
  };
18715
- JobListResponse.toObject = function toObject(message, options) {
18790
+ JobList.toObject = function toObject(message, options) {
18716
18791
  if (!options)
18717
18792
  options = {};
18718
18793
  let object = {};
@@ -18721,116 +18796,72 @@ var sesame = $root.sesame = (() => {
18721
18796
  if (message.jobs && message.jobs.length) {
18722
18797
  object.jobs = [];
18723
18798
  for (let j = 0; j < message.jobs.length; ++j)
18724
- object.jobs[j] = $root.sesame.v1.jobs.JobStatusResponse.toObject(message.jobs[j], options);
18799
+ object.jobs[j] = $root.sesame.v1.jobs.Job.toObject(message.jobs[j], options);
18725
18800
  }
18726
18801
  return object;
18727
18802
  };
18728
- JobListResponse.prototype.toJSON = function toJSON() {
18803
+ JobList.prototype.toJSON = function toJSON() {
18729
18804
  return this.constructor.toObject(this, import_minimal.default.util.toJSONOptions);
18730
18805
  };
18731
- JobListResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
18806
+ JobList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
18732
18807
  if (typeUrlPrefix === void 0) {
18733
18808
  typeUrlPrefix = "type.googleapis.com";
18734
18809
  }
18735
- return typeUrlPrefix + "/sesame.v1.jobs.JobListResponse";
18810
+ return typeUrlPrefix + "/sesame.v1.jobs.JobList";
18736
18811
  };
18737
- return JobListResponse;
18812
+ return JobList;
18738
18813
  }();
18739
- jobs.JobEvent = function() {
18740
- function JobEvent(properties) {
18814
+ jobs.JobStartRequest = function() {
18815
+ function JobStartRequest(properties) {
18741
18816
  if (properties) {
18742
18817
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
18743
18818
  if (properties[keys[i]] != null)
18744
18819
  this[keys[i]] = properties[keys[i]];
18745
18820
  }
18746
18821
  }
18747
- JobEvent.prototype.jobId = 0;
18748
- JobEvent.prototype.source = "";
18749
- JobEvent.prototype.status = 0;
18750
- JobEvent.prototype.statusText = "";
18751
- JobEvent.prototype.error = null;
18752
- JobEvent.prototype.timingInfo = null;
18822
+ JobStartRequest.prototype.exportRequest = null;
18823
+ JobStartRequest.prototype.importRequest = null;
18753
18824
  let $oneOfFields;
18754
- Object.defineProperty(JobEvent.prototype, "_error", {
18755
- get: $util.oneOfGetter($oneOfFields = ["error"]),
18756
- set: $util.oneOfSetter($oneOfFields)
18757
- });
18758
- Object.defineProperty(JobEvent.prototype, "_timingInfo", {
18759
- get: $util.oneOfGetter($oneOfFields = ["timingInfo"]),
18825
+ Object.defineProperty(JobStartRequest.prototype, "config", {
18826
+ get: $util.oneOfGetter($oneOfFields = ["exportRequest", "importRequest"]),
18760
18827
  set: $util.oneOfSetter($oneOfFields)
18761
18828
  });
18762
- JobEvent.create = function create(properties) {
18763
- return new JobEvent(properties);
18829
+ JobStartRequest.create = function create(properties) {
18830
+ return new JobStartRequest(properties);
18764
18831
  };
18765
- JobEvent.encode = function encode(message, writer) {
18832
+ JobStartRequest.encode = function encode(message, writer) {
18766
18833
  if (!writer)
18767
18834
  writer = $Writer.create();
18768
- if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
18769
- writer.uint32(
18770
- /* id 1, wireType 0 =*/
18771
- 8
18772
- ).uint32(message.jobId);
18773
- if (message.source != null && Object.hasOwnProperty.call(message, "source"))
18774
- writer.uint32(
18835
+ if (message.exportRequest != null && Object.hasOwnProperty.call(message, "exportRequest"))
18836
+ $root.sesame.v1.jobs.ExportStartRequest.encode(message.exportRequest, writer.uint32(
18837
+ /* id 1, wireType 2 =*/
18838
+ 10
18839
+ ).fork()).ldelim();
18840
+ if (message.importRequest != null && Object.hasOwnProperty.call(message, "importRequest"))
18841
+ $root.sesame.v1.jobs.ImportStartRequest.encode(message.importRequest, writer.uint32(
18775
18842
  /* id 2, wireType 2 =*/
18776
18843
  18
18777
- ).string(message.source);
18778
- if (message.status != null && Object.hasOwnProperty.call(message, "status"))
18779
- writer.uint32(
18780
- /* id 3, wireType 0 =*/
18781
- 24
18782
- ).int32(message.status);
18783
- if (message.statusText != null && Object.hasOwnProperty.call(message, "statusText"))
18784
- writer.uint32(
18785
- /* id 4, wireType 2 =*/
18786
- 34
18787
- ).string(message.statusText);
18788
- if (message.error != null && Object.hasOwnProperty.call(message, "error"))
18789
- writer.uint32(
18790
- /* id 5, wireType 2 =*/
18791
- 42
18792
- ).string(message.error);
18793
- if (message.timingInfo != null && Object.hasOwnProperty.call(message, "timingInfo"))
18794
- $root.sesame.v1.jobs.TimingInfo.encode(message.timingInfo, writer.uint32(
18795
- /* id 6, wireType 2 =*/
18796
- 50
18797
18844
  ).fork()).ldelim();
18798
18845
  return writer;
18799
18846
  };
18800
- JobEvent.encodeDelimited = function encodeDelimited(message, writer) {
18847
+ JobStartRequest.encodeDelimited = function encodeDelimited(message, writer) {
18801
18848
  return this.encode(message, writer).ldelim();
18802
18849
  };
18803
- JobEvent.decode = function decode(reader, length, error) {
18850
+ JobStartRequest.decode = function decode(reader, length, error) {
18804
18851
  if (!(reader instanceof $Reader))
18805
18852
  reader = $Reader.create(reader);
18806
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobEvent();
18853
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobStartRequest();
18807
18854
  while (reader.pos < end) {
18808
18855
  let tag = reader.uint32();
18809
18856
  if (tag === error)
18810
18857
  break;
18811
18858
  switch (tag >>> 3) {
18812
18859
  case 1: {
18813
- message.jobId = reader.uint32();
18860
+ message.exportRequest = $root.sesame.v1.jobs.ExportStartRequest.decode(reader, reader.uint32());
18814
18861
  break;
18815
18862
  }
18816
18863
  case 2: {
18817
- message.source = reader.string();
18818
- break;
18819
- }
18820
- case 3: {
18821
- message.status = reader.int32();
18822
- break;
18823
- }
18824
- case 4: {
18825
- message.statusText = reader.string();
18826
- break;
18827
- }
18828
- case 5: {
18829
- message.error = reader.string();
18830
- break;
18831
- }
18832
- case 6: {
18833
- message.timingInfo = $root.sesame.v1.jobs.TimingInfo.decode(reader, reader.uint32());
18864
+ message.importRequest = $root.sesame.v1.jobs.ImportStartRequest.decode(reader, reader.uint32());
18834
18865
  break;
18835
18866
  }
18836
18867
  default:
@@ -18840,145 +18871,317 @@ var sesame = $root.sesame = (() => {
18840
18871
  }
18841
18872
  return message;
18842
18873
  };
18843
- JobEvent.decodeDelimited = function decodeDelimited(reader) {
18874
+ JobStartRequest.decodeDelimited = function decodeDelimited(reader) {
18844
18875
  if (!(reader instanceof $Reader))
18845
18876
  reader = new $Reader(reader);
18846
18877
  return this.decode(reader, reader.uint32());
18847
18878
  };
18848
- JobEvent.verify = function verify(message) {
18879
+ JobStartRequest.verify = function verify(message) {
18849
18880
  if (typeof message !== "object" || message === null)
18850
18881
  return "object expected";
18851
18882
  let properties = {};
18852
- if (message.jobId != null && message.hasOwnProperty("jobId")) {
18853
- if (!$util.isInteger(message.jobId))
18854
- return "jobId: integer expected";
18855
- }
18856
- if (message.source != null && message.hasOwnProperty("source")) {
18857
- if (!$util.isString(message.source))
18858
- return "source: string expected";
18883
+ if (message.exportRequest != null && message.hasOwnProperty("exportRequest")) {
18884
+ properties.config = 1;
18885
+ {
18886
+ let error = $root.sesame.v1.jobs.ExportStartRequest.verify(message.exportRequest);
18887
+ if (error)
18888
+ return "exportRequest." + error;
18889
+ }
18859
18890
  }
18860
- if (message.status != null && message.hasOwnProperty("status"))
18861
- switch (message.status) {
18862
- default:
18863
- return "status: enum value expected";
18864
- case 0:
18865
- case 1:
18866
- case 2:
18867
- case 3:
18868
- case 4:
18869
- case 5:
18870
- break;
18891
+ if (message.importRequest != null && message.hasOwnProperty("importRequest")) {
18892
+ if (properties.config === 1)
18893
+ return "config: multiple values";
18894
+ properties.config = 1;
18895
+ {
18896
+ let error = $root.sesame.v1.jobs.ImportStartRequest.verify(message.importRequest);
18897
+ if (error)
18898
+ return "importRequest." + error;
18871
18899
  }
18872
- if (message.statusText != null && message.hasOwnProperty("statusText")) {
18873
- if (!$util.isString(message.statusText))
18874
- return "statusText: string expected";
18875
18900
  }
18876
- if (message.error != null && message.hasOwnProperty("error")) {
18877
- properties._error = 1;
18878
- if (!$util.isString(message.error))
18879
- return "error: string expected";
18901
+ return null;
18902
+ };
18903
+ JobStartRequest.fromObject = function fromObject(object) {
18904
+ if (object instanceof $root.sesame.v1.jobs.JobStartRequest)
18905
+ return object;
18906
+ let message = new $root.sesame.v1.jobs.JobStartRequest();
18907
+ if (object.exportRequest != null) {
18908
+ if (typeof object.exportRequest !== "object")
18909
+ throw TypeError(".sesame.v1.jobs.JobStartRequest.exportRequest: object expected");
18910
+ message.exportRequest = $root.sesame.v1.jobs.ExportStartRequest.fromObject(object.exportRequest);
18880
18911
  }
18881
- if (message.timingInfo != null && message.hasOwnProperty("timingInfo")) {
18882
- properties._timingInfo = 1;
18883
- {
18884
- let error = $root.sesame.v1.jobs.TimingInfo.verify(message.timingInfo);
18885
- if (error)
18886
- return "timingInfo." + error;
18912
+ if (object.importRequest != null) {
18913
+ if (typeof object.importRequest !== "object")
18914
+ throw TypeError(".sesame.v1.jobs.JobStartRequest.importRequest: object expected");
18915
+ message.importRequest = $root.sesame.v1.jobs.ImportStartRequest.fromObject(object.importRequest);
18916
+ }
18917
+ return message;
18918
+ };
18919
+ JobStartRequest.toObject = function toObject(message, options) {
18920
+ if (!options)
18921
+ options = {};
18922
+ let object = {};
18923
+ if (message.exportRequest != null && message.hasOwnProperty("exportRequest")) {
18924
+ object.exportRequest = $root.sesame.v1.jobs.ExportStartRequest.toObject(message.exportRequest, options);
18925
+ if (options.oneofs)
18926
+ object.config = "exportRequest";
18927
+ }
18928
+ if (message.importRequest != null && message.hasOwnProperty("importRequest")) {
18929
+ object.importRequest = $root.sesame.v1.jobs.ImportStartRequest.toObject(message.importRequest, options);
18930
+ if (options.oneofs)
18931
+ object.config = "importRequest";
18932
+ }
18933
+ return object;
18934
+ };
18935
+ JobStartRequest.prototype.toJSON = function toJSON() {
18936
+ return this.constructor.toObject(this, import_minimal.default.util.toJSONOptions);
18937
+ };
18938
+ JobStartRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
18939
+ if (typeUrlPrefix === void 0) {
18940
+ typeUrlPrefix = "type.googleapis.com";
18941
+ }
18942
+ return typeUrlPrefix + "/sesame.v1.jobs.JobStartRequest";
18943
+ };
18944
+ return JobStartRequest;
18945
+ }();
18946
+ jobs.JobAbortRequest = function() {
18947
+ function JobAbortRequest(properties) {
18948
+ if (properties) {
18949
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
18950
+ if (properties[keys[i]] != null)
18951
+ this[keys[i]] = properties[keys[i]];
18952
+ }
18953
+ }
18954
+ JobAbortRequest.prototype.jobId = 0;
18955
+ JobAbortRequest.create = function create(properties) {
18956
+ return new JobAbortRequest(properties);
18957
+ };
18958
+ JobAbortRequest.encode = function encode(message, writer) {
18959
+ if (!writer)
18960
+ writer = $Writer.create();
18961
+ if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
18962
+ writer.uint32(
18963
+ /* id 1, wireType 0 =*/
18964
+ 8
18965
+ ).uint32(message.jobId);
18966
+ return writer;
18967
+ };
18968
+ JobAbortRequest.encodeDelimited = function encodeDelimited(message, writer) {
18969
+ return this.encode(message, writer).ldelim();
18970
+ };
18971
+ JobAbortRequest.decode = function decode(reader, length, error) {
18972
+ if (!(reader instanceof $Reader))
18973
+ reader = $Reader.create(reader);
18974
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobAbortRequest();
18975
+ while (reader.pos < end) {
18976
+ let tag = reader.uint32();
18977
+ if (tag === error)
18978
+ break;
18979
+ switch (tag >>> 3) {
18980
+ case 1: {
18981
+ message.jobId = reader.uint32();
18982
+ break;
18983
+ }
18984
+ default:
18985
+ reader.skipType(tag & 7);
18986
+ break;
18887
18987
  }
18888
18988
  }
18989
+ return message;
18990
+ };
18991
+ JobAbortRequest.decodeDelimited = function decodeDelimited(reader) {
18992
+ if (!(reader instanceof $Reader))
18993
+ reader = new $Reader(reader);
18994
+ return this.decode(reader, reader.uint32());
18995
+ };
18996
+ JobAbortRequest.verify = function verify(message) {
18997
+ if (typeof message !== "object" || message === null)
18998
+ return "object expected";
18999
+ if (message.jobId != null && message.hasOwnProperty("jobId")) {
19000
+ if (!$util.isInteger(message.jobId))
19001
+ return "jobId: integer expected";
19002
+ }
18889
19003
  return null;
18890
19004
  };
18891
- JobEvent.fromObject = function fromObject(object) {
18892
- if (object instanceof $root.sesame.v1.jobs.JobEvent)
19005
+ JobAbortRequest.fromObject = function fromObject(object) {
19006
+ if (object instanceof $root.sesame.v1.jobs.JobAbortRequest)
18893
19007
  return object;
18894
- let message = new $root.sesame.v1.jobs.JobEvent();
19008
+ let message = new $root.sesame.v1.jobs.JobAbortRequest();
18895
19009
  if (object.jobId != null)
18896
19010
  message.jobId = object.jobId >>> 0;
18897
- if (object.source != null)
18898
- message.source = String(object.source);
18899
- switch (object.status) {
18900
- default:
18901
- if (typeof object.status === "number") {
18902
- message.status = object.status;
19011
+ return message;
19012
+ };
19013
+ JobAbortRequest.toObject = function toObject(message, options) {
19014
+ if (!options)
19015
+ options = {};
19016
+ let object = {};
19017
+ if (options.defaults)
19018
+ object.jobId = 0;
19019
+ if (message.jobId != null && message.hasOwnProperty("jobId"))
19020
+ object.jobId = message.jobId;
19021
+ return object;
19022
+ };
19023
+ JobAbortRequest.prototype.toJSON = function toJSON() {
19024
+ return this.constructor.toObject(this, import_minimal.default.util.toJSONOptions);
19025
+ };
19026
+ JobAbortRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19027
+ if (typeUrlPrefix === void 0) {
19028
+ typeUrlPrefix = "type.googleapis.com";
19029
+ }
19030
+ return typeUrlPrefix + "/sesame.v1.jobs.JobAbortRequest";
19031
+ };
19032
+ return JobAbortRequest;
19033
+ }();
19034
+ jobs.JobStatusRequest = function() {
19035
+ function JobStatusRequest(properties) {
19036
+ if (properties) {
19037
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19038
+ if (properties[keys[i]] != null)
19039
+ this[keys[i]] = properties[keys[i]];
19040
+ }
19041
+ }
19042
+ JobStatusRequest.prototype.jobId = 0;
19043
+ JobStatusRequest.create = function create(properties) {
19044
+ return new JobStatusRequest(properties);
19045
+ };
19046
+ JobStatusRequest.encode = function encode(message, writer) {
19047
+ if (!writer)
19048
+ writer = $Writer.create();
19049
+ if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
19050
+ writer.uint32(
19051
+ /* id 1, wireType 0 =*/
19052
+ 8
19053
+ ).uint32(message.jobId);
19054
+ return writer;
19055
+ };
19056
+ JobStatusRequest.encodeDelimited = function encodeDelimited(message, writer) {
19057
+ return this.encode(message, writer).ldelim();
19058
+ };
19059
+ JobStatusRequest.decode = function decode(reader, length, error) {
19060
+ if (!(reader instanceof $Reader))
19061
+ reader = $Reader.create(reader);
19062
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobStatusRequest();
19063
+ while (reader.pos < end) {
19064
+ let tag = reader.uint32();
19065
+ if (tag === error)
19066
+ break;
19067
+ switch (tag >>> 3) {
19068
+ case 1: {
19069
+ message.jobId = reader.uint32();
18903
19070
  break;
18904
19071
  }
18905
- break;
18906
- case "JOB_STATUS_UNSPECIFIED":
18907
- case 0:
18908
- message.status = 0;
18909
- break;
18910
- case "JOB_STATUS_PENDING":
18911
- case 1:
18912
- message.status = 1;
18913
- break;
18914
- case "JOB_STATUS_IN_PROGRESS":
18915
- case 2:
18916
- message.status = 2;
18917
- break;
18918
- case "JOB_STATUS_COMPLETE":
18919
- case 3:
18920
- message.status = 3;
18921
- break;
18922
- case "JOB_STATUS_ABORTED":
18923
- case 4:
18924
- message.status = 4;
18925
- break;
18926
- case "JOB_STATUS_ERROR":
18927
- case 5:
18928
- message.status = 5;
18929
- break;
19072
+ default:
19073
+ reader.skipType(tag & 7);
19074
+ break;
19075
+ }
18930
19076
  }
18931
- if (object.statusText != null)
18932
- message.statusText = String(object.statusText);
18933
- if (object.error != null)
18934
- message.error = String(object.error);
18935
- if (object.timingInfo != null) {
18936
- if (typeof object.timingInfo !== "object")
18937
- throw TypeError(".sesame.v1.jobs.JobEvent.timingInfo: object expected");
18938
- message.timingInfo = $root.sesame.v1.jobs.TimingInfo.fromObject(object.timingInfo);
19077
+ return message;
19078
+ };
19079
+ JobStatusRequest.decodeDelimited = function decodeDelimited(reader) {
19080
+ if (!(reader instanceof $Reader))
19081
+ reader = new $Reader(reader);
19082
+ return this.decode(reader, reader.uint32());
19083
+ };
19084
+ JobStatusRequest.verify = function verify(message) {
19085
+ if (typeof message !== "object" || message === null)
19086
+ return "object expected";
19087
+ if (message.jobId != null && message.hasOwnProperty("jobId")) {
19088
+ if (!$util.isInteger(message.jobId))
19089
+ return "jobId: integer expected";
18939
19090
  }
19091
+ return null;
19092
+ };
19093
+ JobStatusRequest.fromObject = function fromObject(object) {
19094
+ if (object instanceof $root.sesame.v1.jobs.JobStatusRequest)
19095
+ return object;
19096
+ let message = new $root.sesame.v1.jobs.JobStatusRequest();
19097
+ if (object.jobId != null)
19098
+ message.jobId = object.jobId >>> 0;
18940
19099
  return message;
18941
19100
  };
18942
- JobEvent.toObject = function toObject(message, options) {
19101
+ JobStatusRequest.toObject = function toObject(message, options) {
18943
19102
  if (!options)
18944
19103
  options = {};
18945
19104
  let object = {};
18946
- if (options.defaults) {
19105
+ if (options.defaults)
18947
19106
  object.jobId = 0;
18948
- object.source = "";
18949
- object.status = options.enums === String ? "JOB_STATUS_UNSPECIFIED" : 0;
18950
- object.statusText = "";
18951
- }
18952
19107
  if (message.jobId != null && message.hasOwnProperty("jobId"))
18953
19108
  object.jobId = message.jobId;
18954
- if (message.source != null && message.hasOwnProperty("source"))
18955
- object.source = message.source;
18956
- if (message.status != null && message.hasOwnProperty("status"))
18957
- object.status = options.enums === String ? $root.sesame.v1.jobs.JobStatus[message.status] === void 0 ? message.status : $root.sesame.v1.jobs.JobStatus[message.status] : message.status;
18958
- if (message.statusText != null && message.hasOwnProperty("statusText"))
18959
- object.statusText = message.statusText;
18960
- if (message.error != null && message.hasOwnProperty("error")) {
18961
- object.error = message.error;
18962
- if (options.oneofs)
18963
- object._error = "error";
19109
+ return object;
19110
+ };
19111
+ JobStatusRequest.prototype.toJSON = function toJSON() {
19112
+ return this.constructor.toObject(this, import_minimal.default.util.toJSONOptions);
19113
+ };
19114
+ JobStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19115
+ if (typeUrlPrefix === void 0) {
19116
+ typeUrlPrefix = "type.googleapis.com";
18964
19117
  }
18965
- if (message.timingInfo != null && message.hasOwnProperty("timingInfo")) {
18966
- object.timingInfo = $root.sesame.v1.jobs.TimingInfo.toObject(message.timingInfo, options);
18967
- if (options.oneofs)
18968
- object._timingInfo = "timingInfo";
19118
+ return typeUrlPrefix + "/sesame.v1.jobs.JobStatusRequest";
19119
+ };
19120
+ return JobStatusRequest;
19121
+ }();
19122
+ jobs.JobListRequest = function() {
19123
+ function JobListRequest(properties) {
19124
+ if (properties) {
19125
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19126
+ if (properties[keys[i]] != null)
19127
+ this[keys[i]] = properties[keys[i]];
18969
19128
  }
18970
- return object;
19129
+ }
19130
+ JobListRequest.create = function create(properties) {
19131
+ return new JobListRequest(properties);
18971
19132
  };
18972
- JobEvent.prototype.toJSON = function toJSON() {
19133
+ JobListRequest.encode = function encode(message, writer) {
19134
+ if (!writer)
19135
+ writer = $Writer.create();
19136
+ return writer;
19137
+ };
19138
+ JobListRequest.encodeDelimited = function encodeDelimited(message, writer) {
19139
+ return this.encode(message, writer).ldelim();
19140
+ };
19141
+ JobListRequest.decode = function decode(reader, length, error) {
19142
+ if (!(reader instanceof $Reader))
19143
+ reader = $Reader.create(reader);
19144
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobListRequest();
19145
+ while (reader.pos < end) {
19146
+ let tag = reader.uint32();
19147
+ if (tag === error)
19148
+ break;
19149
+ switch (tag >>> 3) {
19150
+ default:
19151
+ reader.skipType(tag & 7);
19152
+ break;
19153
+ }
19154
+ }
19155
+ return message;
19156
+ };
19157
+ JobListRequest.decodeDelimited = function decodeDelimited(reader) {
19158
+ if (!(reader instanceof $Reader))
19159
+ reader = new $Reader(reader);
19160
+ return this.decode(reader, reader.uint32());
19161
+ };
19162
+ JobListRequest.verify = function verify(message) {
19163
+ if (typeof message !== "object" || message === null)
19164
+ return "object expected";
19165
+ return null;
19166
+ };
19167
+ JobListRequest.fromObject = function fromObject(object) {
19168
+ if (object instanceof $root.sesame.v1.jobs.JobListRequest)
19169
+ return object;
19170
+ return new $root.sesame.v1.jobs.JobListRequest();
19171
+ };
19172
+ JobListRequest.toObject = function toObject() {
19173
+ return {};
19174
+ };
19175
+ JobListRequest.prototype.toJSON = function toJSON() {
18973
19176
  return this.constructor.toObject(this, import_minimal.default.util.toJSONOptions);
18974
19177
  };
18975
- JobEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19178
+ JobListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
18976
19179
  if (typeUrlPrefix === void 0) {
18977
19180
  typeUrlPrefix = "type.googleapis.com";
18978
19181
  }
18979
- return typeUrlPrefix + "/sesame.v1.jobs.JobEvent";
19182
+ return typeUrlPrefix + "/sesame.v1.jobs.JobListRequest";
18980
19183
  };
18981
- return JobEvent;
19184
+ return JobListRequest;
18982
19185
  }();
18983
19186
  jobs.ExportConfiguration = function() {
18984
19187
  function ExportConfiguration(properties) {
@@ -19717,292 +19920,8 @@ var sesame = $root.sesame = (() => {
19717
19920
  if (!(message.items && message.items.length))
19718
19921
  message.items = [];
19719
19922
  message.items.push($root.sesame.v1.recorder.PlaylistItem.decode(reader, reader.uint32()));
19720
- break;
19721
- }
19722
- default:
19723
- reader.skipType(tag & 7);
19724
- break;
19725
- }
19726
- }
19727
- return message;
19728
- };
19729
- ExportStartRequest.decodeDelimited = function decodeDelimited(reader) {
19730
- if (!(reader instanceof $Reader))
19731
- reader = new $Reader(reader);
19732
- return this.decode(reader, reader.uint32());
19733
- };
19734
- ExportStartRequest.verify = function verify(message) {
19735
- if (typeof message !== "object" || message === null)
19736
- return "object expected";
19737
- if (message.config != null && message.hasOwnProperty("config")) {
19738
- let error = $root.sesame.v1.jobs.ExportConfiguration.verify(message.config);
19739
- if (error)
19740
- return "config." + error;
19741
- }
19742
- if (message.items != null && message.hasOwnProperty("items")) {
19743
- if (!Array.isArray(message.items))
19744
- return "items: array expected";
19745
- for (let i = 0; i < message.items.length; ++i) {
19746
- let error = $root.sesame.v1.recorder.PlaylistItem.verify(message.items[i]);
19747
- if (error)
19748
- return "items." + error;
19749
- }
19750
- }
19751
- return null;
19752
- };
19753
- ExportStartRequest.fromObject = function fromObject(object) {
19754
- if (object instanceof $root.sesame.v1.jobs.ExportStartRequest)
19755
- return object;
19756
- let message = new $root.sesame.v1.jobs.ExportStartRequest();
19757
- if (object.config != null) {
19758
- if (typeof object.config !== "object")
19759
- throw TypeError(".sesame.v1.jobs.ExportStartRequest.config: object expected");
19760
- message.config = $root.sesame.v1.jobs.ExportConfiguration.fromObject(object.config);
19761
- }
19762
- if (object.items) {
19763
- if (!Array.isArray(object.items))
19764
- throw TypeError(".sesame.v1.jobs.ExportStartRequest.items: array expected");
19765
- message.items = [];
19766
- for (let i = 0; i < object.items.length; ++i) {
19767
- if (typeof object.items[i] !== "object")
19768
- throw TypeError(".sesame.v1.jobs.ExportStartRequest.items: object expected");
19769
- message.items[i] = $root.sesame.v1.recorder.PlaylistItem.fromObject(object.items[i]);
19770
- }
19771
- }
19772
- return message;
19773
- };
19774
- ExportStartRequest.toObject = function toObject(message, options) {
19775
- if (!options)
19776
- options = {};
19777
- let object = {};
19778
- if (options.arrays || options.defaults)
19779
- object.items = [];
19780
- if (options.defaults)
19781
- object.config = null;
19782
- if (message.config != null && message.hasOwnProperty("config"))
19783
- object.config = $root.sesame.v1.jobs.ExportConfiguration.toObject(message.config, options);
19784
- if (message.items && message.items.length) {
19785
- object.items = [];
19786
- for (let j = 0; j < message.items.length; ++j)
19787
- object.items[j] = $root.sesame.v1.recorder.PlaylistItem.toObject(message.items[j], options);
19788
- }
19789
- return object;
19790
- };
19791
- ExportStartRequest.prototype.toJSON = function toJSON() {
19792
- return this.constructor.toObject(this, import_minimal.default.util.toJSONOptions);
19793
- };
19794
- ExportStartRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19795
- if (typeUrlPrefix === void 0) {
19796
- typeUrlPrefix = "type.googleapis.com";
19797
- }
19798
- return typeUrlPrefix + "/sesame.v1.jobs.ExportStartRequest";
19799
- };
19800
- return ExportStartRequest;
19801
- }();
19802
- jobs.ExportAbortRequest = function() {
19803
- function ExportAbortRequest(properties) {
19804
- if (properties) {
19805
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19806
- if (properties[keys[i]] != null)
19807
- this[keys[i]] = properties[keys[i]];
19808
- }
19809
- }
19810
- ExportAbortRequest.prototype.jobId = 0;
19811
- ExportAbortRequest.create = function create(properties) {
19812
- return new ExportAbortRequest(properties);
19813
- };
19814
- ExportAbortRequest.encode = function encode(message, writer) {
19815
- if (!writer)
19816
- writer = $Writer.create();
19817
- if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
19818
- writer.uint32(
19819
- /* id 1, wireType 0 =*/
19820
- 8
19821
- ).uint32(message.jobId);
19822
- return writer;
19823
- };
19824
- ExportAbortRequest.encodeDelimited = function encodeDelimited(message, writer) {
19825
- return this.encode(message, writer).ldelim();
19826
- };
19827
- ExportAbortRequest.decode = function decode(reader, length, error) {
19828
- if (!(reader instanceof $Reader))
19829
- reader = $Reader.create(reader);
19830
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.ExportAbortRequest();
19831
- while (reader.pos < end) {
19832
- let tag = reader.uint32();
19833
- if (tag === error)
19834
- break;
19835
- switch (tag >>> 3) {
19836
- case 1: {
19837
- message.jobId = reader.uint32();
19838
- break;
19839
- }
19840
- default:
19841
- reader.skipType(tag & 7);
19842
- break;
19843
- }
19844
- }
19845
- return message;
19846
- };
19847
- ExportAbortRequest.decodeDelimited = function decodeDelimited(reader) {
19848
- if (!(reader instanceof $Reader))
19849
- reader = new $Reader(reader);
19850
- return this.decode(reader, reader.uint32());
19851
- };
19852
- ExportAbortRequest.verify = function verify(message) {
19853
- if (typeof message !== "object" || message === null)
19854
- return "object expected";
19855
- if (message.jobId != null && message.hasOwnProperty("jobId")) {
19856
- if (!$util.isInteger(message.jobId))
19857
- return "jobId: integer expected";
19858
- }
19859
- return null;
19860
- };
19861
- ExportAbortRequest.fromObject = function fromObject(object) {
19862
- if (object instanceof $root.sesame.v1.jobs.ExportAbortRequest)
19863
- return object;
19864
- let message = new $root.sesame.v1.jobs.ExportAbortRequest();
19865
- if (object.jobId != null)
19866
- message.jobId = object.jobId >>> 0;
19867
- return message;
19868
- };
19869
- ExportAbortRequest.toObject = function toObject(message, options) {
19870
- if (!options)
19871
- options = {};
19872
- let object = {};
19873
- if (options.defaults)
19874
- object.jobId = 0;
19875
- if (message.jobId != null && message.hasOwnProperty("jobId"))
19876
- object.jobId = message.jobId;
19877
- return object;
19878
- };
19879
- ExportAbortRequest.prototype.toJSON = function toJSON() {
19880
- return this.constructor.toObject(this, import_minimal.default.util.toJSONOptions);
19881
- };
19882
- ExportAbortRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19883
- if (typeUrlPrefix === void 0) {
19884
- typeUrlPrefix = "type.googleapis.com";
19885
- }
19886
- return typeUrlPrefix + "/sesame.v1.jobs.ExportAbortRequest";
19887
- };
19888
- return ExportAbortRequest;
19889
- }();
19890
- jobs.ExportStatusRequest = function() {
19891
- function ExportStatusRequest(properties) {
19892
- if (properties) {
19893
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19894
- if (properties[keys[i]] != null)
19895
- this[keys[i]] = properties[keys[i]];
19896
- }
19897
- }
19898
- ExportStatusRequest.prototype.jobId = 0;
19899
- ExportStatusRequest.create = function create(properties) {
19900
- return new ExportStatusRequest(properties);
19901
- };
19902
- ExportStatusRequest.encode = function encode(message, writer) {
19903
- if (!writer)
19904
- writer = $Writer.create();
19905
- if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
19906
- writer.uint32(
19907
- /* id 1, wireType 0 =*/
19908
- 8
19909
- ).uint32(message.jobId);
19910
- return writer;
19911
- };
19912
- ExportStatusRequest.encodeDelimited = function encodeDelimited(message, writer) {
19913
- return this.encode(message, writer).ldelim();
19914
- };
19915
- ExportStatusRequest.decode = function decode(reader, length, error) {
19916
- if (!(reader instanceof $Reader))
19917
- reader = $Reader.create(reader);
19918
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.ExportStatusRequest();
19919
- while (reader.pos < end) {
19920
- let tag = reader.uint32();
19921
- if (tag === error)
19922
- break;
19923
- switch (tag >>> 3) {
19924
- case 1: {
19925
- message.jobId = reader.uint32();
19926
- break;
19927
- }
19928
- default:
19929
- reader.skipType(tag & 7);
19930
- break;
19931
- }
19932
- }
19933
- return message;
19934
- };
19935
- ExportStatusRequest.decodeDelimited = function decodeDelimited(reader) {
19936
- if (!(reader instanceof $Reader))
19937
- reader = new $Reader(reader);
19938
- return this.decode(reader, reader.uint32());
19939
- };
19940
- ExportStatusRequest.verify = function verify(message) {
19941
- if (typeof message !== "object" || message === null)
19942
- return "object expected";
19943
- if (message.jobId != null && message.hasOwnProperty("jobId")) {
19944
- if (!$util.isInteger(message.jobId))
19945
- return "jobId: integer expected";
19946
- }
19947
- return null;
19948
- };
19949
- ExportStatusRequest.fromObject = function fromObject(object) {
19950
- if (object instanceof $root.sesame.v1.jobs.ExportStatusRequest)
19951
- return object;
19952
- let message = new $root.sesame.v1.jobs.ExportStatusRequest();
19953
- if (object.jobId != null)
19954
- message.jobId = object.jobId >>> 0;
19955
- return message;
19956
- };
19957
- ExportStatusRequest.toObject = function toObject(message, options) {
19958
- if (!options)
19959
- options = {};
19960
- let object = {};
19961
- if (options.defaults)
19962
- object.jobId = 0;
19963
- if (message.jobId != null && message.hasOwnProperty("jobId"))
19964
- object.jobId = message.jobId;
19965
- return object;
19966
- };
19967
- ExportStatusRequest.prototype.toJSON = function toJSON() {
19968
- return this.constructor.toObject(this, import_minimal.default.util.toJSONOptions);
19969
- };
19970
- ExportStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19971
- if (typeUrlPrefix === void 0) {
19972
- typeUrlPrefix = "type.googleapis.com";
19973
- }
19974
- return typeUrlPrefix + "/sesame.v1.jobs.ExportStatusRequest";
19975
- };
19976
- return ExportStatusRequest;
19977
- }();
19978
- jobs.ExportListRequest = function() {
19979
- function ExportListRequest(properties) {
19980
- if (properties) {
19981
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19982
- if (properties[keys[i]] != null)
19983
- this[keys[i]] = properties[keys[i]];
19984
- }
19985
- }
19986
- ExportListRequest.create = function create(properties) {
19987
- return new ExportListRequest(properties);
19988
- };
19989
- ExportListRequest.encode = function encode(message, writer) {
19990
- if (!writer)
19991
- writer = $Writer.create();
19992
- return writer;
19993
- };
19994
- ExportListRequest.encodeDelimited = function encodeDelimited(message, writer) {
19995
- return this.encode(message, writer).ldelim();
19996
- };
19997
- ExportListRequest.decode = function decode(reader, length, error) {
19998
- if (!(reader instanceof $Reader))
19999
- reader = $Reader.create(reader);
20000
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.ExportListRequest();
20001
- while (reader.pos < end) {
20002
- let tag = reader.uint32();
20003
- if (tag === error)
20004
- break;
20005
- switch (tag >>> 3) {
19923
+ break;
19924
+ }
20006
19925
  default:
20007
19926
  reader.skipType(tag & 7);
20008
19927
  break;
@@ -20010,34 +19929,78 @@ var sesame = $root.sesame = (() => {
20010
19929
  }
20011
19930
  return message;
20012
19931
  };
20013
- ExportListRequest.decodeDelimited = function decodeDelimited(reader) {
19932
+ ExportStartRequest.decodeDelimited = function decodeDelimited(reader) {
20014
19933
  if (!(reader instanceof $Reader))
20015
19934
  reader = new $Reader(reader);
20016
19935
  return this.decode(reader, reader.uint32());
20017
19936
  };
20018
- ExportListRequest.verify = function verify(message) {
19937
+ ExportStartRequest.verify = function verify(message) {
20019
19938
  if (typeof message !== "object" || message === null)
20020
19939
  return "object expected";
19940
+ if (message.config != null && message.hasOwnProperty("config")) {
19941
+ let error = $root.sesame.v1.jobs.ExportConfiguration.verify(message.config);
19942
+ if (error)
19943
+ return "config." + error;
19944
+ }
19945
+ if (message.items != null && message.hasOwnProperty("items")) {
19946
+ if (!Array.isArray(message.items))
19947
+ return "items: array expected";
19948
+ for (let i = 0; i < message.items.length; ++i) {
19949
+ let error = $root.sesame.v1.recorder.PlaylistItem.verify(message.items[i]);
19950
+ if (error)
19951
+ return "items." + error;
19952
+ }
19953
+ }
20021
19954
  return null;
20022
19955
  };
20023
- ExportListRequest.fromObject = function fromObject(object) {
20024
- if (object instanceof $root.sesame.v1.jobs.ExportListRequest)
19956
+ ExportStartRequest.fromObject = function fromObject(object) {
19957
+ if (object instanceof $root.sesame.v1.jobs.ExportStartRequest)
20025
19958
  return object;
20026
- return new $root.sesame.v1.jobs.ExportListRequest();
19959
+ let message = new $root.sesame.v1.jobs.ExportStartRequest();
19960
+ if (object.config != null) {
19961
+ if (typeof object.config !== "object")
19962
+ throw TypeError(".sesame.v1.jobs.ExportStartRequest.config: object expected");
19963
+ message.config = $root.sesame.v1.jobs.ExportConfiguration.fromObject(object.config);
19964
+ }
19965
+ if (object.items) {
19966
+ if (!Array.isArray(object.items))
19967
+ throw TypeError(".sesame.v1.jobs.ExportStartRequest.items: array expected");
19968
+ message.items = [];
19969
+ for (let i = 0; i < object.items.length; ++i) {
19970
+ if (typeof object.items[i] !== "object")
19971
+ throw TypeError(".sesame.v1.jobs.ExportStartRequest.items: object expected");
19972
+ message.items[i] = $root.sesame.v1.recorder.PlaylistItem.fromObject(object.items[i]);
19973
+ }
19974
+ }
19975
+ return message;
20027
19976
  };
20028
- ExportListRequest.toObject = function toObject() {
20029
- return {};
19977
+ ExportStartRequest.toObject = function toObject(message, options) {
19978
+ if (!options)
19979
+ options = {};
19980
+ let object = {};
19981
+ if (options.arrays || options.defaults)
19982
+ object.items = [];
19983
+ if (options.defaults)
19984
+ object.config = null;
19985
+ if (message.config != null && message.hasOwnProperty("config"))
19986
+ object.config = $root.sesame.v1.jobs.ExportConfiguration.toObject(message.config, options);
19987
+ if (message.items && message.items.length) {
19988
+ object.items = [];
19989
+ for (let j = 0; j < message.items.length; ++j)
19990
+ object.items[j] = $root.sesame.v1.recorder.PlaylistItem.toObject(message.items[j], options);
19991
+ }
19992
+ return object;
20030
19993
  };
20031
- ExportListRequest.prototype.toJSON = function toJSON() {
19994
+ ExportStartRequest.prototype.toJSON = function toJSON() {
20032
19995
  return this.constructor.toObject(this, import_minimal.default.util.toJSONOptions);
20033
19996
  };
20034
- ExportListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19997
+ ExportStartRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
20035
19998
  if (typeUrlPrefix === void 0) {
20036
19999
  typeUrlPrefix = "type.googleapis.com";
20037
20000
  }
20038
- return typeUrlPrefix + "/sesame.v1.jobs.ExportListRequest";
20001
+ return typeUrlPrefix + "/sesame.v1.jobs.ExportStartRequest";
20039
20002
  };
20040
- return ExportListRequest;
20003
+ return ExportStartRequest;
20041
20004
  }();
20042
20005
  jobs.ImportConfiguration = function() {
20043
20006
  function ImportConfiguration(properties) {
@@ -20354,246 +20317,6 @@ var sesame = $root.sesame = (() => {
20354
20317
  };
20355
20318
  return ImportStartRequest;
20356
20319
  }();
20357
- jobs.ImportAbortRequest = function() {
20358
- function ImportAbortRequest(properties) {
20359
- if (properties) {
20360
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20361
- if (properties[keys[i]] != null)
20362
- this[keys[i]] = properties[keys[i]];
20363
- }
20364
- }
20365
- ImportAbortRequest.prototype.jobId = 0;
20366
- ImportAbortRequest.create = function create(properties) {
20367
- return new ImportAbortRequest(properties);
20368
- };
20369
- ImportAbortRequest.encode = function encode(message, writer) {
20370
- if (!writer)
20371
- writer = $Writer.create();
20372
- if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
20373
- writer.uint32(
20374
- /* id 1, wireType 0 =*/
20375
- 8
20376
- ).uint32(message.jobId);
20377
- return writer;
20378
- };
20379
- ImportAbortRequest.encodeDelimited = function encodeDelimited(message, writer) {
20380
- return this.encode(message, writer).ldelim();
20381
- };
20382
- ImportAbortRequest.decode = function decode(reader, length, error) {
20383
- if (!(reader instanceof $Reader))
20384
- reader = $Reader.create(reader);
20385
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.ImportAbortRequest();
20386
- while (reader.pos < end) {
20387
- let tag = reader.uint32();
20388
- if (tag === error)
20389
- break;
20390
- switch (tag >>> 3) {
20391
- case 1: {
20392
- message.jobId = reader.uint32();
20393
- break;
20394
- }
20395
- default:
20396
- reader.skipType(tag & 7);
20397
- break;
20398
- }
20399
- }
20400
- return message;
20401
- };
20402
- ImportAbortRequest.decodeDelimited = function decodeDelimited(reader) {
20403
- if (!(reader instanceof $Reader))
20404
- reader = new $Reader(reader);
20405
- return this.decode(reader, reader.uint32());
20406
- };
20407
- ImportAbortRequest.verify = function verify(message) {
20408
- if (typeof message !== "object" || message === null)
20409
- return "object expected";
20410
- if (message.jobId != null && message.hasOwnProperty("jobId")) {
20411
- if (!$util.isInteger(message.jobId))
20412
- return "jobId: integer expected";
20413
- }
20414
- return null;
20415
- };
20416
- ImportAbortRequest.fromObject = function fromObject(object) {
20417
- if (object instanceof $root.sesame.v1.jobs.ImportAbortRequest)
20418
- return object;
20419
- let message = new $root.sesame.v1.jobs.ImportAbortRequest();
20420
- if (object.jobId != null)
20421
- message.jobId = object.jobId >>> 0;
20422
- return message;
20423
- };
20424
- ImportAbortRequest.toObject = function toObject(message, options) {
20425
- if (!options)
20426
- options = {};
20427
- let object = {};
20428
- if (options.defaults)
20429
- object.jobId = 0;
20430
- if (message.jobId != null && message.hasOwnProperty("jobId"))
20431
- object.jobId = message.jobId;
20432
- return object;
20433
- };
20434
- ImportAbortRequest.prototype.toJSON = function toJSON() {
20435
- return this.constructor.toObject(this, import_minimal.default.util.toJSONOptions);
20436
- };
20437
- ImportAbortRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
20438
- if (typeUrlPrefix === void 0) {
20439
- typeUrlPrefix = "type.googleapis.com";
20440
- }
20441
- return typeUrlPrefix + "/sesame.v1.jobs.ImportAbortRequest";
20442
- };
20443
- return ImportAbortRequest;
20444
- }();
20445
- jobs.ImportStatusRequest = function() {
20446
- function ImportStatusRequest(properties) {
20447
- if (properties) {
20448
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20449
- if (properties[keys[i]] != null)
20450
- this[keys[i]] = properties[keys[i]];
20451
- }
20452
- }
20453
- ImportStatusRequest.prototype.jobId = 0;
20454
- ImportStatusRequest.create = function create(properties) {
20455
- return new ImportStatusRequest(properties);
20456
- };
20457
- ImportStatusRequest.encode = function encode(message, writer) {
20458
- if (!writer)
20459
- writer = $Writer.create();
20460
- if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
20461
- writer.uint32(
20462
- /* id 1, wireType 0 =*/
20463
- 8
20464
- ).uint32(message.jobId);
20465
- return writer;
20466
- };
20467
- ImportStatusRequest.encodeDelimited = function encodeDelimited(message, writer) {
20468
- return this.encode(message, writer).ldelim();
20469
- };
20470
- ImportStatusRequest.decode = function decode(reader, length, error) {
20471
- if (!(reader instanceof $Reader))
20472
- reader = $Reader.create(reader);
20473
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.ImportStatusRequest();
20474
- while (reader.pos < end) {
20475
- let tag = reader.uint32();
20476
- if (tag === error)
20477
- break;
20478
- switch (tag >>> 3) {
20479
- case 1: {
20480
- message.jobId = reader.uint32();
20481
- break;
20482
- }
20483
- default:
20484
- reader.skipType(tag & 7);
20485
- break;
20486
- }
20487
- }
20488
- return message;
20489
- };
20490
- ImportStatusRequest.decodeDelimited = function decodeDelimited(reader) {
20491
- if (!(reader instanceof $Reader))
20492
- reader = new $Reader(reader);
20493
- return this.decode(reader, reader.uint32());
20494
- };
20495
- ImportStatusRequest.verify = function verify(message) {
20496
- if (typeof message !== "object" || message === null)
20497
- return "object expected";
20498
- if (message.jobId != null && message.hasOwnProperty("jobId")) {
20499
- if (!$util.isInteger(message.jobId))
20500
- return "jobId: integer expected";
20501
- }
20502
- return null;
20503
- };
20504
- ImportStatusRequest.fromObject = function fromObject(object) {
20505
- if (object instanceof $root.sesame.v1.jobs.ImportStatusRequest)
20506
- return object;
20507
- let message = new $root.sesame.v1.jobs.ImportStatusRequest();
20508
- if (object.jobId != null)
20509
- message.jobId = object.jobId >>> 0;
20510
- return message;
20511
- };
20512
- ImportStatusRequest.toObject = function toObject(message, options) {
20513
- if (!options)
20514
- options = {};
20515
- let object = {};
20516
- if (options.defaults)
20517
- object.jobId = 0;
20518
- if (message.jobId != null && message.hasOwnProperty("jobId"))
20519
- object.jobId = message.jobId;
20520
- return object;
20521
- };
20522
- ImportStatusRequest.prototype.toJSON = function toJSON() {
20523
- return this.constructor.toObject(this, import_minimal.default.util.toJSONOptions);
20524
- };
20525
- ImportStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
20526
- if (typeUrlPrefix === void 0) {
20527
- typeUrlPrefix = "type.googleapis.com";
20528
- }
20529
- return typeUrlPrefix + "/sesame.v1.jobs.ImportStatusRequest";
20530
- };
20531
- return ImportStatusRequest;
20532
- }();
20533
- jobs.ImportListRequest = function() {
20534
- function ImportListRequest(properties) {
20535
- if (properties) {
20536
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20537
- if (properties[keys[i]] != null)
20538
- this[keys[i]] = properties[keys[i]];
20539
- }
20540
- }
20541
- ImportListRequest.create = function create(properties) {
20542
- return new ImportListRequest(properties);
20543
- };
20544
- ImportListRequest.encode = function encode(message, writer) {
20545
- if (!writer)
20546
- writer = $Writer.create();
20547
- return writer;
20548
- };
20549
- ImportListRequest.encodeDelimited = function encodeDelimited(message, writer) {
20550
- return this.encode(message, writer).ldelim();
20551
- };
20552
- ImportListRequest.decode = function decode(reader, length, error) {
20553
- if (!(reader instanceof $Reader))
20554
- reader = $Reader.create(reader);
20555
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.ImportListRequest();
20556
- while (reader.pos < end) {
20557
- let tag = reader.uint32();
20558
- if (tag === error)
20559
- break;
20560
- switch (tag >>> 3) {
20561
- default:
20562
- reader.skipType(tag & 7);
20563
- break;
20564
- }
20565
- }
20566
- return message;
20567
- };
20568
- ImportListRequest.decodeDelimited = function decodeDelimited(reader) {
20569
- if (!(reader instanceof $Reader))
20570
- reader = new $Reader(reader);
20571
- return this.decode(reader, reader.uint32());
20572
- };
20573
- ImportListRequest.verify = function verify(message) {
20574
- if (typeof message !== "object" || message === null)
20575
- return "object expected";
20576
- return null;
20577
- };
20578
- ImportListRequest.fromObject = function fromObject(object) {
20579
- if (object instanceof $root.sesame.v1.jobs.ImportListRequest)
20580
- return object;
20581
- return new $root.sesame.v1.jobs.ImportListRequest();
20582
- };
20583
- ImportListRequest.toObject = function toObject() {
20584
- return {};
20585
- };
20586
- ImportListRequest.prototype.toJSON = function toJSON() {
20587
- return this.constructor.toObject(this, import_minimal.default.util.toJSONOptions);
20588
- };
20589
- ImportListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
20590
- if (typeUrlPrefix === void 0) {
20591
- typeUrlPrefix = "type.googleapis.com";
20592
- }
20593
- return typeUrlPrefix + "/sesame.v1.jobs.ImportListRequest";
20594
- };
20595
- return ImportListRequest;
20596
- }();
20597
20320
  return jobs;
20598
20321
  }();
20599
20322
  v1.rpc = function() {
@@ -21125,7 +20848,6 @@ var sesame = $root.sesame = (() => {
21125
20848
  case 2:
21126
20849
  case 3:
21127
20850
  case 4:
21128
- case 5:
21129
20851
  case 6:
21130
20852
  break;
21131
20853
  }
@@ -21162,14 +20884,10 @@ var sesame = $root.sesame = (() => {
21162
20884
  case 3:
21163
20885
  message.topic = 3;
21164
20886
  break;
21165
- case "EVENT_TOPIC_PLAYLIST_EXPORT":
20887
+ case "EVENT_TOPIC_JOB":
21166
20888
  case 4:
21167
20889
  message.topic = 4;
21168
20890
  break;
21169
- case "EVENT_TOPIC_CLIP_IMPORT":
21170
- case 5:
21171
- message.topic = 5;
21172
- break;
21173
20891
  case "EVENT_TOPIC_RECORDER":
21174
20892
  case 6:
21175
20893
  message.topic = 6;
@@ -21240,30 +20958,18 @@ var sesame = $root.sesame = (() => {
21240
20958
  Object.defineProperty(SesameAPIService.prototype.requestRecorderOperation = function requestRecorderOperation(request, callback) {
21241
20959
  return this.rpcCall(requestRecorderOperation, $root.sesame.v1.recorder.RecorderRequest, $root.sesame.v1.recorder.RecorderResponse, request, callback);
21242
20960
  }, "name", { value: "RequestRecorderOperation" });
21243
- Object.defineProperty(SesameAPIService.prototype.requestPlaylistExportStart = function requestPlaylistExportStart(request, callback) {
21244
- return this.rpcCall(requestPlaylistExportStart, $root.sesame.v1.jobs.ExportStartRequest, $root.sesame.v1.jobs.JobStatusResponse, request, callback);
21245
- }, "name", { value: "RequestPlaylistExportStart" });
21246
- Object.defineProperty(SesameAPIService.prototype.requestPlaylistExportAbort = function requestPlaylistExportAbort(request, callback) {
21247
- return this.rpcCall(requestPlaylistExportAbort, $root.sesame.v1.jobs.ExportAbortRequest, $root.sesame.v1.jobs.JobStatusResponse, request, callback);
21248
- }, "name", { value: "RequestPlaylistExportAbort" });
21249
- Object.defineProperty(SesameAPIService.prototype.requestPlaylistExportStatus = function requestPlaylistExportStatus(request, callback) {
21250
- return this.rpcCall(requestPlaylistExportStatus, $root.sesame.v1.jobs.ExportStatusRequest, $root.sesame.v1.jobs.JobStatusResponse, request, callback);
21251
- }, "name", { value: "RequestPlaylistExportStatus" });
21252
- Object.defineProperty(SesameAPIService.prototype.requestPlaylistExportList = function requestPlaylistExportList(request, callback) {
21253
- return this.rpcCall(requestPlaylistExportList, $root.sesame.v1.jobs.ExportListRequest, $root.sesame.v1.jobs.JobListResponse, request, callback);
21254
- }, "name", { value: "RequestPlaylistExportList" });
21255
- Object.defineProperty(SesameAPIService.prototype.requestClipImportStart = function requestClipImportStart(request, callback) {
21256
- return this.rpcCall(requestClipImportStart, $root.sesame.v1.jobs.ImportStartRequest, $root.sesame.v1.jobs.JobStatusResponse, request, callback);
21257
- }, "name", { value: "RequestClipImportStart" });
21258
- Object.defineProperty(SesameAPIService.prototype.requestClipImportAbort = function requestClipImportAbort(request, callback) {
21259
- return this.rpcCall(requestClipImportAbort, $root.sesame.v1.jobs.ImportAbortRequest, $root.sesame.v1.jobs.JobStatusResponse, request, callback);
21260
- }, "name", { value: "RequestClipImportAbort" });
21261
- Object.defineProperty(SesameAPIService.prototype.requestClipImportStatus = function requestClipImportStatus(request, callback) {
21262
- return this.rpcCall(requestClipImportStatus, $root.sesame.v1.jobs.ImportStatusRequest, $root.sesame.v1.jobs.JobStatusResponse, request, callback);
21263
- }, "name", { value: "RequestClipImportStatus" });
21264
- Object.defineProperty(SesameAPIService.prototype.requestClipImportList = function requestClipImportList(request, callback) {
21265
- return this.rpcCall(requestClipImportList, $root.sesame.v1.jobs.ImportListRequest, $root.sesame.v1.jobs.JobListResponse, request, callback);
21266
- }, "name", { value: "RequestClipImportList" });
20961
+ Object.defineProperty(SesameAPIService.prototype.startJob = function startJob(request, callback) {
20962
+ return this.rpcCall(startJob, $root.sesame.v1.jobs.JobStartRequest, $root.sesame.v1.jobs.Job, request, callback);
20963
+ }, "name", { value: "StartJob" });
20964
+ Object.defineProperty(SesameAPIService.prototype.abortJob = function abortJob(request, callback) {
20965
+ return this.rpcCall(abortJob, $root.sesame.v1.jobs.JobAbortRequest, $root.sesame.v1.jobs.Job, request, callback);
20966
+ }, "name", { value: "AbortJob" });
20967
+ Object.defineProperty(SesameAPIService.prototype.getJobStatus = function getJobStatus(request, callback) {
20968
+ return this.rpcCall(getJobStatus, $root.sesame.v1.jobs.JobStatusRequest, $root.sesame.v1.jobs.Job, request, callback);
20969
+ }, "name", { value: "GetJobStatus" });
20970
+ Object.defineProperty(SesameAPIService.prototype.listJobs = function listJobs(request, callback) {
20971
+ return this.rpcCall(listJobs, $root.sesame.v1.jobs.JobListRequest, $root.sesame.v1.jobs.JobList, request, callback);
20972
+ }, "name", { value: "ListJobs" });
21267
20973
  Object.defineProperty(SesameAPIService.prototype.requestKeyframe = function requestKeyframe(request, callback) {
21268
20974
  return this.rpcCall(requestKeyframe, $root.sesame.v1.outputs.KeyframeRequest, $root.sesame.v1.common.Empty, request, callback);
21269
20975
  }, "name", { value: "RequestKeyframe" });
@@ -22283,10 +21989,33 @@ var RPCClient = class extends import_events.EventEmitter {
22283
21989
  this.connection.on("rpc", (data) => this.messageHandler(data));
22284
21990
  this.connection.on("error", this.errorHandler);
22285
21991
  this.options = options;
22286
- this.service = service.create(this.rpcImpl);
21992
+ this.service = this.wrapServicePromises(service.create(this.rpcImpl));
22287
21993
  this.eventTypes = options.eventTypes || {};
22288
21994
  this.sendTimeout = options.sendTimeout || 5 * 1e3;
22289
21995
  }
21996
+ /**
21997
+ * Wraps service method calls to attach a rejection handler on all returned
21998
+ * promises. This prevents unhandled promise rejections (e.g. from timeouts
21999
+ * while disconnected) from crashing the host process. Callers can still
22000
+ * catch errors normally via await / .catch().
22001
+ */
22002
+ wrapServicePromises(service) {
22003
+ const self = this;
22004
+ return new Proxy(service, {
22005
+ get(target, prop) {
22006
+ const value = target[prop];
22007
+ if (typeof value !== "function") return value;
22008
+ return function(...args) {
22009
+ const result = value.apply(target, args);
22010
+ if (result != null && typeof result.catch === "function") {
22011
+ result.catch(() => {
22012
+ });
22013
+ }
22014
+ return result;
22015
+ };
22016
+ }
22017
+ });
22018
+ }
22290
22019
  async flushMessageBuffer() {
22291
22020
  const messages = [];
22292
22021
  for (const seq in this.messageBuffer) {
@@ -22619,26 +22348,19 @@ var JobsApi = class {
22619
22348
  this.rpc = rpc;
22620
22349
  }
22621
22350
  async importClip(config) {
22622
- const msg = sesame.v1.jobs.ImportStartRequest.create();
22623
- msg.config = config;
22624
- const res = await this.rpc.service.requestClipImportStart(msg);
22351
+ const importReq = sesame.v1.jobs.ImportStartRequest.create();
22352
+ importReq.config = config;
22353
+ const msg = sesame.v1.jobs.JobStartRequest.create({ importRequest: importReq });
22354
+ const res = await this.rpc.service.startJob(msg);
22625
22355
  if (res.error) {
22626
22356
  throw new Error(res.error);
22627
22357
  }
22628
22358
  return res;
22629
22359
  }
22630
- async getImportStatus() {
22631
- const msg = sesame.v1.jobs.ImportListRequest.create();
22632
- return this.rpc.service.requestClipImportList(msg);
22633
- }
22634
- async abortImport(jobId) {
22635
- const msg = { jobId };
22636
- return this.rpc.service.requestClipImportAbort(msg);
22637
- }
22638
22360
  async exportPlaylist(playlist, config) {
22639
- const msg = sesame.v1.jobs.ExportStartRequest.create();
22361
+ const exportReq = sesame.v1.jobs.ExportStartRequest.create();
22640
22362
  if (!config.filename) throw new Error("Filename is required");
22641
- msg.config = {
22363
+ exportReq.config = {
22642
22364
  ...config,
22643
22365
  filename: config.filename,
22644
22366
  videoCodec: config.videoCodec ?? sesame.v1.common.CodecId.CODEC_ID_H264,
@@ -22648,7 +22370,7 @@ var JobsApi = class {
22648
22370
  audioChannels: config.audioChannels ?? 4,
22649
22371
  audioRouting: config.audioRouting ?? [0, 1, 2, 3]
22650
22372
  };
22651
- msg.items = playlist.clips.map((clip) => ({
22373
+ exportReq.items = playlist.clips.map((clip) => ({
22652
22374
  id: clip.id,
22653
22375
  recorderId: clip.recorderId,
22654
22376
  transitionTimeUs: clip.transitionTimeUs ?? 0,
@@ -22659,15 +22381,20 @@ var JobsApi = class {
22659
22381
  startTimeUs: clip.startTimeUs,
22660
22382
  endTimeUs: clip.endTimeUs
22661
22383
  }));
22662
- await this.rpc.service.requestPlaylistExportStart(msg);
22384
+ const msg = sesame.v1.jobs.JobStartRequest.create({ exportRequest: exportReq });
22385
+ await this.rpc.service.startJob(msg);
22663
22386
  }
22664
- async getExportStatus() {
22665
- const msg = sesame.v1.jobs.ExportListRequest.create();
22666
- return this.rpc.service.requestPlaylistExportList(msg);
22387
+ async abortJob(jobId) {
22388
+ const msg = { jobId };
22389
+ return this.rpc.service.abortJob(msg);
22667
22390
  }
22668
- async abortExport(jobId) {
22391
+ async getJobStatus(jobId) {
22669
22392
  const msg = { jobId };
22670
- return this.rpc.service.requestPlaylistExportAbort(msg);
22393
+ return this.rpc.service.getJobStatus(msg);
22394
+ }
22395
+ async listJobs() {
22396
+ const msg = {};
22397
+ return this.rpc.service.listJobs(msg);
22671
22398
  }
22672
22399
  };
22673
22400
 
@@ -22727,8 +22454,7 @@ var SesameClient = class extends import_events3.EventEmitter {
22727
22454
  [sesame.v1.common.EventTopic.EVENT_TOPIC_ERROR]: sesame.v1.status.Event,
22728
22455
  [sesame.v1.common.EventTopic.EVENT_TOPIC_TRANSPORT]: sesame.v1.status.Event,
22729
22456
  [sesame.v1.common.EventTopic.EVENT_TOPIC_CALLBACK]: sesame.v1.status.Event,
22730
- [sesame.v1.common.EventTopic.EVENT_TOPIC_PLAYLIST_EXPORT]: sesame.v1.status.Event,
22731
- [sesame.v1.common.EventTopic.EVENT_TOPIC_CLIP_IMPORT]: sesame.v1.status.Event,
22457
+ [sesame.v1.common.EventTopic.EVENT_TOPIC_JOB]: sesame.v1.status.Event,
22732
22458
  [sesame.v1.common.EventTopic.EVENT_TOPIC_RECORDER]: sesame.v1.status.Event
22733
22459
  };
22734
22460
  let options = {