@veruna/api-contracts 2.0.1 → 3.0.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.
Files changed (107) hide show
  1. package/build/controllers/analytics.controllers.d.ts +1 -0
  2. package/build/controllers/analytics.controllers.js +5 -0
  3. package/build/controllers/analytics.controllers.js.map +1 -0
  4. package/build/controllers/billing.controllers.d.ts +0 -2
  5. package/build/controllers/billing.controllers.js +1 -3
  6. package/build/controllers/billing.controllers.js.map +1 -1
  7. package/build/controllers/index.d.ts +3 -2
  8. package/build/controllers/index.js +4 -3
  9. package/build/controllers/index.js.map +1 -1
  10. package/build/controllers/wallet.controllers.d.ts +1 -0
  11. package/build/controllers/wallet.controllers.js +2 -1
  12. package/build/controllers/wallet.controllers.js.map +1 -1
  13. package/build/locales/validation.d.ts +7 -7
  14. package/build/locales/validation.js +7 -7
  15. package/build/rest-api.d.ts +7 -6
  16. package/build/rest-api.js +8 -7
  17. package/build/rest-api.js.map +1 -1
  18. package/build/routes/analytics.routes.d.ts +6 -0
  19. package/build/routes/analytics.routes.js +10 -0
  20. package/build/routes/analytics.routes.js.map +1 -0
  21. package/build/routes/billing.routes.d.ts +0 -8
  22. package/build/routes/billing.routes.js +1 -9
  23. package/build/routes/billing.routes.js.map +1 -1
  24. package/build/routes/index.d.ts +3 -2
  25. package/build/routes/index.js +4 -3
  26. package/build/routes/index.js.map +1 -1
  27. package/build/routes/wallet.routes.d.ts +3 -0
  28. package/build/routes/wallet.routes.js +4 -1
  29. package/build/routes/wallet.routes.js.map +1 -1
  30. package/build/tsconfig.tsbuildinfo +1 -1
  31. package/build/v1/analytics/analytics.errors.d.ts +5 -0
  32. package/build/v1/analytics/analytics.errors.js +14 -0
  33. package/build/v1/analytics/analytics.errors.js.map +1 -0
  34. package/build/v1/analytics/index.d.ts +5 -0
  35. package/build/v1/analytics/index.js +25 -0
  36. package/build/v1/analytics/index.js.map +1 -0
  37. package/build/v1/analytics/queries/index.d.ts +4 -0
  38. package/build/v1/analytics/queries/index.js +21 -0
  39. package/build/v1/analytics/queries/index.js.map +1 -0
  40. package/build/v1/analytics/queries/list-messages.query.d.ts +38 -0
  41. package/build/v1/analytics/queries/list-messages.query.js +14 -0
  42. package/build/v1/analytics/queries/list-messages.query.js.map +1 -0
  43. package/build/v1/analytics/queries/message-details.query.d.ts +40 -0
  44. package/build/v1/analytics/queries/message-details.query.js +17 -0
  45. package/build/v1/analytics/queries/message-details.query.js.map +1 -0
  46. package/build/v1/analytics/queries/requests-chart.query.d.ts +32 -0
  47. package/build/v1/analytics/queries/requests-chart.query.js +14 -0
  48. package/build/v1/analytics/queries/requests-chart.query.js.map +1 -0
  49. package/build/v1/analytics/queries/spend-chart.query.d.ts +32 -0
  50. package/build/v1/analytics/queries/spend-chart.query.js +14 -0
  51. package/build/v1/analytics/queries/spend-chart.query.js.map +1 -0
  52. package/build/v1/analytics/schemas/chart.schema.d.ts +57 -0
  53. package/build/v1/analytics/schemas/chart.schema.js +57 -0
  54. package/build/v1/analytics/schemas/chart.schema.js.map +1 -0
  55. package/build/v1/analytics/schemas/index.d.ts +2 -0
  56. package/build/v1/analytics/schemas/index.js +19 -0
  57. package/build/v1/analytics/schemas/index.js.map +1 -0
  58. package/build/v1/analytics/schemas/message.schema.d.ts +111 -0
  59. package/build/v1/analytics/schemas/message.schema.js +72 -0
  60. package/build/v1/analytics/schemas/message.schema.js.map +1 -0
  61. package/build/v1/billing/billing.errors.d.ts +1 -2
  62. package/build/v1/billing/billing.errors.js +0 -5
  63. package/build/v1/billing/billing.errors.js.map +1 -1
  64. package/build/v1/billing/index.d.ts +2 -2
  65. package/build/v1/billing/index.js +1 -3
  66. package/build/v1/billing/index.js.map +1 -1
  67. package/build/v1/billing/queries/index.d.ts +0 -3
  68. package/build/v1/billing/queries/index.js +0 -3
  69. package/build/v1/billing/queries/index.js.map +1 -1
  70. package/build/v1/billing/schemas/index.d.ts +0 -3
  71. package/build/v1/billing/schemas/index.js +0 -3
  72. package/build/v1/billing/schemas/index.js.map +1 -1
  73. package/build/v1/index.d.ts +1 -0
  74. package/build/v1/index.js +1 -0
  75. package/build/v1/index.js.map +1 -1
  76. package/build/v1/message/commands/create-message.command.d.ts +21 -0
  77. package/build/v1/message/queries/get-message-stream-reg.query.d.ts +19 -0
  78. package/build/v1/message/queries/get-message-stream-unreg.query.d.ts +19 -0
  79. package/build/v1/message/schemas/stream-events.schema.d.ts +42 -0
  80. package/build/v1/message/schemas/stream-events.schema.js +20 -1
  81. package/build/v1/message/schemas/stream-events.schema.js.map +1 -1
  82. package/build/v1/wallet/queries/get-balance-summary.query.d.ts +9 -0
  83. package/build/v1/wallet/schemas/balance-response.schema.d.ts +19 -0
  84. package/build/v1/wallet/schemas/balance-response.schema.js +11 -1
  85. package/build/v1/wallet/schemas/balance-response.schema.js.map +1 -1
  86. package/build/v1/wallet/schemas/index.d.ts +1 -1
  87. package/build/v1/wallet/schemas/index.js +2 -1
  88. package/build/v1/wallet/schemas/index.js.map +1 -1
  89. package/package.json +1 -1
  90. package/build/v1/billing/queries/get-billing-balance.query.d.ts +0 -23
  91. package/build/v1/billing/queries/get-billing-balance.query.js +0 -15
  92. package/build/v1/billing/queries/get-billing-balance.query.js.map +0 -1
  93. package/build/v1/billing/queries/get-message-billing-details.query.d.ts +0 -36
  94. package/build/v1/billing/queries/get-message-billing-details.query.js +0 -17
  95. package/build/v1/billing/queries/get-message-billing-details.query.js.map +0 -1
  96. package/build/v1/billing/queries/list-transactions.query.d.ts +0 -26
  97. package/build/v1/billing/queries/list-transactions.query.js +0 -14
  98. package/build/v1/billing/queries/list-transactions.query.js.map +0 -1
  99. package/build/v1/billing/schemas/billing-balance.schema.d.ts +0 -26
  100. package/build/v1/billing/schemas/billing-balance.schema.js +0 -21
  101. package/build/v1/billing/schemas/billing-balance.schema.js.map +0 -1
  102. package/build/v1/billing/schemas/billing-transactions.schema.d.ts +0 -34
  103. package/build/v1/billing/schemas/billing-transactions.schema.js +0 -34
  104. package/build/v1/billing/schemas/billing-transactions.schema.js.map +0 -1
  105. package/build/v1/billing/schemas/message-billing-details.schema.d.ts +0 -59
  106. package/build/v1/billing/schemas/message-billing-details.schema.js +0 -33
  107. package/build/v1/billing/schemas/message-billing-details.schema.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MAX_METADATA_KEYS = exports.MAX_NESTING_DEPTH = exports.MAX_METADATA_SIZE = exports.validateMetadata = exports.MetadataSchema = exports.BalanceSummaryResponseSchema = exports.BalanceItemResponseSchema = exports.InitiatorType = exports.SourceType = exports.isValidTransactionType = exports.TransactionType = exports.HoldStatus = exports.BalanceTypeCode = exports.BalanceStatus = void 0;
