geniebox-shared-lib 2.2.5 → 2.3.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/index.d.ts CHANGED
@@ -9,13 +9,15 @@ export { KeyClient } from "./key.client";
9
9
  export { RequestClient } from "./request.client";
10
10
  export { ResponseClient } from "./response.client";
11
11
  export { BillingClient } from "./billing.client";
12
+ export { GenerationClient } from "./generation.client";
12
13
  export { MessageFns as UserMessageFns, protobufPackage as UserProtobufPackage, User, CreateUserRequest, CreateUserPersonal, UpdateUserRequest, FindOneRequest, UserResponse, UsersResponse, FindByEmailRequest, FindByPhoneRequest, UpdateUserPersonal, UpdatePasswordRequest, UpdateEmailVerificationRequest, ResetPasswordData, GetEmailVerificationStatusRequest, EmailVerificationStatusResponse, UserServiceService as UserService, } from "./user.interface";
13
14
  export { MessageFns as AuthMessageFns, protobufPackage as AuthProtobufPackage, LoginCredentials, RegisterCredentials, LogoutRequest, RefreshRequest, AuthResponse, RefreshTokenResponse, RecoverRequest, ResetPasswordRequest, ConfirmEmailRequest, ConfirmEmailByCodeRequest, ConfirmEmailResponse, CheckEmailVerifiedRequest, CheckEmailVerifiedResponse, ResendConfirmationCodeRequest, VerifyResetCodeRequest, } from "./auth.interface";
14
15
  export { MessageFns as EndpointMessageFns, protobufPackage as EndpointProtobufPackage, ENDPOINT_PACKAGE_NAME, ENDPOINT_SERVICE_NAME, Provider as EndpointProvider, Model as EndpointModel, Pricing as EndpointPricing, EndpointConfig, EndpointRequest, ProvidersRequest, ProvidersResponse, ModelsRequest, ModelsResponse, PricingRequest, PricingResponse, ValidateEndpointRequest, ValidateEndpointResponse, CreateEndpointRequest, UpdateEndpointRequest, GetEndpointByIdRequest, ListEndpointsRequest, DeleteEndpointRequest, CreateEndpointResponse, UpdateEndpointResponse, GetEndpointByIdResponse, ListEndpointsResponse, DeleteEndpointResponse, EndpointServiceClient, EndpointServiceController, EndpointServiceService as EndpointService, } from "./endpoint.interface";
15
16
  export { MessageFns as OpenAIMessageFns, protobufPackage as OpenAIProtobufPackage, CreateRequest as OpenAICreateRequest, CreateResponse as OpenAICreateResponse, OpenAIServiceService as OpenAIService, } from "./openai.interface";
16
17
  export { UploadRequest, UploadResponse, DownloadRequest, DownloadResponse, DeleteRequest, DeleteResponse, StorageServiceService as StorageService, protobufPackage as FileProtobufPackage, } from "./storage.interface";
17
18
  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";
19
+ 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
20
  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
21
  export { MessageFns as ResponseMessageFns, protobufPackage as ResponseProtobufPackage, ProcessResponseRequest, ProcessResponseResponse, StreamUpdatesRequest, StreamUpdate, ResponseServiceService as ResponseService, } from "./response.interface";
21
22
  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";
