geniebox-shared-lib 2.1.2 → 2.2.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/billing.client.d.ts +12 -0
- package/dist/billing.client.js +43 -0
- package/dist/billing.interface.d.ts +434 -0
- package/dist/billing.interface.js +2088 -0
- package/dist/endpoint.client.d.ts +12 -0
- package/dist/endpoint.client.js +43 -0
- package/dist/endpoint.interface.d.ts +338 -0
- package/dist/endpoint.interface.js +1609 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +72 -23
- package/dist/shared.module.d.ts +5 -1
- package/dist/shared.module.js +44 -13
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
export { SharedModule } from "./shared.module";
|
|
2
2
|
export { UsersClient } from "./user.client";
|
|
3
3
|
export { AuthClient } from "./auth.client";
|
|
4
|
-
export {
|
|
4
|
+
export { EndpointClient } from "./endpoint.client";
|
|
5
5
|
export { OpenAIClient } from "./openai.client";
|
|
6
6
|
export { StorageClient } from "./storage.client";
|
|
7
7
|
export { EventClient } from "./event.client";
|
|
8
8
|
export { KeyClient } from "./key.client";
|
|
9
9
|
export { RequestClient } from "./request.client";
|
|
10
10
|
export { ResponseClient } from "./response.client";
|
|
11
|
+
export { BillingClient } from "./billing.client";
|
|
11
12
|
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";
|
|
12
13
|
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";
|
|
13
|
-
export { MessageFns as
|
|
14
|
+
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";
|
|
14
15
|
export { MessageFns as OpenAIMessageFns, protobufPackage as OpenAIProtobufPackage, CreateRequest as OpenAICreateRequest, CreateResponse as OpenAICreateResponse, OpenAIServiceService as OpenAIService, } from "./openai.interface";
|
|
15
16
|
export { UploadRequest, UploadResponse, DownloadRequest, DownloadResponse, DeleteRequest, DeleteResponse, StorageServiceService as StorageService, protobufPackage as FileProtobufPackage, } from "./storage.interface";
|
|
16
17
|
export { MessageFns as EventMessageFns, protobufPackage as EventProtobufPackage, SubscribeRequest, EventMessage, EventServiceService as EventService, } from "./event.interface";
|
|
17
18
|
export { MessageFns as KeysMessageFns, protobufPackage as KeysProtobufPackage, Key, CreateKeyRequest, UpdateKeyRequest, RemoveKeyRequest, GetKeyByIdRequest, KeyResponse, KeysResponse, GetKeysByUserRequest, KeyServiceService as KeyService, } from "./key.interface";
|
|
18
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";
|
|
19
20
|
export { MessageFns as ResponseMessageFns, protobufPackage as ResponseProtobufPackage, ProcessResponseRequest, ProcessResponseResponse, StreamUpdatesRequest, StreamUpdate, ResponseServiceService as ResponseService, } from "./response.interface";
|
|
21
|
+
export { MessageFns as BillingMessageFns, protobufPackage as BillingProtobufPackage, 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,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.ResponseService = exports.StreamUpdate = exports.StreamUpdatesRequest = void 0;
|
|
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.CreateRequestResponse = exports.CreateRequestRequest = exports.RequestProtobufPackage = exports.KeyService = 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.BillingService = exports.ProcessWebhookResponse = exports.ProcessWebhookRequest = 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.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 = void 0;
|
|
6
6
|
var shared_module_1 = require("./shared.module");
|
|
7
7
|
Object.defineProperty(exports, "SharedModule", { enumerable: true, get: function () { return shared_module_1.SharedModule; } });
|
|
8
8
|
var user_client_1 = require("./user.client");
|
|
9
9
|
Object.defineProperty(exports, "UsersClient", { enumerable: true, get: function () { return user_client_1.UsersClient; } });
|
|
10
10
|
var auth_client_1 = require("./auth.client");
|
|
11
11
|
Object.defineProperty(exports, "AuthClient", { enumerable: true, get: function () { return auth_client_1.AuthClient; } });
|
|
12
|
-
var
|
|
13
|
-
Object.defineProperty(exports, "
|
|
12
|
+
var endpoint_client_1 = require("./endpoint.client");
|
|
13
|
+
Object.defineProperty(exports, "EndpointClient", { enumerable: true, get: function () { return endpoint_client_1.EndpointClient; } });
|
|
14
14
|
var openai_client_1 = require("./openai.client");
|
|
15
15
|
Object.defineProperty(exports, "OpenAIClient", { enumerable: true, get: function () { return openai_client_1.OpenAIClient; } });
|
|
16
16
|
var storage_client_1 = require("./storage.client");
|
|
@@ -23,6 +23,8 @@ var request_client_1 = require("./request.client");
|
|
|
23
23
|
Object.defineProperty(exports, "RequestClient", { enumerable: true, get: function () { return request_client_1.RequestClient; } });
|
|
24
24
|
var response_client_1 = require("./response.client");
|
|
25
25
|
Object.defineProperty(exports, "ResponseClient", { enumerable: true, get: function () { return response_client_1.ResponseClient; } });
|
|
26
|
+
var billing_client_1 = require("./billing.client");
|
|
27
|
+
Object.defineProperty(exports, "BillingClient", { enumerable: true, get: function () { return billing_client_1.BillingClient; } });
|
|
26
28
|
// ============================
|
|
27
29
|
// User exports
|
|
28
30
|
// ============================
|
|
@@ -65,24 +67,37 @@ Object.defineProperty(exports, "CheckEmailVerifiedResponse", { enumerable: true,
|
|
|
65
67
|
Object.defineProperty(exports, "ResendConfirmationCodeRequest", { enumerable: true, get: function () { return auth_interface_1.ResendConfirmationCodeRequest; } });
|
|
66
68
|
Object.defineProperty(exports, "VerifyResetCodeRequest", { enumerable: true, get: function () { return auth_interface_1.VerifyResetCodeRequest; } });
|
|
67
69
|
// ============================
|
|
68
|
-
//
|
|
69
|
-
// ============================
|
|
70
|
-
var
|
|
71
|
-
Object.defineProperty(exports, "
|
|
72
|
-
Object.defineProperty(exports, "
|
|
73
|
-
Object.defineProperty(exports, "
|
|
74
|
-
Object.defineProperty(exports, "
|
|
75
|
-
Object.defineProperty(exports, "
|
|
76
|
-
Object.defineProperty(exports, "
|
|
77
|
-
Object.defineProperty(exports, "
|
|
78
|
-
Object.defineProperty(exports, "
|
|
79
|
-
Object.defineProperty(exports, "
|
|
80
|
-
Object.defineProperty(exports, "
|
|
81
|
-
Object.defineProperty(exports, "
|
|
82
|
-
Object.defineProperty(exports, "
|
|
83
|
-
Object.defineProperty(exports, "
|
|
84
|
-
Object.defineProperty(exports, "
|
|
85
|
-
Object.defineProperty(exports, "
|
|
70
|
+
// Endpoint exports
|
|
71
|
+
// ============================
|
|
72
|
+
var endpoint_interface_1 = require("./endpoint.interface");
|
|
73
|
+
Object.defineProperty(exports, "EndpointProtobufPackage", { enumerable: true, get: function () { return endpoint_interface_1.protobufPackage; } });
|
|
74
|
+
Object.defineProperty(exports, "ENDPOINT_PACKAGE_NAME", { enumerable: true, get: function () { return endpoint_interface_1.ENDPOINT_PACKAGE_NAME; } });
|
|
75
|
+
Object.defineProperty(exports, "ENDPOINT_SERVICE_NAME", { enumerable: true, get: function () { return endpoint_interface_1.ENDPOINT_SERVICE_NAME; } });
|
|
76
|
+
Object.defineProperty(exports, "EndpointProvider", { enumerable: true, get: function () { return endpoint_interface_1.Provider; } });
|
|
77
|
+
Object.defineProperty(exports, "EndpointModel", { enumerable: true, get: function () { return endpoint_interface_1.Model; } });
|
|
78
|
+
Object.defineProperty(exports, "EndpointPricing", { enumerable: true, get: function () { return endpoint_interface_1.Pricing; } });
|
|
79
|
+
Object.defineProperty(exports, "EndpointConfig", { enumerable: true, get: function () { return endpoint_interface_1.EndpointConfig; } });
|
|
80
|
+
Object.defineProperty(exports, "EndpointRequest", { enumerable: true, get: function () { return endpoint_interface_1.EndpointRequest; } });
|
|
81
|
+
Object.defineProperty(exports, "ProvidersRequest", { enumerable: true, get: function () { return endpoint_interface_1.ProvidersRequest; } });
|
|
82
|
+
Object.defineProperty(exports, "ProvidersResponse", { enumerable: true, get: function () { return endpoint_interface_1.ProvidersResponse; } });
|
|
83
|
+
Object.defineProperty(exports, "ModelsRequest", { enumerable: true, get: function () { return endpoint_interface_1.ModelsRequest; } });
|
|
84
|
+
Object.defineProperty(exports, "ModelsResponse", { enumerable: true, get: function () { return endpoint_interface_1.ModelsResponse; } });
|
|
85
|
+
Object.defineProperty(exports, "PricingRequest", { enumerable: true, get: function () { return endpoint_interface_1.PricingRequest; } });
|
|
86
|
+
Object.defineProperty(exports, "PricingResponse", { enumerable: true, get: function () { return endpoint_interface_1.PricingResponse; } });
|
|
87
|
+
Object.defineProperty(exports, "ValidateEndpointRequest", { enumerable: true, get: function () { return endpoint_interface_1.ValidateEndpointRequest; } });
|
|
88
|
+
Object.defineProperty(exports, "ValidateEndpointResponse", { enumerable: true, get: function () { return endpoint_interface_1.ValidateEndpointResponse; } });
|
|
89
|
+
// CRUD types
|
|
90
|
+
Object.defineProperty(exports, "CreateEndpointRequest", { enumerable: true, get: function () { return endpoint_interface_1.CreateEndpointRequest; } });
|
|
91
|
+
Object.defineProperty(exports, "UpdateEndpointRequest", { enumerable: true, get: function () { return endpoint_interface_1.UpdateEndpointRequest; } });
|
|
92
|
+
Object.defineProperty(exports, "GetEndpointByIdRequest", { enumerable: true, get: function () { return endpoint_interface_1.GetEndpointByIdRequest; } });
|
|
93
|
+
Object.defineProperty(exports, "ListEndpointsRequest", { enumerable: true, get: function () { return endpoint_interface_1.ListEndpointsRequest; } });
|
|
94
|
+
Object.defineProperty(exports, "DeleteEndpointRequest", { enumerable: true, get: function () { return endpoint_interface_1.DeleteEndpointRequest; } });
|
|
95
|
+
Object.defineProperty(exports, "CreateEndpointResponse", { enumerable: true, get: function () { return endpoint_interface_1.CreateEndpointResponse; } });
|
|
96
|
+
Object.defineProperty(exports, "UpdateEndpointResponse", { enumerable: true, get: function () { return endpoint_interface_1.UpdateEndpointResponse; } });
|
|
97
|
+
Object.defineProperty(exports, "GetEndpointByIdResponse", { enumerable: true, get: function () { return endpoint_interface_1.GetEndpointByIdResponse; } });
|
|
98
|
+
Object.defineProperty(exports, "ListEndpointsResponse", { enumerable: true, get: function () { return endpoint_interface_1.ListEndpointsResponse; } });
|
|
99
|
+
Object.defineProperty(exports, "DeleteEndpointResponse", { enumerable: true, get: function () { return endpoint_interface_1.DeleteEndpointResponse; } });
|
|
100
|
+
Object.defineProperty(exports, "EndpointService", { enumerable: true, get: function () { return endpoint_interface_1.EndpointServiceService; } });
|
|
86
101
|
// ============================
|
|
87
102
|
// OpenAI exports
|
|
88
103
|
// ============================
|
|
@@ -152,3 +167,37 @@ Object.defineProperty(exports, "ProcessResponseResponse", { enumerable: true, ge
|
|
|
152
167
|
Object.defineProperty(exports, "StreamUpdatesRequest", { enumerable: true, get: function () { return response_interface_1.StreamUpdatesRequest; } });
|
|
153
168
|
Object.defineProperty(exports, "StreamUpdate", { enumerable: true, get: function () { return response_interface_1.StreamUpdate; } });
|
|
154
169
|
Object.defineProperty(exports, "ResponseService", { enumerable: true, get: function () { return response_interface_1.ResponseServiceService; } });
|
|
170
|
+
// ============================
|
|
171
|
+
// Billing exports
|
|
172
|
+
// ============================
|
|
173
|
+
var billing_interface_1 = require("./billing.interface");
|
|
174
|
+
Object.defineProperty(exports, "BillingProtobufPackage", { enumerable: true, get: function () { return billing_interface_1.protobufPackage; } });
|
|
175
|
+
Object.defineProperty(exports, "GetBalanceRequest", { enumerable: true, get: function () { return billing_interface_1.GetBalanceRequest; } });
|
|
176
|
+
Object.defineProperty(exports, "GetBalanceResponse", { enumerable: true, get: function () { return billing_interface_1.GetBalanceResponse; } });
|
|
177
|
+
Object.defineProperty(exports, "ChargeRequest", { enumerable: true, get: function () { return billing_interface_1.ChargeRequest; } });
|
|
178
|
+
Object.defineProperty(exports, "ChargeResponse", { enumerable: true, get: function () { return billing_interface_1.ChargeResponse; } });
|
|
179
|
+
Object.defineProperty(exports, "DepositRequest", { enumerable: true, get: function () { return billing_interface_1.DepositRequest; } });
|
|
180
|
+
Object.defineProperty(exports, "DepositResponse", { enumerable: true, get: function () { return billing_interface_1.DepositResponse; } });
|
|
181
|
+
Object.defineProperty(exports, "CreateTransactionRequest", { enumerable: true, get: function () { return billing_interface_1.CreateTransactionRequest; } });
|
|
182
|
+
Object.defineProperty(exports, "CreateTransactionResponse", { enumerable: true, get: function () { return billing_interface_1.CreateTransactionResponse; } });
|
|
183
|
+
Object.defineProperty(exports, "GetTransactionsRequest", { enumerable: true, get: function () { return billing_interface_1.GetTransactionsRequest; } });
|
|
184
|
+
Object.defineProperty(exports, "GetTransactionsResponse", { enumerable: true, get: function () { return billing_interface_1.GetTransactionsResponse; } });
|
|
185
|
+
Object.defineProperty(exports, "GetTransactionRequest", { enumerable: true, get: function () { return billing_interface_1.GetTransactionRequest; } });
|
|
186
|
+
Object.defineProperty(exports, "GetTransactionResponse", { enumerable: true, get: function () { return billing_interface_1.GetTransactionResponse; } });
|
|
187
|
+
Object.defineProperty(exports, "RecordUsageRequest", { enumerable: true, get: function () { return billing_interface_1.RecordUsageRequest; } });
|
|
188
|
+
Object.defineProperty(exports, "RecordUsageResponse", { enumerable: true, get: function () { return billing_interface_1.RecordUsageResponse; } });
|
|
189
|
+
Object.defineProperty(exports, "GetUsageStatsRequest", { enumerable: true, get: function () { return billing_interface_1.GetUsageStatsRequest; } });
|
|
190
|
+
Object.defineProperty(exports, "GetUsageStatsResponse", { enumerable: true, get: function () { return billing_interface_1.GetUsageStatsResponse; } });
|
|
191
|
+
Object.defineProperty(exports, "GetUsageByKeyRequest", { enumerable: true, get: function () { return billing_interface_1.GetUsageByKeyRequest; } });
|
|
192
|
+
Object.defineProperty(exports, "GetUsageByKeyResponse", { enumerable: true, get: function () { return billing_interface_1.GetUsageByKeyResponse; } });
|
|
193
|
+
Object.defineProperty(exports, "GetUsageByUserRequest", { enumerable: true, get: function () { return billing_interface_1.GetUsageByUserRequest; } });
|
|
194
|
+
Object.defineProperty(exports, "GetUsageByUserResponse", { enumerable: true, get: function () { return billing_interface_1.GetUsageByUserResponse; } });
|
|
195
|
+
Object.defineProperty(exports, "CreatePaymentRequest", { enumerable: true, get: function () { return billing_interface_1.CreatePaymentRequest; } });
|
|
196
|
+
Object.defineProperty(exports, "CreatePaymentResponse", { enumerable: true, get: function () { return billing_interface_1.CreatePaymentResponse; } });
|
|
197
|
+
Object.defineProperty(exports, "GetPaymentRequest", { enumerable: true, get: function () { return billing_interface_1.GetPaymentRequest; } });
|
|
198
|
+
Object.defineProperty(exports, "GetPaymentResponse", { enumerable: true, get: function () { return billing_interface_1.GetPaymentResponse; } });
|
|
199
|
+
Object.defineProperty(exports, "GetPaymentsByUserRequest", { enumerable: true, get: function () { return billing_interface_1.GetPaymentsByUserRequest; } });
|
|
200
|
+
Object.defineProperty(exports, "GetPaymentsByUserResponse", { enumerable: true, get: function () { return billing_interface_1.GetPaymentsByUserResponse; } });
|
|
201
|
+
Object.defineProperty(exports, "ProcessWebhookRequest", { enumerable: true, get: function () { return billing_interface_1.ProcessWebhookRequest; } });
|
|
202
|
+
Object.defineProperty(exports, "ProcessWebhookResponse", { enumerable: true, get: function () { return billing_interface_1.ProcessWebhookResponse; } });
|
|
203
|
+
Object.defineProperty(exports, "BillingService", { enumerable: true, get: function () { return billing_interface_1.BillingServiceService; } });
|
package/dist/shared.module.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface SharedModuleOptions {
|
|
|
12
12
|
protoPath: string;
|
|
13
13
|
url: string;
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
endpoint?: {
|
|
16
16
|
protoPath: string;
|
|
17
17
|
url: string;
|
|
18
18
|
};
|
|
@@ -36,6 +36,10 @@ export interface SharedModuleOptions {
|
|
|
36
36
|
protoPath: string;
|
|
37
37
|
url: string;
|
|
38
38
|
};
|
|
39
|
+
billing?: {
|
|
40
|
+
protoPath: string;
|
|
41
|
+
url: string;
|
|
42
|
+
};
|
|
39
43
|
}
|
|
40
44
|
export declare class SharedModule {
|
|
41
45
|
private static readonly logger;
|
package/dist/shared.module.js
CHANGED
|
@@ -14,12 +14,13 @@ const path_1 = require("path");
|
|
|
14
14
|
const user_client_1 = require("./user.client");
|
|
15
15
|
const auth_client_1 = require("./auth.client");
|
|
16
16
|
const openai_client_1 = require("./openai.client");
|
|
17
|
-
const
|
|
17
|
+
const endpoint_client_1 = require("./endpoint.client");
|
|
18
18
|
const storage_client_1 = require("./storage.client");
|
|
19
19
|
const event_client_1 = require("./event.client");
|
|
20
20
|
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
|
+
const billing_client_1 = require("./billing.client");
|
|
23
24
|
let SharedModule = SharedModule_1 = class SharedModule {
|
|
24
25
|
static forRoot(options = {}) {
|
|
25
26
|
const clients = [];
|
|
@@ -84,35 +85,35 @@ let SharedModule = SharedModule_1 = class SharedModule {
|
|
|
84
85
|
else {
|
|
85
86
|
providers.push({ provide: auth_client_1.AuthClient, useValue: null });
|
|
86
87
|
}
|
|
87
|
-
//
|
|
88
|
-
if (options.
|
|
88
|
+
// ENDPOINT
|
|
89
|
+
if (options.endpoint) {
|
|
89
90
|
clients.push({
|
|
90
|
-
name: "
|
|
91
|
+
name: "ENDPOINT_PACKAGE",
|
|
91
92
|
transport: microservices_1.Transport.GRPC,
|
|
92
93
|
options: {
|
|
93
|
-
package: "
|
|
94
|
-
protoPath: (0, path_1.resolve)(process.cwd(), options.
|
|
95
|
-
url: options.
|
|
94
|
+
package: "endpoint",
|
|
95
|
+
protoPath: (0, path_1.resolve)(process.cwd(), options.endpoint.protoPath),
|
|
96
|
+
url: options.endpoint.url,
|
|
96
97
|
},
|
|
97
98
|
});
|
|
98
99
|
providers.push({
|
|
99
|
-
provide:
|
|
100
|
+
provide: endpoint_client_1.EndpointClient,
|
|
100
101
|
useFactory: (client) => {
|
|
101
|
-
const svc = new
|
|
102
|
+
const svc = new endpoint_client_1.EndpointClient(client);
|
|
102
103
|
try {
|
|
103
104
|
svc.onModuleInit();
|
|
104
|
-
SharedModule_1.logger.log("
|
|
105
|
+
SharedModule_1.logger.log("EndpointClient initialized successfully");
|
|
105
106
|
}
|
|
106
107
|
catch (err) {
|
|
107
|
-
SharedModule_1.logger.error("
|
|
108
|
+
SharedModule_1.logger.error("EndpointClient initialization failed", err);
|
|
108
109
|
}
|
|
109
110
|
return svc;
|
|
110
111
|
},
|
|
111
|
-
inject: ["
|
|
112
|
+
inject: ["ENDPOINT_PACKAGE"],
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
115
|
else {
|
|
115
|
-
providers.push({ provide:
|
|
116
|
+
providers.push({ provide: endpoint_client_1.EndpointClient, useValue: null });
|
|
116
117
|
}
|
|
117
118
|
// OPENAI
|
|
118
119
|
if (options.openai) {
|
|
@@ -294,6 +295,36 @@ let SharedModule = SharedModule_1 = class SharedModule {
|
|
|
294
295
|
else {
|
|
295
296
|
providers.push({ provide: response_client_1.ResponseClient, useValue: null });
|
|
296
297
|
}
|
|
298
|
+
// BILLING
|
|
299
|
+
if (options.billing) {
|
|
300
|
+
clients.push({
|
|
301
|
+
name: "BILLING_PACKAGE",
|
|
302
|
+
transport: microservices_1.Transport.GRPC,
|
|
303
|
+
options: {
|
|
304
|
+
package: "billing",
|
|
305
|
+
protoPath: (0, path_1.resolve)(process.cwd(), options.billing.protoPath),
|
|
306
|
+
url: options.billing.url,
|
|
307
|
+
},
|
|
308
|
+
});
|
|
309
|
+
providers.push({
|
|
310
|
+
provide: billing_client_1.BillingClient,
|
|
311
|
+
useFactory: (client) => {
|
|
312
|
+
const svc = new billing_client_1.BillingClient(client);
|
|
313
|
+
try {
|
|
314
|
+
svc.onModuleInit();
|
|
315
|
+
SharedModule_1.logger.log("BillingClient initialized successfully");
|
|
316
|
+
}
|
|
317
|
+
catch (err) {
|
|
318
|
+
SharedModule_1.logger.error("BillingClient initialization failed", err);
|
|
319
|
+
}
|
|
320
|
+
return svc;
|
|
321
|
+
},
|
|
322
|
+
inject: ["BILLING_PACKAGE"],
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
providers.push({ provide: billing_client_1.BillingClient, useValue: null });
|
|
327
|
+
}
|
|
297
328
|
return {
|
|
298
329
|
module: SharedModule_1,
|
|
299
330
|
imports: clients.length ? [microservices_1.ClientsModule.register(clients)] : [],
|