weave-typescript 0.19.0 → 0.21.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/model/v1/model.pb.d.ts +105 -0
- package/dist/weaveapi/model/v1/model.pb.js +1001 -0
- package/dist/weaveapi/model/v1/service.pb.d.ts +116 -0
- package/dist/weaveapi/model/v1/service.pb.js +579 -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/model_catalog_sql.d.ts +91 -0
- package/dist/weavesql/weavedb/model_catalog_sql.js +213 -0
- package/dist/weavesql/weavedb/provider_sql.d.ts +25 -9
- package/dist/weavesql/weavedb/provider_sql.js +83 -54
- package/package.json +2 -2
|
@@ -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
|
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { QueryArrayConfig, QueryArrayResult } from "pg";
|
|
2
|
+
interface Client {
|
|
3
|
+
query: (config: QueryArrayConfig) => Promise<QueryArrayResult>;
|
|
4
|
+
}
|
|
5
|
+
export declare const upsertModelCatalogModelQuery = "-- name: UpsertModelCatalogModel :one\nINSERT INTO weave.llm_model_catalog_models (\n provider_kind,\n model_id,\n display_name,\n primary_type,\n capabilities,\n pricing,\n params,\n max_input_tokens,\n max_output_tokens,\n release_order,\n catalog_revision,\n synced_at\n) VALUES (\n $1,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12\n)\nON CONFLICT (provider_kind, model_id) DO UPDATE\nSET\n display_name = EXCLUDED.display_name,\n primary_type = EXCLUDED.primary_type,\n capabilities = EXCLUDED.capabilities,\n pricing = EXCLUDED.pricing,\n params = EXCLUDED.params,\n max_input_tokens = EXCLUDED.max_input_tokens,\n max_output_tokens = EXCLUDED.max_output_tokens,\n release_order = EXCLUDED.release_order,\n catalog_revision = EXCLUDED.catalog_revision,\n synced_at = EXCLUDED.synced_at,\n updated_at = now()\nRETURNING\n provider_kind,\n model_id,\n display_name,\n primary_type,\n capabilities,\n pricing,\n params,\n max_input_tokens,\n max_output_tokens,\n release_order,\n catalog_revision,\n synced_at,\n updated_at";
|
|
6
|
+
export interface UpsertModelCatalogModelArgs {
|
|
7
|
+
providerKind: string;
|
|
8
|
+
modelId: string;
|
|
9
|
+
displayName: string;
|
|
10
|
+
primaryType: string;
|
|
11
|
+
capabilities: any;
|
|
12
|
+
pricing: any;
|
|
13
|
+
params: any;
|
|
14
|
+
maxInputTokens: string | null;
|
|
15
|
+
maxOutputTokens: string | null;
|
|
16
|
+
releaseOrder: number;
|
|
17
|
+
catalogRevision: string;
|
|
18
|
+
syncedAt: Date;
|
|
19
|
+
}
|
|
20
|
+
export interface UpsertModelCatalogModelRow {
|
|
21
|
+
providerKind: string;
|
|
22
|
+
modelId: string;
|
|
23
|
+
displayName: string;
|
|
24
|
+
primaryType: string;
|
|
25
|
+
capabilities: any;
|
|
26
|
+
pricing: any;
|
|
27
|
+
params: any;
|
|
28
|
+
maxInputTokens: string | null;
|
|
29
|
+
maxOutputTokens: string | null;
|
|
30
|
+
releaseOrder: number;
|
|
31
|
+
catalogRevision: string;
|
|
32
|
+
syncedAt: Date;
|
|
33
|
+
updatedAt: Date;
|
|
34
|
+
}
|
|
35
|
+
export declare function upsertModelCatalogModel(client: Client, args: UpsertModelCatalogModelArgs): Promise<UpsertModelCatalogModelRow | null>;
|
|
36
|
+
export declare const deleteModelCatalogModelsByProviderQuery = "-- name: DeleteModelCatalogModelsByProvider :execrows\nDELETE FROM weave.llm_model_catalog_models\nWHERE provider_kind = $1";
|
|
37
|
+
export interface DeleteModelCatalogModelsByProviderArgs {
|
|
38
|
+
providerKind: string;
|
|
39
|
+
}
|
|
40
|
+
export declare const listModelCatalogProvidersQuery = "-- name: ListModelCatalogProviders :many\nSELECT DISTINCT provider_kind\nFROM weave.llm_model_catalog_models\nORDER BY provider_kind ASC";
|
|
41
|
+
export interface ListModelCatalogProvidersRow {
|
|
42
|
+
providerKind: string;
|
|
43
|
+
}
|
|
44
|
+
export declare function listModelCatalogProviders(client: Client): Promise<ListModelCatalogProvidersRow[]>;
|
|
45
|
+
export declare const listModelCatalogModelsByProviderQuery = "-- name: ListModelCatalogModelsByProvider :many\nSELECT\n provider_kind,\n model_id,\n display_name,\n primary_type,\n capabilities,\n pricing,\n params,\n max_input_tokens,\n max_output_tokens,\n release_order,\n catalog_revision,\n synced_at,\n updated_at\nFROM weave.llm_model_catalog_models\nWHERE provider_kind = $1\nORDER BY release_order ASC, model_id ASC";
|
|
46
|
+
export interface ListModelCatalogModelsByProviderArgs {
|
|
47
|
+
providerKind: string;
|
|
48
|
+
}
|
|
49
|
+
export interface ListModelCatalogModelsByProviderRow {
|
|
50
|
+
providerKind: string;
|
|
51
|
+
modelId: string;
|
|
52
|
+
displayName: string;
|
|
53
|
+
primaryType: string;
|
|
54
|
+
capabilities: any;
|
|
55
|
+
pricing: any;
|
|
56
|
+
params: any;
|
|
57
|
+
maxInputTokens: string | null;
|
|
58
|
+
maxOutputTokens: string | null;
|
|
59
|
+
releaseOrder: number;
|
|
60
|
+
catalogRevision: string;
|
|
61
|
+
syncedAt: Date;
|
|
62
|
+
updatedAt: Date;
|
|
63
|
+
}
|
|
64
|
+
export declare function listModelCatalogModelsByProvider(client: Client, args: ListModelCatalogModelsByProviderArgs): Promise<ListModelCatalogModelsByProviderRow[]>;
|
|
65
|
+
export declare const getModelCatalogModelByProviderAndIDQuery = "-- name: GetModelCatalogModelByProviderAndID :one\nSELECT\n provider_kind,\n model_id,\n display_name,\n primary_type,\n capabilities,\n pricing,\n params,\n max_input_tokens,\n max_output_tokens,\n release_order,\n catalog_revision,\n synced_at,\n updated_at\nFROM weave.llm_model_catalog_models\nWHERE provider_kind = $1\n AND model_id = $2";
|
|
66
|
+
export interface GetModelCatalogModelByProviderAndIDArgs {
|
|
67
|
+
providerKind: string;
|
|
68
|
+
modelId: string;
|
|
69
|
+
}
|
|
70
|
+
export interface GetModelCatalogModelByProviderAndIDRow {
|
|
71
|
+
providerKind: string;
|
|
72
|
+
modelId: string;
|
|
73
|
+
displayName: string;
|
|
74
|
+
primaryType: string;
|
|
75
|
+
capabilities: any;
|
|
76
|
+
pricing: any;
|
|
77
|
+
params: any;
|
|
78
|
+
maxInputTokens: string | null;
|
|
79
|
+
maxOutputTokens: string | null;
|
|
80
|
+
releaseOrder: number;
|
|
81
|
+
catalogRevision: string;
|
|
82
|
+
syncedAt: Date;
|
|
83
|
+
updatedAt: Date;
|
|
84
|
+
}
|
|
85
|
+
export declare function getModelCatalogModelByProviderAndID(client: Client, args: GetModelCatalogModelByProviderAndIDArgs): Promise<GetModelCatalogModelByProviderAndIDRow | null>;
|
|
86
|
+
export declare const getLatestModelCatalogRevisionQuery = "-- name: GetLatestModelCatalogRevision :one\nSELECT catalog_revision\nFROM weave.llm_model_catalog_models\nORDER BY synced_at DESC, updated_at DESC\nLIMIT 1";
|
|
87
|
+
export interface GetLatestModelCatalogRevisionRow {
|
|
88
|
+
catalogRevision: string;
|
|
89
|
+
}
|
|
90
|
+
export declare function getLatestModelCatalogRevision(client: Client): Promise<GetLatestModelCatalogRevisionRow | null>;
|
|
91
|
+
export {};
|