23
+ export { MessageFns as GenerationMessageFns, protobufPackage as GenerationProtobufPackage, Conversation, Message, MessageVersion, ConversationSettings, ImageGeneration, VideoGeneration, GetConversationsRequest, ConversationsResponse, CreateConversationRequest, GetConversationRequest, ConversationResponse, UpdateConversationRequest, DeleteConversationRequest, GetMessagesRequest, MessagesResponse, CreateMessageRequest, MessageResponse, RegenerateMessageRequest, GetMessageVersionsRequest, SelectMessageVersionRequest, MessageVersionsResponse, GetSettingsRequest, UpdateSettingsRequest, SettingsResponse, GetImageGenerationsRequest, GenerateImageRequest, GetImageGenerationRequest, ImageGenerationsResponse, ImageGenerationResponse, GetVideoGenerationsRequest, GenerateVideoRequest, GetVideoGenerationRequest, VideoGenerationsResponse, VideoGenerationResponse, } from "./generation.interface";
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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.RequestProtobufPackage = exports.KeyService = 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.GetPaymentsByUserResponse = 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 = void 0;
6
- exports.BillingService = exports.ProcessWebhookResponse = exports.ProcessWebhookRequest = void 0;
3
+ 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.GenerationClient = 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.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 = exports.EndpointPricing = void 0;
5
+ 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 = exports.KeyService = void 0;
6
+ exports.VideoGenerationResponse = exports.VideoGenerationsResponse = exports.GetVideoGenerationRequest = exports.GenerateVideoRequest = exports.GetVideoGenerationsRequest = exports.ImageGenerationResponse = exports.ImageGenerationsResponse = exports.GetImageGenerationRequest = exports.GenerateImageRequest = exports.GetImageGenerationsRequest = exports.SettingsResponse = exports.UpdateSettingsRequest = exports.GetSettingsRequest = exports.MessageVersionsResponse = exports.SelectMessageVersionRequest = exports.GetMessageVersionsRequest = exports.RegenerateMessageRequest = exports.MessageResponse = exports.CreateMessageRequest = exports.MessagesResponse = exports.GetMessagesRequest = exports.DeleteConversationRequest = exports.UpdateConversationRequest = exports.ConversationResponse = exports.GetConversationRequest = exports.CreateConversationRequest = exports.ConversationsResponse = exports.GetConversationsRequest = exports.VideoGeneration = exports.ImageGeneration = exports.ConversationSettings = exports.MessageVersion = exports.Message = exports.Conversation = exports.GenerationProtobufPackage = exports.BillingService = exports.ProcessWebhookResponse = exports.ProcessWebhookRequest = exports.GetPaymentsByUserResponse = exports.GetPaymentsByUserRequest = 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");
@@ -26,6 +26,8 @@ var response_client_1 = require("./response.client");
26
26
  Object.defineProperty(exports, "ResponseClient", { enumerable: true, get: function () { return response_client_1.ResponseClient; } });
27
27
  var billing_client_1 = require("./billing.client");
28
28
  Object.defineProperty(exports, "BillingClient", { enumerable: true, get: function () { return billing_client_1.BillingClient; } });
29
+ var generation_client_1 = require("./generation.client");
30
+ Object.defineProperty(exports, "GenerationClient", { enumerable: true, get: function () { return generation_client_1.GenerationClient; } });
29
31
  // ============================
30
32
  // User exports
31
33
  // ============================
