geniebox-shared-lib 2.2.4 → 2.2.7
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/endpoint.interface.d.ts +10 -0
- package/dist/endpoint.interface.js +53 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -3
- package/dist/key.interface.d.ts +20 -0
- package/dist/key.interface.js +75 -4
- package/package.json +1 -1
|
@@ -71,6 +71,10 @@ export interface ModelsRequest {
|
|
|
71
71
|
providerId: string;
|
|
72
72
|
/** only active models */
|
|
73
73
|
activeOnly: boolean;
|
|
74
|
+
/** optional, pagination limit (default: 100, max: 1000) */
|
|
75
|
+
limit: number;
|
|
76
|
+
/** optional, pagination offset (default: 0) */
|
|
77
|
+
offset: number;
|
|
74
78
|
}
|
|
75
79
|
export interface PricingRequest {
|
|
76
80
|
/** filter by model */
|
|
@@ -126,6 +130,10 @@ export interface ListEndpointsRequest {
|
|
|
126
130
|
activeOnly: boolean;
|
|
127
131
|
/** optional, filter by provider */
|
|
128
132
|
providerId: string;
|
|
133
|
+
/** optional, pagination limit (default: 100, max: 1000) */
|
|
134
|
+
limit: number;
|
|
135
|
+
/** optional, pagination offset (default: 0) */
|
|
136
|
+
offset: number;
|
|
129
137
|
}
|
|
130
138
|
export interface DeleteEndpointRequest {
|
|
131
139
|
/** required */
|
|
@@ -138,6 +146,8 @@ export interface ProvidersResponse {
|
|
|
138
146
|
}
|
|
139
147
|
export interface ModelsResponse {
|
|
140
148
|
models: Model[];
|
|
149
|
+
/** total count of models matching the query */
|
|
150
|
+
total: number;
|
|
141
151
|
}
|
|
142
152
|
export interface PricingResponse {
|
|
143
153
|
pricing: Pricing[];
|
|
@@ -648,7 +648,7 @@ exports.ProvidersRequest = {
|
|
|
648
648
|
},
|
|
649
649
|
};
|
|
650
650
|
function createBaseModelsRequest() {
|
|
651
|
-
return { providerId: "", activeOnly: false };
|
|
651
|
+
return { providerId: "", activeOnly: false, limit: 0, offset: 0 };
|
|
652
652
|
}
|
|
653
653
|
exports.ModelsRequest = {
|
|
654
654
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -658,6 +658,12 @@ exports.ModelsRequest = {
|
|
|
658
658
|
if (message.activeOnly !== false) {
|
|
659
659
|
writer.uint32(16).bool(message.activeOnly);
|
|
660
660
|
}
|
|
661
|
+
if (message.limit !== 0) {
|
|
662
|
+
writer.uint32(24).int32(message.limit);
|
|
663
|
+
}
|
|
664
|
+
if (message.offset !== 0) {
|
|
665
|
+
writer.uint32(32).int32(message.offset);
|
|
666
|
+
}
|
|
661
667
|
return writer;
|
|
662
668
|
},
|
|
663
669
|
decode(input, length) {
|
|
@@ -681,6 +687,20 @@ exports.ModelsRequest = {
|
|
|
681
687
|
message.activeOnly = reader.bool();
|
|
682
688
|
continue;
|
|
683
689
|
}
|
|
690
|
+
case 3: {
|
|
691
|
+
if (tag !== 24) {
|
|
692
|
+
break;
|
|
693
|
+
}
|
|
694
|
+
message.limit = reader.int32();
|
|
695
|
+
continue;
|
|
696
|
+
}
|
|
697
|
+
case 4: {
|
|
698
|
+
if (tag !== 32) {
|
|
699
|
+
break;
|
|
700
|
+
}
|
|
701
|
+
message.offset = reader.int32();
|
|
702
|
+
continue;
|
|
703
|
+
}
|
|
684
704
|
}
|
|
685
705
|
if ((tag & 7) === 4 || tag === 0) {
|
|
686
706
|
break;
|
|
@@ -1015,7 +1035,7 @@ exports.GetEndpointByIdRequest = {
|
|
|
1015
1035
|
},
|
|
1016
1036
|
};
|
|
1017
1037
|
function createBaseListEndpointsRequest() {
|
|
1018
|
-
return { activeOnly: false, providerId: "" };
|
|
1038
|
+
return { activeOnly: false, providerId: "", limit: 0, offset: 0 };
|
|
1019
1039
|
}
|
|
1020
1040
|
exports.ListEndpointsRequest = {
|
|
1021
1041
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -1025,6 +1045,12 @@ exports.ListEndpointsRequest = {
|
|
|
1025
1045
|
if (message.providerId !== "") {
|
|
1026
1046
|
writer.uint32(18).string(message.providerId);
|
|
1027
1047
|
}
|
|
1048
|
+
if (message.limit !== 0) {
|
|
1049
|
+
writer.uint32(24).int32(message.limit);
|
|
1050
|
+
}
|
|
1051
|
+
if (message.offset !== 0) {
|
|
1052
|
+
writer.uint32(32).int32(message.offset);
|
|
1053
|
+
}
|
|
1028
1054
|
return writer;
|
|
1029
1055
|
},
|
|
1030
1056
|
decode(input, length) {
|
|
@@ -1048,6 +1074,20 @@ exports.ListEndpointsRequest = {
|
|
|
1048
1074
|
message.providerId = reader.string();
|
|
1049
1075
|
continue;
|
|
1050
1076
|
}
|
|
1077
|
+
case 3: {
|
|
1078
|
+
if (tag !== 24) {
|
|
1079
|
+
break;
|
|
1080
|
+
}
|
|
1081
|
+
message.limit = reader.int32();
|
|
1082
|
+
continue;
|
|
1083
|
+
}
|
|
1084
|
+
case 4: {
|
|
1085
|
+
if (tag !== 32) {
|
|
1086
|
+
break;
|
|
1087
|
+
}
|
|
1088
|
+
message.offset = reader.int32();
|
|
1089
|
+
continue;
|
|
1090
|
+
}
|
|
1051
1091
|
}
|
|
1052
1092
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1053
1093
|
break;
|
|
@@ -1134,13 +1174,16 @@ exports.ProvidersResponse = {
|
|
|
1134
1174
|
},
|
|
1135
1175
|
};
|
|
1136
1176
|
function createBaseModelsResponse() {
|
|
1137
|
-
return { models: [] };
|
|
1177
|
+
return { models: [], total: 0 };
|
|
1138
1178
|
}
|
|
1139
1179
|
exports.ModelsResponse = {
|
|
1140
1180
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1141
1181
|
for (const v of message.models) {
|
|
1142
1182
|
exports.Model.encode(v, writer.uint32(10).fork()).join();
|
|
1143
1183
|
}
|
|
1184
|
+
if (message.total !== 0) {
|
|
1185
|
+
writer.uint32(16).int32(message.total);
|
|
1186
|
+
}
|
|
1144
1187
|
return writer;
|
|
1145
1188
|
},
|
|
1146
1189
|
decode(input, length) {
|
|
@@ -1157,6 +1200,13 @@ exports.ModelsResponse = {
|
|
|
1157
1200
|
message.models.push(exports.Model.decode(reader, reader.uint32()));
|
|
1158
1201
|
continue;
|
|
1159
1202
|
}
|
|
1203
|
+
case 2: {
|
|
1204
|
+
if (tag !== 16) {
|
|
1205
|
+
break;
|
|
1206
|
+
}
|
|
1207
|
+
message.total = reader.int32();
|
|
1208
|
+
continue;
|
|
1209
|
+
}
|
|
1160
1210
|
}
|
|
1161
1211
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1162
1212
|
break;
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export { MessageFns as EndpointMessageFns, protobufPackage as EndpointProtobufPa
|
|
|
15
15
|
export { MessageFns as OpenAIMessageFns, protobufPackage as OpenAIProtobufPackage, CreateRequest as OpenAICreateRequest, CreateResponse as OpenAICreateResponse, OpenAIServiceService as OpenAIService, } from "./openai.interface";
|
|
16
16
|
export { UploadRequest, UploadResponse, DownloadRequest, DownloadResponse, DeleteRequest, DeleteResponse, StorageServiceService as StorageService, protobufPackage as FileProtobufPackage, } from "./storage.interface";
|
|
17
17
|
export { MessageFns as EventMessageFns, protobufPackage as EventProtobufPackage, SubscribeRequest, EventMessage, EventServiceService as EventService, } from "./event.interface";
|
|
18
|
-
export { MessageFns as KeysMessageFns, protobufPackage as KeysProtobufPackage, Key, CreateKeyRequest, UpdateKeyRequest, RemoveKeyRequest, GetKeyByIdRequest, KeyResponse, KeysResponse, GetKeysByUserRequest, ValidateKeyRequest, ValidateKeyResponse, KeyServiceService as KeyService, } from "./key.interface";
|
|
18
|
+
export { MessageFns as KeysMessageFns, protobufPackage as KeysProtobufPackage, Key, CreateKeyRequest, UpdateKeyRequest, RemoveKeyRequest, GetKeyByIdRequest, KeyResponse, KeysResponse, GetKeysByUserRequest, ValidateKeyRequest, ValidateKeyResponse, GetSystemKeyRequest, KeyServiceService as KeyService, } from "./key.interface";
|
|
19
19
|
export { MessageFns as RequestMessageFns, protobufPackage as RequestProtobufPackage, CreateRequestRequest, CreateRequestResponse, GetRequestStatusRequest, RequestStatusResponse, GetRequestResultRequest, RequestResultResponse, CancelRequestRequest, CancelRequestResponse, StreamRequestRequest, RequestLog, StreamChunk, RequestServiceService as RequestService, } from "./request.interface";
|
|
20
20
|
export { MessageFns as ResponseMessageFns, protobufPackage as ResponseProtobufPackage, ProcessResponseRequest, ProcessResponseResponse, StreamUpdatesRequest, StreamUpdate, ResponseServiceService as ResponseService, } from "./response.interface";
|
|
21
21
|
export { MessageFns as BillingMessageFns, protobufPackage as BillingProtobufPackage, Balance, Transaction, Usage, UsageStats, Payment, GetBalanceRequest, GetBalanceResponse, ChargeRequest, ChargeResponse, DepositRequest, DepositResponse, CreateTransactionRequest, CreateTransactionResponse, GetTransactionsRequest, GetTransactionsResponse, GetTransactionRequest, GetTransactionResponse, RecordUsageRequest, RecordUsageResponse, GetUsageStatsRequest, GetUsageStatsResponse, GetUsageByKeyRequest, GetUsageByKeyResponse, GetUsageByUserRequest, GetUsageByUserResponse, CreatePaymentRequest, CreatePaymentResponse, GetPaymentRequest, GetPaymentResponse, GetPaymentsByUserRequest, GetPaymentsByUserResponse, ProcessWebhookRequest, ProcessWebhookResponse, BillingServiceService as BillingService, } from "./billing.interface";
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EndpointPricing = exports.EndpointModel = exports.EndpointProvider = exports.ENDPOINT_SERVICE_NAME = exports.ENDPOINT_PACKAGE_NAME = exports.EndpointProtobufPackage = exports.VerifyResetCodeRequest = exports.ResendConfirmationCodeRequest = exports.CheckEmailVerifiedResponse = exports.CheckEmailVerifiedRequest = exports.ConfirmEmailResponse = exports.ConfirmEmailByCodeRequest = exports.ConfirmEmailRequest = exports.ResetPasswordRequest = exports.RecoverRequest = exports.RefreshTokenResponse = exports.AuthResponse = exports.RefreshRequest = exports.LogoutRequest = exports.RegisterCredentials = exports.LoginCredentials = exports.AuthProtobufPackage = exports.UserService = exports.EmailVerificationStatusResponse = exports.GetEmailVerificationStatusRequest = exports.ResetPasswordData = exports.UpdateEmailVerificationRequest = exports.UpdatePasswordRequest = exports.UpdateUserPersonal = exports.FindByPhoneRequest = exports.FindByEmailRequest = exports.UsersResponse = exports.UserResponse = exports.FindOneRequest = exports.UpdateUserRequest = exports.CreateUserPersonal = exports.CreateUserRequest = exports.User = exports.UserProtobufPackage = exports.BillingClient = exports.ResponseClient = exports.RequestClient = exports.KeyClient = exports.EventClient = exports.StorageClient = exports.OpenAIClient = exports.EndpointClient = exports.AuthClient = exports.UsersClient = exports.SharedModule = void 0;
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.BillingService = exports.ProcessWebhookResponse = exports.ProcessWebhookRequest = void 0;
|
|
4
|
+
exports.KeyService = exports.GetSystemKeyRequest = exports.ValidateKeyResponse = exports.ValidateKeyRequest = exports.GetKeysByUserRequest = exports.KeysResponse = exports.KeyResponse = exports.GetKeyByIdRequest = exports.RemoveKeyRequest = exports.UpdateKeyRequest = exports.CreateKeyRequest = exports.Key = exports.KeysProtobufPackage = exports.EventService = exports.EventMessage = exports.SubscribeRequest = exports.EventProtobufPackage = exports.FileProtobufPackage = exports.StorageService = exports.DeleteResponse = exports.DeleteRequest = exports.DownloadResponse = exports.DownloadRequest = exports.UploadResponse = exports.UploadRequest = exports.OpenAIService = exports.OpenAICreateResponse = exports.OpenAICreateRequest = exports.OpenAIProtobufPackage = exports.EndpointService = exports.DeleteEndpointResponse = exports.ListEndpointsResponse = exports.GetEndpointByIdResponse = exports.UpdateEndpointResponse = exports.CreateEndpointResponse = exports.DeleteEndpointRequest = exports.ListEndpointsRequest = exports.GetEndpointByIdRequest = exports.UpdateEndpointRequest = exports.CreateEndpointRequest = exports.ValidateEndpointResponse = exports.ValidateEndpointRequest = exports.PricingResponse = exports.PricingRequest = exports.ModelsResponse = exports.ModelsRequest = exports.ProvidersResponse = exports.ProvidersRequest = exports.EndpointRequest = exports.EndpointConfig = void 0;
|
|
5
|
+
exports.GetPaymentsByUserRequest = exports.GetPaymentResponse = exports.GetPaymentRequest = exports.CreatePaymentResponse = exports.CreatePaymentRequest = exports.GetUsageByUserResponse = exports.GetUsageByUserRequest = exports.GetUsageByKeyResponse = exports.GetUsageByKeyRequest = exports.GetUsageStatsResponse = exports.GetUsageStatsRequest = exports.RecordUsageResponse = exports.RecordUsageRequest = exports.GetTransactionResponse = exports.GetTransactionRequest = exports.GetTransactionsResponse = exports.GetTransactionsRequest = exports.CreateTransactionResponse = exports.CreateTransactionRequest = exports.DepositResponse = exports.DepositRequest = exports.ChargeResponse = exports.ChargeRequest = exports.GetBalanceResponse = exports.GetBalanceRequest = exports.Payment = exports.UsageStats = exports.Usage = exports.Transaction = exports.Balance = exports.BillingProtobufPackage = exports.ResponseService = exports.StreamUpdate = exports.StreamUpdatesRequest = exports.ProcessResponseResponse = exports.ProcessResponseRequest = exports.ResponseProtobufPackage = exports.RequestService = exports.StreamChunk = exports.RequestLog = exports.StreamRequestRequest = exports.CancelRequestResponse = exports.CancelRequestRequest = exports.RequestResultResponse = exports.GetRequestResultRequest = exports.RequestStatusResponse = exports.GetRequestStatusRequest = exports.CreateRequestResponse = exports.CreateRequestRequest = exports.RequestProtobufPackage = void 0;
|
|
6
|
+
exports.BillingService = exports.ProcessWebhookResponse = exports.ProcessWebhookRequest = exports.GetPaymentsByUserResponse = void 0;
|
|
7
7
|
var shared_module_1 = require("./shared.module");
|
|
8
8
|
Object.defineProperty(exports, "SharedModule", { enumerable: true, get: function () { return shared_module_1.SharedModule; } });
|
|
9
9
|
var user_client_1 = require("./user.client");
|
|
@@ -142,6 +142,7 @@ Object.defineProperty(exports, "KeysResponse", { enumerable: true, get: function
|
|
|
142
142
|
Object.defineProperty(exports, "GetKeysByUserRequest", { enumerable: true, get: function () { return key_interface_1.GetKeysByUserRequest; } });
|
|
143
143
|
Object.defineProperty(exports, "ValidateKeyRequest", { enumerable: true, get: function () { return key_interface_1.ValidateKeyRequest; } });
|
|
144
144
|
Object.defineProperty(exports, "ValidateKeyResponse", { enumerable: true, get: function () { return key_interface_1.ValidateKeyResponse; } });
|
|
145
|
+
Object.defineProperty(exports, "GetSystemKeyRequest", { enumerable: true, get: function () { return key_interface_1.GetSystemKeyRequest; } });
|
|
145
146
|
Object.defineProperty(exports, "KeyService", { enumerable: true, get: function () { return key_interface_1.KeyServiceService; } });
|
|
146
147
|
// ============================
|
|
147
148
|
// Request exports
|
package/dist/key.interface.d.ts
CHANGED
|
@@ -12,10 +12,14 @@ export interface Key {
|
|
|
12
12
|
userId: string;
|
|
13
13
|
createdAt: string;
|
|
14
14
|
updatedAt: string;
|
|
15
|
+
/** Indicates if this is a system key */
|
|
16
|
+
isSystem: boolean;
|
|
15
17
|
}
|
|
16
18
|
export interface CreateKeyRequest {
|
|
17
19
|
name: string;
|
|
18
20
|
userId: string;
|
|
21
|
+
/** Indicates if this is a system key */
|
|
22
|
+
isSystem: boolean;
|
|
19
23
|
}
|
|
20
24
|
export interface UpdateKeyRequest {
|
|
21
25
|
uuid: string;
|
|
@@ -27,6 +31,9 @@ export interface GetKeyByIdRequest {
|
|
|
27
31
|
export interface GetKeysByUserRequest {
|
|
28
32
|
userId: string;
|
|
29
33
|
}
|
|
34
|
+
export interface GetSystemKeyRequest {
|
|
35
|
+
userId: string;
|
|
36
|
+
}
|
|
30
37
|
export interface RemoveKeyRequest {
|
|
31
38
|
uuid: string;
|
|
32
39
|
}
|
|
@@ -49,6 +56,7 @@ export declare const CreateKeyRequest: MessageFns<CreateKeyRequest>;
|
|
|
49
56
|
export declare const UpdateKeyRequest: MessageFns<UpdateKeyRequest>;
|
|
50
57
|
export declare const GetKeyByIdRequest: MessageFns<GetKeyByIdRequest>;
|
|
51
58
|
export declare const GetKeysByUserRequest: MessageFns<GetKeysByUserRequest>;
|
|
59
|
+
export declare const GetSystemKeyRequest: MessageFns<GetSystemKeyRequest>;
|
|
52
60
|
export declare const RemoveKeyRequest: MessageFns<RemoveKeyRequest>;
|
|
53
61
|
export declare const ValidateKeyRequest: MessageFns<ValidateKeyRequest>;
|
|
54
62
|
export declare const KeyResponse: MessageFns<KeyResponse>;
|
|
@@ -58,6 +66,7 @@ export interface KeyServiceClient {
|
|
|
58
66
|
create(request: CreateKeyRequest, metadata?: Metadata): Observable<KeyResponse>;
|
|
59
67
|
findOne(request: GetKeyByIdRequest, metadata?: Metadata): Observable<KeyResponse>;
|
|
60
68
|
findByUser(request: GetKeysByUserRequest, metadata?: Metadata): Observable<KeysResponse>;
|
|
69
|
+
getSystemKey(request: GetSystemKeyRequest, metadata?: Metadata): Observable<KeyResponse>;
|
|
61
70
|
findAll(request: Empty, metadata?: Metadata): Observable<KeysResponse>;
|
|
62
71
|
update(request: UpdateKeyRequest, metadata?: Metadata): Observable<KeyResponse>;
|
|
63
72
|
remove(request: RemoveKeyRequest, metadata?: Metadata): Observable<Empty>;
|
|
@@ -67,6 +76,7 @@ export interface KeyServiceController {
|
|
|
67
76
|
create(request: CreateKeyRequest, metadata?: Metadata): Promise<KeyResponse> | Observable<KeyResponse> | KeyResponse;
|
|
68
77
|
findOne(request: GetKeyByIdRequest, metadata?: Metadata): Promise<KeyResponse> | Observable<KeyResponse> | KeyResponse;
|
|
69
78
|
findByUser(request: GetKeysByUserRequest, metadata?: Metadata): Promise<KeysResponse> | Observable<KeysResponse> | KeysResponse;
|
|
79
|
+
getSystemKey(request: GetSystemKeyRequest, metadata?: Metadata): Promise<KeyResponse> | Observable<KeyResponse> | KeyResponse;
|
|
70
80
|
findAll(request: Empty, metadata?: Metadata): Promise<KeysResponse> | Observable<KeysResponse> | KeysResponse;
|
|
71
81
|
update(request: UpdateKeyRequest, metadata?: Metadata): Promise<KeyResponse> | Observable<KeyResponse> | KeyResponse;
|
|
72
82
|
remove(request: RemoveKeyRequest, metadata?: Metadata): void;
|
|
@@ -103,6 +113,15 @@ export declare const KeyServiceService: {
|
|
|
103
113
|
readonly responseSerialize: (value: KeysResponse) => Buffer;
|
|
104
114
|
readonly responseDeserialize: (value: Buffer) => KeysResponse;
|
|
105
115
|
};
|
|
116
|
+
readonly getSystemKey: {
|
|
117
|
+
readonly path: "/key.KeyService/getSystemKey";
|
|
118
|
+
readonly requestStream: false;
|
|
119
|
+
readonly responseStream: false;
|
|
120
|
+
readonly requestSerialize: (value: GetSystemKeyRequest) => Buffer;
|
|
121
|
+
readonly requestDeserialize: (value: Buffer) => GetSystemKeyRequest;
|
|
122
|
+
readonly responseSerialize: (value: KeyResponse) => Buffer;
|
|
123
|
+
readonly responseDeserialize: (value: Buffer) => KeyResponse;
|
|
124
|
+
};
|
|
106
125
|
readonly findAll: {
|
|
107
126
|
readonly path: "/key.KeyService/findAll";
|
|
108
127
|
readonly requestStream: false;
|
|
@@ -144,6 +163,7 @@ export interface KeyServiceServer extends UntypedServiceImplementation {
|
|
|
144
163
|
create: handleUnaryCall<CreateKeyRequest, KeyResponse>;
|
|
145
164
|
findOne: handleUnaryCall<GetKeyByIdRequest, KeyResponse>;
|
|
146
165
|
findByUser: handleUnaryCall<GetKeysByUserRequest, KeysResponse>;
|
|
166
|
+
getSystemKey: handleUnaryCall<GetSystemKeyRequest, KeyResponse>;
|
|
147
167
|
findAll: handleUnaryCall<Empty, KeysResponse>;
|
|
148
168
|
update: handleUnaryCall<UpdateKeyRequest, KeyResponse>;
|
|
149
169
|
remove: handleUnaryCall<RemoveKeyRequest, Empty>;
|
package/dist/key.interface.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v5.28.2
|
|
6
6
|
// source: key.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.KeyServiceService = exports.KEY_SERVICE_NAME = exports.ValidateKeyResponse = exports.KeysResponse = exports.KeyResponse = exports.ValidateKeyRequest = exports.RemoveKeyRequest = exports.GetKeysByUserRequest = exports.GetKeyByIdRequest = exports.UpdateKeyRequest = exports.CreateKeyRequest = exports.Key = exports.KEY_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
8
|
+
exports.KeyServiceService = exports.KEY_SERVICE_NAME = exports.ValidateKeyResponse = exports.KeysResponse = exports.KeyResponse = exports.ValidateKeyRequest = exports.RemoveKeyRequest = exports.GetSystemKeyRequest = exports.GetKeysByUserRequest = exports.GetKeyByIdRequest = exports.UpdateKeyRequest = exports.CreateKeyRequest = exports.Key = exports.KEY_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
9
|
exports.KeyServiceControllerMethods = KeyServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
@@ -14,7 +14,7 @@ const empty_interface_1 = require("./google/protobuf/empty.interface");
|
|
|
14
14
|
exports.protobufPackage = "key";
|
|
15
15
|
exports.KEY_PACKAGE_NAME = "key";
|
|
16
16
|
function createBaseKey() {
|
|
17
|
-
return { uuid: "", name: "", secret: "", lastUsed: "", userId: "", createdAt: "", updatedAt: "" };
|
|
17
|
+
return { uuid: "", name: "", secret: "", lastUsed: "", userId: "", createdAt: "", updatedAt: "", isSystem: false };
|
|
18
18
|
}
|
|
19
19
|
exports.Key = {
|
|
20
20
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -39,6 +39,9 @@ exports.Key = {
|
|
|
39
39
|
if (message.updatedAt !== "") {
|
|
40
40
|
writer.uint32(58).string(message.updatedAt);
|
|
41
41
|
}
|
|
42
|
+
if (message.isSystem !== false) {
|
|
43
|
+
writer.uint32(64).bool(message.isSystem);
|
|
44
|
+
}
|
|
42
45
|
return writer;
|
|
43
46
|
},
|
|
44
47
|
decode(input, length) {
|
|
@@ -97,6 +100,13 @@ exports.Key = {
|
|
|
97
100
|
message.updatedAt = reader.string();
|
|
98
101
|
continue;
|
|
99
102
|
}
|
|
103
|
+
case 8: {
|
|
104
|
+
if (tag !== 64) {
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
message.isSystem = reader.bool();
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
100
110
|
}
|
|
101
111
|
if ((tag & 7) === 4 || tag === 0) {
|
|
102
112
|
break;
|
|
@@ -107,7 +117,7 @@ exports.Key = {
|
|
|
107
117
|
},
|
|
108
118
|
};
|
|
109
119
|
function createBaseCreateKeyRequest() {
|
|
110
|
-
return { name: "", userId: "" };
|
|
120
|
+
return { name: "", userId: "", isSystem: false };
|
|
111
121
|
}
|
|
112
122
|
exports.CreateKeyRequest = {
|
|
113
123
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -117,6 +127,9 @@ exports.CreateKeyRequest = {
|
|
|
117
127
|
if (message.userId !== "") {
|
|
118
128
|
writer.uint32(18).string(message.userId);
|
|
119
129
|
}
|
|
130
|
+
if (message.isSystem !== false) {
|
|
131
|
+
writer.uint32(24).bool(message.isSystem);
|
|
132
|
+
}
|
|
120
133
|
return writer;
|
|
121
134
|
},
|
|
122
135
|
decode(input, length) {
|
|
@@ -140,6 +153,13 @@ exports.CreateKeyRequest = {
|
|
|
140
153
|
message.userId = reader.string();
|
|
141
154
|
continue;
|
|
142
155
|
}
|
|
156
|
+
case 3: {
|
|
157
|
+
if (tag !== 24) {
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
message.isSystem = reader.bool();
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
143
163
|
}
|
|
144
164
|
if ((tag & 7) === 4 || tag === 0) {
|
|
145
165
|
break;
|
|
@@ -258,6 +278,39 @@ exports.GetKeysByUserRequest = {
|
|
|
258
278
|
return message;
|
|
259
279
|
},
|
|
260
280
|
};
|
|
281
|
+
function createBaseGetSystemKeyRequest() {
|
|
282
|
+
return { userId: "" };
|
|
283
|
+
}
|
|
284
|
+
exports.GetSystemKeyRequest = {
|
|
285
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
286
|
+
if (message.userId !== "") {
|
|
287
|
+
writer.uint32(10).string(message.userId);
|
|
288
|
+
}
|
|
289
|
+
return writer;
|
|
290
|
+
},
|
|
291
|
+
decode(input, length) {
|
|
292
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
293
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
294
|
+
const message = createBaseGetSystemKeyRequest();
|
|
295
|
+
while (reader.pos < end) {
|
|
296
|
+
const tag = reader.uint32();
|
|
297
|
+
switch (tag >>> 3) {
|
|
298
|
+
case 1: {
|
|
299
|
+
if (tag !== 10) {
|
|
300
|
+
break;
|
|
301
|
+
}
|
|
302
|
+
message.userId = reader.string();
|
|
303
|
+
continue;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
307
|
+
break;
|
|
308
|
+
}
|
|
309
|
+
reader.skip(tag & 7);
|
|
310
|
+
}
|
|
311
|
+
return message;
|
|
312
|
+
},
|
|
313
|
+
};
|
|
261
314
|
function createBaseRemoveKeyRequest() {
|
|
262
315
|
return { uuid: "" };
|
|
263
316
|
}
|
|
@@ -435,7 +488,16 @@ exports.ValidateKeyResponse = {
|
|
|
435
488
|
};
|
|
436
489
|
function KeyServiceControllerMethods() {
|
|
437
490
|
return function (constructor) {
|
|
438
|
-
const grpcMethods = [
|
|
491
|
+
const grpcMethods = [
|
|
492
|
+
"create",
|
|
493
|
+
"findOne",
|
|
494
|
+
"findByUser",
|
|
495
|
+
"getSystemKey",
|
|
496
|
+
"findAll",
|
|
497
|
+
"update",
|
|
498
|
+
"remove",
|
|
499
|
+
"validateKey",
|
|
500
|
+
];
|
|
439
501
|
for (const method of grpcMethods) {
|
|
440
502
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
441
503
|
(0, microservices_1.GrpcMethod)("KeyService", method)(constructor.prototype[method], method, descriptor);
|
|
@@ -476,6 +538,15 @@ exports.KeyServiceService = {
|
|
|
476
538
|
responseSerialize: (value) => Buffer.from(exports.KeysResponse.encode(value).finish()),
|
|
477
539
|
responseDeserialize: (value) => exports.KeysResponse.decode(value),
|
|
478
540
|
},
|
|
541
|
+
getSystemKey: {
|
|
542
|
+
path: "/key.KeyService/getSystemKey",
|
|
543
|
+
requestStream: false,
|
|
544
|
+
responseStream: false,
|
|
545
|
+
requestSerialize: (value) => Buffer.from(exports.GetSystemKeyRequest.encode(value).finish()),
|
|
546
|
+
requestDeserialize: (value) => exports.GetSystemKeyRequest.decode(value),
|
|
547
|
+
responseSerialize: (value) => Buffer.from(exports.KeyResponse.encode(value).finish()),
|
|
548
|
+
responseDeserialize: (value) => exports.KeyResponse.decode(value),
|
|
549
|
+
},
|
|
479
550
|
findAll: {
|
|
480
551
|
path: "/key.KeyService/findAll",
|
|
481
552
|
requestStream: false,
|