weave-typescript 0.19.0 → 0.20.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/dist/weaveapi/inference/v1/inference.pb.d.ts +588 -0
- package/dist/weaveapi/inference/v1/inference.pb.js +7170 -0
- package/dist/weaveapi/inference/v1/service.pb.d.ts +235 -0
- package/dist/weaveapi/inference/v1/service.pb.js +651 -0
- package/dist/weaveapi/provider/v1/provider.pb.d.ts +14 -0
- package/dist/weaveapi/provider/v1/provider.pb.js +88 -2
- package/dist/weaveapi/provider/v1/service.pb.d.ts +26 -1
- package/dist/weaveapi/provider/v1/service.pb.js +325 -6
- package/dist/weavesql/weavedb/provider_sql.d.ts +25 -9
- package/dist/weavesql/weavedb/provider_sql.js +83 -54
- package/package.json +1 -1
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
// protoc unknown
|
|
6
6
|
// source: weaveapi/provider/v1/service.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.ProviderConfigurationServiceDefinition = exports.ProviderConfigurationServiceClientImpl = exports.ProviderConfigurationServiceServiceName = exports.GetProviderPropagationStatusResponse = exports.GetProviderPropagationStatusRequest = exports.ListAccessibleOrganizationsResponse = exports.ListAccessibleOrganizationsRequest = exports.RotateProviderCredentialResponse = exports.RotateProviderCredentialRequest = exports.UpdateProviderConfigurationResponse = exports.UpdateProviderConfigurationRequest = exports.CreateProviderConfigurationResponse = exports.CreateProviderConfigurationRequest = exports.ListProviderConfigurationsResponse = exports.ListProviderConfigurationsRequest = exports.protobufPackage = void 0;
|
|
8
|
+
exports.ProviderConfigurationServiceDefinition = exports.ProviderConfigurationServiceClientImpl = exports.ProviderConfigurationServiceServiceName = exports.GetProviderPropagationStatusResponse = exports.GetProviderPropagationStatusRequest = exports.ListAccessibleOrganizationsResponse = exports.ListAccessibleOrganizationsRequest = exports.RotateProviderCredentialResponse = exports.RotateProviderCredentialRequest_CredentialFieldsEntry = exports.RotateProviderCredentialRequest = exports.UpdateProviderConfigurationResponse = exports.UpdateProviderConfigurationRequest = exports.CreateProviderConfigurationResponse = exports.CreateProviderConfigurationRequest_CredentialFieldsEntry = exports.CreateProviderConfigurationRequest = exports.ListProviderConfigurationsResponse = exports.ListProviderConfigurationsRequest = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
const struct_pb_1 = require("../../../google/protobuf/struct.pb");
|
|
11
12
|
const provider_pb_1 = require("./provider.pb");
|
|
12
13
|
exports.protobufPackage = "weaveapi.provider.v1";
|
|
13
14
|
function createBaseListProviderConfigurationsRequest() {
|
|
@@ -261,6 +262,9 @@ function createBaseCreateProviderConfigurationRequest() {
|
|
|
261
262
|
baseUrl: "",
|
|
262
263
|
apiKey: "",
|
|
263
264
|
enabled: false,
|
|
265
|
+
authenticationType: 0,
|
|
266
|
+
credentialFields: {},
|
|
267
|
+
settings: undefined,
|
|
264
268
|
};
|
|
265
269
|
}
|
|
266
270
|
exports.CreateProviderConfigurationRequest = {
|
|
@@ -286,6 +290,15 @@ exports.CreateProviderConfigurationRequest = {
|
|
|
286
290
|
if (message.enabled !== false) {
|
|
287
291
|
writer.uint32(56).bool(message.enabled);
|
|
288
292
|
}
|
|
293
|
+
if (message.authenticationType !== 0) {
|
|
294
|
+
writer.uint32(64).int32(message.authenticationType);
|
|
295
|
+
}
|
|
296
|
+
globalThis.Object.entries(message.credentialFields).forEach(([key, value]) => {
|
|
297
|
+
exports.CreateProviderConfigurationRequest_CredentialFieldsEntry.encode({ key: key, value }, writer.uint32(74).fork()).join();
|
|
298
|
+
});
|
|
299
|
+
if (message.settings !== undefined) {
|
|
300
|
+
struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.settings), writer.uint32(82).fork()).join();
|
|
301
|
+
}
|
|
289
302
|
return writer;
|
|
290
303
|
},
|
|
291
304
|
decode(input, length) {
|
|
@@ -344,6 +357,30 @@ exports.CreateProviderConfigurationRequest = {
|
|
|
344
357
|
message.enabled = reader.bool();
|
|
345
358
|
continue;
|
|
346
359
|
}
|
|
360
|
+
case 8: {
|
|
361
|
+
if (tag !== 64) {
|
|
362
|
+
break;
|
|
363
|
+
}
|
|
364
|
+
message.authenticationType = reader.int32();
|
|
365
|
+
continue;
|
|
366
|
+
}
|
|
367
|
+
case 9: {
|
|
368
|
+
if (tag !== 74) {
|
|
369
|
+
break;
|
|
370
|
+
}
|
|
371
|
+
const entry9 = exports.CreateProviderConfigurationRequest_CredentialFieldsEntry.decode(reader, reader.uint32());
|
|
372
|
+
if (entry9.value !== undefined) {
|
|
373
|
+
message.credentialFields[entry9.key] = entry9.value;
|
|
374
|
+
}
|
|
375
|
+
continue;
|
|
376
|
+
}
|
|
377
|
+
case 10: {
|
|
378
|
+
if (tag !== 82) {
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
message.settings = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
|
|
382
|
+
continue;
|
|
383
|
+
}
|
|
347
384
|
}
|
|
348
385
|
if ((tag & 7) === 4 || tag === 0) {
|
|
349
386
|
break;
|
|
@@ -385,6 +422,23 @@ exports.CreateProviderConfigurationRequest = {
|
|
|
385
422
|
? globalThis.String(object.api_key)
|
|
386
423
|
: "",
|
|
387
424
|
enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
|
|
425
|
+
authenticationType: isSet(object.authenticationType)
|
|
426
|
+
? (0, provider_pb_1.providerAuthenticationTypeFromJSON)(object.authenticationType)
|
|
427
|
+
: isSet(object.authentication_type)
|
|
428
|
+
? (0, provider_pb_1.providerAuthenticationTypeFromJSON)(object.authentication_type)
|
|
429
|
+
: 0,
|
|
430
|
+
credentialFields: isObject(object.credentialFields)
|
|
431
|
+
? globalThis.Object.entries(object.credentialFields).reduce((acc, [key, value]) => {
|
|
432
|
+
acc[key] = globalThis.String(value);
|
|
433
|
+
return acc;
|
|
434
|
+
}, {})
|
|
435
|
+
: isObject(object.credential_fields)
|
|
436
|
+
? globalThis.Object.entries(object.credential_fields).reduce((acc, [key, value]) => {
|
|
437
|
+
acc[key] = globalThis.String(value);
|
|
438
|
+
return acc;
|
|
439
|
+
}, {})
|
|
440
|
+
: {},
|
|
441
|
+
settings: isObject(object.settings) ? object.settings : undefined,
|
|
388
442
|
};
|
|
389
443
|
},
|
|
390
444
|
toJSON(message) {
|
|
@@ -411,6 +465,21 @@ exports.CreateProviderConfigurationRequest = {
|
|
|
411
465
|
if (message.enabled !== false) {
|
|
412
466
|
obj.enabled = message.enabled;
|
|
413
467
|
}
|
|
468
|
+
if (message.authenticationType !== 0) {
|
|
469
|
+
obj.authenticationType = (0, provider_pb_1.providerAuthenticationTypeToJSON)(message.authenticationType);
|
|
470
|
+
}
|
|
471
|
+
if (message.credentialFields) {
|
|
472
|
+
const entries = globalThis.Object.entries(message.credentialFields);
|
|
473
|
+
if (entries.length > 0) {
|
|
474
|
+
obj.credentialFields = {};
|
|
475
|
+
entries.forEach(([k, v]) => {
|
|
476
|
+
obj.credentialFields[k] = v;
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
if (message.settings !== undefined) {
|
|
481
|
+
obj.settings = message.settings;
|
|
482
|
+
}
|
|
414
483
|
return obj;
|
|
415
484
|
},
|
|
416
485
|
create(base) {
|
|
@@ -418,7 +487,7 @@ exports.CreateProviderConfigurationRequest = {
|
|
|
418
487
|
},
|
|
419
488
|
fromPartial(object) {
|
|
420
489
|
var _a;
|
|
421
|
-
var _b, _c, _d, _e, _f, _g;
|
|
490
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
422
491
|
const message = createBaseCreateProviderConfigurationRequest();
|
|
423
492
|
message.allOrganizations = (_b = object.allOrganizations) !== null && _b !== void 0 ? _b : false;
|
|
424
493
|
message.organizationIds = ((_a = object.organizationIds) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
|
@@ -427,6 +496,83 @@ exports.CreateProviderConfigurationRequest = {
|
|
|
427
496
|
message.baseUrl = (_e = object.baseUrl) !== null && _e !== void 0 ? _e : "";
|
|
428
497
|
message.apiKey = (_f = object.apiKey) !== null && _f !== void 0 ? _f : "";
|
|
429
498
|
message.enabled = (_g = object.enabled) !== null && _g !== void 0 ? _g : false;
|
|
499
|
+
message.authenticationType = (_h = object.authenticationType) !== null && _h !== void 0 ? _h : 0;
|
|
500
|
+
message.credentialFields = globalThis.Object.entries((_j = object.credentialFields) !== null && _j !== void 0 ? _j : {}).reduce((acc, [key, value]) => {
|
|
501
|
+
if (value !== undefined) {
|
|
502
|
+
acc[key] = globalThis.String(value);
|
|
503
|
+
}
|
|
504
|
+
return acc;
|
|
505
|
+
}, {});
|
|
506
|
+
message.settings = (_k = object.settings) !== null && _k !== void 0 ? _k : undefined;
|
|
507
|
+
return message;
|
|
508
|
+
},
|
|
509
|
+
};
|
|
510
|
+
function createBaseCreateProviderConfigurationRequest_CredentialFieldsEntry() {
|
|
511
|
+
return { key: "", value: "" };
|
|
512
|
+
}
|
|
513
|
+
exports.CreateProviderConfigurationRequest_CredentialFieldsEntry = {
|
|
514
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
515
|
+
if (message.key !== "") {
|
|
516
|
+
writer.uint32(10).string(message.key);
|
|
517
|
+
}
|
|
518
|
+
if (message.value !== "") {
|
|
519
|
+
writer.uint32(18).string(message.value);
|
|
520
|
+
}
|
|
521
|
+
return writer;
|
|
522
|
+
},
|
|
523
|
+
decode(input, length) {
|
|
524
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
525
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
526
|
+
const message = createBaseCreateProviderConfigurationRequest_CredentialFieldsEntry();
|
|
527
|
+
while (reader.pos < end) {
|
|
528
|
+
const tag = reader.uint32();
|
|
529
|
+
switch (tag >>> 3) {
|
|
530
|
+
case 1: {
|
|
531
|
+
if (tag !== 10) {
|
|
532
|
+
break;
|
|
533
|
+
}
|
|
534
|
+
message.key = reader.string();
|
|
535
|
+
continue;
|
|
536
|
+
}
|
|
537
|
+
case 2: {
|
|
538
|
+
if (tag !== 18) {
|
|
539
|
+
break;
|
|
540
|
+
}
|
|
541
|
+
message.value = reader.string();
|
|
542
|
+
continue;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
546
|
+
break;
|
|
547
|
+
}
|
|
548
|
+
reader.skip(tag & 7);
|
|
549
|
+
}
|
|
550
|
+
return message;
|
|
551
|
+
},
|
|
552
|
+
fromJSON(object) {
|
|
553
|
+
return {
|
|
554
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
555
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
556
|
+
};
|
|
557
|
+
},
|
|
558
|
+
toJSON(message) {
|
|
559
|
+
const obj = {};
|
|
560
|
+
if (message.key !== "") {
|
|
561
|
+
obj.key = message.key;
|
|
562
|
+
}
|
|
563
|
+
if (message.value !== "") {
|
|
564
|
+
obj.value = message.value;
|
|
565
|
+
}
|
|
566
|
+
return obj;
|
|
567
|
+
},
|
|
568
|
+
create(base) {
|
|
569
|
+
return exports.CreateProviderConfigurationRequest_CredentialFieldsEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
570
|
+
},
|
|
571
|
+
fromPartial(object) {
|
|
572
|
+
var _a, _b;
|
|
573
|
+
const message = createBaseCreateProviderConfigurationRequest_CredentialFieldsEntry();
|
|
574
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
|
|
575
|
+
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : "";
|
|
430
576
|
return message;
|
|
431
577
|
},
|
|
432
578
|
};
|
|
@@ -531,7 +677,15 @@ exports.CreateProviderConfigurationResponse = {
|
|
|
531
677
|
},
|
|
532
678
|
};
|
|
533
679
|
function createBaseUpdateProviderConfigurationRequest() {
|
|
534
|
-
return {
|
|
680
|
+
return {
|
|
681
|
+
providerConfigurationId: "",
|
|
682
|
+
organizationId: "",
|
|
683
|
+
displayName: "",
|
|
684
|
+
baseUrl: "",
|
|
685
|
+
status: 0,
|
|
686
|
+
authenticationType: 0,
|
|
687
|
+
settings: undefined,
|
|
688
|
+
};
|
|
535
689
|
}
|
|
536
690
|
exports.UpdateProviderConfigurationRequest = {
|
|
537
691
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -550,6 +704,12 @@ exports.UpdateProviderConfigurationRequest = {
|
|
|
550
704
|
if (message.status !== 0) {
|
|
551
705
|
writer.uint32(40).int32(message.status);
|
|
552
706
|
}
|
|
707
|
+
if (message.authenticationType !== 0) {
|
|
708
|
+
writer.uint32(48).int32(message.authenticationType);
|
|
709
|
+
}
|
|
710
|
+
if (message.settings !== undefined) {
|
|
711
|
+
struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.settings), writer.uint32(58).fork()).join();
|
|
712
|
+
}
|
|
553
713
|
return writer;
|
|
554
714
|
},
|
|
555
715
|
decode(input, length) {
|
|
@@ -594,6 +754,20 @@ exports.UpdateProviderConfigurationRequest = {
|
|
|
594
754
|
message.status = reader.int32();
|
|
595
755
|
continue;
|
|
596
756
|
}
|
|
757
|
+
case 6: {
|
|
758
|
+
if (tag !== 48) {
|
|
759
|
+
break;
|
|
760
|
+
}
|
|
761
|
+
message.authenticationType = reader.int32();
|
|
762
|
+
continue;
|
|
763
|
+
}
|
|
764
|
+
case 7: {
|
|
765
|
+
if (tag !== 58) {
|
|
766
|
+
break;
|
|
767
|
+
}
|
|
768
|
+
message.settings = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
|
|
769
|
+
continue;
|
|
770
|
+
}
|
|
597
771
|
}
|
|
598
772
|
if ((tag & 7) === 4 || tag === 0) {
|
|
599
773
|
break;
|
|
@@ -625,6 +799,12 @@ exports.UpdateProviderConfigurationRequest = {
|
|
|
625
799
|
? globalThis.String(object.base_url)
|
|
626
800
|
: "",
|
|
627
801
|
status: isSet(object.status) ? (0, provider_pb_1.providerConfigurationStatusFromJSON)(object.status) : 0,
|
|
802
|
+
authenticationType: isSet(object.authenticationType)
|
|
803
|
+
? (0, provider_pb_1.providerAuthenticationTypeFromJSON)(object.authenticationType)
|
|
804
|
+
: isSet(object.authentication_type)
|
|
805
|
+
? (0, provider_pb_1.providerAuthenticationTypeFromJSON)(object.authentication_type)
|
|
806
|
+
: 0,
|
|
807
|
+
settings: isObject(object.settings) ? object.settings : undefined,
|
|
628
808
|
};
|
|
629
809
|
},
|
|
630
810
|
toJSON(message) {
|
|
@@ -644,19 +824,27 @@ exports.UpdateProviderConfigurationRequest = {
|
|
|
644
824
|
if (message.status !== 0) {
|
|
645
825
|
obj.status = (0, provider_pb_1.providerConfigurationStatusToJSON)(message.status);
|
|
646
826
|
}
|
|
827
|
+
if (message.authenticationType !== 0) {
|
|
828
|
+
obj.authenticationType = (0, provider_pb_1.providerAuthenticationTypeToJSON)(message.authenticationType);
|
|
829
|
+
}
|
|
830
|
+
if (message.settings !== undefined) {
|
|
831
|
+
obj.settings = message.settings;
|
|
832
|
+
}
|
|
647
833
|
return obj;
|
|
648
834
|
},
|
|
649
835
|
create(base) {
|
|
650
836
|
return exports.UpdateProviderConfigurationRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
651
837
|
},
|
|
652
838
|
fromPartial(object) {
|
|
653
|
-
var _a, _b, _c, _d, _e;
|
|
839
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
654
840
|
const message = createBaseUpdateProviderConfigurationRequest();
|
|
655
841
|
message.providerConfigurationId = (_a = object.providerConfigurationId) !== null && _a !== void 0 ? _a : "";
|
|
656
842
|
message.organizationId = (_b = object.organizationId) !== null && _b !== void 0 ? _b : "";
|
|
657
843
|
message.displayName = (_c = object.displayName) !== null && _c !== void 0 ? _c : "";
|
|
658
844
|
message.baseUrl = (_d = object.baseUrl) !== null && _d !== void 0 ? _d : "";
|
|
659
845
|
message.status = (_e = object.status) !== null && _e !== void 0 ? _e : 0;
|
|
846
|
+
message.authenticationType = (_f = object.authenticationType) !== null && _f !== void 0 ? _f : 0;
|
|
847
|
+
message.settings = (_g = object.settings) !== null && _g !== void 0 ? _g : undefined;
|
|
660
848
|
return message;
|
|
661
849
|
},
|
|
662
850
|
};
|
|
@@ -721,7 +909,7 @@ exports.UpdateProviderConfigurationResponse = {
|
|
|
721
909
|
},
|
|
722
910
|
};
|
|
723
911
|
function createBaseRotateProviderCredentialRequest() {
|
|
724
|
-
return { providerConfigurationId: "", organizationId: "", apiKey: "" };
|
|
912
|
+
return { providerConfigurationId: "", organizationId: "", apiKey: "", authenticationType: 0, credentialFields: {} };
|
|
725
913
|
}
|
|
726
914
|
exports.RotateProviderCredentialRequest = {
|
|
727
915
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -734,6 +922,13 @@ exports.RotateProviderCredentialRequest = {
|
|
|
734
922
|
if (message.apiKey !== "") {
|
|
735
923
|
writer.uint32(26).string(message.apiKey);
|
|
736
924
|
}
|
|
925
|
+
if (message.authenticationType !== 0) {
|
|
926
|
+
writer.uint32(32).int32(message.authenticationType);
|
|
927
|
+
}
|
|
928
|
+
globalThis.Object.entries(message.credentialFields).forEach(([key, value]) => {
|
|
929
|
+
exports.RotateProviderCredentialRequest_CredentialFieldsEntry.encode({ key: key, value }, writer.uint32(42).fork())
|
|
930
|
+
.join();
|
|
931
|
+
});
|
|
737
932
|
return writer;
|
|
738
933
|
},
|
|
739
934
|
decode(input, length) {
|
|
@@ -764,6 +959,23 @@ exports.RotateProviderCredentialRequest = {
|
|
|
764
959
|
message.apiKey = reader.string();
|
|
765
960
|
continue;
|
|
766
961
|
}
|
|
962
|
+
case 4: {
|
|
963
|
+
if (tag !== 32) {
|
|
964
|
+
break;
|
|
965
|
+
}
|
|
966
|
+
message.authenticationType = reader.int32();
|
|
967
|
+
continue;
|
|
968
|
+
}
|
|
969
|
+
case 5: {
|
|
970
|
+
if (tag !== 42) {
|
|
971
|
+
break;
|
|
972
|
+
}
|
|
973
|
+
const entry5 = exports.RotateProviderCredentialRequest_CredentialFieldsEntry.decode(reader, reader.uint32());
|
|
974
|
+
if (entry5.value !== undefined) {
|
|
975
|
+
message.credentialFields[entry5.key] = entry5.value;
|
|
976
|
+
}
|
|
977
|
+
continue;
|
|
978
|
+
}
|
|
767
979
|
}
|
|
768
980
|
if ((tag & 7) === 4 || tag === 0) {
|
|
769
981
|
break;
|
|
@@ -789,6 +1001,22 @@ exports.RotateProviderCredentialRequest = {
|
|
|
789
1001
|
: isSet(object.api_key)
|
|
790
1002
|
? globalThis.String(object.api_key)
|
|
791
1003
|
: "",
|
|
1004
|
+
authenticationType: isSet(object.authenticationType)
|
|
1005
|
+
? (0, provider_pb_1.providerAuthenticationTypeFromJSON)(object.authenticationType)
|
|
1006
|
+
: isSet(object.authentication_type)
|
|
1007
|
+
? (0, provider_pb_1.providerAuthenticationTypeFromJSON)(object.authentication_type)
|
|
1008
|
+
: 0,
|
|
1009
|
+
credentialFields: isObject(object.credentialFields)
|
|
1010
|
+
? globalThis.Object.entries(object.credentialFields).reduce((acc, [key, value]) => {
|
|
1011
|
+
acc[key] = globalThis.String(value);
|
|
1012
|
+
return acc;
|
|
1013
|
+
}, {})
|
|
1014
|
+
: isObject(object.credential_fields)
|
|
1015
|
+
? globalThis.Object.entries(object.credential_fields).reduce((acc, [key, value]) => {
|
|
1016
|
+
acc[key] = globalThis.String(value);
|
|
1017
|
+
return acc;
|
|
1018
|
+
}, {})
|
|
1019
|
+
: {},
|
|
792
1020
|
};
|
|
793
1021
|
},
|
|
794
1022
|
toJSON(message) {
|
|
@@ -802,17 +1030,105 @@ exports.RotateProviderCredentialRequest = {
|
|
|
802
1030
|
if (message.apiKey !== "") {
|
|
803
1031
|
obj.apiKey = message.apiKey;
|
|
804
1032
|
}
|
|
1033
|
+
if (message.authenticationType !== 0) {
|
|
1034
|
+
obj.authenticationType = (0, provider_pb_1.providerAuthenticationTypeToJSON)(message.authenticationType);
|
|
1035
|
+
}
|
|
1036
|
+
if (message.credentialFields) {
|
|
1037
|
+
const entries = globalThis.Object.entries(message.credentialFields);
|
|
1038
|
+
if (entries.length > 0) {
|
|
1039
|
+
obj.credentialFields = {};
|
|
1040
|
+
entries.forEach(([k, v]) => {
|
|
1041
|
+
obj.credentialFields[k] = v;
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
805
1045
|
return obj;
|
|
806
1046
|
},
|
|
807
1047
|
create(base) {
|
|
808
1048
|
return exports.RotateProviderCredentialRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
809
1049
|
},
|
|
810
1050
|
fromPartial(object) {
|
|
811
|
-
var _a, _b, _c;
|
|
1051
|
+
var _a, _b, _c, _d, _e;
|
|
812
1052
|
const message = createBaseRotateProviderCredentialRequest();
|
|
813
1053
|
message.providerConfigurationId = (_a = object.providerConfigurationId) !== null && _a !== void 0 ? _a : "";
|
|
814
1054
|
message.organizationId = (_b = object.organizationId) !== null && _b !== void 0 ? _b : "";
|
|
815
1055
|
message.apiKey = (_c = object.apiKey) !== null && _c !== void 0 ? _c : "";
|
|
1056
|
+
message.authenticationType = (_d = object.authenticationType) !== null && _d !== void 0 ? _d : 0;
|
|
1057
|
+
message.credentialFields = globalThis.Object.entries((_e = object.credentialFields) !== null && _e !== void 0 ? _e : {}).reduce((acc, [key, value]) => {
|
|
1058
|
+
if (value !== undefined) {
|
|
1059
|
+
acc[key] = globalThis.String(value);
|
|
1060
|
+
}
|
|
1061
|
+
return acc;
|
|
1062
|
+
}, {});
|
|
1063
|
+
return message;
|
|
1064
|
+
},
|
|
1065
|
+
};
|
|
1066
|
+
function createBaseRotateProviderCredentialRequest_CredentialFieldsEntry() {
|
|
1067
|
+
return { key: "", value: "" };
|
|
1068
|
+
}
|
|
1069
|
+
exports.RotateProviderCredentialRequest_CredentialFieldsEntry = {
|
|
1070
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1071
|
+
if (message.key !== "") {
|
|
1072
|
+
writer.uint32(10).string(message.key);
|
|
1073
|
+
}
|
|
1074
|
+
if (message.value !== "") {
|
|
1075
|
+
writer.uint32(18).string(message.value);
|
|
1076
|
+
}
|
|
1077
|
+
return writer;
|
|
1078
|
+
},
|
|
1079
|
+
decode(input, length) {
|
|
1080
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1081
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1082
|
+
const message = createBaseRotateProviderCredentialRequest_CredentialFieldsEntry();
|
|
1083
|
+
while (reader.pos < end) {
|
|
1084
|
+
const tag = reader.uint32();
|
|
1085
|
+
switch (tag >>> 3) {
|
|
1086
|
+
case 1: {
|
|
1087
|
+
if (tag !== 10) {
|
|
1088
|
+
break;
|
|
1089
|
+
}
|
|
1090
|
+
message.key = reader.string();
|
|
1091
|
+
continue;
|
|
1092
|
+
}
|
|
1093
|
+
case 2: {
|
|
1094
|
+
if (tag !== 18) {
|
|
1095
|
+
break;
|
|
1096
|
+
}
|
|
1097
|
+
message.value = reader.string();
|
|
1098
|
+
continue;
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1102
|
+
break;
|
|
1103
|
+
}
|
|
1104
|
+
reader.skip(tag & 7);
|
|
1105
|
+
}
|
|
1106
|
+
return message;
|
|
1107
|
+
},
|
|
1108
|
+
fromJSON(object) {
|
|
1109
|
+
return {
|
|
1110
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
1111
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
1112
|
+
};
|
|
1113
|
+
},
|
|
1114
|
+
toJSON(message) {
|
|
1115
|
+
const obj = {};
|
|
1116
|
+
if (message.key !== "") {
|
|
1117
|
+
obj.key = message.key;
|
|
1118
|
+
}
|
|
1119
|
+
if (message.value !== "") {
|
|
1120
|
+
obj.value = message.value;
|
|
1121
|
+
}
|
|
1122
|
+
return obj;
|
|
1123
|
+
},
|
|
1124
|
+
create(base) {
|
|
1125
|
+
return exports.RotateProviderCredentialRequest_CredentialFieldsEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1126
|
+
},
|
|
1127
|
+
fromPartial(object) {
|
|
1128
|
+
var _a, _b;
|
|
1129
|
+
const message = createBaseRotateProviderCredentialRequest_CredentialFieldsEntry();
|
|
1130
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
|
|
1131
|
+
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : "";
|
|
816
1132
|
return message;
|
|
817
1133
|
},
|
|
818
1134
|
};
|
|
@@ -1564,6 +1880,9 @@ exports.ProviderConfigurationServiceDefinition = {
|
|
|
1564
1880
|
},
|
|
1565
1881
|
},
|
|
1566
1882
|
};
|
|
1883
|
+
function isObject(value) {
|
|
1884
|
+
return typeof value === "object" && value !== null;
|
|
1885
|
+
}
|
|
1567
1886
|
function isSet(value) {
|
|
1568
1887
|
return value !== null && value !== undefined;
|
|
1569
1888
|
}
|
|
@@ -2,13 +2,15 @@ import { QueryArrayConfig, QueryArrayResult } from "pg";
|
|
|
2
2
|
interface Client {
|
|
3
3
|
query: (config: QueryArrayConfig) => Promise<QueryArrayResult>;
|
|
4
4
|
}
|
|
5
|
-
export declare const createProviderConfigurationQuery = "-- name: CreateProviderConfiguration :one\nINSERT INTO weave.llm_provider_configurations (\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n status,\n created_by_user_id,\n updated_by_user_id\n) VALUES (\n $1,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8\n)\nRETURNING\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n status,\n created_by_user_id,\n updated_by_user_id,\n created_at,\n updated_at";
|
|
5
|
+
export declare const createProviderConfigurationQuery = "-- name: CreateProviderConfiguration :one\nINSERT INTO weave.llm_provider_configurations (\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n authentication_type,\n settings,\n status,\n created_by_user_id,\n updated_by_user_id\n) VALUES (\n $1,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10\n)\nRETURNING\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n authentication_type,\n settings,\n status,\n created_by_user_id,\n updated_by_user_id,\n created_at,\n updated_at";
|
|
6
6
|
export interface CreateProviderConfigurationArgs {
|
|
7
7
|
id: string;
|
|
8
8
|
organizationId: string;
|
|
9
9
|
providerKind: string;
|
|
10
10
|
displayName: string;
|
|
11
11
|
baseUrl: string | null;
|
|
12
|
+
authenticationType: string;
|
|
13
|
+
settings: any;
|
|
12
14
|
status: string;
|
|
13
15
|
createdByUserId: string;
|
|
14
16
|
updatedByUserId: string;
|
|
@@ -19,6 +21,8 @@ export interface CreateProviderConfigurationRow {
|
|
|
19
21
|
providerKind: string;
|
|
20
22
|
displayName: string;
|
|
21
23
|
baseUrl: string | null;
|
|
24
|
+
authenticationType: string;
|
|
25
|
+
settings: any;
|
|
22
26
|
status: string;
|
|
23
27
|
createdByUserId: string;
|
|
24
28
|
updatedByUserId: string;
|
|
@@ -26,7 +30,7 @@ export interface CreateProviderConfigurationRow {
|
|
|
26
30
|
updatedAt: Date;
|
|
27
31
|
}
|
|
28
32
|
export declare function createProviderConfiguration(client: Client, args: CreateProviderConfigurationArgs): Promise<CreateProviderConfigurationRow | null>;
|
|
29
|
-
export declare const getProviderConfigurationByIDQuery = "-- name: GetProviderConfigurationByID :one\nSELECT\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n status,\n created_by_user_id,\n updated_by_user_id,\n created_at,\n updated_at\nFROM weave.llm_provider_configurations\nWHERE organization_id = $1\n AND id = $2";
|
|
33
|
+
export declare const getProviderConfigurationByIDQuery = "-- name: GetProviderConfigurationByID :one\nSELECT\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n authentication_type,\n settings,\n status,\n created_by_user_id,\n updated_by_user_id,\n created_at,\n updated_at\nFROM weave.llm_provider_configurations\nWHERE organization_id = $1\n AND id = $2";
|
|
30
34
|
export interface GetProviderConfigurationByIDArgs {
|
|
31
35
|
organizationId: string;
|
|
32
36
|
id: string;
|
|
@@ -37,6 +41,8 @@ export interface GetProviderConfigurationByIDRow {
|
|
|
37
41
|
providerKind: string;
|
|
38
42
|
displayName: string;
|
|
39
43
|
baseUrl: string | null;
|
|
44
|
+
authenticationType: string;
|
|
45
|
+
settings: any;
|
|
40
46
|
status: string;
|
|
41
47
|
createdByUserId: string;
|
|
42
48
|
updatedByUserId: string;
|
|
@@ -44,25 +50,27 @@ export interface GetProviderConfigurationByIDRow {
|
|
|
44
50
|
updatedAt: Date;
|
|
45
51
|
}
|
|
46
52
|
export declare function getProviderConfigurationByID(client: Client, args: GetProviderConfigurationByIDArgs): Promise<GetProviderConfigurationByIDRow | null>;
|
|
47
|
-
export declare const
|
|
48
|
-
export interface
|
|
53
|
+
export declare const listProviderConfigurationsByKindQuery = "-- name: ListProviderConfigurationsByKind :many\nSELECT\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n authentication_type,\n settings,\n status,\n created_by_user_id,\n updated_by_user_id,\n created_at,\n updated_at\nFROM weave.llm_provider_configurations\nWHERE organization_id = $1\n AND provider_kind = $2\nORDER BY updated_at DESC, created_at DESC";
|
|
54
|
+
export interface ListProviderConfigurationsByKindArgs {
|
|
49
55
|
organizationId: string;
|
|
50
56
|
providerKind: string;
|
|
51
57
|
}
|
|
52
|
-
export interface
|
|
58
|
+
export interface ListProviderConfigurationsByKindRow {
|
|
53
59
|
id: string;
|
|
54
60
|
organizationId: string;
|
|
55
61
|
providerKind: string;
|
|
56
62
|
displayName: string;
|
|
57
63
|
baseUrl: string | null;
|
|
64
|
+
authenticationType: string;
|
|
65
|
+
settings: any;
|
|
58
66
|
status: string;
|
|
59
67
|
createdByUserId: string;
|
|
60
68
|
updatedByUserId: string;
|
|
61
69
|
createdAt: Date;
|
|
62
70
|
updatedAt: Date;
|
|
63
71
|
}
|
|
64
|
-
export declare function
|
|
65
|
-
export declare const listProviderConfigurationsQuery = "-- name: ListProviderConfigurations :many\nSELECT\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n status,\n created_by_user_id,\n updated_by_user_id,\n created_at,\n updated_at\nFROM weave.llm_provider_configurations\nWHERE organization_id = $1\nORDER BY updated_at DESC, created_at DESC";
|
|
72
|
+
export declare function listProviderConfigurationsByKind(client: Client, args: ListProviderConfigurationsByKindArgs): Promise<ListProviderConfigurationsByKindRow[]>;
|
|
73
|
+
export declare const listProviderConfigurationsQuery = "-- name: ListProviderConfigurations :many\nSELECT\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n authentication_type,\n settings,\n status,\n created_by_user_id,\n updated_by_user_id,\n created_at,\n updated_at\nFROM weave.llm_provider_configurations\nWHERE organization_id = $1\nORDER BY updated_at DESC, created_at DESC";
|
|
66
74
|
export interface ListProviderConfigurationsArgs {
|
|
67
75
|
organizationId: string;
|
|
68
76
|
}
|
|
@@ -72,6 +80,8 @@ export interface ListProviderConfigurationsRow {
|
|
|
72
80
|
providerKind: string;
|
|
73
81
|
displayName: string;
|
|
74
82
|
baseUrl: string | null;
|
|
83
|
+
authenticationType: string;
|
|
84
|
+
settings: any;
|
|
75
85
|
status: string;
|
|
76
86
|
createdByUserId: string;
|
|
77
87
|
updatedByUserId: string;
|
|
@@ -79,10 +89,12 @@ export interface ListProviderConfigurationsRow {
|
|
|
79
89
|
updatedAt: Date;
|
|
80
90
|
}
|
|
81
91
|
export declare function listProviderConfigurations(client: Client, args: ListProviderConfigurationsArgs): Promise<ListProviderConfigurationsRow[]>;
|
|
82
|
-
export declare const updateProviderConfigurationByIDQuery = "-- name: UpdateProviderConfigurationByID :one\nUPDATE weave.llm_provider_configurations\nSET\n display_name = $1,\n base_url = $2,\n
|
|
92
|
+
export declare const updateProviderConfigurationByIDQuery = "-- name: UpdateProviderConfigurationByID :one\nUPDATE weave.llm_provider_configurations\nSET\n display_name = $1,\n base_url = $2,\n authentication_type = $3,\n settings = $4,\n status = $5,\n updated_by_user_id = $6,\n updated_at = now()\nWHERE organization_id = $7\n AND id = $8\nRETURNING\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n authentication_type,\n settings,\n status,\n created_by_user_id,\n updated_by_user_id,\n created_at,\n updated_at";
|
|
83
93
|
export interface UpdateProviderConfigurationByIDArgs {
|
|
84
94
|
displayName: string;
|
|
85
95
|
baseUrl: string | null;
|
|
96
|
+
authenticationType: string;
|
|
97
|
+
settings: any;
|
|
86
98
|
status: string;
|
|
87
99
|
updatedByUserId: string;
|
|
88
100
|
organizationId: string;
|
|
@@ -94,6 +106,8 @@ export interface UpdateProviderConfigurationByIDRow {
|
|
|
94
106
|
providerKind: string;
|
|
95
107
|
displayName: string;
|
|
96
108
|
baseUrl: string | null;
|
|
109
|
+
authenticationType: string;
|
|
110
|
+
settings: any;
|
|
97
111
|
status: string;
|
|
98
112
|
createdByUserId: string;
|
|
99
113
|
updatedByUserId: string;
|
|
@@ -101,7 +115,7 @@ export interface UpdateProviderConfigurationByIDRow {
|
|
|
101
115
|
updatedAt: Date;
|
|
102
116
|
}
|
|
103
117
|
export declare function updateProviderConfigurationByID(client: Client, args: UpdateProviderConfigurationByIDArgs): Promise<UpdateProviderConfigurationByIDRow | null>;
|
|
104
|
-
export declare const disableProviderConfigurationByIDQuery = "-- name: DisableProviderConfigurationByID :one\nUPDATE weave.llm_provider_configurations\nSET\n status = 'PROVIDER_CONFIGURATION_STATUS_DISABLED',\n updated_by_user_id = $1,\n updated_at = now()\nWHERE organization_id = $2\n AND id = $3\nRETURNING\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n status,\n created_by_user_id,\n updated_by_user_id,\n created_at,\n updated_at";
|
|
118
|
+
export declare const disableProviderConfigurationByIDQuery = "-- name: DisableProviderConfigurationByID :one\nUPDATE weave.llm_provider_configurations\nSET\n status = 'PROVIDER_CONFIGURATION_STATUS_DISABLED',\n updated_by_user_id = $1,\n updated_at = now()\nWHERE organization_id = $2\n AND id = $3\nRETURNING\n id,\n organization_id,\n provider_kind,\n display_name,\n base_url,\n authentication_type,\n settings,\n status,\n created_by_user_id,\n updated_by_user_id,\n created_at,\n updated_at";
|
|
105
119
|
export interface DisableProviderConfigurationByIDArgs {
|
|
106
120
|
updatedByUserId: string;
|
|
107
121
|
organizationId: string;
|
|
@@ -113,6 +127,8 @@ export interface DisableProviderConfigurationByIDRow {
|
|
|
113
127
|
providerKind: string;
|
|
114
128
|
displayName: string;
|
|
115
129
|
baseUrl: string | null;
|
|
130
|
+
authenticationType: string;
|
|
131
|
+
settings: any;
|
|
116
132
|
status: string;
|
|
117
133
|
createdByUserId: string;
|
|
118
134
|
updatedByUserId: string;
|