@@ -142,6 +144,7 @@ Object.defineProperty(exports, "KeysResponse", { enumerable: true, get: function
142
144
  Object.defineProperty(exports, "GetKeysByUserRequest", { enumerable: true, get: function () { return key_interface_1.GetKeysByUserRequest; } });
143
145
  Object.defineProperty(exports, "ValidateKeyRequest", { enumerable: true, get: function () { return key_interface_1.ValidateKeyRequest; } });
144
146
  Object.defineProperty(exports, "ValidateKeyResponse", { enumerable: true, get: function () { return key_interface_1.ValidateKeyResponse; } });
147
+ Object.defineProperty(exports, "GetSystemKeyRequest", { enumerable: true, get: function () { return key_interface_1.GetSystemKeyRequest; } });
145
148
  Object.defineProperty(exports, "KeyService", { enumerable: true, get: function () { return key_interface_1.KeyServiceService; } });
146
149
  // ============================
147
150
  // Request exports
@@ -209,3 +212,42 @@ Object.defineProperty(exports, "GetPaymentsByUserResponse", { enumerable: true,
209
212
  Object.defineProperty(exports, "ProcessWebhookRequest", { enumerable: true, get: function () { return billing_interface_1.ProcessWebhookRequest; } });
210
213
  Object.defineProperty(exports, "ProcessWebhookResponse", { enumerable: true, get: function () { return billing_interface_1.ProcessWebhookResponse; } });
211
214
  Object.defineProperty(exports, "BillingService", { enumerable: true, get: function () { return billing_interface_1.BillingServiceService; } });
215
+ // ============================
216
+ // Generation exports
217
+ // ============================
218
+ var generation_interface_1 = require("./generation.interface");
219
+ Object.defineProperty(exports, "GenerationProtobufPackage", { enumerable: true, get: function () { return generation_interface_1.protobufPackage; } });
220
+ Object.defineProperty(exports, "Conversation", { enumerable: true, get: function () { return generation_interface_1.Conversation; } });
221
+ Object.defineProperty(exports, "Message", { enumerable: true, get: function () { return generation_interface_1.Message; } });
222
+ Object.defineProperty(exports, "MessageVersion", { enumerable: true, get: function () { return generation_interface_1.MessageVersion; } });
223
+ Object.defineProperty(exports, "ConversationSettings", { enumerable: true, get: function () { return generation_interface_1.ConversationSettings; } });
224
+ Object.defineProperty(exports, "ImageGeneration", { enumerable: true, get: function () { return generation_interface_1.ImageGeneration; } });
225
+ Object.defineProperty(exports, "VideoGeneration", { enumerable: true, get: function () { return generation_interface_1.VideoGeneration; } });
226
+ Object.defineProperty(exports, "GetConversationsRequest", { enumerable: true, get: function () { return generation_interface_1.GetConversationsRequest; } });
227
+ Object.defineProperty(exports, "ConversationsResponse", { enumerable: true, get: function () { return generation_interface_1.ConversationsResponse; } });
228
+ Object.defineProperty(exports, "CreateConversationRequest", { enumerable: true, get: function () { return generation_interface_1.CreateConversationRequest; } });
229
+ Object.defineProperty(exports, "GetConversationRequest", { enumerable: true, get: function () { return generation_interface_1.GetConversationRequest; } });
230
+ Object.defineProperty(exports, "ConversationResponse", { enumerable: true, get: function () { return generation_interface_1.ConversationResponse; } });
231
+ Object.defineProperty(exports, "UpdateConversationRequest", { enumerable: true, get: function () { return generation_interface_1.UpdateConversationRequest; } });
232
+ Object.defineProperty(exports, "DeleteConversationRequest", { enumerable: true, get: function () { return generation_interface_1.DeleteConversationRequest; } });
233
+ Object.defineProperty(exports, "GetMessagesRequest", { enumerable: true, get: function () { return generation_interface_1.GetMessagesRequest; } });
234
+ Object.defineProperty(exports, "MessagesResponse", { enumerable: true, get: function () { return generation_interface_1.MessagesResponse; } });
235
+ Object.defineProperty(exports, "CreateMessageRequest", { enumerable: true, get: function () { return generation_interface_1.CreateMessageRequest; } });
236
+ Object.defineProperty(exports, "MessageResponse", { enumerable: true, get: function () { return generation_interface_1.MessageResponse; } });
237
+ Object.defineProperty(exports, "RegenerateMessageRequest", { enumerable: true, get: function () { return generation_interface_1.RegenerateMessageRequest; } });
238
+ Object.defineProperty(exports, "GetMessageVersionsRequest", { enumerable: true, get: function () { return generation_interface_1.GetMessageVersionsRequest; } });
239
+ Object.defineProperty(exports, "SelectMessageVersionRequest", { enumerable: true, get: function () { return generation_interface_1.SelectMessageVersionRequest; } });
240
+ Object.defineProperty(exports, "MessageVersionsResponse", { enumerable: true, get: function () { return generation_interface_1.MessageVersionsResponse; } });
241
+ Object.defineProperty(exports, "GetSettingsRequest", { enumerable: true, get: function () { return generation_interface_1.GetSettingsRequest; } });
242
+ Object.defineProperty(exports, "UpdateSettingsRequest", { enumerable: true, get: function () { return generation_interface_1.UpdateSettingsRequest; } });
243
+ Object.defineProperty(exports, "SettingsResponse", { enumerable: true, get: function () { return generation_interface_1.SettingsResponse; } });
244
+ Object.defineProperty(exports, "GetImageGenerationsRequest", { enumerable: true, get: function () { return generation_interface_1.GetImageGenerationsRequest; } });
245
+ Object.defineProperty(exports, "GenerateImageRequest", { enumerable: true, get: function () { return generation_interface_1.GenerateImageRequest; } });
246
+ Object.defineProperty(exports, "GetImageGenerationRequest", { enumerable: true, get: function () { return generation_interface_1.GetImageGenerationRequest; } });
247
+ Object.defineProperty(exports, "ImageGenerationsResponse", { enumerable: true, get: function () { return generation_interface_1.ImageGenerationsResponse; } });
248
+ Object.defineProperty(exports, "ImageGenerationResponse", { enumerable: true, get: function () { return generation_interface_1.ImageGenerationResponse; } });
249
+ Object.defineProperty(exports, "GetVideoGenerationsRequest", { enumerable: true, get: function () { return generation_interface_1.GetVideoGenerationsRequest; } });
250
+ Object.defineProperty(exports, "GenerateVideoRequest", { enumerable: true, get: function () { return generation_interface_1.GenerateVideoRequest; } });
251
+ Object.defineProperty(exports, "GetVideoGenerationRequest", { enumerable: true, get: function () { return generation_interface_1.GetVideoGenerationRequest; } });
252
+ Object.defineProperty(exports, "VideoGenerationsResponse", { enumerable: true, get: function () { return generation_interface_1.VideoGenerationsResponse; } });
253
+ Object.defineProperty(exports, "VideoGenerationResponse", { enumerable: true, get: function () { return generation_interface_1.VideoGenerationResponse; } });
@@ -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>;
@@ -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 = ["create", "findOne", "findByUser", "findAll", "update", "remove", "validateKey"];
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,
@@ -40,6 +40,10 @@ export interface SharedModuleOptions {
40
40
  protoPath: string;
41
41
  url: string;
42
42
  };
43
+ generation?: {
44
+ protoPath: string;
45
+ url: string;
46
+ };
43
47
  }
44
48
  export declare class SharedModule {
45
49
  private static readonly logger;
@@ -21,6 +21,7 @@ const key_client_1 = require("./key.client");
21
21
  const request_client_1 = require("./request.client");
22
22
  const response_client_1 = require("./response.client");
23
23
  const billing_client_1 = require("./billing.client");
24
+ const generation_client_1 = require("./generation.client");
24
25
  let SharedModule = SharedModule_1 = class SharedModule {
25
26
  static forRoot(options = {}) {
26
27
  const clients = [];
@@ -325,6 +326,36 @@ let SharedModule = SharedModule_1 = class SharedModule {
325
326
  else {
326
327
  providers.push({ provide: billing_client_1.BillingClient, useValue: null });
327
328
  }
329
+ // GENERATION
330
+ if (options.generation) {
331
+ clients.push({
332
+ name: "GENERATION_PACKAGE",
333
+ transport: microservices_1.Transport.GRPC,
334
+ options: {
335
+ package: "generation",
336
+ protoPath: (0, path_1.resolve)(process.cwd(), options.generation.protoPath),
337
+ url: options.generation.url,
338
+ },
339
+ });
340
+ providers.push({
341
+ provide: generation_client_1.GenerationClient,
342
+ useFactory: (client) => {
343
+ const svc = new generation_client_1.GenerationClient(client);
344
+ try {
345
+ svc.onModuleInit();
346
+ SharedModule_1.logger.log("GenerationClient initialized successfully");
347
+ }
348
+ catch (err) {
349
+ SharedModule_1.logger.error("GenerationClient initialization failed", err);
350
+ }
351
+ return svc;
352
+ },
353
+ inject: ["GENERATION_PACKAGE"],
354
+ });
355
+ }
356
+ else {
357
+ providers.push({ provide: generation_client_1.GenerationClient, useValue: null });
358
+ }
328
359
  return {
329
360
  module: SharedModule_1,
330
361
  imports: clients.length ? [microservices_1.ClientsModule.register(clients)] : [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geniebox-shared-lib",
3
- "version": "2.2.5",
3
+ "version": "2.3.0",
4
4
  "description": "Shared NestJS library with gRPC clients",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",