3
+ exports.MAX_METADATA_KEYS = exports.MAX_NESTING_DEPTH = exports.MAX_METADATA_SIZE = exports.validateMetadata = exports.MetadataSchema = exports.BalanceSummaryResponseSchema = exports.BalanceActiveHoldSchema = exports.BalanceItemResponseSchema = exports.InitiatorType = exports.SourceType = exports.isValidTransactionType = exports.TransactionType = exports.HoldStatus = exports.BalanceTypeCode = exports.BalanceStatus = void 0;
4
4
  var balance_status_enum_1 = require("./balance-status.enum");
5
5
  Object.defineProperty(exports, "BalanceStatus", { enumerable: true, get: function () { return balance_status_enum_1.BalanceStatus; } });
6
6
  var balance_type_code_enum_1 = require("./balance-type-code.enum");
@@ -16,6 +16,7 @@ var initiator_type_enum_1 = require("./initiator-type.enum");
16
16
  Object.defineProperty(exports, "InitiatorType", { enumerable: true, get: function () { return initiator_type_enum_1.InitiatorType; } });
17
17
  var balance_response_schema_1 = require("./balance-response.schema");
18
18
  Object.defineProperty(exports, "BalanceItemResponseSchema", { enumerable: true, get: function () { return balance_response_schema_1.BalanceItemResponseSchema; } });
