modal 0.8.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/index.cjs +2323 -242
- package/dist/index.d.cts +404 -23
- package/dist/index.d.ts +404 -23
- package/dist/index.js +2323 -242
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2017,6 +2017,31 @@ function environmentRoleToJSON(object) {
|
|
|
2017
2017
|
return "UNRECOGNIZED";
|
|
2018
2018
|
}
|
|
2019
2019
|
}
|
|
2020
|
+
function environmentTypeFromJSON(object) {
|
|
2021
|
+
switch (object) {
|
|
2022
|
+
case 0:
|
|
2023
|
+
case "ENVIRONMENT_TYPE_UNSPECIFIED":
|
|
2024
|
+
return 0 /* ENVIRONMENT_TYPE_UNSPECIFIED */;
|
|
2025
|
+
case 1:
|
|
2026
|
+
case "ENVIRONMENT_TYPE_PUBLIC":
|
|
2027
|
+
return 1 /* ENVIRONMENT_TYPE_PUBLIC */;
|
|
2028
|
+
case -1:
|
|
2029
|
+
case "UNRECOGNIZED":
|
|
2030
|
+
default:
|
|
2031
|
+
return -1 /* UNRECOGNIZED */;
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
function environmentTypeToJSON(object) {
|
|
2035
|
+
switch (object) {
|
|
2036
|
+
case 0 /* ENVIRONMENT_TYPE_UNSPECIFIED */:
|
|
2037
|
+
return "ENVIRONMENT_TYPE_UNSPECIFIED";
|
|
2038
|
+
case 1 /* ENVIRONMENT_TYPE_PUBLIC */:
|
|
2039
|
+
return "ENVIRONMENT_TYPE_PUBLIC";
|
|
2040
|
+
case -1 /* UNRECOGNIZED */:
|
|
2041
|
+
default:
|
|
2042
|
+
return "UNRECOGNIZED";
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2020
2045
|
function execOutputOptionFromJSON(object) {
|
|
2021
2046
|
switch (object) {
|
|
2022
2047
|
case 0:
|
|
@@ -13400,14 +13425,54 @@ var ContainerReloadVolumesResponse = {
|
|
|
13400
13425
|
return message;
|
|
13401
13426
|
}
|
|
13402
13427
|
};
|
|
13428
|
+
function createBaseContainerServerLifecycleReadyRequest() {
|
|
13429
|
+
return {};
|
|
13430
|
+
}
|
|
13431
|
+
var ContainerServerLifecycleReadyRequest = {
|
|
13432
|
+
encode(_, writer = new BinaryWriter()) {
|
|
13433
|
+
return writer;
|
|
13434
|
+
},
|
|
13435
|
+
decode(input, length) {
|
|
13436
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
13437
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
13438
|
+
const message = createBaseContainerServerLifecycleReadyRequest();
|
|
13439
|
+
while (reader.pos < end) {
|
|
13440
|
+
const tag = reader.uint32();
|
|
13441
|
+
switch (tag >>> 3) {
|
|
13442
|
+
}
|
|
13443
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
13444
|
+
break;
|
|
13445
|
+
}
|
|
13446
|
+
reader.skip(tag & 7);
|
|
13447
|
+
}
|
|
13448
|
+
return message;
|
|
13449
|
+
},
|
|
13450
|
+
fromJSON(_) {
|
|
13451
|
+
return {};
|
|
13452
|
+
},
|
|
13453
|
+
toJSON(_) {
|
|
13454
|
+
const obj = {};
|
|
13455
|
+
return obj;
|
|
13456
|
+
},
|
|
13457
|
+
create(base) {
|
|
13458
|
+
return ContainerServerLifecycleReadyRequest.fromPartial(base ?? {});
|
|
13459
|
+
},
|
|
13460
|
+
fromPartial(_) {
|
|
13461
|
+
const message = createBaseContainerServerLifecycleReadyRequest();
|
|
13462
|
+
return message;
|
|
13463
|
+
}
|
|
13464
|
+
};
|
|
13403
13465
|
function createBaseContainerStopRequest() {
|
|
13404
|
-
return { taskId: "" };
|
|
13466
|
+
return { taskId: "", graceful: false };
|
|
13405
13467
|
}
|
|
13406
13468
|
var ContainerStopRequest = {
|
|
13407
13469
|
encode(message, writer = new BinaryWriter()) {
|
|
13408
13470
|
if (message.taskId !== "") {
|
|
13409
13471
|
writer.uint32(10).string(message.taskId);
|
|
13410
13472
|
}
|
|
13473
|
+
if (message.graceful !== false) {
|
|
13474
|
+
writer.uint32(16).bool(message.graceful);
|
|
13475
|
+
}
|
|
13411
13476
|
return writer;
|
|
13412
13477
|
},
|
|
13413
13478
|
decode(input, length) {
|
|
@@ -13424,6 +13489,13 @@ var ContainerStopRequest = {
|
|
|
13424
13489
|
message.taskId = reader.string();
|
|
13425
13490
|
continue;
|
|
13426
13491
|
}
|
|
13492
|
+
case 2: {
|
|
13493
|
+
if (tag !== 16) {
|
|
13494
|
+
break;
|
|
13495
|
+
}
|
|
13496
|
+
message.graceful = reader.bool();
|
|
13497
|
+
continue;
|
|
13498
|
+
}
|
|
13427
13499
|
}
|
|
13428
13500
|
if ((tag & 7) === 4 || tag === 0) {
|
|
13429
13501
|
break;
|
|
@@ -13433,13 +13505,19 @@ var ContainerStopRequest = {
|
|
|
13433
13505
|
return message;
|
|
13434
13506
|
},
|
|
13435
13507
|
fromJSON(object) {
|
|
13436
|
-
return {
|
|
13508
|
+
return {
|
|
13509
|
+
taskId: isSet5(object.taskId) ? globalThis.String(object.taskId) : "",
|
|
13510
|
+
graceful: isSet5(object.graceful) ? globalThis.Boolean(object.graceful) : false
|
|
13511
|
+
};
|
|
13437
13512
|
},
|
|
13438
13513
|
toJSON(message) {
|
|
13439
13514
|
const obj = {};
|
|
13440
13515
|
if (message.taskId !== "") {
|
|
13441
13516
|
obj.taskId = message.taskId;
|
|
13442
13517
|
}
|
|
13518
|
+
if (message.graceful !== false) {
|
|
13519
|
+
obj.graceful = message.graceful;
|
|
13520
|
+
}
|
|
13443
13521
|
return obj;
|
|
13444
13522
|
},
|
|
13445
13523
|
create(base) {
|
|
@@ -13448,6 +13526,7 @@ var ContainerStopRequest = {
|
|
|
13448
13526
|
fromPartial(object) {
|
|
13449
13527
|
const message = createBaseContainerStopRequest();
|
|
13450
13528
|
message.taskId = object.taskId ?? "";
|
|
13529
|
+
message.graceful = object.graceful ?? false;
|
|
13451
13530
|
return message;
|
|
13452
13531
|
}
|
|
13453
13532
|
};
|
|
@@ -17495,8 +17574,280 @@ var EndpointStopResponse = {
|
|
|
17495
17574
|
return message;
|
|
17496
17575
|
}
|
|
17497
17576
|
};
|
|
17577
|
+
function createBaseEnvironmentBillingSummaryRequest() {
|
|
17578
|
+
return { startTimestamp: void 0, endTimestamp: void 0, environmentId: "" };
|
|
17579
|
+
}
|
|
17580
|
+
var EnvironmentBillingSummaryRequest = {
|
|
17581
|
+
encode(message, writer = new BinaryWriter()) {
|
|
17582
|
+
if (message.startTimestamp !== void 0) {
|
|
17583
|
+
Timestamp.encode(toTimestamp(message.startTimestamp), writer.uint32(10).fork()).join();
|
|
17584
|
+
}
|
|
17585
|
+
if (message.endTimestamp !== void 0) {
|
|
17586
|
+
Timestamp.encode(toTimestamp(message.endTimestamp), writer.uint32(18).fork()).join();
|
|
17587
|
+
}
|
|
17588
|
+
if (message.environmentId !== "") {
|
|
17589
|
+
writer.uint32(26).string(message.environmentId);
|
|
17590
|
+
}
|
|
17591
|
+
return writer;
|
|
17592
|
+
},
|
|
17593
|
+
decode(input, length) {
|
|
17594
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
17595
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
17596
|
+
const message = createBaseEnvironmentBillingSummaryRequest();
|
|
17597
|
+
while (reader.pos < end) {
|
|
17598
|
+
const tag = reader.uint32();
|
|
17599
|
+
switch (tag >>> 3) {
|
|
17600
|
+
case 1: {
|
|
17601
|
+
if (tag !== 10) {
|
|
17602
|
+
break;
|
|
17603
|
+
}
|
|
17604
|
+
message.startTimestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
17605
|
+
continue;
|
|
17606
|
+
}
|
|
17607
|
+
case 2: {
|
|
17608
|
+
if (tag !== 18) {
|
|
17609
|
+
break;
|
|
17610
|
+
}
|
|
17611
|
+
message.endTimestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
17612
|
+
continue;
|
|
17613
|
+
}
|
|
17614
|
+
case 3: {
|
|
17615
|
+
if (tag !== 26) {
|
|
17616
|
+
break;
|
|
17617
|
+
}
|
|
17618
|
+
message.environmentId = reader.string();
|
|
17619
|
+
continue;
|
|
17620
|
+
}
|
|
17621
|
+
}
|
|
17622
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
17623
|
+
break;
|
|
17624
|
+
}
|
|
17625
|
+
reader.skip(tag & 7);
|
|
17626
|
+
}
|
|
17627
|
+
return message;
|
|
17628
|
+
},
|
|
17629
|
+
fromJSON(object) {
|
|
17630
|
+
return {
|
|
17631
|
+
startTimestamp: isSet5(object.startTimestamp) ? fromJsonTimestamp(object.startTimestamp) : void 0,
|
|
17632
|
+
endTimestamp: isSet5(object.endTimestamp) ? fromJsonTimestamp(object.endTimestamp) : void 0,
|
|
17633
|
+
environmentId: isSet5(object.environmentId) ? globalThis.String(object.environmentId) : ""
|
|
17634
|
+
};
|
|
17635
|
+
},
|
|
17636
|
+
toJSON(message) {
|
|
17637
|
+
const obj = {};
|
|
17638
|
+
if (message.startTimestamp !== void 0) {
|
|
17639
|
+
obj.startTimestamp = message.startTimestamp.toISOString();
|
|
17640
|
+
}
|
|
17641
|
+
if (message.endTimestamp !== void 0) {
|
|
17642
|
+
obj.endTimestamp = message.endTimestamp.toISOString();
|
|
17643
|
+
}
|
|
17644
|
+
if (message.environmentId !== "") {
|
|
17645
|
+
obj.environmentId = message.environmentId;
|
|
17646
|
+
}
|
|
17647
|
+
return obj;
|
|
17648
|
+
},
|
|
17649
|
+
create(base) {
|
|
17650
|
+
return EnvironmentBillingSummaryRequest.fromPartial(base ?? {});
|
|
17651
|
+
},
|
|
17652
|
+
fromPartial(object) {
|
|
17653
|
+
const message = createBaseEnvironmentBillingSummaryRequest();
|
|
17654
|
+
message.startTimestamp = object.startTimestamp ?? void 0;
|
|
17655
|
+
message.endTimestamp = object.endTimestamp ?? void 0;
|
|
17656
|
+
message.environmentId = object.environmentId ?? "";
|
|
17657
|
+
return message;
|
|
17658
|
+
}
|
|
17659
|
+
};
|
|
17660
|
+
function createBaseEnvironmentBillingSummaryResponse() {
|
|
17661
|
+
return { startTimestamp: void 0, endTimestamp: void 0, meteredCost: "", meteredCostBreakdown: {} };
|
|
17662
|
+
}
|
|
17663
|
+
var EnvironmentBillingSummaryResponse = {
|
|
17664
|
+
encode(message, writer = new BinaryWriter()) {
|
|
17665
|
+
if (message.startTimestamp !== void 0) {
|
|
17666
|
+
Timestamp.encode(toTimestamp(message.startTimestamp), writer.uint32(10).fork()).join();
|
|
17667
|
+
}
|
|
17668
|
+
if (message.endTimestamp !== void 0) {
|
|
17669
|
+
Timestamp.encode(toTimestamp(message.endTimestamp), writer.uint32(18).fork()).join();
|
|
17670
|
+
}
|
|
17671
|
+
if (message.meteredCost !== "") {
|
|
17672
|
+
writer.uint32(26).string(message.meteredCost);
|
|
17673
|
+
}
|
|
17674
|
+
Object.entries(message.meteredCostBreakdown).forEach(([key, value]) => {
|
|
17675
|
+
EnvironmentBillingSummaryResponse_MeteredCostBreakdownEntry.encode(
|
|
17676
|
+
{ key, value },
|
|
17677
|
+
writer.uint32(34).fork()
|
|
17678
|
+
).join();
|
|
17679
|
+
});
|
|
17680
|
+
return writer;
|
|
17681
|
+
},
|
|
17682
|
+
decode(input, length) {
|
|
17683
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
17684
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
17685
|
+
const message = createBaseEnvironmentBillingSummaryResponse();
|
|
17686
|
+
while (reader.pos < end) {
|
|
17687
|
+
const tag = reader.uint32();
|
|
17688
|
+
switch (tag >>> 3) {
|
|
17689
|
+
case 1: {
|
|
17690
|
+
if (tag !== 10) {
|
|
17691
|
+
break;
|
|
17692
|
+
}
|
|
17693
|
+
message.startTimestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
17694
|
+
continue;
|
|
17695
|
+
}
|
|
17696
|
+
case 2: {
|
|
17697
|
+
if (tag !== 18) {
|
|
17698
|
+
break;
|
|
17699
|
+
}
|
|
17700
|
+
message.endTimestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
17701
|
+
continue;
|
|
17702
|
+
}
|
|
17703
|
+
case 3: {
|
|
17704
|
+
if (tag !== 26) {
|
|
17705
|
+
break;
|
|
17706
|
+
}
|
|
17707
|
+
message.meteredCost = reader.string();
|
|
17708
|
+
continue;
|
|
17709
|
+
}
|
|
17710
|
+
case 4: {
|
|
17711
|
+
if (tag !== 34) {
|
|
17712
|
+
break;
|
|
17713
|
+
}
|
|
17714
|
+
const entry4 = EnvironmentBillingSummaryResponse_MeteredCostBreakdownEntry.decode(reader, reader.uint32());
|
|
17715
|
+
if (entry4.value !== void 0) {
|
|
17716
|
+
message.meteredCostBreakdown[entry4.key] = entry4.value;
|
|
17717
|
+
}
|
|
17718
|
+
continue;
|
|
17719
|
+
}
|
|
17720
|
+
}
|
|
17721
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
17722
|
+
break;
|
|
17723
|
+
}
|
|
17724
|
+
reader.skip(tag & 7);
|
|
17725
|
+
}
|
|
17726
|
+
return message;
|
|
17727
|
+
},
|
|
17728
|
+
fromJSON(object) {
|
|
17729
|
+
return {
|
|
17730
|
+
startTimestamp: isSet5(object.startTimestamp) ? fromJsonTimestamp(object.startTimestamp) : void 0,
|
|
17731
|
+
endTimestamp: isSet5(object.endTimestamp) ? fromJsonTimestamp(object.endTimestamp) : void 0,
|
|
17732
|
+
meteredCost: isSet5(object.meteredCost) ? globalThis.String(object.meteredCost) : "",
|
|
17733
|
+
meteredCostBreakdown: isObject2(object.meteredCostBreakdown) ? Object.entries(object.meteredCostBreakdown).reduce((acc, [key, value]) => {
|
|
17734
|
+
acc[key] = String(value);
|
|
17735
|
+
return acc;
|
|
17736
|
+
}, {}) : {}
|
|
17737
|
+
};
|
|
17738
|
+
},
|
|
17739
|
+
toJSON(message) {
|
|
17740
|
+
const obj = {};
|
|
17741
|
+
if (message.startTimestamp !== void 0) {
|
|
17742
|
+
obj.startTimestamp = message.startTimestamp.toISOString();
|
|
17743
|
+
}
|
|
17744
|
+
if (message.endTimestamp !== void 0) {
|
|
17745
|
+
obj.endTimestamp = message.endTimestamp.toISOString();
|
|
17746
|
+
}
|
|
17747
|
+
if (message.meteredCost !== "") {
|
|
17748
|
+
obj.meteredCost = message.meteredCost;
|
|
17749
|
+
}
|
|
17750
|
+
if (message.meteredCostBreakdown) {
|
|
17751
|
+
const entries = Object.entries(message.meteredCostBreakdown);
|
|
17752
|
+
if (entries.length > 0) {
|
|
17753
|
+
obj.meteredCostBreakdown = {};
|
|
17754
|
+
entries.forEach(([k, v]) => {
|
|
17755
|
+
obj.meteredCostBreakdown[k] = v;
|
|
17756
|
+
});
|
|
17757
|
+
}
|
|
17758
|
+
}
|
|
17759
|
+
return obj;
|
|
17760
|
+
},
|
|
17761
|
+
create(base) {
|
|
17762
|
+
return EnvironmentBillingSummaryResponse.fromPartial(base ?? {});
|
|
17763
|
+
},
|
|
17764
|
+
fromPartial(object) {
|
|
17765
|
+
const message = createBaseEnvironmentBillingSummaryResponse();
|
|
17766
|
+
message.startTimestamp = object.startTimestamp ?? void 0;
|
|
17767
|
+
message.endTimestamp = object.endTimestamp ?? void 0;
|
|
17768
|
+
message.meteredCost = object.meteredCost ?? "";
|
|
17769
|
+
message.meteredCostBreakdown = Object.entries(object.meteredCostBreakdown ?? {}).reduce(
|
|
17770
|
+
(acc, [key, value]) => {
|
|
17771
|
+
if (value !== void 0) {
|
|
17772
|
+
acc[key] = globalThis.String(value);
|
|
17773
|
+
}
|
|
17774
|
+
return acc;
|
|
17775
|
+
},
|
|
17776
|
+
{}
|
|
17777
|
+
);
|
|
17778
|
+
return message;
|
|
17779
|
+
}
|
|
17780
|
+
};
|
|
17781
|
+
function createBaseEnvironmentBillingSummaryResponse_MeteredCostBreakdownEntry() {
|
|
17782
|
+
return { key: "", value: "" };
|
|
17783
|
+
}
|
|
17784
|
+
var EnvironmentBillingSummaryResponse_MeteredCostBreakdownEntry = {
|
|
17785
|
+
encode(message, writer = new BinaryWriter()) {
|
|
17786
|
+
if (message.key !== "") {
|
|
17787
|
+
writer.uint32(10).string(message.key);
|
|
17788
|
+
}
|
|
17789
|
+
if (message.value !== "") {
|
|
17790
|
+
writer.uint32(18).string(message.value);
|
|
17791
|
+
}
|
|
17792
|
+
return writer;
|
|
17793
|
+
},
|
|
17794
|
+
decode(input, length) {
|
|
17795
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
17796
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
17797
|
+
const message = createBaseEnvironmentBillingSummaryResponse_MeteredCostBreakdownEntry();
|
|
17798
|
+
while (reader.pos < end) {
|
|
17799
|
+
const tag = reader.uint32();
|
|
17800
|
+
switch (tag >>> 3) {
|
|
17801
|
+
case 1: {
|
|
17802
|
+
if (tag !== 10) {
|
|
17803
|
+
break;
|
|
17804
|
+
}
|
|
17805
|
+
message.key = reader.string();
|
|
17806
|
+
continue;
|
|
17807
|
+
}
|
|
17808
|
+
case 2: {
|
|
17809
|
+
if (tag !== 18) {
|
|
17810
|
+
break;
|
|
17811
|
+
}
|
|
17812
|
+
message.value = reader.string();
|
|
17813
|
+
continue;
|
|
17814
|
+
}
|
|
17815
|
+
}
|
|
17816
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
17817
|
+
break;
|
|
17818
|
+
}
|
|
17819
|
+
reader.skip(tag & 7);
|
|
17820
|
+
}
|
|
17821
|
+
return message;
|
|
17822
|
+
},
|
|
17823
|
+
fromJSON(object) {
|
|
17824
|
+
return {
|
|
17825
|
+
key: isSet5(object.key) ? globalThis.String(object.key) : "",
|
|
17826
|
+
value: isSet5(object.value) ? globalThis.String(object.value) : ""
|
|
17827
|
+
};
|
|
17828
|
+
},
|
|
17829
|
+
toJSON(message) {
|
|
17830
|
+
const obj = {};
|
|
17831
|
+
if (message.key !== "") {
|
|
17832
|
+
obj.key = message.key;
|
|
17833
|
+
}
|
|
17834
|
+
if (message.value !== "") {
|
|
17835
|
+
obj.value = message.value;
|
|
17836
|
+
}
|
|
17837
|
+
return obj;
|
|
17838
|
+
},
|
|
17839
|
+
create(base) {
|
|
17840
|
+
return EnvironmentBillingSummaryResponse_MeteredCostBreakdownEntry.fromPartial(base ?? {});
|
|
17841
|
+
},
|
|
17842
|
+
fromPartial(object) {
|
|
17843
|
+
const message = createBaseEnvironmentBillingSummaryResponse_MeteredCostBreakdownEntry();
|
|
17844
|
+
message.key = object.key ?? "";
|
|
17845
|
+
message.value = object.value ?? "";
|
|
17846
|
+
return message;
|
|
17847
|
+
}
|
|
17848
|
+
};
|
|
17498
17849
|
function createBaseEnvironmentCreateRequest() {
|
|
17499
|
-
return { name: "", isManaged: false, settings: void 0 };
|
|
17850
|
+
return { name: "", isManaged: false, settings: void 0, environmentType: 0 };
|
|
17500
17851
|
}
|
|
17501
17852
|
var EnvironmentCreateRequest = {
|
|
17502
17853
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -17509,6 +17860,9 @@ var EnvironmentCreateRequest = {
|
|
|
17509
17860
|
if (message.settings !== void 0) {
|
|
17510
17861
|
EnvironmentSettings.encode(message.settings, writer.uint32(26).fork()).join();
|
|
17511
17862
|
}
|
|
17863
|
+
if (message.environmentType !== 0) {
|
|
17864
|
+
writer.uint32(32).int32(message.environmentType);
|
|
17865
|
+
}
|
|
17512
17866
|
return writer;
|
|
17513
17867
|
},
|
|
17514
17868
|
decode(input, length) {
|
|
@@ -17539,6 +17893,13 @@ var EnvironmentCreateRequest = {
|
|
|
17539
17893
|
message.settings = EnvironmentSettings.decode(reader, reader.uint32());
|
|
17540
17894
|
continue;
|
|
17541
17895
|
}
|
|
17896
|
+
case 4: {
|
|
17897
|
+
if (tag !== 32) {
|
|
17898
|
+
break;
|
|
17899
|
+
}
|
|
17900
|
+
message.environmentType = reader.int32();
|
|
17901
|
+
continue;
|
|
17902
|
+
}
|
|
17542
17903
|
}
|
|
17543
17904
|
if ((tag & 7) === 4 || tag === 0) {
|
|
17544
17905
|
break;
|
|
@@ -17551,7 +17912,8 @@ var EnvironmentCreateRequest = {
|
|
|
17551
17912
|
return {
|
|
17552
17913
|
name: isSet5(object.name) ? globalThis.String(object.name) : "",
|
|
17553
17914
|
isManaged: isSet5(object.isManaged) ? globalThis.Boolean(object.isManaged) : false,
|
|
17554
|
-
settings: isSet5(object.settings) ? EnvironmentSettings.fromJSON(object.settings) : void 0
|
|
17915
|
+
settings: isSet5(object.settings) ? EnvironmentSettings.fromJSON(object.settings) : void 0,
|
|
17916
|
+
environmentType: isSet5(object.environmentType) ? environmentTypeFromJSON(object.environmentType) : 0
|
|
17555
17917
|
};
|
|
17556
17918
|
},
|
|
17557
17919
|
toJSON(message) {
|
|
@@ -17565,6 +17927,9 @@ var EnvironmentCreateRequest = {
|
|
|
17565
17927
|
if (message.settings !== void 0) {
|
|
17566
17928
|
obj.settings = EnvironmentSettings.toJSON(message.settings);
|
|
17567
17929
|
}
|
|
17930
|
+
if (message.environmentType !== 0) {
|
|
17931
|
+
obj.environmentType = environmentTypeToJSON(message.environmentType);
|
|
17932
|
+
}
|
|
17568
17933
|
return obj;
|
|
17569
17934
|
},
|
|
17570
17935
|
create(base) {
|
|
@@ -17575,6 +17940,7 @@ var EnvironmentCreateRequest = {
|
|
|
17575
17940
|
message.name = object.name ?? "";
|
|
17576
17941
|
message.isManaged = object.isManaged ?? false;
|
|
17577
17942
|
message.settings = object.settings !== void 0 && object.settings !== null ? EnvironmentSettings.fromPartial(object.settings) : void 0;
|
|
17943
|
+
message.environmentType = object.environmentType ?? 0;
|
|
17578
17944
|
return message;
|
|
17579
17945
|
}
|
|
17580
17946
|
};
|
|
@@ -18262,7 +18628,8 @@ function createBaseEnvironmentListItem() {
|
|
|
18262
18628
|
cycleBudgetDollars: void 0,
|
|
18263
18629
|
effectiveCycleSpendLimit: 0,
|
|
18264
18630
|
currentCycleUsage: 0,
|
|
18265
|
-
spendLimitReached: false
|
|
18631
|
+
spendLimitReached: false,
|
|
18632
|
+
environmentType: 0
|
|
18266
18633
|
};
|
|
18267
18634
|
}
|
|
18268
18635
|
var EnvironmentListItem = {
|
|
@@ -18309,6 +18676,9 @@ var EnvironmentListItem = {
|
|
|
18309
18676
|
if (message.spendLimitReached !== false) {
|
|
18310
18677
|
writer.uint32(112).bool(message.spendLimitReached);
|
|
18311
18678
|
}
|
|
18679
|
+
if (message.environmentType !== 0) {
|
|
18680
|
+
writer.uint32(120).int32(message.environmentType);
|
|
18681
|
+
}
|
|
18312
18682
|
return writer;
|
|
18313
18683
|
},
|
|
18314
18684
|
decode(input, length) {
|
|
@@ -18416,6 +18786,13 @@ var EnvironmentListItem = {
|
|
|
18416
18786
|
message.spendLimitReached = reader.bool();
|
|
18417
18787
|
continue;
|
|
18418
18788
|
}
|
|
18789
|
+
case 15: {
|
|
18790
|
+
if (tag !== 120) {
|
|
18791
|
+
break;
|
|
18792
|
+
}
|
|
18793
|
+
message.environmentType = reader.int32();
|
|
18794
|
+
continue;
|
|
18795
|
+
}
|
|
18419
18796
|
}
|
|
18420
18797
|
if ((tag & 7) === 4 || tag === 0) {
|
|
18421
18798
|
break;
|
|
@@ -18439,7 +18816,8 @@ var EnvironmentListItem = {
|
|
|
18439
18816
|
cycleBudgetDollars: isSet5(object.cycleBudgetDollars) ? globalThis.Number(object.cycleBudgetDollars) : void 0,
|
|
18440
18817
|
effectiveCycleSpendLimit: isSet5(object.effectiveCycleSpendLimit) ? globalThis.Number(object.effectiveCycleSpendLimit) : 0,
|
|
18441
18818
|
currentCycleUsage: isSet5(object.currentCycleUsage) ? globalThis.Number(object.currentCycleUsage) : 0,
|
|
18442
|
-
spendLimitReached: isSet5(object.spendLimitReached) ? globalThis.Boolean(object.spendLimitReached) : false
|
|
18819
|
+
spendLimitReached: isSet5(object.spendLimitReached) ? globalThis.Boolean(object.spendLimitReached) : false,
|
|
18820
|
+
environmentType: isSet5(object.environmentType) ? environmentTypeFromJSON(object.environmentType) : 0
|
|
18443
18821
|
};
|
|
18444
18822
|
},
|
|
18445
18823
|
toJSON(message) {
|
|
@@ -18486,6 +18864,9 @@ var EnvironmentListItem = {
|
|
|
18486
18864
|
if (message.spendLimitReached !== false) {
|
|
18487
18865
|
obj.spendLimitReached = message.spendLimitReached;
|
|
18488
18866
|
}
|
|
18867
|
+
if (message.environmentType !== 0) {
|
|
18868
|
+
obj.environmentType = environmentTypeToJSON(message.environmentType);
|
|
18869
|
+
}
|
|
18489
18870
|
return obj;
|
|
18490
18871
|
},
|
|
18491
18872
|
create(base) {
|
|
@@ -18507,6 +18888,7 @@ var EnvironmentListItem = {
|
|
|
18507
18888
|
message.effectiveCycleSpendLimit = object.effectiveCycleSpendLimit ?? 0;
|
|
18508
18889
|
message.currentCycleUsage = object.currentCycleUsage ?? 0;
|
|
18509
18890
|
message.spendLimitReached = object.spendLimitReached ?? false;
|
|
18891
|
+
message.environmentType = object.environmentType ?? 0;
|
|
18510
18892
|
return message;
|
|
18511
18893
|
}
|
|
18512
18894
|
};
|
|
@@ -18564,7 +18946,7 @@ var EnvironmentListResponse = {
|
|
|
18564
18946
|
}
|
|
18565
18947
|
};
|
|
18566
18948
|
function createBaseEnvironmentMetadata() {
|
|
18567
|
-
return { name: "", settings: void 0 };
|
|
18949
|
+
return { name: "", settings: void 0, environmentType: 0 };
|
|
18568
18950
|
}
|
|
18569
18951
|
var EnvironmentMetadata = {
|
|
18570
18952
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -18574,6 +18956,9 @@ var EnvironmentMetadata = {
|
|
|
18574
18956
|
if (message.settings !== void 0) {
|
|
18575
18957
|
EnvironmentSettings.encode(message.settings, writer.uint32(18).fork()).join();
|
|
18576
18958
|
}
|
|
18959
|
+
if (message.environmentType !== 0) {
|
|
18960
|
+
writer.uint32(24).int32(message.environmentType);
|
|
18961
|
+
}
|
|
18577
18962
|
return writer;
|
|
18578
18963
|
},
|
|
18579
18964
|
decode(input, length) {
|
|
@@ -18597,6 +18982,13 @@ var EnvironmentMetadata = {
|
|
|
18597
18982
|
message.settings = EnvironmentSettings.decode(reader, reader.uint32());
|
|
18598
18983
|
continue;
|
|
18599
18984
|
}
|
|
18985
|
+
case 3: {
|
|
18986
|
+
if (tag !== 24) {
|
|
18987
|
+
break;
|
|
18988
|
+
}
|
|
18989
|
+
message.environmentType = reader.int32();
|
|
18990
|
+
continue;
|
|
18991
|
+
}
|
|
18600
18992
|
}
|
|
18601
18993
|
if ((tag & 7) === 4 || tag === 0) {
|
|
18602
18994
|
break;
|
|
@@ -18608,7 +19000,8 @@ var EnvironmentMetadata = {
|
|
|
18608
19000
|
fromJSON(object) {
|
|
18609
19001
|
return {
|
|
18610
19002
|
name: isSet5(object.name) ? globalThis.String(object.name) : "",
|
|
18611
|
-
settings: isSet5(object.settings) ? EnvironmentSettings.fromJSON(object.settings) : void 0
|
|
19003
|
+
settings: isSet5(object.settings) ? EnvironmentSettings.fromJSON(object.settings) : void 0,
|
|
19004
|
+
environmentType: isSet5(object.environmentType) ? environmentTypeFromJSON(object.environmentType) : 0
|
|
18612
19005
|
};
|
|
18613
19006
|
},
|
|
18614
19007
|
toJSON(message) {
|
|
@@ -18619,6 +19012,9 @@ var EnvironmentMetadata = {
|
|
|
18619
19012
|
if (message.settings !== void 0) {
|
|
18620
19013
|
obj.settings = EnvironmentSettings.toJSON(message.settings);
|
|
18621
19014
|
}
|
|
19015
|
+
if (message.environmentType !== 0) {
|
|
19016
|
+
obj.environmentType = environmentTypeToJSON(message.environmentType);
|
|
19017
|
+
}
|
|
18622
19018
|
return obj;
|
|
18623
19019
|
},
|
|
18624
19020
|
create(base) {
|
|
@@ -18628,6 +19024,7 @@ var EnvironmentMetadata = {
|
|
|
18628
19024
|
const message = createBaseEnvironmentMetadata();
|
|
18629
19025
|
message.name = object.name ?? "";
|
|
18630
19026
|
message.settings = object.settings !== void 0 && object.settings !== null ? EnvironmentSettings.fromPartial(object.settings) : void 0;
|
|
19027
|
+
message.environmentType = object.environmentType ?? 0;
|
|
18631
19028
|
return message;
|
|
18632
19029
|
}
|
|
18633
19030
|
};
|
|
@@ -21881,7 +22278,7 @@ var FunctionCallFromIdRequest = {
|
|
|
21881
22278
|
}
|
|
21882
22279
|
};
|
|
21883
22280
|
function createBaseFunctionCallFromIdResponse() {
|
|
21884
|
-
return { functionCallId: "", numInputs: 0 };
|
|
22281
|
+
return { functionCallId: "", numInputs: 0, metadata: void 0 };
|
|
21885
22282
|
}
|
|
21886
22283
|
var FunctionCallFromIdResponse = {
|
|
21887
22284
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -21891,6 +22288,9 @@ var FunctionCallFromIdResponse = {
|
|
|
21891
22288
|
if (message.numInputs !== 0) {
|
|
21892
22289
|
writer.uint32(16).int32(message.numInputs);
|
|
21893
22290
|
}
|
|
22291
|
+
if (message.metadata !== void 0) {
|
|
22292
|
+
FunctionCallHandleMetadata.encode(message.metadata, writer.uint32(26).fork()).join();
|
|
22293
|
+
}
|
|
21894
22294
|
return writer;
|
|
21895
22295
|
},
|
|
21896
22296
|
decode(input, length) {
|
|
@@ -21914,6 +22314,13 @@ var FunctionCallFromIdResponse = {
|
|
|
21914
22314
|
message.numInputs = reader.int32();
|
|
21915
22315
|
continue;
|
|
21916
22316
|
}
|
|
22317
|
+
case 3: {
|
|
22318
|
+
if (tag !== 26) {
|
|
22319
|
+
break;
|
|
22320
|
+
}
|
|
22321
|
+
message.metadata = FunctionCallHandleMetadata.decode(reader, reader.uint32());
|
|
22322
|
+
continue;
|
|
22323
|
+
}
|
|
21917
22324
|
}
|
|
21918
22325
|
if ((tag & 7) === 4 || tag === 0) {
|
|
21919
22326
|
break;
|
|
@@ -21925,7 +22332,8 @@ var FunctionCallFromIdResponse = {
|
|
|
21925
22332
|
fromJSON(object) {
|
|
21926
22333
|
return {
|
|
21927
22334
|
functionCallId: isSet5(object.functionCallId) ? globalThis.String(object.functionCallId) : "",
|
|
21928
|
-
numInputs: isSet5(object.numInputs) ? globalThis.Number(object.numInputs) : 0
|
|
22335
|
+
numInputs: isSet5(object.numInputs) ? globalThis.Number(object.numInputs) : 0,
|
|
22336
|
+
metadata: isSet5(object.metadata) ? FunctionCallHandleMetadata.fromJSON(object.metadata) : void 0
|
|
21929
22337
|
};
|
|
21930
22338
|
},
|
|
21931
22339
|
toJSON(message) {
|
|
@@ -21936,6 +22344,9 @@ var FunctionCallFromIdResponse = {
|
|
|
21936
22344
|
if (message.numInputs !== 0) {
|
|
21937
22345
|
obj.numInputs = Math.round(message.numInputs);
|
|
21938
22346
|
}
|
|
22347
|
+
if (message.metadata !== void 0) {
|
|
22348
|
+
obj.metadata = FunctionCallHandleMetadata.toJSON(message.metadata);
|
|
22349
|
+
}
|
|
21939
22350
|
return obj;
|
|
21940
22351
|
},
|
|
21941
22352
|
create(base) {
|
|
@@ -21945,6 +22356,7 @@ var FunctionCallFromIdResponse = {
|
|
|
21945
22356
|
const message = createBaseFunctionCallFromIdResponse();
|
|
21946
22357
|
message.functionCallId = object.functionCallId ?? "";
|
|
21947
22358
|
message.numInputs = object.numInputs ?? 0;
|
|
22359
|
+
message.metadata = object.metadata !== void 0 && object.metadata !== null ? FunctionCallHandleMetadata.fromPartial(object.metadata) : void 0;
|
|
21948
22360
|
return message;
|
|
21949
22361
|
}
|
|
21950
22362
|
};
|
|
@@ -22031,6 +22443,74 @@ var FunctionCallGetDataRequest = {
|
|
|
22031
22443
|
return message;
|
|
22032
22444
|
}
|
|
22033
22445
|
};
|
|
22446
|
+
function createBaseFunctionCallHandleMetadata() {
|
|
22447
|
+
return { appId: "", functionId: "" };
|
|
22448
|
+
}
|
|
22449
|
+
var FunctionCallHandleMetadata = {
|
|
22450
|
+
encode(message, writer = new BinaryWriter()) {
|
|
22451
|
+
if (message.appId !== "") {
|
|
22452
|
+
writer.uint32(10).string(message.appId);
|
|
22453
|
+
}
|
|
22454
|
+
if (message.functionId !== "") {
|
|
22455
|
+
writer.uint32(18).string(message.functionId);
|
|
22456
|
+
}
|
|
22457
|
+
return writer;
|
|
22458
|
+
},
|
|
22459
|
+
decode(input, length) {
|
|
22460
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
22461
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
22462
|
+
const message = createBaseFunctionCallHandleMetadata();
|
|
22463
|
+
while (reader.pos < end) {
|
|
22464
|
+
const tag = reader.uint32();
|
|
22465
|
+
switch (tag >>> 3) {
|
|
22466
|
+
case 1: {
|
|
22467
|
+
if (tag !== 10) {
|
|
22468
|
+
break;
|
|
22469
|
+
}
|
|
22470
|
+
message.appId = reader.string();
|
|
22471
|
+
continue;
|
|
22472
|
+
}
|
|
22473
|
+
case 2: {
|
|
22474
|
+
if (tag !== 18) {
|
|
22475
|
+
break;
|
|
22476
|
+
}
|
|
22477
|
+
message.functionId = reader.string();
|
|
22478
|
+
continue;
|
|
22479
|
+
}
|
|
22480
|
+
}
|
|
22481
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
22482
|
+
break;
|
|
22483
|
+
}
|
|
22484
|
+
reader.skip(tag & 7);
|
|
22485
|
+
}
|
|
22486
|
+
return message;
|
|
22487
|
+
},
|
|
22488
|
+
fromJSON(object) {
|
|
22489
|
+
return {
|
|
22490
|
+
appId: isSet5(object.appId) ? globalThis.String(object.appId) : "",
|
|
22491
|
+
functionId: isSet5(object.functionId) ? globalThis.String(object.functionId) : ""
|
|
22492
|
+
};
|
|
22493
|
+
},
|
|
22494
|
+
toJSON(message) {
|
|
22495
|
+
const obj = {};
|
|
22496
|
+
if (message.appId !== "") {
|
|
22497
|
+
obj.appId = message.appId;
|
|
22498
|
+
}
|
|
22499
|
+
if (message.functionId !== "") {
|
|
22500
|
+
obj.functionId = message.functionId;
|
|
22501
|
+
}
|
|
22502
|
+
return obj;
|
|
22503
|
+
},
|
|
22504
|
+
create(base) {
|
|
22505
|
+
return FunctionCallHandleMetadata.fromPartial(base ?? {});
|
|
22506
|
+
},
|
|
22507
|
+
fromPartial(object) {
|
|
22508
|
+
const message = createBaseFunctionCallHandleMetadata();
|
|
22509
|
+
message.appId = object.appId ?? "";
|
|
22510
|
+
message.functionId = object.functionId ?? "";
|
|
22511
|
+
return message;
|
|
22512
|
+
}
|
|
22513
|
+
};
|
|
22034
22514
|
function createBaseFunctionCallInfo() {
|
|
22035
22515
|
return {
|
|
22036
22516
|
functionCallId: "",
|
|
@@ -25153,7 +25633,8 @@ function createBaseFunctionHandleMetadata() {
|
|
|
25153
25633
|
maxObjectSizeBytes: void 0,
|
|
25154
25634
|
ExperimentalFlashUrls: [],
|
|
25155
25635
|
supportedInputFormats: [],
|
|
25156
|
-
supportedOutputFormats: []
|
|
25636
|
+
supportedOutputFormats: [],
|
|
25637
|
+
appId: ""
|
|
25157
25638
|
};
|
|
25158
25639
|
}
|
|
25159
25640
|
var FunctionHandleMetadata = {
|
|
@@ -25210,6 +25691,9 @@ var FunctionHandleMetadata = {
|
|
|
25210
25691
|
writer.int32(v);
|
|
25211
25692
|
}
|
|
25212
25693
|
writer.join();
|
|
25694
|
+
if (message.appId !== "") {
|
|
25695
|
+
writer.uint32(418).string(message.appId);
|
|
25696
|
+
}
|
|
25213
25697
|
return writer;
|
|
25214
25698
|
},
|
|
25215
25699
|
decode(input, length) {
|
|
@@ -25348,6 +25832,13 @@ var FunctionHandleMetadata = {
|
|
|
25348
25832
|
}
|
|
25349
25833
|
break;
|
|
25350
25834
|
}
|
|
25835
|
+
case 52: {
|
|
25836
|
+
if (tag !== 418) {
|
|
25837
|
+
break;
|
|
25838
|
+
}
|
|
25839
|
+
message.appId = reader.string();
|
|
25840
|
+
continue;
|
|
25841
|
+
}
|
|
25351
25842
|
}
|
|
25352
25843
|
if ((tag & 7) === 4 || tag === 0) {
|
|
25353
25844
|
break;
|
|
@@ -25379,7 +25870,8 @@ var FunctionHandleMetadata = {
|
|
|
25379
25870
|
maxObjectSizeBytes: isSet5(object.maxObjectSizeBytes) ? globalThis.Number(object.maxObjectSizeBytes) : void 0,
|
|
25380
25871
|
ExperimentalFlashUrls: globalThis.Array.isArray(object?.ExperimentalFlashUrls) ? object.ExperimentalFlashUrls.map((e) => globalThis.String(e)) : [],
|
|
25381
25872
|
supportedInputFormats: globalThis.Array.isArray(object?.supportedInputFormats) ? object.supportedInputFormats.map((e) => dataFormatFromJSON(e)) : [],
|
|
25382
|
-
supportedOutputFormats: globalThis.Array.isArray(object?.supportedOutputFormats) ? object.supportedOutputFormats.map((e) => dataFormatFromJSON(e)) : []
|
|
25873
|
+
supportedOutputFormats: globalThis.Array.isArray(object?.supportedOutputFormats) ? object.supportedOutputFormats.map((e) => dataFormatFromJSON(e)) : [],
|
|
25874
|
+
appId: isSet5(object.appId) ? globalThis.String(object.appId) : ""
|
|
25383
25875
|
};
|
|
25384
25876
|
},
|
|
25385
25877
|
toJSON(message) {
|
|
@@ -25438,6 +25930,9 @@ var FunctionHandleMetadata = {
|
|
|
25438
25930
|
if (message.supportedOutputFormats?.length) {
|
|
25439
25931
|
obj.supportedOutputFormats = message.supportedOutputFormats.map((e) => dataFormatToJSON(e));
|
|
25440
25932
|
}
|
|
25933
|
+
if (message.appId !== "") {
|
|
25934
|
+
obj.appId = message.appId;
|
|
25935
|
+
}
|
|
25441
25936
|
return obj;
|
|
25442
25937
|
},
|
|
25443
25938
|
create(base) {
|
|
@@ -25466,6 +25961,7 @@ var FunctionHandleMetadata = {
|
|
|
25466
25961
|
message.ExperimentalFlashUrls = object.ExperimentalFlashUrls?.map((e) => e) || [];
|
|
25467
25962
|
message.supportedInputFormats = object.supportedInputFormats?.map((e) => e) || [];
|
|
25468
25963
|
message.supportedOutputFormats = object.supportedOutputFormats?.map((e) => e) || [];
|
|
25964
|
+
message.appId = object.appId ?? "";
|
|
25469
25965
|
return message;
|
|
25470
25966
|
}
|
|
25471
25967
|
};
|
|
@@ -25958,7 +26454,8 @@ function createBaseFunctionOptions() {
|
|
|
25958
26454
|
cloudProviderStr: void 0,
|
|
25959
26455
|
replaceCloudBucketMounts: false,
|
|
25960
26456
|
cloudBucketMounts: [],
|
|
25961
|
-
pinnedAppVersion: void 0
|
|
26457
|
+
pinnedAppVersion: void 0,
|
|
26458
|
+
routingRegion: void 0
|
|
25962
26459
|
};
|
|
25963
26460
|
}
|
|
25964
26461
|
var FunctionOptions = {
|
|
@@ -26026,6 +26523,9 @@ var FunctionOptions = {
|
|
|
26026
26523
|
if (message.pinnedAppVersion !== void 0) {
|
|
26027
26524
|
writer.uint32(168).int32(message.pinnedAppVersion);
|
|
26028
26525
|
}
|
|
26526
|
+
if (message.routingRegion !== void 0) {
|
|
26527
|
+
writer.uint32(178).string(message.routingRegion);
|
|
26528
|
+
}
|
|
26029
26529
|
return writer;
|
|
26030
26530
|
},
|
|
26031
26531
|
decode(input, length) {
|
|
@@ -26182,6 +26682,13 @@ var FunctionOptions = {
|
|
|
26182
26682
|
message.pinnedAppVersion = reader.int32();
|
|
26183
26683
|
continue;
|
|
26184
26684
|
}
|
|
26685
|
+
case 22: {
|
|
26686
|
+
if (tag !== 178) {
|
|
26687
|
+
break;
|
|
26688
|
+
}
|
|
26689
|
+
message.routingRegion = reader.string();
|
|
26690
|
+
continue;
|
|
26691
|
+
}
|
|
26185
26692
|
}
|
|
26186
26693
|
if ((tag & 7) === 4 || tag === 0) {
|
|
26187
26694
|
break;
|
|
@@ -26212,7 +26719,8 @@ var FunctionOptions = {
|
|
|
26212
26719
|
cloudProviderStr: isSet5(object.cloudProviderStr) ? globalThis.String(object.cloudProviderStr) : void 0,
|
|
26213
26720
|
replaceCloudBucketMounts: isSet5(object.replaceCloudBucketMounts) ? globalThis.Boolean(object.replaceCloudBucketMounts) : false,
|
|
26214
26721
|
cloudBucketMounts: globalThis.Array.isArray(object?.cloudBucketMounts) ? object.cloudBucketMounts.map((e) => CloudBucketMount.fromJSON(e)) : [],
|
|
26215
|
-
pinnedAppVersion: isSet5(object.pinnedAppVersion) ? globalThis.Number(object.pinnedAppVersion) : void 0
|
|
26722
|
+
pinnedAppVersion: isSet5(object.pinnedAppVersion) ? globalThis.Number(object.pinnedAppVersion) : void 0,
|
|
26723
|
+
routingRegion: isSet5(object.routingRegion) ? globalThis.String(object.routingRegion) : void 0
|
|
26216
26724
|
};
|
|
26217
26725
|
},
|
|
26218
26726
|
toJSON(message) {
|
|
@@ -26280,6 +26788,9 @@ var FunctionOptions = {
|
|
|
26280
26788
|
if (message.pinnedAppVersion !== void 0) {
|
|
26281
26789
|
obj.pinnedAppVersion = Math.round(message.pinnedAppVersion);
|
|
26282
26790
|
}
|
|
26791
|
+
if (message.routingRegion !== void 0) {
|
|
26792
|
+
obj.routingRegion = message.routingRegion;
|
|
26793
|
+
}
|
|
26283
26794
|
return obj;
|
|
26284
26795
|
},
|
|
26285
26796
|
create(base) {
|
|
@@ -26308,6 +26819,7 @@ var FunctionOptions = {
|
|
|
26308
26819
|
message.replaceCloudBucketMounts = object.replaceCloudBucketMounts ?? false;
|
|
26309
26820
|
message.cloudBucketMounts = object.cloudBucketMounts?.map((e) => CloudBucketMount.fromPartial(e)) || [];
|
|
26310
26821
|
message.pinnedAppVersion = object.pinnedAppVersion ?? void 0;
|
|
26822
|
+
message.routingRegion = object.routingRegion ?? void 0;
|
|
26311
26823
|
return message;
|
|
26312
26824
|
}
|
|
26313
26825
|
};
|
|
@@ -30107,7 +30619,7 @@ var ImageMetadata_PythonPackagesEntry = {
|
|
|
30107
30619
|
}
|
|
30108
30620
|
};
|
|
30109
30621
|
function createBaseImagePublishRequest() {
|
|
30110
|
-
return { imageId: "", tag: "", environmentName: "",
|
|
30622
|
+
return { imageId: "", tag: "", environmentName: "", allowPublic: false };
|
|
30111
30623
|
}
|
|
30112
30624
|
var ImagePublishRequest = {
|
|
30113
30625
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -30120,8 +30632,8 @@ var ImagePublishRequest = {
|
|
|
30120
30632
|
if (message.environmentName !== "") {
|
|
30121
30633
|
writer.uint32(26).string(message.environmentName);
|
|
30122
30634
|
}
|
|
30123
|
-
if (message.
|
|
30124
|
-
writer.uint32(32).bool(message.
|
|
30635
|
+
if (message.allowPublic !== false) {
|
|
30636
|
+
writer.uint32(32).bool(message.allowPublic);
|
|
30125
30637
|
}
|
|
30126
30638
|
return writer;
|
|
30127
30639
|
},
|
|
@@ -30157,7 +30669,7 @@ var ImagePublishRequest = {
|
|
|
30157
30669
|
if (tag !== 32) {
|
|
30158
30670
|
break;
|
|
30159
30671
|
}
|
|
30160
|
-
message.
|
|
30672
|
+
message.allowPublic = reader.bool();
|
|
30161
30673
|
continue;
|
|
30162
30674
|
}
|
|
30163
30675
|
}
|
|
@@ -30173,7 +30685,7 @@ var ImagePublishRequest = {
|
|
|
30173
30685
|
imageId: isSet5(object.imageId) ? globalThis.String(object.imageId) : "",
|
|
30174
30686
|
tag: isSet5(object.tag) ? globalThis.String(object.tag) : "",
|
|
30175
30687
|
environmentName: isSet5(object.environmentName) ? globalThis.String(object.environmentName) : "",
|
|
30176
|
-
|
|
30688
|
+
allowPublic: isSet5(object.allowPublic) ? globalThis.Boolean(object.allowPublic) : false
|
|
30177
30689
|
};
|
|
30178
30690
|
},
|
|
30179
30691
|
toJSON(message) {
|
|
@@ -30187,8 +30699,8 @@ var ImagePublishRequest = {
|
|
|
30187
30699
|
if (message.environmentName !== "") {
|
|
30188
30700
|
obj.environmentName = message.environmentName;
|
|
30189
30701
|
}
|
|
30190
|
-
if (message.
|
|
30191
|
-
obj.
|
|
30702
|
+
if (message.allowPublic !== false) {
|
|
30703
|
+
obj.allowPublic = message.allowPublic;
|
|
30192
30704
|
}
|
|
30193
30705
|
return obj;
|
|
30194
30706
|
},
|
|
@@ -30200,7 +30712,7 @@ var ImagePublishRequest = {
|
|
|
30200
30712
|
message.imageId = object.imageId ?? "";
|
|
30201
30713
|
message.tag = object.tag ?? "";
|
|
30202
30714
|
message.environmentName = object.environmentName ?? "";
|
|
30203
|
-
message.
|
|
30715
|
+
message.allowPublic = object.allowPublic ?? false;
|
|
30204
30716
|
return message;
|
|
30205
30717
|
}
|
|
30206
30718
|
};
|
|
@@ -30341,7 +30853,7 @@ var ImageRegistryConfig = {
|
|
|
30341
30853
|
}
|
|
30342
30854
|
};
|
|
30343
30855
|
function createBaseImageTagRevisionsItem() {
|
|
30344
|
-
return { imageId: "", revisionId: "", createdAt: 0 };
|
|
30856
|
+
return { imageId: "", revisionId: "", createdAt: 0, publishedBy: "" };
|
|
30345
30857
|
}
|
|
30346
30858
|
var ImageTagRevisionsItem = {
|
|
30347
30859
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -30354,6 +30866,9 @@ var ImageTagRevisionsItem = {
|
|
|
30354
30866
|
if (message.createdAt !== 0) {
|
|
30355
30867
|
writer.uint32(25).double(message.createdAt);
|
|
30356
30868
|
}
|
|
30869
|
+
if (message.publishedBy !== "") {
|
|
30870
|
+
writer.uint32(34).string(message.publishedBy);
|
|
30871
|
+
}
|
|
30357
30872
|
return writer;
|
|
30358
30873
|
},
|
|
30359
30874
|
decode(input, length) {
|
|
@@ -30384,6 +30899,13 @@ var ImageTagRevisionsItem = {
|
|
|
30384
30899
|
message.createdAt = reader.double();
|
|
30385
30900
|
continue;
|
|
30386
30901
|
}
|
|
30902
|
+
case 4: {
|
|
30903
|
+
if (tag !== 34) {
|
|
30904
|
+
break;
|
|
30905
|
+
}
|
|
30906
|
+
message.publishedBy = reader.string();
|
|
30907
|
+
continue;
|
|
30908
|
+
}
|
|
30387
30909
|
}
|
|
30388
30910
|
if ((tag & 7) === 4 || tag === 0) {
|
|
30389
30911
|
break;
|
|
@@ -30396,7 +30918,8 @@ var ImageTagRevisionsItem = {
|
|
|
30396
30918
|
return {
|
|
30397
30919
|
imageId: isSet5(object.imageId) ? globalThis.String(object.imageId) : "",
|
|
30398
30920
|
revisionId: isSet5(object.revisionId) ? globalThis.String(object.revisionId) : "",
|
|
30399
|
-
createdAt: isSet5(object.createdAt) ? globalThis.Number(object.createdAt) : 0
|
|
30921
|
+
createdAt: isSet5(object.createdAt) ? globalThis.Number(object.createdAt) : 0,
|
|
30922
|
+
publishedBy: isSet5(object.publishedBy) ? globalThis.String(object.publishedBy) : ""
|
|
30400
30923
|
};
|
|
30401
30924
|
},
|
|
30402
30925
|
toJSON(message) {
|
|
@@ -30410,6 +30933,9 @@ var ImageTagRevisionsItem = {
|
|
|
30410
30933
|
if (message.createdAt !== 0) {
|
|
30411
30934
|
obj.createdAt = message.createdAt;
|
|
30412
30935
|
}
|
|
30936
|
+
if (message.publishedBy !== "") {
|
|
30937
|
+
obj.publishedBy = message.publishedBy;
|
|
30938
|
+
}
|
|
30413
30939
|
return obj;
|
|
30414
30940
|
},
|
|
30415
30941
|
create(base) {
|
|
@@ -30420,6 +30946,7 @@ var ImageTagRevisionsItem = {
|
|
|
30420
30946
|
message.imageId = object.imageId ?? "";
|
|
30421
30947
|
message.revisionId = object.revisionId ?? "";
|
|
30422
30948
|
message.createdAt = object.createdAt ?? 0;
|
|
30949
|
+
message.publishedBy = object.publishedBy ?? "";
|
|
30423
30950
|
return message;
|
|
30424
30951
|
}
|
|
30425
30952
|
};
|
|
@@ -31837,6 +32364,112 @@ var MethodDefinition = {
|
|
|
31837
32364
|
return message;
|
|
31838
32365
|
}
|
|
31839
32366
|
};
|
|
32367
|
+
function createBaseMountBatchedCheckExistenceRequest() {
|
|
32368
|
+
return { sha256HexHashes: [] };
|
|
32369
|
+
}
|
|
32370
|
+
var MountBatchedCheckExistenceRequest = {
|
|
32371
|
+
encode(message, writer = new BinaryWriter()) {
|
|
32372
|
+
for (const v of message.sha256HexHashes) {
|
|
32373
|
+
writer.uint32(10).string(v);
|
|
32374
|
+
}
|
|
32375
|
+
return writer;
|
|
32376
|
+
},
|
|
32377
|
+
decode(input, length) {
|
|
32378
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
32379
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
32380
|
+
const message = createBaseMountBatchedCheckExistenceRequest();
|
|
32381
|
+
while (reader.pos < end) {
|
|
32382
|
+
const tag = reader.uint32();
|
|
32383
|
+
switch (tag >>> 3) {
|
|
32384
|
+
case 1: {
|
|
32385
|
+
if (tag !== 10) {
|
|
32386
|
+
break;
|
|
32387
|
+
}
|
|
32388
|
+
message.sha256HexHashes.push(reader.string());
|
|
32389
|
+
continue;
|
|
32390
|
+
}
|
|
32391
|
+
}
|
|
32392
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
32393
|
+
break;
|
|
32394
|
+
}
|
|
32395
|
+
reader.skip(tag & 7);
|
|
32396
|
+
}
|
|
32397
|
+
return message;
|
|
32398
|
+
},
|
|
32399
|
+
fromJSON(object) {
|
|
32400
|
+
return {
|
|
32401
|
+
sha256HexHashes: globalThis.Array.isArray(object?.sha256HexHashes) ? object.sha256HexHashes.map((e) => globalThis.String(e)) : []
|
|
32402
|
+
};
|
|
32403
|
+
},
|
|
32404
|
+
toJSON(message) {
|
|
32405
|
+
const obj = {};
|
|
32406
|
+
if (message.sha256HexHashes?.length) {
|
|
32407
|
+
obj.sha256HexHashes = message.sha256HexHashes;
|
|
32408
|
+
}
|
|
32409
|
+
return obj;
|
|
32410
|
+
},
|
|
32411
|
+
create(base) {
|
|
32412
|
+
return MountBatchedCheckExistenceRequest.fromPartial(base ?? {});
|
|
32413
|
+
},
|
|
32414
|
+
fromPartial(object) {
|
|
32415
|
+
const message = createBaseMountBatchedCheckExistenceRequest();
|
|
32416
|
+
message.sha256HexHashes = object.sha256HexHashes?.map((e) => e) || [];
|
|
32417
|
+
return message;
|
|
32418
|
+
}
|
|
32419
|
+
};
|
|
32420
|
+
function createBaseMountBatchedCheckExistenceResponse() {
|
|
32421
|
+
return { missingSha256HexHashes: [] };
|
|
32422
|
+
}
|
|
32423
|
+
var MountBatchedCheckExistenceResponse = {
|
|
32424
|
+
encode(message, writer = new BinaryWriter()) {
|
|
32425
|
+
for (const v of message.missingSha256HexHashes) {
|
|
32426
|
+
writer.uint32(10).string(v);
|
|
32427
|
+
}
|
|
32428
|
+
return writer;
|
|
32429
|
+
},
|
|
32430
|
+
decode(input, length) {
|
|
32431
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
32432
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
32433
|
+
const message = createBaseMountBatchedCheckExistenceResponse();
|
|
32434
|
+
while (reader.pos < end) {
|
|
32435
|
+
const tag = reader.uint32();
|
|
32436
|
+
switch (tag >>> 3) {
|
|
32437
|
+
case 1: {
|
|
32438
|
+
if (tag !== 10) {
|
|
32439
|
+
break;
|
|
32440
|
+
}
|
|
32441
|
+
message.missingSha256HexHashes.push(reader.string());
|
|
32442
|
+
continue;
|
|
32443
|
+
}
|
|
32444
|
+
}
|
|
32445
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
32446
|
+
break;
|
|
32447
|
+
}
|
|
32448
|
+
reader.skip(tag & 7);
|
|
32449
|
+
}
|
|
32450
|
+
return message;
|
|
32451
|
+
},
|
|
32452
|
+
fromJSON(object) {
|
|
32453
|
+
return {
|
|
32454
|
+
missingSha256HexHashes: globalThis.Array.isArray(object?.missingSha256HexHashes) ? object.missingSha256HexHashes.map((e) => globalThis.String(e)) : []
|
|
32455
|
+
};
|
|
32456
|
+
},
|
|
32457
|
+
toJSON(message) {
|
|
32458
|
+
const obj = {};
|
|
32459
|
+
if (message.missingSha256HexHashes?.length) {
|
|
32460
|
+
obj.missingSha256HexHashes = message.missingSha256HexHashes;
|
|
32461
|
+
}
|
|
32462
|
+
return obj;
|
|
32463
|
+
},
|
|
32464
|
+
create(base) {
|
|
32465
|
+
return MountBatchedCheckExistenceResponse.fromPartial(base ?? {});
|
|
32466
|
+
},
|
|
32467
|
+
fromPartial(object) {
|
|
32468
|
+
const message = createBaseMountBatchedCheckExistenceResponse();
|
|
32469
|
+
message.missingSha256HexHashes = object.missingSha256HexHashes?.map((e) => e) || [];
|
|
32470
|
+
return message;
|
|
32471
|
+
}
|
|
32472
|
+
};
|
|
31840
32473
|
function createBaseMountFile() {
|
|
31841
32474
|
return { filename: "", sha256Hex: "", size: void 0, mode: void 0 };
|
|
31842
32475
|
}
|
|
@@ -38174,7 +38807,7 @@ var SandboxCreateResponse = {
|
|
|
38174
38807
|
}
|
|
38175
38808
|
};
|
|
38176
38809
|
function createBaseSandboxCreateV2Request() {
|
|
38177
|
-
return { appId: "", definition: void 0, ephemeralSecrets: void 0 };
|
|
38810
|
+
return { appId: "", definition: void 0, ephemeralSecrets: void 0, tags: [] };
|
|
38178
38811
|
}
|
|
38179
38812
|
var SandboxCreateV2Request = {
|
|
38180
38813
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -38187,6 +38820,9 @@ var SandboxCreateV2Request = {
|
|
|
38187
38820
|
if (message.ephemeralSecrets !== void 0) {
|
|
38188
38821
|
StringMap.encode(message.ephemeralSecrets, writer.uint32(26).fork()).join();
|
|
38189
38822
|
}
|
|
38823
|
+
for (const v of message.tags) {
|
|
38824
|
+
SandboxTag.encode(v, writer.uint32(34).fork()).join();
|
|
38825
|
+
}
|
|
38190
38826
|
return writer;
|
|
38191
38827
|
},
|
|
38192
38828
|
decode(input, length) {
|
|
@@ -38217,6 +38853,13 @@ var SandboxCreateV2Request = {
|
|
|
38217
38853
|
message.ephemeralSecrets = StringMap.decode(reader, reader.uint32());
|
|
38218
38854
|
continue;
|
|
38219
38855
|
}
|
|
38856
|
+
case 4: {
|
|
38857
|
+
if (tag !== 34) {
|
|
38858
|
+
break;
|
|
38859
|
+
}
|
|
38860
|
+
message.tags.push(SandboxTag.decode(reader, reader.uint32()));
|
|
38861
|
+
continue;
|
|
38862
|
+
}
|
|
38220
38863
|
}
|
|
38221
38864
|
if ((tag & 7) === 4 || tag === 0) {
|
|
38222
38865
|
break;
|
|
@@ -38229,7 +38872,8 @@ var SandboxCreateV2Request = {
|
|
|
38229
38872
|
return {
|
|
38230
38873
|
appId: isSet5(object.appId) ? globalThis.String(object.appId) : "",
|
|
38231
38874
|
definition: isSet5(object.definition) ? Sandbox.fromJSON(object.definition) : void 0,
|
|
38232
|
-
ephemeralSecrets: isSet5(object.ephemeralSecrets) ? StringMap.fromJSON(object.ephemeralSecrets) : void 0
|
|
38875
|
+
ephemeralSecrets: isSet5(object.ephemeralSecrets) ? StringMap.fromJSON(object.ephemeralSecrets) : void 0,
|
|
38876
|
+
tags: globalThis.Array.isArray(object?.tags) ? object.tags.map((e) => SandboxTag.fromJSON(e)) : []
|
|
38233
38877
|
};
|
|
38234
38878
|
},
|
|
38235
38879
|
toJSON(message) {
|
|
@@ -38243,6 +38887,9 @@ var SandboxCreateV2Request = {
|
|
|
38243
38887
|
if (message.ephemeralSecrets !== void 0) {
|
|
38244
38888
|
obj.ephemeralSecrets = StringMap.toJSON(message.ephemeralSecrets);
|
|
38245
38889
|
}
|
|
38890
|
+
if (message.tags?.length) {
|
|
38891
|
+
obj.tags = message.tags.map((e) => SandboxTag.toJSON(e));
|
|
38892
|
+
}
|
|
38246
38893
|
return obj;
|
|
38247
38894
|
},
|
|
38248
38895
|
create(base) {
|
|
@@ -38253,6 +38900,7 @@ var SandboxCreateV2Request = {
|
|
|
38253
38900
|
message.appId = object.appId ?? "";
|
|
38254
38901
|
message.definition = object.definition !== void 0 && object.definition !== null ? Sandbox.fromPartial(object.definition) : void 0;
|
|
38255
38902
|
message.ephemeralSecrets = object.ephemeralSecrets !== void 0 && object.ephemeralSecrets !== null ? StringMap.fromPartial(object.ephemeralSecrets) : void 0;
|
|
38903
|
+
message.tags = object.tags?.map((e) => SandboxTag.fromPartial(e)) || [];
|
|
38256
38904
|
return message;
|
|
38257
38905
|
}
|
|
38258
38906
|
};
|
|
@@ -38340,13 +38988,16 @@ var SandboxCreateV2Response = {
|
|
|
38340
38988
|
}
|
|
38341
38989
|
};
|
|
38342
38990
|
function createBaseSandboxGetCommandRouterAccessRequest() {
|
|
38343
|
-
return { sandboxId:
|
|
38991
|
+
return { sandboxId: void 0, taskId: void 0 };
|
|
38344
38992
|
}
|
|
38345
38993
|
var SandboxGetCommandRouterAccessRequest = {
|
|
38346
38994
|
encode(message, writer = new BinaryWriter()) {
|
|
38347
|
-
if (message.sandboxId !==
|
|
38995
|
+
if (message.sandboxId !== void 0) {
|
|
38348
38996
|
writer.uint32(10).string(message.sandboxId);
|
|
38349
38997
|
}
|
|
38998
|
+
if (message.taskId !== void 0) {
|
|
38999
|
+
writer.uint32(18).string(message.taskId);
|
|
39000
|
+
}
|
|
38350
39001
|
return writer;
|
|
38351
39002
|
},
|
|
38352
39003
|
decode(input, length) {
|
|
@@ -38363,6 +39014,13 @@ var SandboxGetCommandRouterAccessRequest = {
|
|
|
38363
39014
|
message.sandboxId = reader.string();
|
|
38364
39015
|
continue;
|
|
38365
39016
|
}
|
|
39017
|
+
case 2: {
|
|
39018
|
+
if (tag !== 18) {
|
|
39019
|
+
break;
|
|
39020
|
+
}
|
|
39021
|
+
message.taskId = reader.string();
|
|
39022
|
+
continue;
|
|
39023
|
+
}
|
|
38366
39024
|
}
|
|
38367
39025
|
if ((tag & 7) === 4 || tag === 0) {
|
|
38368
39026
|
break;
|
|
@@ -38372,13 +39030,19 @@ var SandboxGetCommandRouterAccessRequest = {
|
|
|
38372
39030
|
return message;
|
|
38373
39031
|
},
|
|
38374
39032
|
fromJSON(object) {
|
|
38375
|
-
return {
|
|
39033
|
+
return {
|
|
39034
|
+
sandboxId: isSet5(object.sandboxId) ? globalThis.String(object.sandboxId) : void 0,
|
|
39035
|
+
taskId: isSet5(object.taskId) ? globalThis.String(object.taskId) : void 0
|
|
39036
|
+
};
|
|
38376
39037
|
},
|
|
38377
39038
|
toJSON(message) {
|
|
38378
39039
|
const obj = {};
|
|
38379
|
-
if (message.sandboxId !==
|
|
39040
|
+
if (message.sandboxId !== void 0) {
|
|
38380
39041
|
obj.sandboxId = message.sandboxId;
|
|
38381
39042
|
}
|
|
39043
|
+
if (message.taskId !== void 0) {
|
|
39044
|
+
obj.taskId = message.taskId;
|
|
39045
|
+
}
|
|
38382
39046
|
return obj;
|
|
38383
39047
|
},
|
|
38384
39048
|
create(base) {
|
|
@@ -38386,7 +39050,8 @@ var SandboxGetCommandRouterAccessRequest = {
|
|
|
38386
39050
|
},
|
|
38387
39051
|
fromPartial(object) {
|
|
38388
39052
|
const message = createBaseSandboxGetCommandRouterAccessRequest();
|
|
38389
|
-
message.sandboxId = object.sandboxId ??
|
|
39053
|
+
message.sandboxId = object.sandboxId ?? void 0;
|
|
39054
|
+
message.taskId = object.taskId ?? void 0;
|
|
38390
39055
|
return message;
|
|
38391
39056
|
}
|
|
38392
39057
|
};
|
|
@@ -43937,7 +44602,7 @@ var SystemErrorMessage = {
|
|
|
43937
44602
|
}
|
|
43938
44603
|
};
|
|
43939
44604
|
function createBaseTaskClusterHelloRequest() {
|
|
43940
|
-
return { taskId: "", containerIp: "", imexHostIp: "" };
|
|
44605
|
+
return { taskId: "", containerIp: "", imexHostIp: "", imexFabricId: "" };
|
|
43941
44606
|
}
|
|
43942
44607
|
var TaskClusterHelloRequest = {
|
|
43943
44608
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -43950,6 +44615,9 @@ var TaskClusterHelloRequest = {
|
|
|
43950
44615
|
if (message.imexHostIp !== "") {
|
|
43951
44616
|
writer.uint32(26).string(message.imexHostIp);
|
|
43952
44617
|
}
|
|
44618
|
+
if (message.imexFabricId !== "") {
|
|
44619
|
+
writer.uint32(34).string(message.imexFabricId);
|
|
44620
|
+
}
|
|
43953
44621
|
return writer;
|
|
43954
44622
|
},
|
|
43955
44623
|
decode(input, length) {
|
|
@@ -43980,6 +44648,13 @@ var TaskClusterHelloRequest = {
|
|
|
43980
44648
|
message.imexHostIp = reader.string();
|
|
43981
44649
|
continue;
|
|
43982
44650
|
}
|
|
44651
|
+
case 4: {
|
|
44652
|
+
if (tag !== 34) {
|
|
44653
|
+
break;
|
|
44654
|
+
}
|
|
44655
|
+
message.imexFabricId = reader.string();
|
|
44656
|
+
continue;
|
|
44657
|
+
}
|
|
43983
44658
|
}
|
|
43984
44659
|
if ((tag & 7) === 4 || tag === 0) {
|
|
43985
44660
|
break;
|
|
@@ -43992,7 +44667,8 @@ var TaskClusterHelloRequest = {
|
|
|
43992
44667
|
return {
|
|
43993
44668
|
taskId: isSet5(object.taskId) ? globalThis.String(object.taskId) : "",
|
|
43994
44669
|
containerIp: isSet5(object.containerIp) ? globalThis.String(object.containerIp) : "",
|
|
43995
|
-
imexHostIp: isSet5(object.imexHostIp) ? globalThis.String(object.imexHostIp) : ""
|
|
44670
|
+
imexHostIp: isSet5(object.imexHostIp) ? globalThis.String(object.imexHostIp) : "",
|
|
44671
|
+
imexFabricId: isSet5(object.imexFabricId) ? globalThis.String(object.imexFabricId) : ""
|
|
43996
44672
|
};
|
|
43997
44673
|
},
|
|
43998
44674
|
toJSON(message) {
|
|
@@ -44006,6 +44682,9 @@ var TaskClusterHelloRequest = {
|
|
|
44006
44682
|
if (message.imexHostIp !== "") {
|
|
44007
44683
|
obj.imexHostIp = message.imexHostIp;
|
|
44008
44684
|
}
|
|
44685
|
+
if (message.imexFabricId !== "") {
|
|
44686
|
+
obj.imexFabricId = message.imexFabricId;
|
|
44687
|
+
}
|
|
44009
44688
|
return obj;
|
|
44010
44689
|
},
|
|
44011
44690
|
create(base) {
|
|
@@ -44016,6 +44695,7 @@ var TaskClusterHelloRequest = {
|
|
|
44016
44695
|
message.taskId = object.taskId ?? "";
|
|
44017
44696
|
message.containerIp = object.containerIp ?? "";
|
|
44018
44697
|
message.imexHostIp = object.imexHostIp ?? "";
|
|
44698
|
+
message.imexFabricId = object.imexFabricId ?? "";
|
|
44019
44699
|
return message;
|
|
44020
44700
|
}
|
|
44021
44701
|
};
|
|
@@ -47204,6 +47884,147 @@ var VolumeCopyFilesRequest = {
|
|
|
47204
47884
|
return message;
|
|
47205
47885
|
}
|
|
47206
47886
|
};
|
|
47887
|
+
function createBaseVolumeCreateOptions() {
|
|
47888
|
+
return { experimentalOptions: {} };
|
|
47889
|
+
}
|
|
47890
|
+
var VolumeCreateOptions = {
|
|
47891
|
+
encode(message, writer = new BinaryWriter()) {
|
|
47892
|
+
Object.entries(message.experimentalOptions).forEach(([key, value]) => {
|
|
47893
|
+
VolumeCreateOptions_ExperimentalOptionsEntry.encode({ key, value }, writer.uint32(10).fork()).join();
|
|
47894
|
+
});
|
|
47895
|
+
return writer;
|
|
47896
|
+
},
|
|
47897
|
+
decode(input, length) {
|
|
47898
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
47899
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
47900
|
+
const message = createBaseVolumeCreateOptions();
|
|
47901
|
+
while (reader.pos < end) {
|
|
47902
|
+
const tag = reader.uint32();
|
|
47903
|
+
switch (tag >>> 3) {
|
|
47904
|
+
case 1: {
|
|
47905
|
+
if (tag !== 10) {
|
|
47906
|
+
break;
|
|
47907
|
+
}
|
|
47908
|
+
const entry1 = VolumeCreateOptions_ExperimentalOptionsEntry.decode(reader, reader.uint32());
|
|
47909
|
+
if (entry1.value !== void 0) {
|
|
47910
|
+
message.experimentalOptions[entry1.key] = entry1.value;
|
|
47911
|
+
}
|
|
47912
|
+
continue;
|
|
47913
|
+
}
|
|
47914
|
+
}
|
|
47915
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
47916
|
+
break;
|
|
47917
|
+
}
|
|
47918
|
+
reader.skip(tag & 7);
|
|
47919
|
+
}
|
|
47920
|
+
return message;
|
|
47921
|
+
},
|
|
47922
|
+
fromJSON(object) {
|
|
47923
|
+
return {
|
|
47924
|
+
experimentalOptions: isObject2(object.experimentalOptions) ? Object.entries(object.experimentalOptions).reduce((acc, [key, value]) => {
|
|
47925
|
+
acc[key] = String(value);
|
|
47926
|
+
return acc;
|
|
47927
|
+
}, {}) : {}
|
|
47928
|
+
};
|
|
47929
|
+
},
|
|
47930
|
+
toJSON(message) {
|
|
47931
|
+
const obj = {};
|
|
47932
|
+
if (message.experimentalOptions) {
|
|
47933
|
+
const entries = Object.entries(message.experimentalOptions);
|
|
47934
|
+
if (entries.length > 0) {
|
|
47935
|
+
obj.experimentalOptions = {};
|
|
47936
|
+
entries.forEach(([k, v]) => {
|
|
47937
|
+
obj.experimentalOptions[k] = v;
|
|
47938
|
+
});
|
|
47939
|
+
}
|
|
47940
|
+
}
|
|
47941
|
+
return obj;
|
|
47942
|
+
},
|
|
47943
|
+
create(base) {
|
|
47944
|
+
return VolumeCreateOptions.fromPartial(base ?? {});
|
|
47945
|
+
},
|
|
47946
|
+
fromPartial(object) {
|
|
47947
|
+
const message = createBaseVolumeCreateOptions();
|
|
47948
|
+
message.experimentalOptions = Object.entries(object.experimentalOptions ?? {}).reduce(
|
|
47949
|
+
(acc, [key, value]) => {
|
|
47950
|
+
if (value !== void 0) {
|
|
47951
|
+
acc[key] = globalThis.String(value);
|
|
47952
|
+
}
|
|
47953
|
+
return acc;
|
|
47954
|
+
},
|
|
47955
|
+
{}
|
|
47956
|
+
);
|
|
47957
|
+
return message;
|
|
47958
|
+
}
|
|
47959
|
+
};
|
|
47960
|
+
function createBaseVolumeCreateOptions_ExperimentalOptionsEntry() {
|
|
47961
|
+
return { key: "", value: "" };
|
|
47962
|
+
}
|
|
47963
|
+
var VolumeCreateOptions_ExperimentalOptionsEntry = {
|
|
47964
|
+
encode(message, writer = new BinaryWriter()) {
|
|
47965
|
+
if (message.key !== "") {
|
|
47966
|
+
writer.uint32(10).string(message.key);
|
|
47967
|
+
}
|
|
47968
|
+
if (message.value !== "") {
|
|
47969
|
+
writer.uint32(18).string(message.value);
|
|
47970
|
+
}
|
|
47971
|
+
return writer;
|
|
47972
|
+
},
|
|
47973
|
+
decode(input, length) {
|
|
47974
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
47975
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
47976
|
+
const message = createBaseVolumeCreateOptions_ExperimentalOptionsEntry();
|
|
47977
|
+
while (reader.pos < end) {
|
|
47978
|
+
const tag = reader.uint32();
|
|
47979
|
+
switch (tag >>> 3) {
|
|
47980
|
+
case 1: {
|
|
47981
|
+
if (tag !== 10) {
|
|
47982
|
+
break;
|
|
47983
|
+
}
|
|
47984
|
+
message.key = reader.string();
|
|
47985
|
+
continue;
|
|
47986
|
+
}
|
|
47987
|
+
case 2: {
|
|
47988
|
+
if (tag !== 18) {
|
|
47989
|
+
break;
|
|
47990
|
+
}
|
|
47991
|
+
message.value = reader.string();
|
|
47992
|
+
continue;
|
|
47993
|
+
}
|
|
47994
|
+
}
|
|
47995
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
47996
|
+
break;
|
|
47997
|
+
}
|
|
47998
|
+
reader.skip(tag & 7);
|
|
47999
|
+
}
|
|
48000
|
+
return message;
|
|
48001
|
+
},
|
|
48002
|
+
fromJSON(object) {
|
|
48003
|
+
return {
|
|
48004
|
+
key: isSet5(object.key) ? globalThis.String(object.key) : "",
|
|
48005
|
+
value: isSet5(object.value) ? globalThis.String(object.value) : ""
|
|
48006
|
+
};
|
|
48007
|
+
},
|
|
48008
|
+
toJSON(message) {
|
|
48009
|
+
const obj = {};
|
|
48010
|
+
if (message.key !== "") {
|
|
48011
|
+
obj.key = message.key;
|
|
48012
|
+
}
|
|
48013
|
+
if (message.value !== "") {
|
|
48014
|
+
obj.value = message.value;
|
|
48015
|
+
}
|
|
48016
|
+
return obj;
|
|
48017
|
+
},
|
|
48018
|
+
create(base) {
|
|
48019
|
+
return VolumeCreateOptions_ExperimentalOptionsEntry.fromPartial(base ?? {});
|
|
48020
|
+
},
|
|
48021
|
+
fromPartial(object) {
|
|
48022
|
+
const message = createBaseVolumeCreateOptions_ExperimentalOptionsEntry();
|
|
48023
|
+
message.key = object.key ?? "";
|
|
48024
|
+
message.value = object.value ?? "";
|
|
48025
|
+
return message;
|
|
48026
|
+
}
|
|
48027
|
+
};
|
|
47207
48028
|
function createBaseVolumeDeleteRequest() {
|
|
47208
48029
|
return { volumeId: "", environmentName: "" };
|
|
47209
48030
|
}
|
|
@@ -47799,7 +48620,14 @@ var VolumeGetFileResponse = {
|
|
|
47799
48620
|
}
|
|
47800
48621
|
};
|
|
47801
48622
|
function createBaseVolumeGetOrCreateRequest() {
|
|
47802
|
-
return {
|
|
48623
|
+
return {
|
|
48624
|
+
deploymentName: "",
|
|
48625
|
+
environmentName: "",
|
|
48626
|
+
objectCreationType: 0,
|
|
48627
|
+
appId: "",
|
|
48628
|
+
version: 0,
|
|
48629
|
+
createOptions: void 0
|
|
48630
|
+
};
|
|
47803
48631
|
}
|
|
47804
48632
|
var VolumeGetOrCreateRequest = {
|
|
47805
48633
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -47818,6 +48646,9 @@ var VolumeGetOrCreateRequest = {
|
|
|
47818
48646
|
if (message.version !== 0) {
|
|
47819
48647
|
writer.uint32(48).int32(message.version);
|
|
47820
48648
|
}
|
|
48649
|
+
if (message.createOptions !== void 0) {
|
|
48650
|
+
VolumeCreateOptions.encode(message.createOptions, writer.uint32(58).fork()).join();
|
|
48651
|
+
}
|
|
47821
48652
|
return writer;
|
|
47822
48653
|
},
|
|
47823
48654
|
decode(input, length) {
|
|
@@ -47862,6 +48693,13 @@ var VolumeGetOrCreateRequest = {
|
|
|
47862
48693
|
message.version = reader.int32();
|
|
47863
48694
|
continue;
|
|
47864
48695
|
}
|
|
48696
|
+
case 7: {
|
|
48697
|
+
if (tag !== 58) {
|
|
48698
|
+
break;
|
|
48699
|
+
}
|
|
48700
|
+
message.createOptions = VolumeCreateOptions.decode(reader, reader.uint32());
|
|
48701
|
+
continue;
|
|
48702
|
+
}
|
|
47865
48703
|
}
|
|
47866
48704
|
if ((tag & 7) === 4 || tag === 0) {
|
|
47867
48705
|
break;
|
|
@@ -47876,7 +48714,8 @@ var VolumeGetOrCreateRequest = {
|
|
|
47876
48714
|
environmentName: isSet5(object.environmentName) ? globalThis.String(object.environmentName) : "",
|
|
47877
48715
|
objectCreationType: isSet5(object.objectCreationType) ? objectCreationTypeFromJSON(object.objectCreationType) : 0,
|
|
47878
48716
|
appId: isSet5(object.appId) ? globalThis.String(object.appId) : "",
|
|
47879
|
-
version: isSet5(object.version) ? volumeFsVersionFromJSON(object.version) : 0
|
|
48717
|
+
version: isSet5(object.version) ? volumeFsVersionFromJSON(object.version) : 0,
|
|
48718
|
+
createOptions: isSet5(object.createOptions) ? VolumeCreateOptions.fromJSON(object.createOptions) : void 0
|
|
47880
48719
|
};
|
|
47881
48720
|
},
|
|
47882
48721
|
toJSON(message) {
|
|
@@ -47896,6 +48735,9 @@ var VolumeGetOrCreateRequest = {
|
|
|
47896
48735
|
if (message.version !== 0) {
|
|
47897
48736
|
obj.version = volumeFsVersionToJSON(message.version);
|
|
47898
48737
|
}
|
|
48738
|
+
if (message.createOptions !== void 0) {
|
|
48739
|
+
obj.createOptions = VolumeCreateOptions.toJSON(message.createOptions);
|
|
48740
|
+
}
|
|
47899
48741
|
return obj;
|
|
47900
48742
|
},
|
|
47901
48743
|
create(base) {
|
|
@@ -47908,6 +48750,7 @@ var VolumeGetOrCreateRequest = {
|
|
|
47908
48750
|
message.objectCreationType = object.objectCreationType ?? 0;
|
|
47909
48751
|
message.appId = object.appId ?? "";
|
|
47910
48752
|
message.version = object.version ?? 0;
|
|
48753
|
+
message.createOptions = object.createOptions !== void 0 && object.createOptions !== null ? VolumeCreateOptions.fromPartial(object.createOptions) : void 0;
|
|
47911
48754
|
return message;
|
|
47912
48755
|
}
|
|
47913
48756
|
};
|
|
@@ -50366,7 +51209,6 @@ function createBaseWorkspaceBillingReportItem() {
|
|
|
50366
51209
|
interval: void 0,
|
|
50367
51210
|
cost: "",
|
|
50368
51211
|
tags: {},
|
|
50369
|
-
costByResourceFloat: {},
|
|
50370
51212
|
costByResource: {}
|
|
50371
51213
|
};
|
|
50372
51214
|
}
|
|
@@ -50390,9 +51232,6 @@ var WorkspaceBillingReportItem = {
|
|
|
50390
51232
|
Object.entries(message.tags).forEach(([key, value]) => {
|
|
50391
51233
|
WorkspaceBillingReportItem_TagsEntry.encode({ key, value }, writer.uint32(50).fork()).join();
|
|
50392
51234
|
});
|
|
50393
|
-
Object.entries(message.costByResourceFloat).forEach(([key, value]) => {
|
|
50394
|
-
WorkspaceBillingReportItem_CostByResourceFloatEntry.encode({ key, value }, writer.uint32(58).fork()).join();
|
|
50395
|
-
});
|
|
50396
51235
|
Object.entries(message.costByResource).forEach(([key, value]) => {
|
|
50397
51236
|
WorkspaceBillingReportItem_CostByResourceEntry.encode({ key, value }, writer.uint32(66).fork()).join();
|
|
50398
51237
|
});
|
|
@@ -50450,16 +51289,6 @@ var WorkspaceBillingReportItem = {
|
|
|
50450
51289
|
}
|
|
50451
51290
|
continue;
|
|
50452
51291
|
}
|
|
50453
|
-
case 7: {
|
|
50454
|
-
if (tag !== 58) {
|
|
50455
|
-
break;
|
|
50456
|
-
}
|
|
50457
|
-
const entry7 = WorkspaceBillingReportItem_CostByResourceFloatEntry.decode(reader, reader.uint32());
|
|
50458
|
-
if (entry7.value !== void 0) {
|
|
50459
|
-
message.costByResourceFloat[entry7.key] = entry7.value;
|
|
50460
|
-
}
|
|
50461
|
-
continue;
|
|
50462
|
-
}
|
|
50463
51292
|
case 8: {
|
|
50464
51293
|
if (tag !== 66) {
|
|
50465
51294
|
break;
|
|
@@ -50489,10 +51318,6 @@ var WorkspaceBillingReportItem = {
|
|
|
50489
51318
|
acc[key] = String(value);
|
|
50490
51319
|
return acc;
|
|
50491
51320
|
}, {}) : {},
|
|
50492
|
-
costByResourceFloat: isObject2(object.costByResourceFloat) ? Object.entries(object.costByResourceFloat).reduce((acc, [key, value]) => {
|
|
50493
|
-
acc[key] = Number(value);
|
|
50494
|
-
return acc;
|
|
50495
|
-
}, {}) : {},
|
|
50496
51321
|
costByResource: isObject2(object.costByResource) ? Object.entries(object.costByResource).reduce((acc, [key, value]) => {
|
|
50497
51322
|
acc[key] = String(value);
|
|
50498
51323
|
return acc;
|
|
@@ -50525,15 +51350,6 @@ var WorkspaceBillingReportItem = {
|
|
|
50525
51350
|
});
|
|
50526
51351
|
}
|
|
50527
51352
|
}
|
|
50528
|
-
if (message.costByResourceFloat) {
|
|
50529
|
-
const entries = Object.entries(message.costByResourceFloat);
|
|
50530
|
-
if (entries.length > 0) {
|
|
50531
|
-
obj.costByResourceFloat = {};
|
|
50532
|
-
entries.forEach(([k, v]) => {
|
|
50533
|
-
obj.costByResourceFloat[k] = v;
|
|
50534
|
-
});
|
|
50535
|
-
}
|
|
50536
|
-
}
|
|
50537
51353
|
if (message.costByResource) {
|
|
50538
51354
|
const entries = Object.entries(message.costByResource);
|
|
50539
51355
|
if (entries.length > 0) {
|
|
@@ -50561,15 +51377,6 @@ var WorkspaceBillingReportItem = {
|
|
|
50561
51377
|
}
|
|
50562
51378
|
return acc;
|
|
50563
51379
|
}, {});
|
|
50564
|
-
message.costByResourceFloat = Object.entries(object.costByResourceFloat ?? {}).reduce(
|
|
50565
|
-
(acc, [key, value]) => {
|
|
50566
|
-
if (value !== void 0) {
|
|
50567
|
-
acc[key] = globalThis.Number(value);
|
|
50568
|
-
}
|
|
50569
|
-
return acc;
|
|
50570
|
-
},
|
|
50571
|
-
{}
|
|
50572
|
-
);
|
|
50573
51380
|
message.costByResource = Object.entries(object.costByResource ?? {}).reduce(
|
|
50574
51381
|
(acc, [key, value]) => {
|
|
50575
51382
|
if (value !== void 0) {
|
|
@@ -50650,23 +51457,23 @@ var WorkspaceBillingReportItem_TagsEntry = {
|
|
|
50650
51457
|
return message;
|
|
50651
51458
|
}
|
|
50652
51459
|
};
|
|
50653
|
-
function
|
|
50654
|
-
return { key: "", value:
|
|
51460
|
+
function createBaseWorkspaceBillingReportItem_CostByResourceEntry() {
|
|
51461
|
+
return { key: "", value: "" };
|
|
50655
51462
|
}
|
|
50656
|
-
var
|
|
51463
|
+
var WorkspaceBillingReportItem_CostByResourceEntry = {
|
|
50657
51464
|
encode(message, writer = new BinaryWriter()) {
|
|
50658
51465
|
if (message.key !== "") {
|
|
50659
51466
|
writer.uint32(10).string(message.key);
|
|
50660
51467
|
}
|
|
50661
|
-
if (message.value !==
|
|
50662
|
-
writer.uint32(
|
|
51468
|
+
if (message.value !== "") {
|
|
51469
|
+
writer.uint32(18).string(message.value);
|
|
50663
51470
|
}
|
|
50664
51471
|
return writer;
|
|
50665
51472
|
},
|
|
50666
51473
|
decode(input, length) {
|
|
50667
51474
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
50668
51475
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
50669
|
-
const message =
|
|
51476
|
+
const message = createBaseWorkspaceBillingReportItem_CostByResourceEntry();
|
|
50670
51477
|
while (reader.pos < end) {
|
|
50671
51478
|
const tag = reader.uint32();
|
|
50672
51479
|
switch (tag >>> 3) {
|
|
@@ -50678,10 +51485,10 @@ var WorkspaceBillingReportItem_CostByResourceFloatEntry = {
|
|
|
50678
51485
|
continue;
|
|
50679
51486
|
}
|
|
50680
51487
|
case 2: {
|
|
50681
|
-
if (tag !==
|
|
51488
|
+
if (tag !== 18) {
|
|
50682
51489
|
break;
|
|
50683
51490
|
}
|
|
50684
|
-
message.value = reader.
|
|
51491
|
+
message.value = reader.string();
|
|
50685
51492
|
continue;
|
|
50686
51493
|
}
|
|
50687
51494
|
}
|
|
@@ -50695,7 +51502,7 @@ var WorkspaceBillingReportItem_CostByResourceFloatEntry = {
|
|
|
50695
51502
|
fromJSON(object) {
|
|
50696
51503
|
return {
|
|
50697
51504
|
key: isSet5(object.key) ? globalThis.String(object.key) : "",
|
|
50698
|
-
value: isSet5(object.value) ? globalThis.
|
|
51505
|
+
value: isSet5(object.value) ? globalThis.String(object.value) : ""
|
|
50699
51506
|
};
|
|
50700
51507
|
},
|
|
50701
51508
|
toJSON(message) {
|
|
@@ -50703,38 +51510,57 @@ var WorkspaceBillingReportItem_CostByResourceFloatEntry = {
|
|
|
50703
51510
|
if (message.key !== "") {
|
|
50704
51511
|
obj.key = message.key;
|
|
50705
51512
|
}
|
|
50706
|
-
if (message.value !==
|
|
51513
|
+
if (message.value !== "") {
|
|
50707
51514
|
obj.value = message.value;
|
|
50708
51515
|
}
|
|
50709
51516
|
return obj;
|
|
50710
51517
|
},
|
|
50711
51518
|
create(base) {
|
|
50712
|
-
return
|
|
51519
|
+
return WorkspaceBillingReportItem_CostByResourceEntry.fromPartial(base ?? {});
|
|
50713
51520
|
},
|
|
50714
51521
|
fromPartial(object) {
|
|
50715
|
-
const message =
|
|
51522
|
+
const message = createBaseWorkspaceBillingReportItem_CostByResourceEntry();
|
|
50716
51523
|
message.key = object.key ?? "";
|
|
50717
|
-
message.value = object.value ??
|
|
51524
|
+
message.value = object.value ?? "";
|
|
50718
51525
|
return message;
|
|
50719
51526
|
}
|
|
50720
51527
|
};
|
|
50721
|
-
function
|
|
50722
|
-
return {
|
|
51528
|
+
function createBaseWorkspaceBillingReportRequest() {
|
|
51529
|
+
return {
|
|
51530
|
+
startTimestamp: void 0,
|
|
51531
|
+
endTimestamp: void 0,
|
|
51532
|
+
resolution: "",
|
|
51533
|
+
tagNames: [],
|
|
51534
|
+
environmentIds: [],
|
|
51535
|
+
appIds: []
|
|
51536
|
+
};
|
|
50723
51537
|
}
|
|
50724
|
-
var
|
|
51538
|
+
var WorkspaceBillingReportRequest = {
|
|
50725
51539
|
encode(message, writer = new BinaryWriter()) {
|
|
50726
|
-
if (message.
|
|
50727
|
-
writer.uint32(10).
|
|
51540
|
+
if (message.startTimestamp !== void 0) {
|
|
51541
|
+
Timestamp.encode(toTimestamp(message.startTimestamp), writer.uint32(10).fork()).join();
|
|
50728
51542
|
}
|
|
50729
|
-
if (message.
|
|
50730
|
-
writer.uint32(18).
|
|
51543
|
+
if (message.endTimestamp !== void 0) {
|
|
51544
|
+
Timestamp.encode(toTimestamp(message.endTimestamp), writer.uint32(18).fork()).join();
|
|
51545
|
+
}
|
|
51546
|
+
if (message.resolution !== "") {
|
|
51547
|
+
writer.uint32(26).string(message.resolution);
|
|
51548
|
+
}
|
|
51549
|
+
for (const v of message.tagNames) {
|
|
51550
|
+
writer.uint32(34).string(v);
|
|
51551
|
+
}
|
|
51552
|
+
for (const v of message.environmentIds) {
|
|
51553
|
+
writer.uint32(42).string(v);
|
|
51554
|
+
}
|
|
51555
|
+
for (const v of message.appIds) {
|
|
51556
|
+
writer.uint32(50).string(v);
|
|
50731
51557
|
}
|
|
50732
51558
|
return writer;
|
|
50733
51559
|
},
|
|
50734
51560
|
decode(input, length) {
|
|
50735
51561
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
50736
51562
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
50737
|
-
const message =
|
|
51563
|
+
const message = createBaseWorkspaceBillingReportRequest();
|
|
50738
51564
|
while (reader.pos < end) {
|
|
50739
51565
|
const tag = reader.uint32();
|
|
50740
51566
|
switch (tag >>> 3) {
|
|
@@ -50742,14 +51568,42 @@ var WorkspaceBillingReportItem_CostByResourceEntry = {
|
|
|
50742
51568
|
if (tag !== 10) {
|
|
50743
51569
|
break;
|
|
50744
51570
|
}
|
|
50745
|
-
message.
|
|
51571
|
+
message.startTimestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
50746
51572
|
continue;
|
|
50747
51573
|
}
|
|
50748
51574
|
case 2: {
|
|
50749
51575
|
if (tag !== 18) {
|
|
50750
51576
|
break;
|
|
50751
51577
|
}
|
|
50752
|
-
message.
|
|
51578
|
+
message.endTimestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
51579
|
+
continue;
|
|
51580
|
+
}
|
|
51581
|
+
case 3: {
|
|
51582
|
+
if (tag !== 26) {
|
|
51583
|
+
break;
|
|
51584
|
+
}
|
|
51585
|
+
message.resolution = reader.string();
|
|
51586
|
+
continue;
|
|
51587
|
+
}
|
|
51588
|
+
case 4: {
|
|
51589
|
+
if (tag !== 34) {
|
|
51590
|
+
break;
|
|
51591
|
+
}
|
|
51592
|
+
message.tagNames.push(reader.string());
|
|
51593
|
+
continue;
|
|
51594
|
+
}
|
|
51595
|
+
case 5: {
|
|
51596
|
+
if (tag !== 42) {
|
|
51597
|
+
break;
|
|
51598
|
+
}
|
|
51599
|
+
message.environmentIds.push(reader.string());
|
|
51600
|
+
continue;
|
|
51601
|
+
}
|
|
51602
|
+
case 6: {
|
|
51603
|
+
if (tag !== 50) {
|
|
51604
|
+
break;
|
|
51605
|
+
}
|
|
51606
|
+
message.appIds.push(reader.string());
|
|
50753
51607
|
continue;
|
|
50754
51608
|
}
|
|
50755
51609
|
}
|
|
@@ -50762,41 +51616,132 @@ var WorkspaceBillingReportItem_CostByResourceEntry = {
|
|
|
50762
51616
|
},
|
|
50763
51617
|
fromJSON(object) {
|
|
50764
51618
|
return {
|
|
50765
|
-
|
|
50766
|
-
|
|
51619
|
+
startTimestamp: isSet5(object.startTimestamp) ? fromJsonTimestamp(object.startTimestamp) : void 0,
|
|
51620
|
+
endTimestamp: isSet5(object.endTimestamp) ? fromJsonTimestamp(object.endTimestamp) : void 0,
|
|
51621
|
+
resolution: isSet5(object.resolution) ? globalThis.String(object.resolution) : "",
|
|
51622
|
+
tagNames: globalThis.Array.isArray(object?.tagNames) ? object.tagNames.map((e) => globalThis.String(e)) : [],
|
|
51623
|
+
environmentIds: globalThis.Array.isArray(object?.environmentIds) ? object.environmentIds.map((e) => globalThis.String(e)) : [],
|
|
51624
|
+
appIds: globalThis.Array.isArray(object?.appIds) ? object.appIds.map((e) => globalThis.String(e)) : []
|
|
50767
51625
|
};
|
|
50768
51626
|
},
|
|
50769
51627
|
toJSON(message) {
|
|
50770
51628
|
const obj = {};
|
|
50771
|
-
if (message.
|
|
50772
|
-
obj.
|
|
51629
|
+
if (message.startTimestamp !== void 0) {
|
|
51630
|
+
obj.startTimestamp = message.startTimestamp.toISOString();
|
|
50773
51631
|
}
|
|
50774
|
-
if (message.
|
|
50775
|
-
obj.
|
|
51632
|
+
if (message.endTimestamp !== void 0) {
|
|
51633
|
+
obj.endTimestamp = message.endTimestamp.toISOString();
|
|
51634
|
+
}
|
|
51635
|
+
if (message.resolution !== "") {
|
|
51636
|
+
obj.resolution = message.resolution;
|
|
51637
|
+
}
|
|
51638
|
+
if (message.tagNames?.length) {
|
|
51639
|
+
obj.tagNames = message.tagNames;
|
|
51640
|
+
}
|
|
51641
|
+
if (message.environmentIds?.length) {
|
|
51642
|
+
obj.environmentIds = message.environmentIds;
|
|
51643
|
+
}
|
|
51644
|
+
if (message.appIds?.length) {
|
|
51645
|
+
obj.appIds = message.appIds;
|
|
50776
51646
|
}
|
|
50777
51647
|
return obj;
|
|
50778
51648
|
},
|
|
50779
51649
|
create(base) {
|
|
50780
|
-
return
|
|
51650
|
+
return WorkspaceBillingReportRequest.fromPartial(base ?? {});
|
|
50781
51651
|
},
|
|
50782
51652
|
fromPartial(object) {
|
|
50783
|
-
const message =
|
|
50784
|
-
message.
|
|
50785
|
-
message.
|
|
51653
|
+
const message = createBaseWorkspaceBillingReportRequest();
|
|
51654
|
+
message.startTimestamp = object.startTimestamp ?? void 0;
|
|
51655
|
+
message.endTimestamp = object.endTimestamp ?? void 0;
|
|
51656
|
+
message.resolution = object.resolution ?? "";
|
|
51657
|
+
message.tagNames = object.tagNames?.map((e) => e) || [];
|
|
51658
|
+
message.environmentIds = object.environmentIds?.map((e) => e) || [];
|
|
51659
|
+
message.appIds = object.appIds?.map((e) => e) || [];
|
|
50786
51660
|
return message;
|
|
50787
51661
|
}
|
|
50788
51662
|
};
|
|
50789
|
-
function
|
|
51663
|
+
function createBaseWorkspaceBillingSummaryRequest() {
|
|
51664
|
+
return { startTimestamp: void 0, endTimestamp: void 0 };
|
|
51665
|
+
}
|
|
51666
|
+
var WorkspaceBillingSummaryRequest = {
|
|
51667
|
+
encode(message, writer = new BinaryWriter()) {
|
|
51668
|
+
if (message.startTimestamp !== void 0) {
|
|
51669
|
+
Timestamp.encode(toTimestamp(message.startTimestamp), writer.uint32(10).fork()).join();
|
|
51670
|
+
}
|
|
51671
|
+
if (message.endTimestamp !== void 0) {
|
|
51672
|
+
Timestamp.encode(toTimestamp(message.endTimestamp), writer.uint32(18).fork()).join();
|
|
51673
|
+
}
|
|
51674
|
+
return writer;
|
|
51675
|
+
},
|
|
51676
|
+
decode(input, length) {
|
|
51677
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
51678
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
51679
|
+
const message = createBaseWorkspaceBillingSummaryRequest();
|
|
51680
|
+
while (reader.pos < end) {
|
|
51681
|
+
const tag = reader.uint32();
|
|
51682
|
+
switch (tag >>> 3) {
|
|
51683
|
+
case 1: {
|
|
51684
|
+
if (tag !== 10) {
|
|
51685
|
+
break;
|
|
51686
|
+
}
|
|
51687
|
+
message.startTimestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
51688
|
+
continue;
|
|
51689
|
+
}
|
|
51690
|
+
case 2: {
|
|
51691
|
+
if (tag !== 18) {
|
|
51692
|
+
break;
|
|
51693
|
+
}
|
|
51694
|
+
message.endTimestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
51695
|
+
continue;
|
|
51696
|
+
}
|
|
51697
|
+
}
|
|
51698
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
51699
|
+
break;
|
|
51700
|
+
}
|
|
51701
|
+
reader.skip(tag & 7);
|
|
51702
|
+
}
|
|
51703
|
+
return message;
|
|
51704
|
+
},
|
|
51705
|
+
fromJSON(object) {
|
|
51706
|
+
return {
|
|
51707
|
+
startTimestamp: isSet5(object.startTimestamp) ? fromJsonTimestamp(object.startTimestamp) : void 0,
|
|
51708
|
+
endTimestamp: isSet5(object.endTimestamp) ? fromJsonTimestamp(object.endTimestamp) : void 0
|
|
51709
|
+
};
|
|
51710
|
+
},
|
|
51711
|
+
toJSON(message) {
|
|
51712
|
+
const obj = {};
|
|
51713
|
+
if (message.startTimestamp !== void 0) {
|
|
51714
|
+
obj.startTimestamp = message.startTimestamp.toISOString();
|
|
51715
|
+
}
|
|
51716
|
+
if (message.endTimestamp !== void 0) {
|
|
51717
|
+
obj.endTimestamp = message.endTimestamp.toISOString();
|
|
51718
|
+
}
|
|
51719
|
+
return obj;
|
|
51720
|
+
},
|
|
51721
|
+
create(base) {
|
|
51722
|
+
return WorkspaceBillingSummaryRequest.fromPartial(base ?? {});
|
|
51723
|
+
},
|
|
51724
|
+
fromPartial(object) {
|
|
51725
|
+
const message = createBaseWorkspaceBillingSummaryRequest();
|
|
51726
|
+
message.startTimestamp = object.startTimestamp ?? void 0;
|
|
51727
|
+
message.endTimestamp = object.endTimestamp ?? void 0;
|
|
51728
|
+
return message;
|
|
51729
|
+
}
|
|
51730
|
+
};
|
|
51731
|
+
function createBaseWorkspaceBillingSummaryResponse() {
|
|
50790
51732
|
return {
|
|
50791
51733
|
startTimestamp: void 0,
|
|
50792
51734
|
endTimestamp: void 0,
|
|
50793
|
-
|
|
50794
|
-
|
|
50795
|
-
|
|
50796
|
-
|
|
51735
|
+
meteredCost: "",
|
|
51736
|
+
planCost: "",
|
|
51737
|
+
creditsApplied: "",
|
|
51738
|
+
reservationsDiscount: "",
|
|
51739
|
+
volumesDiscount: "",
|
|
51740
|
+
billedCost: "",
|
|
51741
|
+
meteredCostBreakdown: {}
|
|
50797
51742
|
};
|
|
50798
51743
|
}
|
|
50799
|
-
var
|
|
51744
|
+
var WorkspaceBillingSummaryResponse = {
|
|
50800
51745
|
encode(message, writer = new BinaryWriter()) {
|
|
50801
51746
|
if (message.startTimestamp !== void 0) {
|
|
50802
51747
|
Timestamp.encode(toTimestamp(message.startTimestamp), writer.uint32(10).fork()).join();
|
|
@@ -50804,24 +51749,36 @@ var WorkspaceBillingReportRequest = {
|
|
|
50804
51749
|
if (message.endTimestamp !== void 0) {
|
|
50805
51750
|
Timestamp.encode(toTimestamp(message.endTimestamp), writer.uint32(18).fork()).join();
|
|
50806
51751
|
}
|
|
50807
|
-
if (message.
|
|
50808
|
-
writer.uint32(26).string(message.
|
|
51752
|
+
if (message.meteredCost !== "") {
|
|
51753
|
+
writer.uint32(26).string(message.meteredCost);
|
|
50809
51754
|
}
|
|
50810
|
-
|
|
50811
|
-
writer.uint32(34).string(
|
|
51755
|
+
if (message.planCost !== "") {
|
|
51756
|
+
writer.uint32(34).string(message.planCost);
|
|
50812
51757
|
}
|
|
50813
|
-
|
|
50814
|
-
writer.uint32(42).string(
|
|
51758
|
+
if (message.creditsApplied !== "") {
|
|
51759
|
+
writer.uint32(42).string(message.creditsApplied);
|
|
50815
51760
|
}
|
|
50816
|
-
|
|
50817
|
-
writer.uint32(50).string(
|
|
51761
|
+
if (message.reservationsDiscount !== "") {
|
|
51762
|
+
writer.uint32(50).string(message.reservationsDiscount);
|
|
51763
|
+
}
|
|
51764
|
+
if (message.volumesDiscount !== "") {
|
|
51765
|
+
writer.uint32(58).string(message.volumesDiscount);
|
|
51766
|
+
}
|
|
51767
|
+
if (message.billedCost !== "") {
|
|
51768
|
+
writer.uint32(66).string(message.billedCost);
|
|
50818
51769
|
}
|
|
51770
|
+
Object.entries(message.meteredCostBreakdown).forEach(([key, value]) => {
|
|
51771
|
+
WorkspaceBillingSummaryResponse_MeteredCostBreakdownEntry.encode(
|
|
51772
|
+
{ key, value },
|
|
51773
|
+
writer.uint32(74).fork()
|
|
51774
|
+
).join();
|
|
51775
|
+
});
|
|
50819
51776
|
return writer;
|
|
50820
51777
|
},
|
|
50821
51778
|
decode(input, length) {
|
|
50822
51779
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
50823
51780
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
50824
|
-
const message =
|
|
51781
|
+
const message = createBaseWorkspaceBillingSummaryResponse();
|
|
50825
51782
|
while (reader.pos < end) {
|
|
50826
51783
|
const tag = reader.uint32();
|
|
50827
51784
|
switch (tag >>> 3) {
|
|
@@ -50843,28 +51800,52 @@ var WorkspaceBillingReportRequest = {
|
|
|
50843
51800
|
if (tag !== 26) {
|
|
50844
51801
|
break;
|
|
50845
51802
|
}
|
|
50846
|
-
message.
|
|
51803
|
+
message.meteredCost = reader.string();
|
|
50847
51804
|
continue;
|
|
50848
51805
|
}
|
|
50849
51806
|
case 4: {
|
|
50850
51807
|
if (tag !== 34) {
|
|
50851
51808
|
break;
|
|
50852
51809
|
}
|
|
50853
|
-
message.
|
|
51810
|
+
message.planCost = reader.string();
|
|
50854
51811
|
continue;
|
|
50855
51812
|
}
|
|
50856
51813
|
case 5: {
|
|
50857
51814
|
if (tag !== 42) {
|
|
50858
51815
|
break;
|
|
50859
51816
|
}
|
|
50860
|
-
message.
|
|
51817
|
+
message.creditsApplied = reader.string();
|
|
50861
51818
|
continue;
|
|
50862
51819
|
}
|
|
50863
51820
|
case 6: {
|
|
50864
51821
|
if (tag !== 50) {
|
|
50865
51822
|
break;
|
|
50866
51823
|
}
|
|
50867
|
-
message.
|
|
51824
|
+
message.reservationsDiscount = reader.string();
|
|
51825
|
+
continue;
|
|
51826
|
+
}
|
|
51827
|
+
case 7: {
|
|
51828
|
+
if (tag !== 58) {
|
|
51829
|
+
break;
|
|
51830
|
+
}
|
|
51831
|
+
message.volumesDiscount = reader.string();
|
|
51832
|
+
continue;
|
|
51833
|
+
}
|
|
51834
|
+
case 8: {
|
|
51835
|
+
if (tag !== 66) {
|
|
51836
|
+
break;
|
|
51837
|
+
}
|
|
51838
|
+
message.billedCost = reader.string();
|
|
51839
|
+
continue;
|
|
51840
|
+
}
|
|
51841
|
+
case 9: {
|
|
51842
|
+
if (tag !== 74) {
|
|
51843
|
+
break;
|
|
51844
|
+
}
|
|
51845
|
+
const entry9 = WorkspaceBillingSummaryResponse_MeteredCostBreakdownEntry.decode(reader, reader.uint32());
|
|
51846
|
+
if (entry9.value !== void 0) {
|
|
51847
|
+
message.meteredCostBreakdown[entry9.key] = entry9.value;
|
|
51848
|
+
}
|
|
50868
51849
|
continue;
|
|
50869
51850
|
}
|
|
50870
51851
|
}
|
|
@@ -50879,10 +51860,16 @@ var WorkspaceBillingReportRequest = {
|
|
|
50879
51860
|
return {
|
|
50880
51861
|
startTimestamp: isSet5(object.startTimestamp) ? fromJsonTimestamp(object.startTimestamp) : void 0,
|
|
50881
51862
|
endTimestamp: isSet5(object.endTimestamp) ? fromJsonTimestamp(object.endTimestamp) : void 0,
|
|
50882
|
-
|
|
50883
|
-
|
|
50884
|
-
|
|
50885
|
-
|
|
51863
|
+
meteredCost: isSet5(object.meteredCost) ? globalThis.String(object.meteredCost) : "",
|
|
51864
|
+
planCost: isSet5(object.planCost) ? globalThis.String(object.planCost) : "",
|
|
51865
|
+
creditsApplied: isSet5(object.creditsApplied) ? globalThis.String(object.creditsApplied) : "",
|
|
51866
|
+
reservationsDiscount: isSet5(object.reservationsDiscount) ? globalThis.String(object.reservationsDiscount) : "",
|
|
51867
|
+
volumesDiscount: isSet5(object.volumesDiscount) ? globalThis.String(object.volumesDiscount) : "",
|
|
51868
|
+
billedCost: isSet5(object.billedCost) ? globalThis.String(object.billedCost) : "",
|
|
51869
|
+
meteredCostBreakdown: isObject2(object.meteredCostBreakdown) ? Object.entries(object.meteredCostBreakdown).reduce((acc, [key, value]) => {
|
|
51870
|
+
acc[key] = String(value);
|
|
51871
|
+
return acc;
|
|
51872
|
+
}, {}) : {}
|
|
50886
51873
|
};
|
|
50887
51874
|
},
|
|
50888
51875
|
toJSON(message) {
|
|
@@ -50893,31 +51880,125 @@ var WorkspaceBillingReportRequest = {
|
|
|
50893
51880
|
if (message.endTimestamp !== void 0) {
|
|
50894
51881
|
obj.endTimestamp = message.endTimestamp.toISOString();
|
|
50895
51882
|
}
|
|
50896
|
-
if (message.
|
|
50897
|
-
obj.
|
|
51883
|
+
if (message.meteredCost !== "") {
|
|
51884
|
+
obj.meteredCost = message.meteredCost;
|
|
50898
51885
|
}
|
|
50899
|
-
if (message.
|
|
50900
|
-
obj.
|
|
51886
|
+
if (message.planCost !== "") {
|
|
51887
|
+
obj.planCost = message.planCost;
|
|
50901
51888
|
}
|
|
50902
|
-
if (message.
|
|
50903
|
-
obj.
|
|
51889
|
+
if (message.creditsApplied !== "") {
|
|
51890
|
+
obj.creditsApplied = message.creditsApplied;
|
|
50904
51891
|
}
|
|
50905
|
-
if (message.
|
|
50906
|
-
obj.
|
|
51892
|
+
if (message.reservationsDiscount !== "") {
|
|
51893
|
+
obj.reservationsDiscount = message.reservationsDiscount;
|
|
51894
|
+
}
|
|
51895
|
+
if (message.volumesDiscount !== "") {
|
|
51896
|
+
obj.volumesDiscount = message.volumesDiscount;
|
|
51897
|
+
}
|
|
51898
|
+
if (message.billedCost !== "") {
|
|
51899
|
+
obj.billedCost = message.billedCost;
|
|
51900
|
+
}
|
|
51901
|
+
if (message.meteredCostBreakdown) {
|
|
51902
|
+
const entries = Object.entries(message.meteredCostBreakdown);
|
|
51903
|
+
if (entries.length > 0) {
|
|
51904
|
+
obj.meteredCostBreakdown = {};
|
|
51905
|
+
entries.forEach(([k, v]) => {
|
|
51906
|
+
obj.meteredCostBreakdown[k] = v;
|
|
51907
|
+
});
|
|
51908
|
+
}
|
|
50907
51909
|
}
|
|
50908
51910
|
return obj;
|
|
50909
51911
|
},
|
|
50910
51912
|
create(base) {
|
|
50911
|
-
return
|
|
51913
|
+
return WorkspaceBillingSummaryResponse.fromPartial(base ?? {});
|
|
50912
51914
|
},
|
|
50913
51915
|
fromPartial(object) {
|
|
50914
|
-
const message =
|
|
51916
|
+
const message = createBaseWorkspaceBillingSummaryResponse();
|
|
50915
51917
|
message.startTimestamp = object.startTimestamp ?? void 0;
|
|
50916
51918
|
message.endTimestamp = object.endTimestamp ?? void 0;
|
|
50917
|
-
message.
|
|
50918
|
-
message.
|
|
50919
|
-
message.
|
|
50920
|
-
message.
|
|
51919
|
+
message.meteredCost = object.meteredCost ?? "";
|
|
51920
|
+
message.planCost = object.planCost ?? "";
|
|
51921
|
+
message.creditsApplied = object.creditsApplied ?? "";
|
|
51922
|
+
message.reservationsDiscount = object.reservationsDiscount ?? "";
|
|
51923
|
+
message.volumesDiscount = object.volumesDiscount ?? "";
|
|
51924
|
+
message.billedCost = object.billedCost ?? "";
|
|
51925
|
+
message.meteredCostBreakdown = Object.entries(object.meteredCostBreakdown ?? {}).reduce(
|
|
51926
|
+
(acc, [key, value]) => {
|
|
51927
|
+
if (value !== void 0) {
|
|
51928
|
+
acc[key] = globalThis.String(value);
|
|
51929
|
+
}
|
|
51930
|
+
return acc;
|
|
51931
|
+
},
|
|
51932
|
+
{}
|
|
51933
|
+
);
|
|
51934
|
+
return message;
|
|
51935
|
+
}
|
|
51936
|
+
};
|
|
51937
|
+
function createBaseWorkspaceBillingSummaryResponse_MeteredCostBreakdownEntry() {
|
|
51938
|
+
return { key: "", value: "" };
|
|
51939
|
+
}
|
|
51940
|
+
var WorkspaceBillingSummaryResponse_MeteredCostBreakdownEntry = {
|
|
51941
|
+
encode(message, writer = new BinaryWriter()) {
|
|
51942
|
+
if (message.key !== "") {
|
|
51943
|
+
writer.uint32(10).string(message.key);
|
|
51944
|
+
}
|
|
51945
|
+
if (message.value !== "") {
|
|
51946
|
+
writer.uint32(18).string(message.value);
|
|
51947
|
+
}
|
|
51948
|
+
return writer;
|
|
51949
|
+
},
|
|
51950
|
+
decode(input, length) {
|
|
51951
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
51952
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
51953
|
+
const message = createBaseWorkspaceBillingSummaryResponse_MeteredCostBreakdownEntry();
|
|
51954
|
+
while (reader.pos < end) {
|
|
51955
|
+
const tag = reader.uint32();
|
|
51956
|
+
switch (tag >>> 3) {
|
|
51957
|
+
case 1: {
|
|
51958
|
+
if (tag !== 10) {
|
|
51959
|
+
break;
|
|
51960
|
+
}
|
|
51961
|
+
message.key = reader.string();
|
|
51962
|
+
continue;
|
|
51963
|
+
}
|
|
51964
|
+
case 2: {
|
|
51965
|
+
if (tag !== 18) {
|
|
51966
|
+
break;
|
|
51967
|
+
}
|
|
51968
|
+
message.value = reader.string();
|
|
51969
|
+
continue;
|
|
51970
|
+
}
|
|
51971
|
+
}
|
|
51972
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
51973
|
+
break;
|
|
51974
|
+
}
|
|
51975
|
+
reader.skip(tag & 7);
|
|
51976
|
+
}
|
|
51977
|
+
return message;
|
|
51978
|
+
},
|
|
51979
|
+
fromJSON(object) {
|
|
51980
|
+
return {
|
|
51981
|
+
key: isSet5(object.key) ? globalThis.String(object.key) : "",
|
|
51982
|
+
value: isSet5(object.value) ? globalThis.String(object.value) : ""
|
|
51983
|
+
};
|
|
51984
|
+
},
|
|
51985
|
+
toJSON(message) {
|
|
51986
|
+
const obj = {};
|
|
51987
|
+
if (message.key !== "") {
|
|
51988
|
+
obj.key = message.key;
|
|
51989
|
+
}
|
|
51990
|
+
if (message.value !== "") {
|
|
51991
|
+
obj.value = message.value;
|
|
51992
|
+
}
|
|
51993
|
+
return obj;
|
|
51994
|
+
},
|
|
51995
|
+
create(base) {
|
|
51996
|
+
return WorkspaceBillingSummaryResponse_MeteredCostBreakdownEntry.fromPartial(base ?? {});
|
|
51997
|
+
},
|
|
51998
|
+
fromPartial(object) {
|
|
51999
|
+
const message = createBaseWorkspaceBillingSummaryResponse_MeteredCostBreakdownEntry();
|
|
52000
|
+
message.key = object.key ?? "";
|
|
52001
|
+
message.value = object.value ?? "";
|
|
50921
52002
|
return message;
|
|
50922
52003
|
}
|
|
50923
52004
|
};
|
|
@@ -51359,6 +52440,231 @@ var WorkspaceNameLookupResponse = {
|
|
|
51359
52440
|
return message;
|
|
51360
52441
|
}
|
|
51361
52442
|
};
|
|
52443
|
+
function createBaseWorkspaceSetDefaultEnvironmentRequest() {
|
|
52444
|
+
return { environmentName: "" };
|
|
52445
|
+
}
|
|
52446
|
+
var WorkspaceSetDefaultEnvironmentRequest = {
|
|
52447
|
+
encode(message, writer = new BinaryWriter()) {
|
|
52448
|
+
if (message.environmentName !== "") {
|
|
52449
|
+
writer.uint32(10).string(message.environmentName);
|
|
52450
|
+
}
|
|
52451
|
+
return writer;
|
|
52452
|
+
},
|
|
52453
|
+
decode(input, length) {
|
|
52454
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
52455
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
52456
|
+
const message = createBaseWorkspaceSetDefaultEnvironmentRequest();
|
|
52457
|
+
while (reader.pos < end) {
|
|
52458
|
+
const tag = reader.uint32();
|
|
52459
|
+
switch (tag >>> 3) {
|
|
52460
|
+
case 1: {
|
|
52461
|
+
if (tag !== 10) {
|
|
52462
|
+
break;
|
|
52463
|
+
}
|
|
52464
|
+
message.environmentName = reader.string();
|
|
52465
|
+
continue;
|
|
52466
|
+
}
|
|
52467
|
+
}
|
|
52468
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
52469
|
+
break;
|
|
52470
|
+
}
|
|
52471
|
+
reader.skip(tag & 7);
|
|
52472
|
+
}
|
|
52473
|
+
return message;
|
|
52474
|
+
},
|
|
52475
|
+
fromJSON(object) {
|
|
52476
|
+
return { environmentName: isSet5(object.environmentName) ? globalThis.String(object.environmentName) : "" };
|
|
52477
|
+
},
|
|
52478
|
+
toJSON(message) {
|
|
52479
|
+
const obj = {};
|
|
52480
|
+
if (message.environmentName !== "") {
|
|
52481
|
+
obj.environmentName = message.environmentName;
|
|
52482
|
+
}
|
|
52483
|
+
return obj;
|
|
52484
|
+
},
|
|
52485
|
+
create(base) {
|
|
52486
|
+
return WorkspaceSetDefaultEnvironmentRequest.fromPartial(base ?? {});
|
|
52487
|
+
},
|
|
52488
|
+
fromPartial(object) {
|
|
52489
|
+
const message = createBaseWorkspaceSetDefaultEnvironmentRequest();
|
|
52490
|
+
message.environmentName = object.environmentName ?? "";
|
|
52491
|
+
return message;
|
|
52492
|
+
}
|
|
52493
|
+
};
|
|
52494
|
+
function createBaseWorkspaceSetImageBuilderVersionRequest() {
|
|
52495
|
+
return { newImageBuilderVersion: "" };
|
|
52496
|
+
}
|
|
52497
|
+
var WorkspaceSetImageBuilderVersionRequest = {
|
|
52498
|
+
encode(message, writer = new BinaryWriter()) {
|
|
52499
|
+
if (message.newImageBuilderVersion !== "") {
|
|
52500
|
+
writer.uint32(10).string(message.newImageBuilderVersion);
|
|
52501
|
+
}
|
|
52502
|
+
return writer;
|
|
52503
|
+
},
|
|
52504
|
+
decode(input, length) {
|
|
52505
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
52506
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
52507
|
+
const message = createBaseWorkspaceSetImageBuilderVersionRequest();
|
|
52508
|
+
while (reader.pos < end) {
|
|
52509
|
+
const tag = reader.uint32();
|
|
52510
|
+
switch (tag >>> 3) {
|
|
52511
|
+
case 1: {
|
|
52512
|
+
if (tag !== 10) {
|
|
52513
|
+
break;
|
|
52514
|
+
}
|
|
52515
|
+
message.newImageBuilderVersion = reader.string();
|
|
52516
|
+
continue;
|
|
52517
|
+
}
|
|
52518
|
+
}
|
|
52519
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
52520
|
+
break;
|
|
52521
|
+
}
|
|
52522
|
+
reader.skip(tag & 7);
|
|
52523
|
+
}
|
|
52524
|
+
return message;
|
|
52525
|
+
},
|
|
52526
|
+
fromJSON(object) {
|
|
52527
|
+
return {
|
|
52528
|
+
newImageBuilderVersion: isSet5(object.newImageBuilderVersion) ? globalThis.String(object.newImageBuilderVersion) : ""
|
|
52529
|
+
};
|
|
52530
|
+
},
|
|
52531
|
+
toJSON(message) {
|
|
52532
|
+
const obj = {};
|
|
52533
|
+
if (message.newImageBuilderVersion !== "") {
|
|
52534
|
+
obj.newImageBuilderVersion = message.newImageBuilderVersion;
|
|
52535
|
+
}
|
|
52536
|
+
return obj;
|
|
52537
|
+
},
|
|
52538
|
+
create(base) {
|
|
52539
|
+
return WorkspaceSetImageBuilderVersionRequest.fromPartial(base ?? {});
|
|
52540
|
+
},
|
|
52541
|
+
fromPartial(object) {
|
|
52542
|
+
const message = createBaseWorkspaceSetImageBuilderVersionRequest();
|
|
52543
|
+
message.newImageBuilderVersion = object.newImageBuilderVersion ?? "";
|
|
52544
|
+
return message;
|
|
52545
|
+
}
|
|
52546
|
+
};
|
|
52547
|
+
function createBaseWorkspaceSetImageBuilderVersionResponse() {
|
|
52548
|
+
return { imageBuilderVersion: "" };
|
|
52549
|
+
}
|
|
52550
|
+
var WorkspaceSetImageBuilderVersionResponse = {
|
|
52551
|
+
encode(message, writer = new BinaryWriter()) {
|
|
52552
|
+
if (message.imageBuilderVersion !== "") {
|
|
52553
|
+
writer.uint32(10).string(message.imageBuilderVersion);
|
|
52554
|
+
}
|
|
52555
|
+
return writer;
|
|
52556
|
+
},
|
|
52557
|
+
decode(input, length) {
|
|
52558
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
52559
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
52560
|
+
const message = createBaseWorkspaceSetImageBuilderVersionResponse();
|
|
52561
|
+
while (reader.pos < end) {
|
|
52562
|
+
const tag = reader.uint32();
|
|
52563
|
+
switch (tag >>> 3) {
|
|
52564
|
+
case 1: {
|
|
52565
|
+
if (tag !== 10) {
|
|
52566
|
+
break;
|
|
52567
|
+
}
|
|
52568
|
+
message.imageBuilderVersion = reader.string();
|
|
52569
|
+
continue;
|
|
52570
|
+
}
|
|
52571
|
+
}
|
|
52572
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
52573
|
+
break;
|
|
52574
|
+
}
|
|
52575
|
+
reader.skip(tag & 7);
|
|
52576
|
+
}
|
|
52577
|
+
return message;
|
|
52578
|
+
},
|
|
52579
|
+
fromJSON(object) {
|
|
52580
|
+
return {
|
|
52581
|
+
imageBuilderVersion: isSet5(object.imageBuilderVersion) ? globalThis.String(object.imageBuilderVersion) : ""
|
|
52582
|
+
};
|
|
52583
|
+
},
|
|
52584
|
+
toJSON(message) {
|
|
52585
|
+
const obj = {};
|
|
52586
|
+
if (message.imageBuilderVersion !== "") {
|
|
52587
|
+
obj.imageBuilderVersion = message.imageBuilderVersion;
|
|
52588
|
+
}
|
|
52589
|
+
return obj;
|
|
52590
|
+
},
|
|
52591
|
+
create(base) {
|
|
52592
|
+
return WorkspaceSetImageBuilderVersionResponse.fromPartial(base ?? {});
|
|
52593
|
+
},
|
|
52594
|
+
fromPartial(object) {
|
|
52595
|
+
const message = createBaseWorkspaceSetImageBuilderVersionResponse();
|
|
52596
|
+
message.imageBuilderVersion = object.imageBuilderVersion ?? "";
|
|
52597
|
+
return message;
|
|
52598
|
+
}
|
|
52599
|
+
};
|
|
52600
|
+
function createBaseWorkspaceSettingsResponse() {
|
|
52601
|
+
return { defaultEnvironmentName: "", imageBuilderVersion: "" };
|
|
52602
|
+
}
|
|
52603
|
+
var WorkspaceSettingsResponse = {
|
|
52604
|
+
encode(message, writer = new BinaryWriter()) {
|
|
52605
|
+
if (message.defaultEnvironmentName !== "") {
|
|
52606
|
+
writer.uint32(10).string(message.defaultEnvironmentName);
|
|
52607
|
+
}
|
|
52608
|
+
if (message.imageBuilderVersion !== "") {
|
|
52609
|
+
writer.uint32(18).string(message.imageBuilderVersion);
|
|
52610
|
+
}
|
|
52611
|
+
return writer;
|
|
52612
|
+
},
|
|
52613
|
+
decode(input, length) {
|
|
52614
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
52615
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
52616
|
+
const message = createBaseWorkspaceSettingsResponse();
|
|
52617
|
+
while (reader.pos < end) {
|
|
52618
|
+
const tag = reader.uint32();
|
|
52619
|
+
switch (tag >>> 3) {
|
|
52620
|
+
case 1: {
|
|
52621
|
+
if (tag !== 10) {
|
|
52622
|
+
break;
|
|
52623
|
+
}
|
|
52624
|
+
message.defaultEnvironmentName = reader.string();
|
|
52625
|
+
continue;
|
|
52626
|
+
}
|
|
52627
|
+
case 2: {
|
|
52628
|
+
if (tag !== 18) {
|
|
52629
|
+
break;
|
|
52630
|
+
}
|
|
52631
|
+
message.imageBuilderVersion = reader.string();
|
|
52632
|
+
continue;
|
|
52633
|
+
}
|
|
52634
|
+
}
|
|
52635
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
52636
|
+
break;
|
|
52637
|
+
}
|
|
52638
|
+
reader.skip(tag & 7);
|
|
52639
|
+
}
|
|
52640
|
+
return message;
|
|
52641
|
+
},
|
|
52642
|
+
fromJSON(object) {
|
|
52643
|
+
return {
|
|
52644
|
+
defaultEnvironmentName: isSet5(object.defaultEnvironmentName) ? globalThis.String(object.defaultEnvironmentName) : "",
|
|
52645
|
+
imageBuilderVersion: isSet5(object.imageBuilderVersion) ? globalThis.String(object.imageBuilderVersion) : ""
|
|
52646
|
+
};
|
|
52647
|
+
},
|
|
52648
|
+
toJSON(message) {
|
|
52649
|
+
const obj = {};
|
|
52650
|
+
if (message.defaultEnvironmentName !== "") {
|
|
52651
|
+
obj.defaultEnvironmentName = message.defaultEnvironmentName;
|
|
52652
|
+
}
|
|
52653
|
+
if (message.imageBuilderVersion !== "") {
|
|
52654
|
+
obj.imageBuilderVersion = message.imageBuilderVersion;
|
|
52655
|
+
}
|
|
52656
|
+
return obj;
|
|
52657
|
+
},
|
|
52658
|
+
create(base) {
|
|
52659
|
+
return WorkspaceSettingsResponse.fromPartial(base ?? {});
|
|
52660
|
+
},
|
|
52661
|
+
fromPartial(object) {
|
|
52662
|
+
const message = createBaseWorkspaceSettingsResponse();
|
|
52663
|
+
message.defaultEnvironmentName = object.defaultEnvironmentName ?? "";
|
|
52664
|
+
message.imageBuilderVersion = object.imageBuilderVersion ?? "";
|
|
52665
|
+
return message;
|
|
52666
|
+
}
|
|
52667
|
+
};
|
|
51362
52668
|
var ModalClientDefinition = {
|
|
51363
52669
|
name: "ModalClient",
|
|
51364
52670
|
fullName: "modal.client.ModalClient",
|
|
@@ -51723,6 +53029,14 @@ var ModalClientDefinition = {
|
|
|
51723
53029
|
responseStream: false,
|
|
51724
53030
|
options: {}
|
|
51725
53031
|
},
|
|
53032
|
+
containerServerLifecycleReady: {
|
|
53033
|
+
name: "ContainerServerLifecycleReady",
|
|
53034
|
+
requestType: ContainerServerLifecycleReadyRequest,
|
|
53035
|
+
requestStream: false,
|
|
53036
|
+
responseType: Empty,
|
|
53037
|
+
responseStream: false,
|
|
53038
|
+
options: {}
|
|
53039
|
+
},
|
|
51726
53040
|
containerStop: {
|
|
51727
53041
|
name: "ContainerStop",
|
|
51728
53042
|
requestType: ContainerStopRequest,
|
|
@@ -51904,6 +53218,14 @@ var ModalClientDefinition = {
|
|
|
51904
53218
|
options: {}
|
|
51905
53219
|
},
|
|
51906
53220
|
/** Environments */
|
|
53221
|
+
environmentBillingSummary: {
|
|
53222
|
+
name: "EnvironmentBillingSummary",
|
|
53223
|
+
requestType: EnvironmentBillingSummaryRequest,
|
|
53224
|
+
requestStream: false,
|
|
53225
|
+
responseType: EnvironmentBillingSummaryResponse,
|
|
53226
|
+
responseStream: false,
|
|
53227
|
+
options: {}
|
|
53228
|
+
},
|
|
51907
53229
|
environmentCreate: {
|
|
51908
53230
|
name: "EnvironmentCreate",
|
|
51909
53231
|
requestType: EnvironmentCreateRequest,
|
|
@@ -52305,6 +53627,14 @@ var ModalClientDefinition = {
|
|
|
52305
53627
|
options: {}
|
|
52306
53628
|
},
|
|
52307
53629
|
/** Mounts */
|
|
53630
|
+
mountBatchedCheckExistence: {
|
|
53631
|
+
name: "MountBatchedCheckExistence",
|
|
53632
|
+
requestType: MountBatchedCheckExistenceRequest,
|
|
53633
|
+
requestStream: false,
|
|
53634
|
+
responseType: MountBatchedCheckExistenceResponse,
|
|
53635
|
+
responseStream: false,
|
|
53636
|
+
options: {}
|
|
53637
|
+
},
|
|
52308
53638
|
mountGetOrCreate: {
|
|
52309
53639
|
name: "MountGetOrCreate",
|
|
52310
53640
|
requestType: MountGetOrCreateRequest,
|
|
@@ -52509,6 +53839,14 @@ var ModalClientDefinition = {
|
|
|
52509
53839
|
responseStream: false,
|
|
52510
53840
|
options: {}
|
|
52511
53841
|
},
|
|
53842
|
+
sandboxGetFromNameV2: {
|
|
53843
|
+
name: "SandboxGetFromNameV2",
|
|
53844
|
+
requestType: SandboxGetFromNameRequest,
|
|
53845
|
+
requestStream: false,
|
|
53846
|
+
responseType: SandboxGetFromNameResponse,
|
|
53847
|
+
responseStream: false,
|
|
53848
|
+
options: {}
|
|
53849
|
+
},
|
|
52512
53850
|
sandboxGetLogs: {
|
|
52513
53851
|
name: "SandboxGetLogs",
|
|
52514
53852
|
requestType: SandboxGetLogsRequest,
|
|
@@ -52646,6 +53984,14 @@ var ModalClientDefinition = {
|
|
|
52646
53984
|
responseStream: false,
|
|
52647
53985
|
options: {}
|
|
52648
53986
|
},
|
|
53987
|
+
sandboxTagsGetV2: {
|
|
53988
|
+
name: "SandboxTagsGetV2",
|
|
53989
|
+
requestType: SandboxTagsGetRequest,
|
|
53990
|
+
requestStream: false,
|
|
53991
|
+
responseType: SandboxTagsGetResponse,
|
|
53992
|
+
responseStream: false,
|
|
53993
|
+
options: {}
|
|
53994
|
+
},
|
|
52649
53995
|
sandboxTagsSet: {
|
|
52650
53996
|
name: "SandboxTagsSet",
|
|
52651
53997
|
requestType: SandboxTagsSetRequest,
|
|
@@ -52654,6 +54000,14 @@ var ModalClientDefinition = {
|
|
|
52654
54000
|
responseStream: false,
|
|
52655
54001
|
options: {}
|
|
52656
54002
|
},
|
|
54003
|
+
sandboxTagsSetV2: {
|
|
54004
|
+
name: "SandboxTagsSetV2",
|
|
54005
|
+
requestType: SandboxTagsSetRequest,
|
|
54006
|
+
requestStream: false,
|
|
54007
|
+
responseType: Empty,
|
|
54008
|
+
responseStream: false,
|
|
54009
|
+
options: {}
|
|
54010
|
+
},
|
|
52657
54011
|
sandboxTerminate: {
|
|
52658
54012
|
name: "SandboxTerminate",
|
|
52659
54013
|
requestType: SandboxTerminateRequest,
|
|
@@ -53120,6 +54474,14 @@ var ModalClientDefinition = {
|
|
|
53120
54474
|
responseStream: true,
|
|
53121
54475
|
options: {}
|
|
53122
54476
|
},
|
|
54477
|
+
workspaceBillingSummary: {
|
|
54478
|
+
name: "WorkspaceBillingSummary",
|
|
54479
|
+
requestType: WorkspaceBillingSummaryRequest,
|
|
54480
|
+
requestStream: false,
|
|
54481
|
+
responseType: WorkspaceBillingSummaryResponse,
|
|
54482
|
+
responseStream: false,
|
|
54483
|
+
options: {}
|
|
54484
|
+
},
|
|
53123
54485
|
workspaceDashboardUrlGet: {
|
|
53124
54486
|
name: "WorkspaceDashboardUrlGet",
|
|
53125
54487
|
requestType: WorkspaceDashboardUrlRequest,
|
|
@@ -53143,6 +54505,30 @@ var ModalClientDefinition = {
|
|
|
53143
54505
|
responseType: WorkspaceNameLookupResponse,
|
|
53144
54506
|
responseStream: false,
|
|
53145
54507
|
options: {}
|
|
54508
|
+
},
|
|
54509
|
+
workspaceSetDefaultEnvironment: {
|
|
54510
|
+
name: "WorkspaceSetDefaultEnvironment",
|
|
54511
|
+
requestType: WorkspaceSetDefaultEnvironmentRequest,
|
|
54512
|
+
requestStream: false,
|
|
54513
|
+
responseType: Empty,
|
|
54514
|
+
responseStream: false,
|
|
54515
|
+
options: {}
|
|
54516
|
+
},
|
|
54517
|
+
workspaceSetImageBuilderVersion: {
|
|
54518
|
+
name: "WorkspaceSetImageBuilderVersion",
|
|
54519
|
+
requestType: WorkspaceSetImageBuilderVersionRequest,
|
|
54520
|
+
requestStream: false,
|
|
54521
|
+
responseType: WorkspaceSetImageBuilderVersionResponse,
|
|
54522
|
+
responseStream: false,
|
|
54523
|
+
options: {}
|
|
54524
|
+
},
|
|
54525
|
+
workspaceSettings: {
|
|
54526
|
+
name: "WorkspaceSettings",
|
|
54527
|
+
requestType: Empty,
|
|
54528
|
+
requestStream: false,
|
|
54529
|
+
responseType: WorkspaceSettingsResponse,
|
|
54530
|
+
responseStream: false,
|
|
54531
|
+
options: {}
|
|
53146
54532
|
}
|
|
53147
54533
|
}
|
|
53148
54534
|
};
|
|
@@ -53734,6 +55120,16 @@ import { ClientError as ClientError4, Status as Status4 } from "nice-grpc";
|
|
|
53734
55120
|
|
|
53735
55121
|
// src/secret.ts
|
|
53736
55122
|
import { ClientError as ClientError2, Status as Status2 } from "nice-grpc";
|
|
55123
|
+
var ENV_VAR_KEY_REGEX = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
|
|
55124
|
+
function validateEnvVarKeys(env) {
|
|
55125
|
+
for (const key of Object.keys(env)) {
|
|
55126
|
+
if (!ENV_VAR_KEY_REGEX.test(key)) {
|
|
55127
|
+
throw new InvalidError(
|
|
55128
|
+
`Secret key name ${JSON.stringify(key)} is invalid for environment variables. Only letters, numbers, and underscores are allowed, and the name may not start with a number.`
|
|
55129
|
+
);
|
|
55130
|
+
}
|
|
55131
|
+
}
|
|
55132
|
+
}
|
|
53737
55133
|
var SecretService = class {
|
|
53738
55134
|
#client;
|
|
53739
55135
|
constructor(client) {
|
|
@@ -53763,7 +55159,16 @@ var SecretService = class {
|
|
|
53763
55159
|
throw err;
|
|
53764
55160
|
}
|
|
53765
55161
|
}
|
|
53766
|
-
/**
|
|
55162
|
+
/**
|
|
55163
|
+
* Create a {@link Secret} from a plain object of key-value pairs.
|
|
55164
|
+
*
|
|
55165
|
+
* The returned Secret is lazy: no server-side Secret is created (and
|
|
55166
|
+
* {@link Secret#secretId secretId} stays empty) until it is first used. When
|
|
55167
|
+
* used with {@link Sandbox#exec Sandbox.exec()} or
|
|
55168
|
+
* {@link SandboxService#experimentalCreate client.sandboxes.experimentalCreate()},
|
|
55169
|
+
* the values are sent directly to the worker as environment variables,
|
|
55170
|
+
* avoiding a `SecretGetOrCreate` round-trip entirely.
|
|
55171
|
+
*/
|
|
53767
55172
|
async fromObject(entries, params) {
|
|
53768
55173
|
for (const [, value] of Object.entries(entries)) {
|
|
53769
55174
|
if (value == null || typeof value !== "string") {
|
|
@@ -53772,23 +55177,14 @@ var SecretService = class {
|
|
|
53772
55177
|
);
|
|
53773
55178
|
}
|
|
53774
55179
|
}
|
|
53775
|
-
|
|
53776
|
-
|
|
53777
|
-
|
|
53778
|
-
|
|
53779
|
-
|
|
53780
|
-
|
|
53781
|
-
|
|
53782
|
-
|
|
53783
|
-
"secret_id",
|
|
53784
|
-
resp.secretId
|
|
53785
|
-
);
|
|
53786
|
-
return new Secret(resp.secretId);
|
|
53787
|
-
} catch (err) {
|
|
53788
|
-
if (err instanceof ClientError2 && (err.code === Status2.INVALID_ARGUMENT || err.code === Status2.FAILED_PRECONDITION))
|
|
53789
|
-
throw new InvalidError(err.details);
|
|
53790
|
-
throw err;
|
|
53791
|
-
}
|
|
55180
|
+
validateEnvVarKeys(entries);
|
|
55181
|
+
const envDict = { ...entries };
|
|
55182
|
+
const environment = this.#client.environmentName(params?.environment);
|
|
55183
|
+
return new Secret(
|
|
55184
|
+
"",
|
|
55185
|
+
void 0,
|
|
55186
|
+
new SecretFromObjectHydrator(envDict, environment)
|
|
55187
|
+
);
|
|
53792
55188
|
}
|
|
53793
55189
|
/**
|
|
53794
55190
|
* Delete a named {@link Secret}.
|
|
@@ -53819,15 +55215,98 @@ var SecretService = class {
|
|
|
53819
55215
|
}
|
|
53820
55216
|
}
|
|
53821
55217
|
};
|
|
55218
|
+
var SecretFromObjectHydrator = class {
|
|
55219
|
+
envDict;
|
|
55220
|
+
#environment;
|
|
55221
|
+
constructor(envDict, environment) {
|
|
55222
|
+
this.envDict = envDict;
|
|
55223
|
+
this.#environment = environment;
|
|
55224
|
+
}
|
|
55225
|
+
async hydrate(client) {
|
|
55226
|
+
try {
|
|
55227
|
+
const resp = await client.cpClient.secretGetOrCreate({
|
|
55228
|
+
objectCreationType: 5 /* OBJECT_CREATION_TYPE_EPHEMERAL */,
|
|
55229
|
+
envDict: this.envDict,
|
|
55230
|
+
environmentName: this.#environment
|
|
55231
|
+
});
|
|
55232
|
+
client.logger.debug(
|
|
55233
|
+
"Created ephemeral Secret",
|
|
55234
|
+
"secret_id",
|
|
55235
|
+
resp.secretId
|
|
55236
|
+
);
|
|
55237
|
+
return resp.secretId;
|
|
55238
|
+
} catch (err) {
|
|
55239
|
+
if (err instanceof ClientError2 && (err.code === Status2.INVALID_ARGUMENT || err.code === Status2.FAILED_PRECONDITION))
|
|
55240
|
+
throw new InvalidError(err.details);
|
|
55241
|
+
throw err;
|
|
55242
|
+
}
|
|
55243
|
+
}
|
|
55244
|
+
};
|
|
53822
55245
|
var Secret = class {
|
|
53823
|
-
secretId;
|
|
55246
|
+
#secretId;
|
|
53824
55247
|
name;
|
|
55248
|
+
// Resolves secretId lazily the first time it is needed. Undefined for Secrets
|
|
55249
|
+
// constructed already-hydrated (e.g. from fromName), and not consulted again
|
|
55250
|
+
// once secretId is set.
|
|
55251
|
+
#hydrator;
|
|
55252
|
+
// Caches the single in-flight (or successfully completed) hydration so the
|
|
55253
|
+
// ephemeral Secret is created at most once, even if multiple callers hydrate
|
|
55254
|
+
// the same Secret concurrently. Cleared on failure so a transient error
|
|
55255
|
+
// doesn't permanently break the Secret; subsequent calls can retry.
|
|
55256
|
+
#hydratePromise;
|
|
53825
55257
|
/** @ignore */
|
|
53826
|
-
constructor(secretId, name) {
|
|
53827
|
-
this
|
|
55258
|
+
constructor(secretId, name, hydrator) {
|
|
55259
|
+
this.#secretId = secretId;
|
|
53828
55260
|
this.name = name;
|
|
55261
|
+
this.#hydrator = hydrator;
|
|
55262
|
+
}
|
|
55263
|
+
/** The ID of the server-side Secret, or an empty string if not yet hydrated. */
|
|
55264
|
+
get secretId() {
|
|
55265
|
+
return this.#secretId;
|
|
55266
|
+
}
|
|
55267
|
+
/**
|
|
55268
|
+
* The hydrator resolving a lazy Secret to a secretId, or `undefined` for
|
|
55269
|
+
* Secrets that already reference a server-side Secret (e.g. from fromName).
|
|
55270
|
+
*
|
|
55271
|
+
* @internal
|
|
55272
|
+
* @hidden
|
|
55273
|
+
*/
|
|
55274
|
+
get _hydrator() {
|
|
55275
|
+
return this.#hydrator;
|
|
55276
|
+
}
|
|
55277
|
+
/**
|
|
55278
|
+
* Lazily create the ephemeral server-side Secret backing a fromObject Secret
|
|
55279
|
+
* and populate {@link Secret#secretId secretId}. A no-op once secretId is set
|
|
55280
|
+
* (e.g. for Secrets returned by fromName).
|
|
55281
|
+
*
|
|
55282
|
+
* @internal
|
|
55283
|
+
* @hidden
|
|
55284
|
+
*/
|
|
55285
|
+
async _hydrate(client) {
|
|
55286
|
+
if (this.#secretId !== "" || this.#hydrator === void 0) {
|
|
55287
|
+
return;
|
|
55288
|
+
}
|
|
55289
|
+
if (this.#hydratePromise === void 0) {
|
|
55290
|
+
this.#hydratePromise = this.#doHydrate(client);
|
|
55291
|
+
}
|
|
55292
|
+
const promise = this.#hydratePromise;
|
|
55293
|
+
try {
|
|
55294
|
+
await promise;
|
|
55295
|
+
} catch (err) {
|
|
55296
|
+
if (this.#hydratePromise === promise) {
|
|
55297
|
+
this.#hydratePromise = void 0;
|
|
55298
|
+
}
|
|
55299
|
+
throw err;
|
|
55300
|
+
}
|
|
55301
|
+
}
|
|
55302
|
+
async #doHydrate(client) {
|
|
55303
|
+
this.#secretId = await this.#hydrator.hydrate(client);
|
|
53829
55304
|
}
|
|
53830
55305
|
};
|
|
55306
|
+
function secretEnvDictHydrator(secret) {
|
|
55307
|
+
const hydrator = secret?._hydrator;
|
|
55308
|
+
return hydrator instanceof SecretFromObjectHydrator ? hydrator : void 0;
|
|
55309
|
+
}
|
|
53831
55310
|
async function mergeEnvIntoSecrets(client, env, secrets) {
|
|
53832
55311
|
const result = [...secrets || []];
|
|
53833
55312
|
if (env && Object.keys(env).length > 0) {
|
|
@@ -53835,6 +55314,38 @@ async function mergeEnvIntoSecrets(client, env, secrets) {
|
|
|
53835
55314
|
}
|
|
53836
55315
|
return result;
|
|
53837
55316
|
}
|
|
55317
|
+
async function hydrateSecrets(client, secrets) {
|
|
55318
|
+
secrets.forEach((secret, i) => {
|
|
55319
|
+
if (secret == null) {
|
|
55320
|
+
throw new InvalidError(`secret at index ${i} must not be null`);
|
|
55321
|
+
}
|
|
55322
|
+
});
|
|
55323
|
+
await Promise.all(secrets.map((secret) => secret._hydrate(client)));
|
|
55324
|
+
}
|
|
55325
|
+
function collectSecretIds(secrets) {
|
|
55326
|
+
return secrets.map((secret, i) => {
|
|
55327
|
+
if (secret == null) {
|
|
55328
|
+
throw new InvalidError(`secret at index ${i} must not be null`);
|
|
55329
|
+
}
|
|
55330
|
+
if (secret.secretId === "") {
|
|
55331
|
+
throw new InvalidError(`secret at index ${i} has not been hydrated`);
|
|
55332
|
+
}
|
|
55333
|
+
return secret.secretId;
|
|
55334
|
+
});
|
|
55335
|
+
}
|
|
55336
|
+
function splitEnvDictAndResolvableSecrets(secrets) {
|
|
55337
|
+
const envDict = {};
|
|
55338
|
+
const resolvable = [];
|
|
55339
|
+
for (const secret of secrets) {
|
|
55340
|
+
const hydrator = secret != null ? secretEnvDictHydrator(secret) : void 0;
|
|
55341
|
+
if (hydrator !== void 0) {
|
|
55342
|
+
Object.assign(envDict, hydrator.envDict);
|
|
55343
|
+
} else {
|
|
55344
|
+
resolvable.push(secret);
|
|
55345
|
+
}
|
|
55346
|
+
}
|
|
55347
|
+
return [envDict, resolvable];
|
|
55348
|
+
}
|
|
53838
55349
|
|
|
53839
55350
|
// src/volume.ts
|
|
53840
55351
|
import { ClientError as ClientError3, Status as Status3 } from "nice-grpc";
|
|
@@ -54094,7 +55605,8 @@ var FunctionService = class {
|
|
|
54094
55605
|
const resp = await this.#client.cpClient.functionGet({
|
|
54095
55606
|
appName,
|
|
54096
55607
|
objectTag: name,
|
|
54097
|
-
environmentName: this.#client.environmentName(params.environment)
|
|
55608
|
+
environmentName: this.#client.environmentName(params.environment),
|
|
55609
|
+
appVersion: params.version
|
|
54098
55610
|
});
|
|
54099
55611
|
this.#client.logger.debug(
|
|
54100
55612
|
"Retrieved Function",
|
|
@@ -54217,7 +55729,8 @@ async function buildFunctionOptionsProto(options) {
|
|
|
54217
55729
|
maxConcurrentInputs: o.maxConcurrentInputs,
|
|
54218
55730
|
targetConcurrentInputs: o.targetConcurrentInputs,
|
|
54219
55731
|
batchMaxSize: o.batchMaxSize,
|
|
54220
|
-
batchLingerMs: o.batchWaitMs
|
|
55732
|
+
batchLingerMs: o.batchWaitMs,
|
|
55733
|
+
routingRegion: o.routingRegion
|
|
54221
55734
|
});
|
|
54222
55735
|
return functionOptions;
|
|
54223
55736
|
}
|
|
@@ -54282,6 +55795,7 @@ async function bindParameters(client, functionId, options = {}, schema = [], par
|
|
|
54282
55795
|
options?.env,
|
|
54283
55796
|
options?.secrets
|
|
54284
55797
|
);
|
|
55798
|
+
await hydrateSecrets(client, mergedSecrets);
|
|
54285
55799
|
const mergedOptions = mergeServiceOptions(options, {
|
|
54286
55800
|
secrets: mergedSecrets,
|
|
54287
55801
|
env: void 0
|
|
@@ -54358,6 +55872,7 @@ var Function_ = class _Function_ {
|
|
|
54358
55872
|
* and/or {@link Function_#withBatching withBatching}. */
|
|
54359
55873
|
async instance() {
|
|
54360
55874
|
let newFnId = this.functionId;
|
|
55875
|
+
let handleMetadata = this.#handleMetadata;
|
|
54361
55876
|
if (this.#options != null && Object.entries(this.#options).length > 0) {
|
|
54362
55877
|
const boundF = await bindParameters(
|
|
54363
55878
|
this.#client,
|
|
@@ -54365,12 +55880,13 @@ var Function_ = class _Function_ {
|
|
|
54365
55880
|
this.#options
|
|
54366
55881
|
);
|
|
54367
55882
|
newFnId = boundF.boundFunctionId;
|
|
55883
|
+
handleMetadata = boundF.handleMetadata;
|
|
54368
55884
|
}
|
|
54369
55885
|
return new _Function_(
|
|
54370
55886
|
this.#client,
|
|
54371
55887
|
newFnId,
|
|
54372
55888
|
this.methodName,
|
|
54373
|
-
|
|
55889
|
+
handleMetadata
|
|
54374
55890
|
);
|
|
54375
55891
|
}
|
|
54376
55892
|
// Execute a single input into a remote Function.
|
|
@@ -54521,7 +56037,8 @@ var ClsService = class {
|
|
|
54521
56037
|
const serviceFunction = await this.#client.cpClient.functionGet({
|
|
54522
56038
|
appName,
|
|
54523
56039
|
objectTag: serviceFunctionName,
|
|
54524
|
-
environmentName: this.#client.environmentName(params.environment)
|
|
56040
|
+
environmentName: this.#client.environmentName(params.environment),
|
|
56041
|
+
appVersion: params.version
|
|
54525
56042
|
});
|
|
54526
56043
|
const parameterInfo = serviceFunction.handleMetadata?.classParameterInfo;
|
|
54527
56044
|
const schema = parameterInfo?.schema ?? [];
|
|
@@ -54570,15 +56087,17 @@ var Cls = class _Cls {
|
|
|
54570
56087
|
/** Create a new instance of the Cls with parameters and/or runtime options. */
|
|
54571
56088
|
async instance(parameters = {}) {
|
|
54572
56089
|
let functionId;
|
|
56090
|
+
let methodHandleMetadata;
|
|
54573
56091
|
if (this.#schema.length === 0 && this.#serviceFunctionOptions === void 0) {
|
|
54574
56092
|
functionId = this.#serviceFunctionId;
|
|
56093
|
+
methodHandleMetadata = this.#serviceFunctionMetadata.methodHandleMetadata;
|
|
54575
56094
|
} else {
|
|
54576
|
-
|
|
56095
|
+
const bindResp = await this.#bindParameters(parameters);
|
|
56096
|
+
functionId = bindResp.boundFunctionId;
|
|
56097
|
+
methodHandleMetadata = bindResp.handleMetadata?.methodHandleMetadata ?? {};
|
|
54577
56098
|
}
|
|
54578
56099
|
const methods = /* @__PURE__ */ new Map();
|
|
54579
|
-
for (const [name, methodMetadata] of Object.entries(
|
|
54580
|
-
this.#serviceFunctionMetadata.methodHandleMetadata
|
|
54581
|
-
)) {
|
|
56100
|
+
for (const [name, methodMetadata] of Object.entries(methodHandleMetadata)) {
|
|
54582
56101
|
methods.set(
|
|
54583
56102
|
name,
|
|
54584
56103
|
new Function_(this.#client, functionId, name, methodMetadata)
|
|
@@ -54624,14 +56143,13 @@ var Cls = class _Cls {
|
|
|
54624
56143
|
}
|
|
54625
56144
|
/** Bind parameters to the Cls function. */
|
|
54626
56145
|
async #bindParameters(parameters) {
|
|
54627
|
-
|
|
56146
|
+
return await bindParameters(
|
|
54628
56147
|
this.#client,
|
|
54629
56148
|
this.#serviceFunctionId,
|
|
54630
56149
|
this.#serviceFunctionOptions,
|
|
54631
56150
|
this.#schema,
|
|
54632
56151
|
parameters
|
|
54633
56152
|
);
|
|
54634
|
-
return bindResp.boundFunctionId;
|
|
54635
56153
|
}
|
|
54636
56154
|
};
|
|
54637
56155
|
var ClsInstance = class {
|
|
@@ -55298,11 +56816,27 @@ var Queue = class _Queue {
|
|
|
55298
56816
|
// src/image.ts
|
|
55299
56817
|
import { ClientError as ClientError7 } from "nice-grpc";
|
|
55300
56818
|
import { Status as Status7 } from "nice-grpc";
|
|
56819
|
+
|
|
56820
|
+
// src/name_utils.ts
|
|
56821
|
+
var OBJECT_NAME_CHARSET = /^[a-zA-Z0-9\-_.]+$/;
|
|
56822
|
+
var APP_ID_PATTERN = /^ap-[a-zA-Z0-9]{22}$/;
|
|
56823
|
+
function isValidObjectName(name) {
|
|
56824
|
+
return name.length <= 64 && OBJECT_NAME_CHARSET.test(name) && !APP_ID_PATTERN.test(name);
|
|
56825
|
+
}
|
|
56826
|
+
function checkObjectName(name, objectType) {
|
|
56827
|
+
if (!isValidObjectName(name)) {
|
|
56828
|
+
throw new InvalidError(
|
|
56829
|
+
`Invalid ${objectType} name: '${name}'.
|
|
56830
|
+
|
|
56831
|
+
Names may contain only alphanumeric characters, dashes, periods, and underscores, must be shorter than 64 characters, and cannot conflict with App ID strings.`
|
|
56832
|
+
);
|
|
56833
|
+
}
|
|
56834
|
+
}
|
|
56835
|
+
|
|
56836
|
+
// src/image.ts
|
|
55301
56837
|
var DEFAULT_IMAGE_TAG = "latest";
|
|
55302
56838
|
function validateImageName(name) {
|
|
55303
|
-
|
|
55304
|
-
throw new InvalidError("Image name must be non-empty.");
|
|
55305
|
-
}
|
|
56839
|
+
checkObjectName(name, "Image");
|
|
55306
56840
|
if (name.startsWith("im-")) {
|
|
55307
56841
|
throw new InvalidError(
|
|
55308
56842
|
"Image name cannot start with 'im-' (reserved for image IDs)."
|
|
@@ -55310,21 +56844,53 @@ function validateImageName(name) {
|
|
|
55310
56844
|
}
|
|
55311
56845
|
}
|
|
55312
56846
|
function validateImageTag(tag) {
|
|
55313
|
-
|
|
55314
|
-
throw new InvalidError("Image tag must be non-empty.");
|
|
55315
|
-
}
|
|
56847
|
+
checkObjectName(tag, "Image tag");
|
|
55316
56848
|
}
|
|
55317
56849
|
function parseNamedImageRef(value) {
|
|
55318
56850
|
const separatorIndex = value.indexOf(":");
|
|
56851
|
+
let imageName;
|
|
56852
|
+
let tag;
|
|
55319
56853
|
if (separatorIndex === -1) {
|
|
55320
|
-
|
|
55321
|
-
|
|
56854
|
+
imageName = value;
|
|
56855
|
+
tag = DEFAULT_IMAGE_TAG;
|
|
56856
|
+
} else {
|
|
56857
|
+
imageName = value.slice(0, separatorIndex);
|
|
56858
|
+
tag = value.slice(separatorIndex + 1);
|
|
56859
|
+
}
|
|
56860
|
+
let prefix = "";
|
|
56861
|
+
const lastSlashIndex = imageName.lastIndexOf("/");
|
|
56862
|
+
if (lastSlashIndex !== -1) {
|
|
56863
|
+
prefix = imageName.slice(0, lastSlashIndex);
|
|
56864
|
+
const after = imageName.slice(lastSlashIndex + 1);
|
|
56865
|
+
if (prefix === "") {
|
|
56866
|
+
throw new InvalidError(
|
|
56867
|
+
"Invalid Image name: '/' prefix must be non-empty."
|
|
56868
|
+
);
|
|
56869
|
+
}
|
|
56870
|
+
if (after === "") {
|
|
56871
|
+
throw new InvalidError(
|
|
56872
|
+
"Invalid Image name: name after '/' must be non-empty."
|
|
56873
|
+
);
|
|
56874
|
+
}
|
|
56875
|
+
imageName = after;
|
|
55322
56876
|
}
|
|
55323
|
-
|
|
55324
|
-
const tag = value.slice(separatorIndex + 1);
|
|
55325
|
-
validateImageName(name);
|
|
56877
|
+
validateImageName(imageName);
|
|
55326
56878
|
validateImageTag(tag);
|
|
55327
|
-
|
|
56879
|
+
const fullName = prefix ? `${prefix}/${imageName}` : imageName;
|
|
56880
|
+
return [prefix, `${fullName}:${tag}`];
|
|
56881
|
+
}
|
|
56882
|
+
function registryConfigBuilder(authType, secret) {
|
|
56883
|
+
return async (client) => {
|
|
56884
|
+
let secretId = "";
|
|
56885
|
+
if (secret) {
|
|
56886
|
+
await hydrateSecrets(client, [secret]);
|
|
56887
|
+
secretId = secret.secretId;
|
|
56888
|
+
}
|
|
56889
|
+
return ImageRegistryConfig.create({
|
|
56890
|
+
registryAuthType: authType,
|
|
56891
|
+
secretId
|
|
56892
|
+
});
|
|
56893
|
+
};
|
|
55328
56894
|
}
|
|
55329
56895
|
var ImageService = class {
|
|
55330
56896
|
#client;
|
|
@@ -55356,10 +56922,21 @@ var ImageService = class {
|
|
|
55356
56922
|
* @param params - Optional environment.
|
|
55357
56923
|
*/
|
|
55358
56924
|
async fromName(name, params = {}) {
|
|
55359
|
-
const tag = parseNamedImageRef(name);
|
|
56925
|
+
const [namespacePrefix, tag] = parseNamedImageRef(name);
|
|
56926
|
+
let environmentName;
|
|
56927
|
+
if (namespacePrefix) {
|
|
56928
|
+
if (params.environment) {
|
|
56929
|
+
throw new InvalidError(
|
|
56930
|
+
"Cannot specify 'environment' when the image name contains a '/'."
|
|
56931
|
+
);
|
|
56932
|
+
}
|
|
56933
|
+
environmentName = "";
|
|
56934
|
+
} else {
|
|
56935
|
+
environmentName = this.#client.environmentName(params.environment);
|
|
56936
|
+
}
|
|
55360
56937
|
try {
|
|
55361
56938
|
const resp = await this.#client.cpClient.imageGetByTag({
|
|
55362
|
-
environmentName
|
|
56939
|
+
environmentName,
|
|
55363
56940
|
tag
|
|
55364
56941
|
});
|
|
55365
56942
|
return new Image2(this.#client, resp.imageId, "");
|
|
@@ -55376,19 +56953,19 @@ var ImageService = class {
|
|
|
55376
56953
|
* @param secret - Optional. A Secret containing credentials for registry authentication.
|
|
55377
56954
|
*/
|
|
55378
56955
|
fromRegistry(tag, secret) {
|
|
55379
|
-
let
|
|
56956
|
+
let buildRegistryConfig;
|
|
55380
56957
|
if (secret) {
|
|
55381
56958
|
if (!(secret instanceof Secret)) {
|
|
55382
56959
|
throw new TypeError(
|
|
55383
56960
|
"secret must be a reference to an existing Secret, e.g. `await client.secrets.fromName('my_secret')`"
|
|
55384
56961
|
);
|
|
55385
56962
|
}
|
|
55386
|
-
|
|
55387
|
-
|
|
55388
|
-
|
|
55389
|
-
|
|
56963
|
+
buildRegistryConfig = registryConfigBuilder(
|
|
56964
|
+
4 /* REGISTRY_AUTH_TYPE_STATIC_CREDS */,
|
|
56965
|
+
secret
|
|
56966
|
+
);
|
|
55390
56967
|
}
|
|
55391
|
-
return new Image2(this.#client, "", tag,
|
|
56968
|
+
return new Image2(this.#client, "", tag, buildRegistryConfig);
|
|
55392
56969
|
}
|
|
55393
56970
|
/**
|
|
55394
56971
|
* Creates an {@link Image} from a raw registry tag, optionally using a {@link Secret} for authentication.
|
|
@@ -55397,19 +56974,16 @@ var ImageService = class {
|
|
|
55397
56974
|
* @param secret - A Secret containing credentials for registry authentication.
|
|
55398
56975
|
*/
|
|
55399
56976
|
fromAwsEcr(tag, secret) {
|
|
55400
|
-
|
|
55401
|
-
|
|
55402
|
-
|
|
55403
|
-
|
|
55404
|
-
"secret must be a reference to an existing Secret, e.g. `await client.secrets.fromName('my_secret')`"
|
|
55405
|
-
);
|
|
55406
|
-
}
|
|
55407
|
-
imageRegistryConfig = {
|
|
55408
|
-
registryAuthType: 1 /* REGISTRY_AUTH_TYPE_AWS */,
|
|
55409
|
-
secretId: secret.secretId
|
|
55410
|
-
};
|
|
56977
|
+
if (!(secret instanceof Secret)) {
|
|
56978
|
+
throw new TypeError(
|
|
56979
|
+
"secret must be a reference to an existing Secret, e.g. `await client.secrets.fromName('my_secret')`"
|
|
56980
|
+
);
|
|
55411
56981
|
}
|
|
55412
|
-
|
|
56982
|
+
const buildRegistryConfig = registryConfigBuilder(
|
|
56983
|
+
1 /* REGISTRY_AUTH_TYPE_AWS */,
|
|
56984
|
+
secret
|
|
56985
|
+
);
|
|
56986
|
+
return new Image2(this.#client, "", tag, buildRegistryConfig);
|
|
55413
56987
|
}
|
|
55414
56988
|
/**
|
|
55415
56989
|
* Creates an {@link Image} from a raw registry tag, optionally using a {@link Secret} for authentication.
|
|
@@ -55418,19 +56992,16 @@ var ImageService = class {
|
|
|
55418
56992
|
* @param secret - A Secret containing credentials for registry authentication.
|
|
55419
56993
|
*/
|
|
55420
56994
|
fromGcpArtifactRegistry(tag, secret) {
|
|
55421
|
-
|
|
55422
|
-
|
|
55423
|
-
|
|
55424
|
-
|
|
55425
|
-
"secret must be a reference to an existing Secret, e.g. `await client.secrets.fromName('my_secret')`"
|
|
55426
|
-
);
|
|
55427
|
-
}
|
|
55428
|
-
imageRegistryConfig = {
|
|
55429
|
-
registryAuthType: 2 /* REGISTRY_AUTH_TYPE_GCP */,
|
|
55430
|
-
secretId: secret.secretId
|
|
55431
|
-
};
|
|
56995
|
+
if (!(secret instanceof Secret)) {
|
|
56996
|
+
throw new TypeError(
|
|
56997
|
+
"secret must be a reference to an existing Secret, e.g. `await client.secrets.fromName('my_secret')`"
|
|
56998
|
+
);
|
|
55432
56999
|
}
|
|
55433
|
-
|
|
57000
|
+
const buildRegistryConfig = registryConfigBuilder(
|
|
57001
|
+
2 /* REGISTRY_AUTH_TYPE_GCP */,
|
|
57002
|
+
secret
|
|
57003
|
+
);
|
|
57004
|
+
return new Image2(this.#client, "", tag, buildRegistryConfig);
|
|
55434
57005
|
}
|
|
55435
57006
|
/**
|
|
55436
57007
|
* Delete an {@link Image} by ID.
|
|
@@ -55460,15 +57031,18 @@ var Image2 = class _Image {
|
|
|
55460
57031
|
#tag;
|
|
55461
57032
|
// Image ID of the parent image layer to use as `FROM base`.
|
|
55462
57033
|
#baseImageId;
|
|
55463
|
-
|
|
57034
|
+
// When set, hydrates the registry-auth Secret (if any) and returns the
|
|
57035
|
+
// ImageRegistryConfig for the base build layer. Runs at build time, since the
|
|
57036
|
+
// Secret may be lazy. Undefined when not pulling from a private registry.
|
|
57037
|
+
#buildRegistryConfig;
|
|
55464
57038
|
#layers;
|
|
55465
57039
|
/** @ignore */
|
|
55466
|
-
constructor(client, imageId, tag,
|
|
57040
|
+
constructor(client, imageId, tag, buildRegistryConfig, layers, baseImageId) {
|
|
55467
57041
|
this.#client = client;
|
|
55468
57042
|
this.#imageId = imageId;
|
|
55469
57043
|
this.#tag = tag;
|
|
55470
57044
|
this.#baseImageId = baseImageId || "";
|
|
55471
|
-
this.#
|
|
57045
|
+
this.#buildRegistryConfig = buildRegistryConfig;
|
|
55472
57046
|
this.#layers = layers || [
|
|
55473
57047
|
{
|
|
55474
57048
|
commands: [],
|
|
@@ -55520,7 +57094,7 @@ var Image2 = class _Image {
|
|
|
55520
57094
|
this.#client,
|
|
55521
57095
|
"",
|
|
55522
57096
|
this.#tag,
|
|
55523
|
-
this.#
|
|
57097
|
+
this.#buildRegistryConfig,
|
|
55524
57098
|
[...layers, newLayer],
|
|
55525
57099
|
baseImageId
|
|
55526
57100
|
);
|
|
@@ -55546,6 +57120,7 @@ var Image2 = class _Image {
|
|
|
55546
57120
|
layer.env,
|
|
55547
57121
|
layer.secrets
|
|
55548
57122
|
);
|
|
57123
|
+
await hydrateSecrets(this.#client, mergedSecrets);
|
|
55549
57124
|
const secretIds = mergedSecrets.map((secret) => secret.secretId);
|
|
55550
57125
|
const gpuConfig = layer.gpuConfig;
|
|
55551
57126
|
let dockerfileCommands;
|
|
@@ -55560,7 +57135,7 @@ var Image2 = class _Image {
|
|
|
55560
57135
|
dockerfileCommands = ["FROM base", ...layer.commands];
|
|
55561
57136
|
baseImages = [{ dockerTag: "base", imageId: baseImageId }];
|
|
55562
57137
|
}
|
|
55563
|
-
const imageRegistryConfig = i === 0 && !baseImageId ? this.#
|
|
57138
|
+
const imageRegistryConfig = i === 0 && !baseImageId && this.#buildRegistryConfig ? await this.#buildRegistryConfig(this.#client) : void 0;
|
|
55564
57139
|
const resp = await this.#client.cpClient.imageGetOrCreate({
|
|
55565
57140
|
appId: app.appId,
|
|
55566
57141
|
image: Image.create({
|
|
@@ -55627,17 +57202,27 @@ ${result.exception}`
|
|
|
55627
57202
|
* @param params - Optional environment.
|
|
55628
57203
|
*/
|
|
55629
57204
|
async publish(name, params = {}) {
|
|
55630
|
-
const tag = parseNamedImageRef(name);
|
|
57205
|
+
const [namespacePrefix, tag] = parseNamedImageRef(name);
|
|
55631
57206
|
if (this.#imageId === "") {
|
|
55632
57207
|
throw new InvalidError(
|
|
55633
57208
|
"Cannot publish an image that has not been built yet. Call build() first."
|
|
55634
57209
|
);
|
|
55635
57210
|
}
|
|
55636
|
-
|
|
57211
|
+
let environmentName;
|
|
57212
|
+
if (namespacePrefix) {
|
|
57213
|
+
if (params.environment) {
|
|
57214
|
+
throw new InvalidError(
|
|
57215
|
+
"Cannot specify 'environment' when the image name contains a '/'."
|
|
57216
|
+
);
|
|
57217
|
+
}
|
|
57218
|
+
environmentName = "";
|
|
57219
|
+
} else {
|
|
57220
|
+
environmentName = this.#client.environmentName(params.environment);
|
|
57221
|
+
}
|
|
55637
57222
|
await this.#client.cpClient.imagePublish({
|
|
55638
57223
|
imageId: this.#imageId,
|
|
55639
57224
|
environmentName,
|
|
55640
|
-
|
|
57225
|
+
allowPublic: false,
|
|
55641
57226
|
tag
|
|
55642
57227
|
});
|
|
55643
57228
|
}
|
|
@@ -57845,8 +59430,45 @@ var TaskExecStdinWriteResponse = {
|
|
|
57845
59430
|
return message;
|
|
57846
59431
|
}
|
|
57847
59432
|
};
|
|
59433
|
+
function createBaseTaskExecStdinWriteStreamEnd() {
|
|
59434
|
+
return {};
|
|
59435
|
+
}
|
|
59436
|
+
var TaskExecStdinWriteStreamEnd = {
|
|
59437
|
+
encode(_, writer = new BinaryWriter()) {
|
|
59438
|
+
return writer;
|
|
59439
|
+
},
|
|
59440
|
+
decode(input, length) {
|
|
59441
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
59442
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
59443
|
+
const message = createBaseTaskExecStdinWriteStreamEnd();
|
|
59444
|
+
while (reader.pos < end) {
|
|
59445
|
+
const tag = reader.uint32();
|
|
59446
|
+
switch (tag >>> 3) {
|
|
59447
|
+
}
|
|
59448
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
59449
|
+
break;
|
|
59450
|
+
}
|
|
59451
|
+
reader.skip(tag & 7);
|
|
59452
|
+
}
|
|
59453
|
+
return message;
|
|
59454
|
+
},
|
|
59455
|
+
fromJSON(_) {
|
|
59456
|
+
return {};
|
|
59457
|
+
},
|
|
59458
|
+
toJSON(_) {
|
|
59459
|
+
const obj = {};
|
|
59460
|
+
return obj;
|
|
59461
|
+
},
|
|
59462
|
+
create(base) {
|
|
59463
|
+
return TaskExecStdinWriteStreamEnd.fromPartial(base ?? {});
|
|
59464
|
+
},
|
|
59465
|
+
fromPartial(_) {
|
|
59466
|
+
const message = createBaseTaskExecStdinWriteStreamEnd();
|
|
59467
|
+
return message;
|
|
59468
|
+
}
|
|
59469
|
+
};
|
|
57848
59470
|
function createBaseTaskExecStdinWriteStreamRequest() {
|
|
57849
|
-
return { start: void 0, data: void 0 };
|
|
59471
|
+
return { start: void 0, data: void 0, end: void 0 };
|
|
57850
59472
|
}
|
|
57851
59473
|
var TaskExecStdinWriteStreamRequest = {
|
|
57852
59474
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -57856,6 +59478,9 @@ var TaskExecStdinWriteStreamRequest = {
|
|
|
57856
59478
|
if (message.data !== void 0) {
|
|
57857
59479
|
writer.uint32(18).bytes(message.data);
|
|
57858
59480
|
}
|
|
59481
|
+
if (message.end !== void 0) {
|
|
59482
|
+
TaskExecStdinWriteStreamEnd.encode(message.end, writer.uint32(26).fork()).join();
|
|
59483
|
+
}
|
|
57859
59484
|
return writer;
|
|
57860
59485
|
},
|
|
57861
59486
|
decode(input, length) {
|
|
@@ -57879,6 +59504,13 @@ var TaskExecStdinWriteStreamRequest = {
|
|
|
57879
59504
|
message.data = reader.bytes();
|
|
57880
59505
|
continue;
|
|
57881
59506
|
}
|
|
59507
|
+
case 3: {
|
|
59508
|
+
if (tag !== 26) {
|
|
59509
|
+
break;
|
|
59510
|
+
}
|
|
59511
|
+
message.end = TaskExecStdinWriteStreamEnd.decode(reader, reader.uint32());
|
|
59512
|
+
continue;
|
|
59513
|
+
}
|
|
57882
59514
|
}
|
|
57883
59515
|
if ((tag & 7) === 4 || tag === 0) {
|
|
57884
59516
|
break;
|
|
@@ -57890,7 +59522,8 @@ var TaskExecStdinWriteStreamRequest = {
|
|
|
57890
59522
|
fromJSON(object) {
|
|
57891
59523
|
return {
|
|
57892
59524
|
start: isSet6(object.start) ? TaskExecStdinWriteStreamStart.fromJSON(object.start) : void 0,
|
|
57893
|
-
data: isSet6(object.data) ? bytesFromBase643(object.data) : void 0
|
|
59525
|
+
data: isSet6(object.data) ? bytesFromBase643(object.data) : void 0,
|
|
59526
|
+
end: isSet6(object.end) ? TaskExecStdinWriteStreamEnd.fromJSON(object.end) : void 0
|
|
57894
59527
|
};
|
|
57895
59528
|
},
|
|
57896
59529
|
toJSON(message) {
|
|
@@ -57901,6 +59534,9 @@ var TaskExecStdinWriteStreamRequest = {
|
|
|
57901
59534
|
if (message.data !== void 0) {
|
|
57902
59535
|
obj.data = base64FromBytes3(message.data);
|
|
57903
59536
|
}
|
|
59537
|
+
if (message.end !== void 0) {
|
|
59538
|
+
obj.end = TaskExecStdinWriteStreamEnd.toJSON(message.end);
|
|
59539
|
+
}
|
|
57904
59540
|
return obj;
|
|
57905
59541
|
},
|
|
57906
59542
|
create(base) {
|
|
@@ -57910,6 +59546,7 @@ var TaskExecStdinWriteStreamRequest = {
|
|
|
57910
59546
|
const message = createBaseTaskExecStdinWriteStreamRequest();
|
|
57911
59547
|
message.start = object.start !== void 0 && object.start !== null ? TaskExecStdinWriteStreamStart.fromPartial(object.start) : void 0;
|
|
57912
59548
|
message.data = object.data ?? void 0;
|
|
59549
|
+
message.end = object.end !== void 0 && object.end !== null ? TaskExecStdinWriteStreamEnd.fromPartial(object.end) : void 0;
|
|
57913
59550
|
return message;
|
|
57914
59551
|
}
|
|
57915
59552
|
};
|
|
@@ -58416,6 +60053,94 @@ var TaskMountDirectoryRequest = {
|
|
|
58416
60053
|
return message;
|
|
58417
60054
|
}
|
|
58418
60055
|
};
|
|
60056
|
+
function createBaseTaskReloadVolumesRequest() {
|
|
60057
|
+
return { taskId: "" };
|
|
60058
|
+
}
|
|
60059
|
+
var TaskReloadVolumesRequest = {
|
|
60060
|
+
encode(message, writer = new BinaryWriter()) {
|
|
60061
|
+
if (message.taskId !== "") {
|
|
60062
|
+
writer.uint32(10).string(message.taskId);
|
|
60063
|
+
}
|
|
60064
|
+
return writer;
|
|
60065
|
+
},
|
|
60066
|
+
decode(input, length) {
|
|
60067
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
60068
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
60069
|
+
const message = createBaseTaskReloadVolumesRequest();
|
|
60070
|
+
while (reader.pos < end) {
|
|
60071
|
+
const tag = reader.uint32();
|
|
60072
|
+
switch (tag >>> 3) {
|
|
60073
|
+
case 1: {
|
|
60074
|
+
if (tag !== 10) {
|
|
60075
|
+
break;
|
|
60076
|
+
}
|
|
60077
|
+
message.taskId = reader.string();
|
|
60078
|
+
continue;
|
|
60079
|
+
}
|
|
60080
|
+
}
|
|
60081
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
60082
|
+
break;
|
|
60083
|
+
}
|
|
60084
|
+
reader.skip(tag & 7);
|
|
60085
|
+
}
|
|
60086
|
+
return message;
|
|
60087
|
+
},
|
|
60088
|
+
fromJSON(object) {
|
|
60089
|
+
return { taskId: isSet6(object.taskId) ? globalThis.String(object.taskId) : "" };
|
|
60090
|
+
},
|
|
60091
|
+
toJSON(message) {
|
|
60092
|
+
const obj = {};
|
|
60093
|
+
if (message.taskId !== "") {
|
|
60094
|
+
obj.taskId = message.taskId;
|
|
60095
|
+
}
|
|
60096
|
+
return obj;
|
|
60097
|
+
},
|
|
60098
|
+
create(base) {
|
|
60099
|
+
return TaskReloadVolumesRequest.fromPartial(base ?? {});
|
|
60100
|
+
},
|
|
60101
|
+
fromPartial(object) {
|
|
60102
|
+
const message = createBaseTaskReloadVolumesRequest();
|
|
60103
|
+
message.taskId = object.taskId ?? "";
|
|
60104
|
+
return message;
|
|
60105
|
+
}
|
|
60106
|
+
};
|
|
60107
|
+
function createBaseTaskReloadVolumesResponse() {
|
|
60108
|
+
return {};
|
|
60109
|
+
}
|
|
60110
|
+
var TaskReloadVolumesResponse = {
|
|
60111
|
+
encode(_, writer = new BinaryWriter()) {
|
|
60112
|
+
return writer;
|
|
60113
|
+
},
|
|
60114
|
+
decode(input, length) {
|
|
60115
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
60116
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
60117
|
+
const message = createBaseTaskReloadVolumesResponse();
|
|
60118
|
+
while (reader.pos < end) {
|
|
60119
|
+
const tag = reader.uint32();
|
|
60120
|
+
switch (tag >>> 3) {
|
|
60121
|
+
}
|
|
60122
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
60123
|
+
break;
|
|
60124
|
+
}
|
|
60125
|
+
reader.skip(tag & 7);
|
|
60126
|
+
}
|
|
60127
|
+
return message;
|
|
60128
|
+
},
|
|
60129
|
+
fromJSON(_) {
|
|
60130
|
+
return {};
|
|
60131
|
+
},
|
|
60132
|
+
toJSON(_) {
|
|
60133
|
+
const obj = {};
|
|
60134
|
+
return obj;
|
|
60135
|
+
},
|
|
60136
|
+
create(base) {
|
|
60137
|
+
return TaskReloadVolumesResponse.fromPartial(base ?? {});
|
|
60138
|
+
},
|
|
60139
|
+
fromPartial(_) {
|
|
60140
|
+
const message = createBaseTaskReloadVolumesResponse();
|
|
60141
|
+
return message;
|
|
60142
|
+
}
|
|
60143
|
+
};
|
|
58419
60144
|
function createBaseTaskSetNetworkAccessRequest() {
|
|
58420
60145
|
return { taskId: "", networkAccess: void 0 };
|
|
58421
60146
|
}
|
|
@@ -59061,6 +60786,15 @@ var TaskCommandRouterDefinition = {
|
|
|
59061
60786
|
responseStream: false,
|
|
59062
60787
|
options: {}
|
|
59063
60788
|
},
|
|
60789
|
+
/** Reload all Volumes mounted in the task to reflect their latest committed state. */
|
|
60790
|
+
taskReloadVolumes: {
|
|
60791
|
+
name: "TaskReloadVolumes",
|
|
60792
|
+
requestType: TaskReloadVolumesRequest,
|
|
60793
|
+
requestStream: false,
|
|
60794
|
+
responseType: TaskReloadVolumesResponse,
|
|
60795
|
+
responseStream: false,
|
|
60796
|
+
options: {}
|
|
60797
|
+
},
|
|
59064
60798
|
/** Replace the task's outbound network allowlist (domains + CIDRs). */
|
|
59065
60799
|
taskSetNetworkAccess: {
|
|
59066
60800
|
name: "TaskSetNetworkAccess",
|
|
@@ -59464,8 +61198,9 @@ var AuthTokenManager = class {
|
|
|
59464
61198
|
};
|
|
59465
61199
|
|
|
59466
61200
|
// src/version.ts
|
|
61201
|
+
var SDK_VERSION = "0.9.0";
|
|
59467
61202
|
function getSDKVersion() {
|
|
59468
|
-
return
|
|
61203
|
+
return SDK_VERSION;
|
|
59469
61204
|
}
|
|
59470
61205
|
|
|
59471
61206
|
// src/logger.ts
|
|
@@ -60361,6 +62096,40 @@ var TaskCommandRouterClientImpl = class _TaskCommandRouterClientImpl {
|
|
|
60361
62096
|
async unmountDirectory(request) {
|
|
60362
62097
|
await this.callUnary(() => this.stub.taskUnmountDirectory(request));
|
|
60363
62098
|
}
|
|
62099
|
+
async setNetworkAccess(request) {
|
|
62100
|
+
await this.callUnary(() => this.stub.taskSetNetworkAccess(request));
|
|
62101
|
+
}
|
|
62102
|
+
/**
|
|
62103
|
+
* Reload all Volumes mounted in the task to reflect their latest committed state.
|
|
62104
|
+
*
|
|
62105
|
+
* `timeoutMs` is the client-side deadline. If the reload does not complete
|
|
62106
|
+
* within this window, the call is cancelled and a TimeoutError is thrown.
|
|
62107
|
+
*/
|
|
62108
|
+
async reloadVolumes(request, options) {
|
|
62109
|
+
const overallDeadlineMs = options?.timeoutMs !== void 0 ? Date.now() + options.timeoutMs : null;
|
|
62110
|
+
try {
|
|
62111
|
+
await callWithRetriesOnTransientErrors(
|
|
62112
|
+
() => this.callWithAuthRetry(() => {
|
|
62113
|
+
const remainingMs = overallDeadlineMs !== null ? Math.max(1, overallDeadlineMs - Date.now()) : options?.timeoutMs;
|
|
62114
|
+
return this.stub.taskReloadVolumes(request, {
|
|
62115
|
+
...options,
|
|
62116
|
+
timeoutMs: remainingMs
|
|
62117
|
+
});
|
|
62118
|
+
}),
|
|
62119
|
+
10,
|
|
62120
|
+
2,
|
|
62121
|
+
10,
|
|
62122
|
+
overallDeadlineMs,
|
|
62123
|
+
() => this.closed,
|
|
62124
|
+
[Status10.DEADLINE_EXCEEDED, Status10.CANCELLED]
|
|
62125
|
+
);
|
|
62126
|
+
} catch (err) {
|
|
62127
|
+
if (overallDeadlineMs !== null && Date.now() >= overallDeadlineMs) {
|
|
62128
|
+
throw new TimeoutError("Timeout expired");
|
|
62129
|
+
}
|
|
62130
|
+
throw err;
|
|
62131
|
+
}
|
|
62132
|
+
}
|
|
60364
62133
|
async sandboxWaitUntilReady(taskId, timeoutMs) {
|
|
60365
62134
|
const deadlineMs = Date.now() + timeoutMs;
|
|
60366
62135
|
try {
|
|
@@ -60726,6 +62495,44 @@ function raiseStatError(returnCode, stderr, remotePath) {
|
|
|
60726
62495
|
function makeStatCommand(remotePath) {
|
|
60727
62496
|
return JSON.stringify({ Stat: { path: remotePath } });
|
|
60728
62497
|
}
|
|
62498
|
+
function raiseWatchError(returnCode, stderr, remotePath) {
|
|
62499
|
+
const payload = tryParseErrorPayload(stderr);
|
|
62500
|
+
if (payload) {
|
|
62501
|
+
logger.debug(
|
|
62502
|
+
`sandbox-fs-tools watch error: path=${remotePath}, error_kind=${payload.error_kind}, message=${payload.message}, detail=${payload.detail}`
|
|
62503
|
+
);
|
|
62504
|
+
if (payload.error_kind === "NotFound")
|
|
62505
|
+
throw new SandboxFilesystemNotFoundError(
|
|
62506
|
+
`${payload.message}: ${remotePath}`
|
|
62507
|
+
);
|
|
62508
|
+
if (payload.error_kind === "PermissionDenied")
|
|
62509
|
+
throw new SandboxFilesystemPermissionError(
|
|
62510
|
+
`${payload.message}: ${remotePath}`
|
|
62511
|
+
);
|
|
62512
|
+
if (payload.error_kind === "NotSupported")
|
|
62513
|
+
throw new InvalidError(
|
|
62514
|
+
`${payload.message}: ${remotePath} - this operation is not supported for CloudBucketMounts`
|
|
62515
|
+
);
|
|
62516
|
+
throw new SandboxFilesystemError(payload.message);
|
|
62517
|
+
}
|
|
62518
|
+
const text = stderrToText(stderr);
|
|
62519
|
+
if (text) logger.debug(`Unstructured modal-sandbox-fs-tools stderr: ${text}`);
|
|
62520
|
+
throw new SandboxFilesystemError(
|
|
62521
|
+
`Operation on '${remotePath}' failed with exit code ${returnCode}`
|
|
62522
|
+
);
|
|
62523
|
+
}
|
|
62524
|
+
function makeWatchCommand(remotePath, opts) {
|
|
62525
|
+
return JSON.stringify({
|
|
62526
|
+
Watch: {
|
|
62527
|
+
path: remotePath,
|
|
62528
|
+
recursive: opts.recursive,
|
|
62529
|
+
filter: opts.filter,
|
|
62530
|
+
// The fs-tools wire protocol takes whole seconds; convert from the SDK's
|
|
62531
|
+
// millisecond convention, truncating any sub-second remainder.
|
|
62532
|
+
timeout_secs: opts.timeoutMs !== null ? Math.trunc(opts.timeoutMs / 1e3) : null
|
|
62533
|
+
}
|
|
62534
|
+
});
|
|
62535
|
+
}
|
|
60729
62536
|
function raiseWriteFileError(returnCode, stderr, remotePath) {
|
|
60730
62537
|
const payload = tryParseErrorPayload(stderr);
|
|
60731
62538
|
if (payload) {
|
|
@@ -60819,6 +62626,36 @@ function parseFileEntry(raw) {
|
|
|
60819
62626
|
symlinkTarget: raw.symlink_target ?? null
|
|
60820
62627
|
};
|
|
60821
62628
|
}
|
|
62629
|
+
var RUST_RENAME_VARIANTS = ["Rename", "RenameFrom", "RenameTo"];
|
|
62630
|
+
var VALID_EVENT_TYPES = /* @__PURE__ */ new Set([
|
|
62631
|
+
"Access",
|
|
62632
|
+
"Create",
|
|
62633
|
+
"Modify",
|
|
62634
|
+
"Remove",
|
|
62635
|
+
"Unknown"
|
|
62636
|
+
]);
|
|
62637
|
+
function expandWatchFilter(filter) {
|
|
62638
|
+
const result = [];
|
|
62639
|
+
for (const eventType of filter) {
|
|
62640
|
+
result.push(eventType);
|
|
62641
|
+
if (eventType === "Modify") {
|
|
62642
|
+
result.push(...RUST_RENAME_VARIANTS);
|
|
62643
|
+
}
|
|
62644
|
+
}
|
|
62645
|
+
return result;
|
|
62646
|
+
}
|
|
62647
|
+
async function* readLines(stream) {
|
|
62648
|
+
const decoder2 = new TextDecoder();
|
|
62649
|
+
let buffer = "";
|
|
62650
|
+
for await (const chunk of stream) {
|
|
62651
|
+
buffer += typeof chunk === "string" ? chunk : decoder2.decode(chunk, { stream: true });
|
|
62652
|
+
const lines = buffer.split("\n");
|
|
62653
|
+
buffer = lines.pop() ?? "";
|
|
62654
|
+
for (const line of lines) yield line;
|
|
62655
|
+
}
|
|
62656
|
+
const tail = decoder2.decode(void 0, { stream: false });
|
|
62657
|
+
if (buffer + tail) yield buffer + tail;
|
|
62658
|
+
}
|
|
60822
62659
|
var WRITE_CHUNK_SIZE = 4 * 1024 * 1024;
|
|
60823
62660
|
function toUint8Array(data) {
|
|
60824
62661
|
if (data instanceof ArrayBuffer) return new Uint8Array(data);
|
|
@@ -61096,6 +62933,94 @@ var SandboxFilesystem = class {
|
|
|
61096
62933
|
});
|
|
61097
62934
|
return parseFileEntry(JSON.parse(stdout));
|
|
61098
62935
|
}
|
|
62936
|
+
/**
|
|
62937
|
+
* Watch a path in the Sandbox for filesystem changes.
|
|
62938
|
+
*
|
|
62939
|
+
* `remotePath` must be an absolute path in the Sandbox. If it points to a
|
|
62940
|
+
* file, events for that file are reported. If it points to a directory,
|
|
62941
|
+
* events for entries directly inside it are reported. Set `recursive: true`
|
|
62942
|
+
* to also receive events for all nested subdirectories. If `remotePath` is
|
|
62943
|
+
* a symlink, it is followed and events reference paths under the resolved
|
|
62944
|
+
* target.
|
|
62945
|
+
*
|
|
62946
|
+
* Yields {@link FileWatchEvent} objects as changes occur, until either the
|
|
62947
|
+
* timeout elapses, the iterator is closed, or the Sandbox is terminated.
|
|
62948
|
+
*
|
|
62949
|
+
* Optionally restrict the kinds of events emitted to those included in
|
|
62950
|
+
* `filter`. An undefined `filter` permits all types; passing an empty array
|
|
62951
|
+
* suppresses all events.
|
|
62952
|
+
*
|
|
62953
|
+
* `timeoutMs` is truncated to whole seconds. Omit it to watch indefinitely.
|
|
62954
|
+
* When the timeout elapses, the iterator stops without raising an exception.
|
|
62955
|
+
*
|
|
62956
|
+
* @throws {SandboxFilesystemNotFoundError} `remotePath` does not exist.
|
|
62957
|
+
* @throws {SandboxFilesystemPermissionError} watch access is denied.
|
|
62958
|
+
* @throws {InvalidError} the filesystem does not support watching.
|
|
62959
|
+
* @throws {SandboxFilesystemError} the command fails for any other reason.
|
|
62960
|
+
*/
|
|
62961
|
+
async *watch(remotePath, params = {}) {
|
|
62962
|
+
validateAbsoluteRemotePath(remotePath, "watch");
|
|
62963
|
+
checkForRenamedParams(params, { timeout: "timeoutMs" });
|
|
62964
|
+
const { filter, recursive = false, timeoutMs } = params;
|
|
62965
|
+
const process2 = await translateExecErrors(
|
|
62966
|
+
"watch",
|
|
62967
|
+
remotePath,
|
|
62968
|
+
() => this.exec(
|
|
62969
|
+
[
|
|
62970
|
+
SANDBOX_FS_TOOLS_PATH,
|
|
62971
|
+
makeWatchCommand(remotePath, {
|
|
62972
|
+
recursive,
|
|
62973
|
+
filter: filter !== void 0 ? expandWatchFilter(filter) : null,
|
|
62974
|
+
timeoutMs: timeoutMs ?? null
|
|
62975
|
+
})
|
|
62976
|
+
],
|
|
62977
|
+
{ mode: "text" }
|
|
62978
|
+
)
|
|
62979
|
+
);
|
|
62980
|
+
let streamEnded = false;
|
|
62981
|
+
try {
|
|
62982
|
+
for await (const line of readLines(process2.stdout)) {
|
|
62983
|
+
const trimmed = line.trim();
|
|
62984
|
+
if (!trimmed) continue;
|
|
62985
|
+
let data;
|
|
62986
|
+
try {
|
|
62987
|
+
data = JSON.parse(trimmed);
|
|
62988
|
+
} catch {
|
|
62989
|
+
continue;
|
|
62990
|
+
}
|
|
62991
|
+
const paths = data.paths ?? [];
|
|
62992
|
+
if (paths.length === 0) continue;
|
|
62993
|
+
let rawType = data.event_type;
|
|
62994
|
+
if (typeof rawType !== "string") continue;
|
|
62995
|
+
if (RUST_RENAME_VARIANTS.includes(rawType)) {
|
|
62996
|
+
rawType = "Modify";
|
|
62997
|
+
}
|
|
62998
|
+
if (!VALID_EVENT_TYPES.has(rawType)) continue;
|
|
62999
|
+
yield { eventType: rawType, paths };
|
|
63000
|
+
}
|
|
63001
|
+
streamEnded = true;
|
|
63002
|
+
} catch (err) {
|
|
63003
|
+
await translateExecErrors("watch", remotePath, () => {
|
|
63004
|
+
throw err;
|
|
63005
|
+
});
|
|
63006
|
+
throw err;
|
|
63007
|
+
} finally {
|
|
63008
|
+
await process2.closeStdin().catch(() => {
|
|
63009
|
+
});
|
|
63010
|
+
if (streamEnded) {
|
|
63011
|
+
await translateExecErrors("watch", remotePath, async () => {
|
|
63012
|
+
const returnCode = await process2.wait();
|
|
63013
|
+
if (returnCode !== 0) {
|
|
63014
|
+
const stderr = await process2.stderr.readBytes();
|
|
63015
|
+
raiseWatchError(returnCode, stderr, remotePath);
|
|
63016
|
+
}
|
|
63017
|
+
});
|
|
63018
|
+
} else {
|
|
63019
|
+
await process2.wait().catch(() => {
|
|
63020
|
+
});
|
|
63021
|
+
}
|
|
63022
|
+
}
|
|
63023
|
+
}
|
|
61099
63024
|
/**
|
|
61100
63025
|
* Write binary content to a file in the Sandbox.
|
|
61101
63026
|
*
|
|
@@ -61206,7 +63131,13 @@ var SidecarService = class {
|
|
|
61206
63131
|
const command = params?.command ?? [];
|
|
61207
63132
|
validateExecArgs(command);
|
|
61208
63133
|
validateWorkdir(params?.workdir);
|
|
61209
|
-
|
|
63134
|
+
validateEnvVarKeys(params?.env ?? {});
|
|
63135
|
+
const [envDict, resolvableSecrets] = splitEnvDictAndResolvableSecrets(
|
|
63136
|
+
params?.secrets ?? []
|
|
63137
|
+
);
|
|
63138
|
+
Object.assign(envDict, params?.env ?? {});
|
|
63139
|
+
await hydrateSecrets(this.#access.client, resolvableSecrets);
|
|
63140
|
+
const secretIds = collectSecretIds(resolvableSecrets);
|
|
61210
63141
|
const [taskId, client] = await this.#access.commandRouter();
|
|
61211
63142
|
let resp;
|
|
61212
63143
|
try {
|
|
@@ -61216,7 +63147,7 @@ var SidecarService = class {
|
|
|
61216
63147
|
containerName: name,
|
|
61217
63148
|
imageId: image.imageId,
|
|
61218
63149
|
args: command,
|
|
61219
|
-
env:
|
|
63150
|
+
env: envDict,
|
|
61220
63151
|
workdir: params?.workdir ?? "",
|
|
61221
63152
|
secretIds
|
|
61222
63153
|
})
|
|
@@ -61828,9 +63759,11 @@ async function buildSandboxCreateV2RequestProto(appId, imageId, params = {}) {
|
|
|
61828
63759
|
throw new Error("custom domains are not supported by experimentalCreate");
|
|
61829
63760
|
}
|
|
61830
63761
|
const req = await buildSandboxCreateRequestProto(appId, imageId, params);
|
|
63762
|
+
const ephemeralSecrets = params.env && Object.keys(params.env).length > 0 ? StringMap.create({ contents: params.env }) : void 0;
|
|
61831
63763
|
return SandboxCreateV2Request.create({
|
|
61832
63764
|
appId: req.appId,
|
|
61833
|
-
definition: req.definition
|
|
63765
|
+
definition: req.definition,
|
|
63766
|
+
ephemeralSecrets
|
|
61834
63767
|
});
|
|
61835
63768
|
}
|
|
61836
63769
|
var SandboxService = class {
|
|
@@ -61848,6 +63781,11 @@ var SandboxService = class {
|
|
|
61848
63781
|
params.env,
|
|
61849
63782
|
params.secrets
|
|
61850
63783
|
);
|
|
63784
|
+
await hydrateSandboxSecrets(
|
|
63785
|
+
this.#client,
|
|
63786
|
+
mergedSecrets,
|
|
63787
|
+
params.cloudBucketMounts
|
|
63788
|
+
);
|
|
61851
63789
|
const mergedParams = {
|
|
61852
63790
|
...params,
|
|
61853
63791
|
secrets: mergedSecrets,
|
|
@@ -61887,24 +63825,28 @@ var SandboxService = class {
|
|
|
61887
63825
|
* supported.
|
|
61888
63826
|
*
|
|
61889
63827
|
* V2 sandboxes created with this method are not currently returned by
|
|
61890
|
-
* {@link SandboxService#list client.sandboxes.list()}
|
|
61891
|
-
*
|
|
61892
|
-
* {@link
|
|
61893
|
-
*
|
|
61894
|
-
* to reattach.
|
|
63828
|
+
* {@link SandboxService#list client.sandboxes.list()}. A named Sandbox can be
|
|
63829
|
+
* looked up with
|
|
63830
|
+
* {@link SandboxService#experimentalFromName client.sandboxes.experimentalFromName()};
|
|
63831
|
+
* otherwise store {@link Sandbox#sandboxId sandbox.sandboxId} and use
|
|
63832
|
+
* {@link SandboxService#fromId client.sandboxes.fromId()} to reattach.
|
|
61895
63833
|
*/
|
|
61896
63834
|
async experimentalCreate(app, image, params = {}) {
|
|
61897
63835
|
await image.build(app);
|
|
61898
|
-
|
|
63836
|
+
validateEnvVarKeys(params.env ?? {});
|
|
63837
|
+
const [envDict, resolvableSecrets] = splitEnvDictAndResolvableSecrets(
|
|
63838
|
+
params.secrets ?? []
|
|
63839
|
+
);
|
|
63840
|
+
Object.assign(envDict, params.env ?? {});
|
|
63841
|
+
await hydrateSandboxSecrets(
|
|
61899
63842
|
this.#client,
|
|
61900
|
-
|
|
61901
|
-
params.
|
|
63843
|
+
resolvableSecrets,
|
|
63844
|
+
params.cloudBucketMounts
|
|
61902
63845
|
);
|
|
61903
63846
|
const mergedParams = {
|
|
61904
63847
|
...params,
|
|
61905
|
-
secrets:
|
|
61906
|
-
env:
|
|
61907
|
-
// setting env to undefined just to clarify it's not needed anymore
|
|
63848
|
+
secrets: resolvableSecrets,
|
|
63849
|
+
env: envDict
|
|
61908
63850
|
};
|
|
61909
63851
|
const createReq = await buildSandboxCreateV2RequestProto(
|
|
61910
63852
|
app.appId,
|
|
@@ -61972,6 +63914,35 @@ var SandboxService = class {
|
|
|
61972
63914
|
throw err;
|
|
61973
63915
|
}
|
|
61974
63916
|
}
|
|
63917
|
+
/**
|
|
63918
|
+
* Get a running V2 {@link Sandbox} by name from a deployed {@link App}.
|
|
63919
|
+
*
|
|
63920
|
+
* This looks up V2 Sandboxes, i.e. Sandboxes created via
|
|
63921
|
+
* {@link SandboxService#experimentalCreate client.sandboxes.experimentalCreate()}.
|
|
63922
|
+
*
|
|
63923
|
+
* EXPERIMENTAL: the API is subject to change.
|
|
63924
|
+
*
|
|
63925
|
+
* @param appName - Name of the deployed App
|
|
63926
|
+
* @param name - Name of the Sandbox
|
|
63927
|
+
* @param params - Optional parameters for getting the Sandbox
|
|
63928
|
+
* @returns Promise that resolves to a Sandbox
|
|
63929
|
+
*/
|
|
63930
|
+
async experimentalFromName(appName, name, params) {
|
|
63931
|
+
try {
|
|
63932
|
+
const resp = await this.#client.cpClient.sandboxGetFromNameV2({
|
|
63933
|
+
sandboxName: name,
|
|
63934
|
+
appName,
|
|
63935
|
+
environmentName: this.#client.environmentName(params?.environment)
|
|
63936
|
+
});
|
|
63937
|
+
return new Sandbox2(this.#client, resp.sandboxId, { isV2: true });
|
|
63938
|
+
} catch (err) {
|
|
63939
|
+
if (err instanceof ClientError14 && err.code === Status14.NOT_FOUND)
|
|
63940
|
+
throw new NotFoundError(
|
|
63941
|
+
`Sandbox with name '${name}' not found in App '${appName}'`
|
|
63942
|
+
);
|
|
63943
|
+
throw err;
|
|
63944
|
+
}
|
|
63945
|
+
}
|
|
61975
63946
|
/**
|
|
61976
63947
|
* List all {@link Sandbox}es for the current Environment or App ID (if specified).
|
|
61977
63948
|
* If tags are specified, only Sandboxes that have at least those tags are returned.
|
|
@@ -62007,6 +63978,46 @@ var SandboxService = class {
|
|
|
62007
63978
|
}
|
|
62008
63979
|
}
|
|
62009
63980
|
}
|
|
63981
|
+
/**
|
|
63982
|
+
* List the V2 {@link Sandbox}es in an {@link App}.
|
|
63983
|
+
*
|
|
63984
|
+
* This lists V2 Sandboxes, i.e. Sandboxes created via
|
|
63985
|
+
* {@link SandboxService#experimentalCreate client.sandboxes.experimentalCreate()}.
|
|
63986
|
+
* Such Sandboxes are not returned by
|
|
63987
|
+
* {@link SandboxService#list client.sandboxes.list()}. If tags are specified,
|
|
63988
|
+
* only Sandboxes that have at least those tags are returned.
|
|
63989
|
+
*
|
|
63990
|
+
* Yields {@link Sandbox} objects that are currently running in the App.
|
|
63991
|
+
*
|
|
63992
|
+
* EXPERIMENTAL: the API is subject to change.
|
|
63993
|
+
*/
|
|
63994
|
+
async *experimentalList(params) {
|
|
63995
|
+
if (!params?.appId) {
|
|
63996
|
+
throw new InvalidError(
|
|
63997
|
+
'experimentalList requires an `appId`:\n\nconst app = await modal.apps.fromName("my-app");\nmodal.sandboxes.experimentalList({ appId: app.appId });'
|
|
63998
|
+
);
|
|
63999
|
+
}
|
|
64000
|
+
const tagsList = params.tags ? Object.entries(params.tags).map(([tagName, tagValue]) => ({
|
|
64001
|
+
tagName,
|
|
64002
|
+
tagValue
|
|
64003
|
+
})) : [];
|
|
64004
|
+
let beforeTimestamp = void 0;
|
|
64005
|
+
while (true) {
|
|
64006
|
+
const resp = await this.#client.cpClient.sandboxListV2({
|
|
64007
|
+
appId: params.appId,
|
|
64008
|
+
beforeTimestamp,
|
|
64009
|
+
includeFinished: false,
|
|
64010
|
+
tags: tagsList
|
|
64011
|
+
});
|
|
64012
|
+
if (!resp.sandboxes || resp.sandboxes.length === 0) {
|
|
64013
|
+
return;
|
|
64014
|
+
}
|
|
64015
|
+
for (const info of resp.sandboxes) {
|
|
64016
|
+
yield new Sandbox2(this.#client, info.id, { isV2: true });
|
|
64017
|
+
}
|
|
64018
|
+
beforeTimestamp = resp.sandboxes[resp.sandboxes.length - 1].createdAt;
|
|
64019
|
+
}
|
|
64020
|
+
}
|
|
62010
64021
|
};
|
|
62011
64022
|
var Tunnel = class {
|
|
62012
64023
|
/** @ignore */
|
|
@@ -62064,6 +64075,17 @@ function validateWorkdir(workdir) {
|
|
|
62064
64075
|
throw new InvalidError(`workdir must be an absolute path, got: ${workdir}`);
|
|
62065
64076
|
}
|
|
62066
64077
|
}
|
|
64078
|
+
async function hydrateSandboxSecrets(client, secrets, mounts) {
|
|
64079
|
+
const toHydrate = [...secrets];
|
|
64080
|
+
if (mounts) {
|
|
64081
|
+
for (const mount of Object.values(mounts)) {
|
|
64082
|
+
if (mount?.secret) {
|
|
64083
|
+
toHydrate.push(mount.secret);
|
|
64084
|
+
}
|
|
64085
|
+
}
|
|
64086
|
+
}
|
|
64087
|
+
await hydrateSecrets(client, toHydrate);
|
|
64088
|
+
}
|
|
62067
64089
|
function getReturnCode(result) {
|
|
62068
64090
|
if (result === void 0 || result.status === 0 /* GENERIC_STATUS_UNSPECIFIED */) {
|
|
62069
64091
|
return null;
|
|
@@ -62236,6 +64258,7 @@ var Sandbox2 = class _Sandbox {
|
|
|
62236
64258
|
this.#ensureAttached();
|
|
62237
64259
|
if (!this.#sidecars) {
|
|
62238
64260
|
this.#sidecars = new SidecarService({
|
|
64261
|
+
client: this.#client,
|
|
62239
64262
|
exec: (command, params, containerId) => this.#execInternal(command, params, containerId),
|
|
62240
64263
|
commandRouter: () => this.#getCommandRouter()
|
|
62241
64264
|
});
|
|
@@ -62290,13 +64313,24 @@ var Sandbox2 = class _Sandbox {
|
|
|
62290
64313
|
async #execInternal(command, params, containerId) {
|
|
62291
64314
|
this.#ensureAttached();
|
|
62292
64315
|
validateExecArgs(command);
|
|
64316
|
+
validateEnvVarKeys(params?.env ?? {});
|
|
64317
|
+
const [envDict, resolvableSecrets] = splitEnvDictAndResolvableSecrets(
|
|
64318
|
+
params?.secrets ?? []
|
|
64319
|
+
);
|
|
64320
|
+
Object.assign(envDict, params?.env ?? {});
|
|
64321
|
+
await hydrateSecrets(this.#client, resolvableSecrets);
|
|
64322
|
+
const execParams = {
|
|
64323
|
+
...params,
|
|
64324
|
+
env: envDict,
|
|
64325
|
+
secrets: resolvableSecrets
|
|
64326
|
+
};
|
|
62293
64327
|
const [taskId, commandRouterClient] = await this.#getCommandRouter();
|
|
62294
64328
|
const execId = uuidv42();
|
|
62295
64329
|
const request = buildTaskExecStartRequestProto(
|
|
62296
64330
|
taskId,
|
|
62297
64331
|
execId,
|
|
62298
64332
|
command,
|
|
62299
|
-
|
|
64333
|
+
execParams,
|
|
62300
64334
|
containerId
|
|
62301
64335
|
);
|
|
62302
64336
|
await commandRouterClient.execStart(request);
|
|
@@ -62602,6 +64636,53 @@ var Sandbox2 = class _Sandbox {
|
|
|
62602
64636
|
});
|
|
62603
64637
|
await commandRouterClient.unmountDirectory(request);
|
|
62604
64638
|
}
|
|
64639
|
+
/**
|
|
64640
|
+
* Updates the outbound network policy of a running Sandbox.
|
|
64641
|
+
*
|
|
64642
|
+
* Established connections that the new policy no longer permits are terminated.
|
|
64643
|
+
*
|
|
64644
|
+
* @param params - Both `outboundCidrAllowlist` and `outboundDomainAllowlist` must be provided.
|
|
64645
|
+
*/
|
|
64646
|
+
async updateNetworkPolicy(params) {
|
|
64647
|
+
this.#ensureAttached();
|
|
64648
|
+
if (params.outboundCidrAllowlist === void 0 || params.outboundDomainAllowlist === void 0) {
|
|
64649
|
+
throw new InvalidError(
|
|
64650
|
+
"updateNetworkPolicy currently requires both outboundCidrAllowlist and outboundDomainAllowlist to be set"
|
|
64651
|
+
);
|
|
64652
|
+
}
|
|
64653
|
+
const [taskId, commandRouterClient] = await this.#getCommandRouter();
|
|
64654
|
+
const request = TaskSetNetworkAccessRequest.create({
|
|
64655
|
+
taskId,
|
|
64656
|
+
networkAccess: NetworkAccess.create({
|
|
64657
|
+
networkAccessType: 3 /* ALLOWLIST */,
|
|
64658
|
+
allowedCidrs: params.outboundCidrAllowlist,
|
|
64659
|
+
allowedDomains: params.outboundDomainAllowlist
|
|
64660
|
+
})
|
|
64661
|
+
});
|
|
64662
|
+
await commandRouterClient.setNetworkAccess(request);
|
|
64663
|
+
}
|
|
64664
|
+
/**
|
|
64665
|
+
* Reload all Volumes mounted in the Sandbox.
|
|
64666
|
+
*
|
|
64667
|
+
* Blocks until the Volumes have been reloaded, bounded by `timeoutMs` (55000
|
|
64668
|
+
* by default). If the reload does not complete within that window, a
|
|
64669
|
+
* `TimeoutError` is thrown; note that the reload may still complete in the
|
|
64670
|
+
* background.
|
|
64671
|
+
*
|
|
64672
|
+
* @param params - Optional parameters; see {@link SandboxReloadVolumesParams}.
|
|
64673
|
+
*/
|
|
64674
|
+
async reloadVolumes(params) {
|
|
64675
|
+
this.#ensureAttached();
|
|
64676
|
+
if (params?.timeoutMs !== void 0 && params.timeoutMs < 0) {
|
|
64677
|
+
throw new InvalidError("`timeoutMs` must not be negative");
|
|
64678
|
+
}
|
|
64679
|
+
const timeoutMs = params?.timeoutMs || 55e3;
|
|
64680
|
+
const [taskId, commandRouterClient] = await this.#getCommandRouter();
|
|
64681
|
+
await commandRouterClient.reloadVolumes(
|
|
64682
|
+
TaskReloadVolumesRequest.create({ taskId }),
|
|
64683
|
+
{ timeoutMs }
|
|
64684
|
+
);
|
|
64685
|
+
}
|
|
62605
64686
|
/**
|
|
62606
64687
|
* Snapshots and creates a new {@link Image} from a directory in the running sandbox.
|
|
62607
64688
|
*
|