19
+ Object.defineProperty(exports, "BalanceActiveHoldSchema", { enumerable: true, get: function () { return balance_response_schema_1.BalanceActiveHoldSchema; } });
19
20
  Object.defineProperty(exports, "BalanceSummaryResponseSchema", { enumerable: true, get: function () { return balance_response_schema_1.BalanceSummaryResponseSchema; } });
20
21
  var metadata_schema_1 = require("./metadata.schema");
21
22
  Object.defineProperty(exports, "MetadataSchema", { enumerable: true, get: function () { return metadata_schema_1.MetadataSchema; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/wallet/schemas/index.ts"],"names":[],"mappings":";;;AACA,6DAAsD;AAA7C,oHAAA,aAAa,OAAA;AACtB,mEAA2D;AAAlD,yHAAA,eAAe,OAAA;AACxB,uDAAgD;AAAvC,8GAAA,UAAU,OAAA;AACnB,iEAAkF;AAAzE,wHAAA,eAAe,OAAA;AAAE,+HAAA,sBAAsB,OAAA;AAChD,uDAAgD;AAAvC,8GAAA,UAAU,OAAA;AACnB,6DAAsD;AAA7C,oHAAA,aAAa,OAAA;AAGtB,qEAKmC;AAJ/B,oIAAA,yBAAyB,OAAA;AACzB,uIAAA,4BAA4B,OAAA;AAMhC,qDAO2B;AANvB,iHAAA,cAAc,OAAA;AACd,mHAAA,gBAAgB,OAAA;AAChB,oHAAA,iBAAiB,OAAA;AACjB,oHAAA,iBAAiB,OAAA;AACjB,oHAAA,iBAAiB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/wallet/schemas/index.ts"],"names":[],"mappings":";;;AACA,6DAAsD;AAA7C,oHAAA,aAAa,OAAA;AACtB,mEAA2D;AAAlD,yHAAA,eAAe,OAAA;AACxB,uDAAgD;AAAvC,8GAAA,UAAU,OAAA;AACnB,iEAAkF;AAAzE,wHAAA,eAAe,OAAA;AAAE,+HAAA,sBAAsB,OAAA;AAChD,uDAAgD;AAAvC,8GAAA,UAAU,OAAA;AACnB,6DAAsD;AAA7C,oHAAA,aAAa,OAAA;AAGtB,qEAOmC;AAN/B,oIAAA,yBAAyB,OAAA;AACzB,kIAAA,uBAAuB,OAAA;AACvB,uIAAA,4BAA4B,OAAA;AAOhC,qDAO2B;AANvB,iHAAA,cAAc,OAAA;AACd,mHAAA,gBAAgB,OAAA;AAChB,oHAAA,iBAAiB,OAAA;AACjB,oHAAA,iBAAiB,OAAA;AACjB,oHAAA,iBAAiB,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veruna/api-contracts",
3
- "version": "2.0.1",
3
+ "version": "3.0.0",
4
4
  "description": "API contracts for Veruna project - Zod schemas, types, and paths",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -1,23 +0,0 @@
1
- import { z } from 'zod';
2
- import { HttpMethod } from '../../../shared/http-method';
3
- export declare namespace GetBillingBalanceQuery {
4
- const Request: z.ZodObject<{}, z.core.$strip>;
5
- const Response: z.ZodObject<{
6
- total: z.ZodNumber;
7
- held: z.ZodNumber;
8
- available: z.ZodNumber;
9
- activeHolds: z.ZodArray<z.ZodObject<{
10
- holdId: z.ZodString;
11
- amount: z.ZodNumber;
12
- operationType: z.ZodString;
13
- operationId: z.ZodString;
14
- description: z.ZodNullable<z.ZodString>;
15
- createdAt: z.ZodString;
16
- expiresAt: z.ZodNullable<z.ZodString>;
17
- }, z.core.$strip>>;
18
- }, z.core.$strip>;
19
- const URL: "/api/v1/billing/balance";
20
- const METHOD = HttpMethod.GET;
21
- type RequestType = z.infer<typeof Request>;
22
- type ResponseType = z.infer<typeof Response>;
23
- }
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetBillingBalanceQuery = void 0;
4
- const zod_1 = require("zod");
5
- const schemas_1 = require("../schemas");
6
- const rest_api_1 = require("../../../rest-api");
7
- const http_method_1 = require("../../../shared/http-method");
8
- var GetBillingBalanceQuery;
9
- (function (GetBillingBalanceQuery) {
10
- GetBillingBalanceQuery.Request = zod_1.z.object({});
11
- GetBillingBalanceQuery.Response = schemas_1.BillingBalanceResponseSchema;
12
- GetBillingBalanceQuery.URL = rest_api_1.REST_API.V1.BILLING.BALANCE;
13
- GetBillingBalanceQuery.METHOD = http_method_1.HttpMethod.GET;
14
- })(GetBillingBalanceQuery || (exports.GetBillingBalanceQuery = GetBillingBalanceQuery = {}));
15
- //# sourceMappingURL=get-billing-balance.query.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-billing-balance.query.js","sourceRoot":"","sources":["../../../../v1/billing/queries/get-billing-balance.query.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAA0D;AAC1D,gDAA6C;AAC7C,6DAAyD;AAEzD,IAAiB,sBAAsB,CAStC;AATD,WAAiB,sBAAsB;IACtB,8BAAO,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvB,+BAAQ,GAAG,sCAA4B,CAAC;IAExC,0BAAG,GAAG,mBAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;IAClC,6BAAM,GAAG,wBAAU,CAAC,GAAG,CAAC;AAIzC,CAAC,EATgB,sBAAsB,sCAAtB,sBAAsB,QAStC"}
@@ -1,36 +0,0 @@
1
- import { z } from 'zod';
2
- import { HttpMethod } from '../../../shared/http-method';
3
- export declare namespace GetMessageBillingDetailsQuery {
4
- const Params: z.ZodObject<{
5
- messageId: z.ZodString;
6
- }, z.core.$strip>;
7
- const Response: z.ZodObject<{
8
- messageId: z.ZodString;
9
- totalChargedKopeks: z.ZodNumber;
10
- totalExternalKopeks: z.ZodNumber;
11
- holdId: z.ZodNullable<z.ZodString>;
12
- steps: z.ZodArray<z.ZodObject<{
13
- stepId: z.ZodString;
14
- type: z.ZodString;
15
- status: z.ZodString;
16
- externalPriceKopeks: z.ZodNullable<z.ZodNumber>;
17
- internalPriceKopeks: z.ZodNullable<z.ZodNumber>;
18
- snapshot: z.ZodNullable<z.ZodObject<{
19
- modelPriceKopeks: z.ZodNumber;
20
- appliedDeltas: z.ZodArray<z.ZodObject<{
21
- source: z.ZodString;
22
- value: z.ZodNumber;
23
- }, z.core.$strip>>;
24
- tierId: z.ZodNullable<z.ZodString>;
25
- tierPercent: z.ZodNumber;
26
- externalKopeks: z.ZodNumber;
27
- internalKopeks: z.ZodNumber;
28
- }, z.core.$strip>>;
29
- completedAt: z.ZodNullable<z.ZodString>;
30
- }, z.core.$strip>>;
31
- }, z.core.$strip>;
32
- const URL: (messageId: string) => string;
33
- const METHOD = HttpMethod.GET;
34
- type ParamsType = z.infer<typeof Params>;
35
- type ResponseType = z.infer<typeof Response>;
36
- }
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetMessageBillingDetailsQuery = void 0;
4
- const zod_1 = require("zod");
5
- const schemas_1 = require("../schemas");
6
- const rest_api_1 = require("../../../rest-api");
7
- const http_method_1 = require("../../../shared/http-method");
8
- var GetMessageBillingDetailsQuery;
9
- (function (GetMessageBillingDetailsQuery) {
10
- GetMessageBillingDetailsQuery.Params = zod_1.z.object({
11
- messageId: zod_1.z.string().uuid(),
12
- });
13
- GetMessageBillingDetailsQuery.Response = schemas_1.MessageBillingDetailsResponseSchema;
14
- GetMessageBillingDetailsQuery.URL = (messageId) => rest_api_1.REST_API.V1.BILLING.MESSAGE_DETAILS(messageId);
15
- GetMessageBillingDetailsQuery.METHOD = http_method_1.HttpMethod.GET;
16
- })(GetMessageBillingDetailsQuery || (exports.GetMessageBillingDetailsQuery = GetMessageBillingDetailsQuery = {}));
17
- //# sourceMappingURL=get-message-billing-details.query.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-message-billing-details.query.js","sourceRoot":"","sources":["../../../../v1/billing/queries/get-message-billing-details.query.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAAiE;AACjE,gDAA6C;AAC7C,6DAAyD;AAYzD,IAAiB,6BAA6B,CAW7C;AAXD,WAAiB,6BAA6B;IAC7B,oCAAM,GAAG,OAAC,CAAC,MAAM,CAAC;QAC3B,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;KAC/B,CAAC,CAAC;IACU,sCAAQ,GAAG,6CAAmC,CAAC;IAE/C,iCAAG,GAAG,CAAC,SAAiB,EAAE,EAAE,CAAC,mBAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;IAC5E,oCAAM,GAAG,wBAAU,CAAC,GAAG,CAAC;AAIzC,CAAC,EAXgB,6BAA6B,6CAA7B,6BAA6B,QAW7C"}
@@ -1,26 +0,0 @@
1
- import { z } from 'zod';
2
- import { HttpMethod } from '../../../shared/http-method';
3
- export declare namespace ListTransactionsQuery {
4
- const Request: z.ZodObject<{
5
- cursor: z.ZodOptional<z.ZodString>;
6
- limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
7
- }, z.core.$strip>;
8
- const Response: z.ZodObject<{
9
- items: z.ZodArray<z.ZodObject<{
10
- uuid: z.ZodString;
11
- type: z.ZodEnum<typeof import("../..").TransactionType>;
12
- amount: z.ZodNumber;
13
- balanceAfter: z.ZodNumber;
14
- correlationId: z.ZodString;
15
- reason: z.ZodString;
16
- description: z.ZodNullable<z.ZodString>;
17
- holdId: z.ZodNullable<z.ZodString>;
18
- createdAt: z.ZodString;
19
- }, z.core.$strip>>;
20
- nextCursor: z.ZodNullable<z.ZodString>;
21
- }, z.core.$strip>;
22
- const URL: "/api/v1/billing/transactions";
23
- const METHOD = HttpMethod.GET;
24
- type RequestType = z.infer<typeof Request>;
25
- type ResponseType = z.infer<typeof Response>;
26
- }
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ListTransactionsQuery = void 0;
4
- const schemas_1 = require("../schemas");
5
- const rest_api_1 = require("../../../rest-api");
6
- const http_method_1 = require("../../../shared/http-method");
7
- var ListTransactionsQuery;
8
- (function (ListTransactionsQuery) {
9
- ListTransactionsQuery.Request = schemas_1.ListTransactionsRequestSchema;
10
- ListTransactionsQuery.Response = schemas_1.ListTransactionsResponseSchema;
11
- ListTransactionsQuery.URL = rest_api_1.REST_API.V1.BILLING.TRANSACTIONS;
12
- ListTransactionsQuery.METHOD = http_method_1.HttpMethod.GET;
13
- })(ListTransactionsQuery || (exports.ListTransactionsQuery = ListTransactionsQuery = {}));
14
- //# sourceMappingURL=list-transactions.query.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-transactions.query.js","sourceRoot":"","sources":["../../../../v1/billing/queries/list-transactions.query.ts"],"names":[],"mappings":";;;AACA,wCAGoB;AACpB,gDAA6C;AAC7C,6DAAyD;AAEzD,IAAiB,qBAAqB,CASrC;AATD,WAAiB,qBAAqB;IACrB,6BAAO,GAAG,uCAA6B,CAAC;IACxC,8BAAQ,GAAG,wCAA8B,CAAC;IAE1C,yBAAG,GAAG,mBAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC;IACvC,4BAAM,GAAG,wBAAU,CAAC,GAAG,CAAC;AAIzC,CAAC,EATgB,qBAAqB,qCAArB,qBAAqB,QASrC"}
@@ -1,26 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const BillingActiveHoldSchema: z.ZodObject<{
3
- holdId: z.ZodString;
4
- amount: z.ZodNumber;
5
- operationType: z.ZodString;
6
- operationId: z.ZodString;
7
- description: z.ZodNullable<z.ZodString>;
8
- createdAt: z.ZodString;
9
- expiresAt: z.ZodNullable<z.ZodString>;
10
- }, z.core.$strip>;
11
- export type BillingActiveHold = z.infer<typeof BillingActiveHoldSchema>;
12
- export declare const BillingBalanceResponseSchema: z.ZodObject<{
13
- total: z.ZodNumber;
14
- held: z.ZodNumber;
15
- available: z.ZodNumber;
16
- activeHolds: z.ZodArray<z.ZodObject<{
17
- holdId: z.ZodString;
18
- amount: z.ZodNumber;
19
- operationType: z.ZodString;
20
- operationId: z.ZodString;
21
- description: z.ZodNullable<z.ZodString>;
22
- createdAt: z.ZodString;
23
- expiresAt: z.ZodNullable<z.ZodString>;
24
- }, z.core.$strip>>;
25
- }, z.core.$strip>;
26
- export type BillingBalanceResponse = z.infer<typeof BillingBalanceResponseSchema>;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BillingBalanceResponseSchema = exports.BillingActiveHoldSchema = void 0;
4
- const zod_1 = require("zod");
5
- const shared_1 = require("../../../shared");
6
- exports.BillingActiveHoldSchema = zod_1.z.object({
7
- holdId: zod_1.z.string().regex(shared_1.UUID_REGEX),
8
- amount: zod_1.z.number().int().nonnegative(),
9
- operationType: zod_1.z.string(),
10
- operationId: zod_1.z.string(),
11
- description: zod_1.z.string().nullable(),
12
- createdAt: zod_1.z.string().datetime({ offset: true }),
13
- expiresAt: zod_1.z.string().datetime({ offset: true }).nullable(),
14
- });
15
- exports.BillingBalanceResponseSchema = zod_1.z.object({
16
- total: zod_1.z.number().int().nonnegative(),
17
- held: zod_1.z.number().int().nonnegative(),
18
- available: zod_1.z.number().int().nonnegative(),
19
- activeHolds: zod_1.z.array(exports.BillingActiveHoldSchema),
20
- });
21
- //# sourceMappingURL=billing-balance.schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"billing-balance.schema.js","sourceRoot":"","sources":["../../../../v1/billing/schemas/billing-balance.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAA6C;AAKhC,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mBAAU,CAAC;IACpC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IACtC,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAChD,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC9D,CAAC,CAAC;AAWU,QAAA,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IACrC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IACpC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IACzC,WAAW,EAAE,OAAC,CAAC,KAAK,CAAC,+BAAuB,CAAC;CAChD,CAAC,CAAC"}
@@ -1,34 +0,0 @@
1
- import { z } from 'zod';
2
- import { TransactionType } from '../../wallet/schemas/transaction-type.enum';
3
- export declare const ListTransactionsRequestSchema: z.ZodObject<{
4
- cursor: z.ZodOptional<z.ZodString>;
5
- limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
6
- }, z.core.$strip>;
7
- export type ListTransactionsRequest = z.infer<typeof ListTransactionsRequestSchema>;
8
- export declare const BillingTransactionItemSchema: z.ZodObject<{
9
- uuid: z.ZodString;
10
- type: z.ZodEnum<typeof TransactionType>;
11
- amount: z.ZodNumber;
12
- balanceAfter: z.ZodNumber;
13
- correlationId: z.ZodString;
14
- reason: z.ZodString;
15
- description: z.ZodNullable<z.ZodString>;
16
- holdId: z.ZodNullable<z.ZodString>;
17
- createdAt: z.ZodString;
18
- }, z.core.$strip>;
19
- export type BillingTransactionItem = z.infer<typeof BillingTransactionItemSchema>;
20
- export declare const ListTransactionsResponseSchema: z.ZodObject<{
21
- items: z.ZodArray<z.ZodObject<{
22
- uuid: z.ZodString;
23
- type: z.ZodEnum<typeof TransactionType>;
24
- amount: z.ZodNumber;
25
- balanceAfter: z.ZodNumber;
26
- correlationId: z.ZodString;
27
- reason: z.ZodString;
28
- description: z.ZodNullable<z.ZodString>;
29
- holdId: z.ZodNullable<z.ZodString>;
30
- createdAt: z.ZodString;
31
- }, z.core.$strip>>;
32
- nextCursor: z.ZodNullable<z.ZodString>;
33
- }, z.core.$strip>;
34
- export type ListTransactionsResponse = z.infer<typeof ListTransactionsResponseSchema>;
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ListTransactionsResponseSchema = exports.BillingTransactionItemSchema = exports.ListTransactionsRequestSchema = void 0;
4
- const zod_1 = require("zod");
5
- const shared_1 = require("../../../shared");
6
- const transaction_type_enum_1 = require("../../wallet/schemas/transaction-type.enum");
7
- exports.ListTransactionsRequestSchema = zod_1.z.object({
8
- cursor: zod_1.z
9
- .string({ error: 'ListTransactionsRequest.cursor.invalid' })
10
- .datetime({ offset: true, message: 'ListTransactionsRequest.cursor.invalid' })
11
- .optional(),
12
- limit: zod_1.z.coerce
13
- .number({ error: 'ListTransactionsRequest.limit.invalid' })
14
- .int({ message: 'ListTransactionsRequest.limit.invalid' })
15
- .min(1, { message: 'ListTransactionsRequest.limit.min' })
16
- .max(100, { message: 'ListTransactionsRequest.limit.max' })
17
- .default(20),
18
- });
19
- exports.BillingTransactionItemSchema = zod_1.z.object({
20
- uuid: zod_1.z.string().regex(shared_1.UUID_REGEX),
21
- type: zod_1.z.nativeEnum(transaction_type_enum_1.TransactionType),
22
- amount: zod_1.z.number().int(),
23
- balanceAfter: zod_1.z.number().int().nonnegative(),
24
- correlationId: zod_1.z.string().regex(shared_1.UUID_REGEX),
25
- reason: zod_1.z.string(),
26
- description: zod_1.z.string().nullable(),
27
- holdId: zod_1.z.string().regex(shared_1.UUID_REGEX).nullable(),
28
- createdAt: zod_1.z.string().datetime({ offset: true }),
29
- });
30
- exports.ListTransactionsResponseSchema = zod_1.z.object({
31
- items: zod_1.z.array(exports.BillingTransactionItemSchema),
32
- nextCursor: zod_1.z.string().datetime({ offset: true }).nullable(),
33
- });
34
- //# sourceMappingURL=billing-transactions.schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"billing-transactions.schema.js","sourceRoot":"","sources":["../../../../v1/billing/schemas/billing-transactions.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAA6C;AAC7C,sFAA6E;AAOhE,QAAA,6BAA6B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,MAAM,EAAE,OAAC;SACJ,MAAM,CAAC,EAAE,KAAK,EAAE,wCAAwC,EAAE,CAAC;SAC3D,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,wCAAwC,EAAE,CAAC;SAC7E,QAAQ,EAAE;IACf,KAAK,EAAE,OAAC,CAAC,MAAM;SACV,MAAM,CAAC,EAAE,KAAK,EAAE,uCAAuC,EAAE,CAAC;SAC1D,GAAG,CAAC,EAAE,OAAO,EAAE,uCAAuC,EAAE,CAAC;SACzD,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE,CAAC;SACxD,GAAG,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE,CAAC;SAC1D,OAAO,CAAC,EAAE,CAAC;CACnB,CAAC,CAAC;AAIU,QAAA,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mBAAU,CAAC;IAClC,IAAI,EAAE,OAAC,CAAC,UAAU,CAAC,uCAAe,CAAC;IAEnC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACxB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC5C,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mBAAU,CAAC;IAC3C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mBAAU,CAAC,CAAC,QAAQ,EAAE;IAC/C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;CACnD,CAAC,CAAC;AAIU,QAAA,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,oCAA4B,CAAC;IAE5C,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC/D,CAAC,CAAC"}
@@ -1,59 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const PricingSnapshotSchema: z.ZodObject<{
3
- modelPriceKopeks: z.ZodNumber;
4
- appliedDeltas: z.ZodArray<z.ZodObject<{
5
- source: z.ZodString;
6
- value: z.ZodNumber;
7
- }, z.core.$strip>>;
8
- tierId: z.ZodNullable<z.ZodString>;
9
- tierPercent: z.ZodNumber;
10
- externalKopeks: z.ZodNumber;
11
- internalKopeks: z.ZodNumber;
12
- }, z.core.$strip>;
13
- export type PricingSnapshot = z.infer<typeof PricingSnapshotSchema>;
14
- export declare const MessageStepBillingSchema: z.ZodObject<{
15
- stepId: z.ZodString;
16
- type: z.ZodString;
17
- status: z.ZodString;
18
- externalPriceKopeks: z.ZodNullable<z.ZodNumber>;
19
- internalPriceKopeks: z.ZodNullable<z.ZodNumber>;
20
- snapshot: z.ZodNullable<z.ZodObject<{
21
- modelPriceKopeks: z.ZodNumber;
22
- appliedDeltas: z.ZodArray<z.ZodObject<{
23
- source: z.ZodString;
24
- value: z.ZodNumber;
25
- }, z.core.$strip>>;
26
- tierId: z.ZodNullable<z.ZodString>;
27
- tierPercent: z.ZodNumber;
28
- externalKopeks: z.ZodNumber;
29
- internalKopeks: z.ZodNumber;
30
- }, z.core.$strip>>;
31
- completedAt: z.ZodNullable<z.ZodString>;
32
- }, z.core.$strip>;
33
- export type MessageStepBilling = z.infer<typeof MessageStepBillingSchema>;
34
- export declare const MessageBillingDetailsResponseSchema: z.ZodObject<{
35
- messageId: z.ZodString;
36
- totalChargedKopeks: z.ZodNumber;
37
- totalExternalKopeks: z.ZodNumber;
38
- holdId: z.ZodNullable<z.ZodString>;
39
- steps: z.ZodArray<z.ZodObject<{
40
- stepId: z.ZodString;
41
- type: z.ZodString;
42
- status: z.ZodString;
43
- externalPriceKopeks: z.ZodNullable<z.ZodNumber>;
44
- internalPriceKopeks: z.ZodNullable<z.ZodNumber>;
45
- snapshot: z.ZodNullable<z.ZodObject<{
46
- modelPriceKopeks: z.ZodNumber;
47
- appliedDeltas: z.ZodArray<z.ZodObject<{
48
- source: z.ZodString;
49
- value: z.ZodNumber;
50
- }, z.core.$strip>>;
51
- tierId: z.ZodNullable<z.ZodString>;
52
- tierPercent: z.ZodNumber;
53
- externalKopeks: z.ZodNumber;
54
- internalKopeks: z.ZodNumber;
55
- }, z.core.$strip>>;
56
- completedAt: z.ZodNullable<z.ZodString>;
57
- }, z.core.$strip>>;
58
- }, z.core.$strip>;
59
- export type MessageBillingDetailsResponse = z.infer<typeof MessageBillingDetailsResponseSchema>;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MessageBillingDetailsResponseSchema = exports.MessageStepBillingSchema = exports.PricingSnapshotSchema = void 0;
4
- const zod_1 = require("zod");
5
- const shared_1 = require("../../../shared");
6
- exports.PricingSnapshotSchema = zod_1.z.object({
7
- modelPriceKopeks: zod_1.z.number().int().nonnegative(),
8
- appliedDeltas: zod_1.z.array(zod_1.z.object({
9
- source: zod_1.z.string(),
10
- value: zod_1.z.number().int().nonnegative(),
11
- })),
12
- tierId: zod_1.z.string().regex(shared_1.UUID_REGEX).nullable(),
13
- tierPercent: zod_1.z.number().int().nonnegative(),
14
- externalKopeks: zod_1.z.number().int().nonnegative(),
15
- internalKopeks: zod_1.z.number().int().nonnegative(),
16
- });
17
- exports.MessageStepBillingSchema = zod_1.z.object({
18
- stepId: zod_1.z.string().regex(shared_1.UUID_REGEX),
19
- type: zod_1.z.string(),
20
- status: zod_1.z.string(),
21
- externalPriceKopeks: zod_1.z.number().int().nonnegative().nullable(),
22
- internalPriceKopeks: zod_1.z.number().int().nonnegative().nullable(),
23
- snapshot: exports.PricingSnapshotSchema.nullable(),
24
- completedAt: zod_1.z.string().datetime({ offset: true }).nullable(),
25
- });
26
- exports.MessageBillingDetailsResponseSchema = zod_1.z.object({
27
- messageId: zod_1.z.string().regex(shared_1.UUID_REGEX),
28
- totalChargedKopeks: zod_1.z.number().int().nonnegative(),
29
- totalExternalKopeks: zod_1.z.number().int().nonnegative(),
30
- holdId: zod_1.z.string().regex(shared_1.UUID_REGEX).nullable(),
31
- steps: zod_1.z.array(exports.MessageStepBillingSchema),
32
- });
33
- //# sourceMappingURL=message-billing-details.schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"message-billing-details.schema.js","sourceRoot":"","sources":["../../../../v1/billing/schemas/message-billing-details.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAA6C;AAOhC,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAChD,aAAa,EAAE,OAAC,CAAC,KAAK,CAClB,OAAC,CAAC,MAAM,CAAC;QACL,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;QAClB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;KACxC,CAAC,CACL;IACD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mBAAU,CAAC,CAAC,QAAQ,EAAE;IAC/C,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC3C,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC9C,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CACjD,CAAC,CAAC;AAIU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mBAAU,CAAC;IACpC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;IAC9D,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;IAC9D,QAAQ,EAAE,6BAAqB,CAAC,QAAQ,EAAE;IAC1C,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;CAChE,CAAC,CAAC;AAIU,QAAA,mCAAmC,GAAG,OAAC,CAAC,MAAM,CAAC;IACxD,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mBAAU,CAAC;IACvC,kBAAkB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAClD,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IACnD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mBAAU,CAAC,CAAC,QAAQ,EAAE;IAC/C,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,gCAAwB,CAAC;CAC3C,CAAC,CAAC"}