@gigapay-dev/contracts 1.8.6 → 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.
- package/README.md +1 -0
- package/build/domains/admin/index.d.ts +150 -0
- package/build/domains/admin/index.d.ts.map +1 -0
- package/build/domains/admin/index.js +72 -0
- package/build/domains/admin/index.js.map +1 -0
- package/build/domains/auth/commands.d.ts +294 -0
- package/build/domains/auth/commands.d.ts.map +1 -0
- package/build/domains/auth/commands.js +116 -0
- package/build/domains/auth/commands.js.map +1 -0
- package/build/domains/auth/dtos.d.ts +37 -0
- package/build/domains/auth/dtos.d.ts.map +1 -0
- package/build/domains/auth/dtos.js +26 -0
- package/build/domains/auth/dtos.js.map +1 -0
- package/build/domains/auth/events.d.ts +35 -0
- package/build/domains/auth/events.d.ts.map +1 -0
- package/build/domains/auth/events.js +24 -0
- package/build/domains/auth/events.js.map +1 -0
- package/build/domains/auth/index.d.ts +165 -0
- package/build/domains/auth/index.d.ts.map +1 -0
- package/build/{commands/products → domains/auth}/index.js +12 -6
- package/build/domains/auth/index.js.map +1 -0
- package/build/domains/auth/queries.d.ts +75 -0
- package/build/domains/auth/queries.d.ts.map +1 -0
- package/build/domains/auth/queries.js +25 -0
- package/build/domains/auth/queries.js.map +1 -0
- package/build/domains/catalog/commands.d.ts +255 -0
- package/build/domains/catalog/commands.d.ts.map +1 -0
- package/build/domains/catalog/commands.js +82 -0
- package/build/domains/catalog/commands.js.map +1 -0
- package/build/domains/catalog/dtos.d.ts +89 -0
- package/build/domains/catalog/dtos.d.ts.map +1 -0
- package/build/domains/catalog/dtos.js +43 -0
- package/build/domains/catalog/dtos.js.map +1 -0
- package/build/domains/catalog/index.d.ts +194 -0
- package/build/domains/catalog/index.d.ts.map +1 -0
- package/build/{commands/payment-methods → domains/catalog}/index.js +11 -4
- package/build/domains/catalog/index.js.map +1 -0
- package/build/domains/catalog/queries.d.ts +168 -0
- package/build/domains/catalog/queries.d.ts.map +1 -0
- package/build/domains/catalog/queries.js +29 -0
- package/build/domains/catalog/queries.js.map +1 -0
- package/build/domains/config/index.d.ts +40 -0
- package/build/domains/config/index.d.ts.map +1 -0
- package/build/domains/config/index.js +18 -0
- package/build/domains/config/index.js.map +1 -0
- package/build/domains/orders/commands.d.ts +262 -0
- package/build/domains/orders/commands.d.ts.map +1 -0
- package/build/domains/orders/commands.js +47 -0
- package/build/domains/orders/commands.js.map +1 -0
- package/build/domains/orders/dtos.d.ts +112 -0
- package/build/domains/orders/dtos.d.ts.map +1 -0
- package/build/domains/orders/dtos.js +44 -0
- package/build/domains/orders/dtos.js.map +1 -0
- package/build/domains/orders/events.d.ts +21 -0
- package/build/domains/orders/events.d.ts.map +1 -0
- package/build/domains/orders/events.js +19 -0
- package/build/domains/orders/events.js.map +1 -0
- package/build/domains/orders/index.d.ts +381 -0
- package/build/domains/orders/index.d.ts.map +1 -0
- package/build/domains/orders/index.js +28 -0
- package/build/domains/orders/index.js.map +1 -0
- package/build/domains/orders/queries.d.ts +532 -0
- package/build/domains/orders/queries.d.ts.map +1 -0
- package/build/domains/orders/queries.js +40 -0
- package/build/domains/orders/queries.js.map +1 -0
- package/build/domains/payments/index.d.ts +96 -0
- package/build/domains/payments/index.d.ts.map +1 -0
- package/build/domains/payments/index.js +34 -0
- package/build/domains/payments/index.js.map +1 -0
- package/build/domains/products/commands.d.ts +302 -0
- package/build/domains/products/commands.d.ts.map +1 -0
- package/build/domains/products/commands.js +101 -0
- package/build/domains/products/commands.js.map +1 -0
- package/build/domains/products/dtos.d.ts +122 -0
- package/build/domains/products/dtos.d.ts.map +1 -0
- package/build/domains/products/dtos.js +54 -0
- package/build/domains/products/dtos.js.map +1 -0
- package/build/domains/products/index.d.ts +276 -0
- package/build/domains/products/index.d.ts.map +1 -0
- package/build/{commands/auth → domains/products}/index.js +11 -5
- package/build/domains/products/index.js.map +1 -0
- package/build/domains/products/queries.d.ts +334 -0
- package/build/domains/products/queries.d.ts.map +1 -0
- package/build/domains/products/queries.js +41 -0
- package/build/domains/products/queries.js.map +1 -0
- package/build/domains/promo-codes/index.d.ts +92 -0
- package/build/domains/promo-codes/index.d.ts.map +1 -0
- package/build/domains/promo-codes/index.js +40 -0
- package/build/domains/promo-codes/index.js.map +1 -0
- package/build/domains/stats/index.d.ts +274 -0
- package/build/domains/stats/index.d.ts.map +1 -0
- package/build/domains/stats/index.js +76 -0
- package/build/domains/stats/index.js.map +1 -0
- package/build/domains/users/dtos.d.ts +9 -0
- package/build/domains/users/dtos.d.ts.map +1 -0
- package/build/domains/users/dtos.js +11 -0
- package/build/domains/users/dtos.js.map +1 -0
- package/build/domains/users/index.d.ts +101 -0
- package/build/domains/users/index.d.ts.map +1 -0
- package/build/domains/users/index.js +52 -0
- package/build/domains/users/index.js.map +1 -0
- package/build/index.d.ts +1310 -1
- package/build/index.d.ts.map +1 -0
- package/build/index.js +35 -1
- package/build/index.js.map +1 -0
- package/build/shared/api-response.d.ts +17 -0
- package/build/shared/api-response.d.ts.map +1 -0
- package/build/shared/api-response.js +22 -0
- package/build/shared/api-response.js.map +1 -0
- package/build/shared/common.d.ts +14 -0
- package/build/shared/common.d.ts.map +1 -0
- package/build/shared/common.js +8 -0
- package/build/shared/common.js.map +1 -0
- package/build/shared/errors.d.ts +34 -0
- package/build/shared/errors.d.ts.map +1 -0
- package/build/shared/errors.js +36 -0
- package/build/shared/errors.js.map +1 -0
- package/build/shared/index.d.ts +7 -0
- package/build/shared/index.d.ts.map +1 -0
- package/build/{commands/orders → shared}/index.js +7 -6
- package/build/shared/index.js.map +1 -0
- package/build/shared/money.d.ts +32 -0
- package/build/shared/money.d.ts.map +1 -0
- package/build/shared/money.js +20 -0
- package/build/shared/money.js.map +1 -0
- package/build/shared/pagination.d.ts +27 -0
- package/build/shared/pagination.d.ts.map +1 -0
- package/build/shared/pagination.js +22 -0
- package/build/shared/pagination.js.map +1 -0
- package/build/shared/types.d.ts +20 -0
- package/build/shared/types.d.ts.map +1 -0
- package/build/{types.js → shared/types.js} +1 -0
- package/build/shared/types.js.map +1 -0
- package/package.json +41 -15
- package/build/commands/api-response.d.ts +0 -18
- package/build/commands/api-response.js +0 -13
- package/build/commands/auth/confirm.d.ts +0 -11
- package/build/commands/auth/confirm.js +0 -11
- package/build/commands/auth/endpoints.d.ts +0 -114
- package/build/commands/auth/endpoints.js +0 -50
- package/build/commands/auth/index.d.ts +0 -5
- package/build/commands/auth/login.d.ts +0 -20
- package/build/commands/auth/login.js +0 -11
- package/build/commands/auth/profile.d.ts +0 -18
- package/build/commands/auth/profile.js +0 -10
- package/build/commands/auth/register.d.ts +0 -12
- package/build/commands/auth/register.js +0 -11
- package/build/commands/auth/reset.d.ts +0 -12
- package/build/commands/auth/reset.js +0 -9
- package/build/commands/consts.d.ts +0 -1
- package/build/commands/consts.js +0 -4
- package/build/commands/index.d.ts +0 -13
- package/build/commands/index.js +0 -29
- package/build/commands/orders/create.d.ts +0 -95
- package/build/commands/orders/create.js +0 -40
- package/build/commands/orders/endpoints.d.ts +0 -726
- package/build/commands/orders/endpoints.js +0 -47
- package/build/commands/orders/enums.d.ts +0 -7
- package/build/commands/orders/enums.js +0 -25
- package/build/commands/orders/index.d.ts +0 -6
- package/build/commands/orders/query.d.ts +0 -103
- package/build/commands/orders/query.js +0 -45
- package/build/commands/orders/read.d.ts +0 -230
- package/build/commands/orders/read.js +0 -81
- package/build/commands/orders/update.d.ts +0 -23
- package/build/commands/orders/update.js +0 -16
- package/build/commands/pagination.d.ts +0 -12
- package/build/commands/pagination.js +0 -11
- package/build/commands/payment-methods/create.d.ts +0 -45
- package/build/commands/payment-methods/create.js +0 -22
- package/build/commands/payment-methods/endpoints.d.ts +0 -536
- package/build/commands/payment-methods/endpoints.js +0 -63
- package/build/commands/payment-methods/index.d.ts +0 -4
- package/build/commands/payment-methods/read.d.ts +0 -71
- package/build/commands/payment-methods/read.js +0 -28
- package/build/commands/payment-methods/update.d.ts +0 -45
- package/build/commands/payment-methods/update.js +0 -19
- package/build/commands/products/create.d.ts +0 -229
- package/build/commands/products/create.js +0 -122
- package/build/commands/products/endpoints.d.ts +0 -1881
- package/build/commands/products/endpoints.js +0 -99
- package/build/commands/products/enums.d.ts +0 -19
- package/build/commands/products/enums.js +0 -27
- package/build/commands/products/index.d.ts +0 -6
- package/build/commands/products/query.d.ts +0 -79
- package/build/commands/products/query.js +0 -55
- package/build/commands/products/read.d.ts +0 -1178
- package/build/commands/products/read.js +0 -231
- package/build/commands/products/update.d.ts +0 -78
- package/build/commands/products/update.js +0 -10
- package/build/commands/promocode-activations/create.d.ts +0 -18
- package/build/commands/promocode-activations/create.js +0 -10
- package/build/commands/promocode-activations/index.d.ts +0 -3
- package/build/commands/promocode-activations/index.js +0 -19
- package/build/commands/promocode-activations/read.d.ts +0 -21
- package/build/commands/promocode-activations/read.js +0 -14
- package/build/commands/promocode-activations/update.d.ts +0 -18
- package/build/commands/promocode-activations/update.js +0 -10
- package/build/commands/promocodes/create.d.ts +0 -39
- package/build/commands/promocodes/create.js +0 -18
- package/build/commands/promocodes/endpoints.d.ts +0 -353
- package/build/commands/promocodes/endpoints.js +0 -46
- package/build/commands/promocodes/enums.d.ts +0 -5
- package/build/commands/promocodes/enums.js +0 -9
- package/build/commands/promocodes/index.d.ts +0 -5
- package/build/commands/promocodes/index.js +0 -21
- package/build/commands/promocodes/read.d.ts +0 -45
- package/build/commands/promocodes/read.js +0 -23
- package/build/commands/promocodes/update.d.ts +0 -33
- package/build/commands/promocodes/update.js +0 -16
- package/build/commands/refresh-sessions/create.d.ts +0 -24
- package/build/commands/refresh-sessions/create.js +0 -13
- package/build/commands/refresh-sessions/enums.d.ts +0 -3
- package/build/commands/refresh-sessions/enums.js +0 -8
- package/build/commands/refresh-sessions/index.d.ts +0 -4
- package/build/commands/refresh-sessions/index.js +0 -20
- package/build/commands/refresh-sessions/read.d.ts +0 -27
- package/build/commands/refresh-sessions/read.js +0 -17
- package/build/commands/refresh-sessions/update.d.ts +0 -24
- package/build/commands/refresh-sessions/update.js +0 -16
- package/build/commands/settings/endpoints.d.ts +0 -108
- package/build/commands/settings/endpoints.js +0 -43
- package/build/commands/settings/index.d.ts +0 -3
- package/build/commands/settings/index.js +0 -19
- package/build/commands/settings/read.d.ts +0 -18
- package/build/commands/settings/read.js +0 -10
- package/build/commands/settings/update.d.ts +0 -18
- package/build/commands/settings/update.js +0 -10
- package/build/commands/stats/endpoints.d.ts +0 -67
- package/build/commands/stats/endpoints.js +0 -13
- package/build/commands/stats/index.d.ts +0 -3
- package/build/commands/stats/index.js +0 -19
- package/build/commands/stats/query.d.ts +0 -31
- package/build/commands/stats/query.js +0 -15
- package/build/commands/stats/read.d.ts +0 -30
- package/build/commands/stats/read.js +0 -17
- package/build/commands/users/create.d.ts +0 -42
- package/build/commands/users/create.js +0 -19
- package/build/commands/users/endpoints.d.ts +0 -403
- package/build/commands/users/endpoints.js +0 -39
- package/build/commands/users/enums.d.ts +0 -6
- package/build/commands/users/enums.js +0 -10
- package/build/commands/users/index.d.ts +0 -6
- package/build/commands/users/index.js +0 -22
- package/build/commands/users/query.d.ts +0 -52
- package/build/commands/users/query.js +0 -21
- package/build/commands/users/read.d.ts +0 -60
- package/build/commands/users/read.js +0 -28
- package/build/commands/users/update.d.ts +0 -42
- package/build/commands/users/update.js +0 -19
- package/build/types.d.ts +0 -8
- package/commands/api-response.ts +0 -10
- package/commands/auth/confirm.ts +0 -10
- package/commands/auth/endpoints.ts +0 -51
- package/commands/auth/index.ts +0 -5
- package/commands/auth/login.ts +0 -13
- package/commands/auth/profile.ts +0 -10
- package/commands/auth/register.ts +0 -8
- package/commands/auth/reset.ts +0 -9
- package/commands/consts.ts +0 -1
- package/commands/index.ts +0 -13
- package/commands/orders/create.ts +0 -41
- package/commands/orders/endpoints.ts +0 -51
- package/commands/orders/enums.ts +0 -25
- package/commands/orders/index.ts +0 -6
- package/commands/orders/query.ts +0 -46
- package/commands/orders/read.ts +0 -83
- package/commands/orders/update.ts +0 -16
- package/commands/pagination.ts +0 -8
- package/commands/payment-methods/create.ts +0 -19
- package/commands/payment-methods/endpoints.ts +0 -67
- package/commands/payment-methods/index.ts +0 -4
- package/commands/payment-methods/read.ts +0 -30
- package/commands/payment-methods/update.ts +0 -19
- package/commands/products/create.ts +0 -134
- package/commands/products/endpoints.ts +0 -108
- package/commands/products/enums.ts +0 -33
- package/commands/products/index.ts +0 -6
- package/commands/products/query.ts +0 -52
- package/commands/products/read.ts +0 -268
- package/commands/products/update.ts +0 -11
- package/commands/promocode-activations/create.ts +0 -10
- package/commands/promocode-activations/index.ts +0 -3
- package/commands/promocode-activations/read.ts +0 -11
- package/commands/promocode-activations/update.ts +0 -10
- package/commands/promocodes/create.ts +0 -18
- package/commands/promocodes/endpoints.ts +0 -62
- package/commands/promocodes/enums.ts +0 -9
- package/commands/promocodes/index.ts +0 -5
- package/commands/promocodes/read.ts +0 -20
- package/commands/promocodes/update.ts +0 -16
- package/commands/refresh-sessions/create.ts +0 -13
- package/commands/refresh-sessions/enums.ts +0 -4
- package/commands/refresh-sessions/index.ts +0 -4
- package/commands/refresh-sessions/read.ts +0 -14
- package/commands/refresh-sessions/update.ts +0 -13
- package/commands/settings/endpoints.ts +0 -52
- package/commands/settings/index.ts +0 -3
- package/commands/settings/read.ts +0 -10
- package/commands/settings/update.ts +0 -10
- package/commands/stats/endpoints.ts +0 -23
- package/commands/stats/index.ts +0 -3
- package/commands/stats/query.ts +0 -18
- package/commands/stats/read.ts +0 -14
- package/commands/users/create.ts +0 -19
- package/commands/users/endpoints.ts +0 -47
- package/commands/users/enums.ts +0 -10
- package/commands/users/index.ts +0 -6
- package/commands/users/query.ts +0 -20
- package/commands/users/read.ts +0 -25
- package/commands/users/update.ts +0 -19
- package/index.ts +0 -1
- package/tsconfig.json +0 -111
- package/types.ts +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAahC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWf,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC;AAE/C,MAAM,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC;AAC3C,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,SAAS,IAAI,MAAM,YAAY,CAAC,CAAC,CAAC,CAAC;AACrE,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,SAAS,EAAE,CAAC,SAAS,WAAW,CAAC,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
package/build/index.js
CHANGED
|
@@ -14,4 +14,38 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
17
|
+
exports.AllEndpoints = void 0;
|
|
18
|
+
__exportStar(require("./shared"), exports);
|
|
19
|
+
__exportStar(require("./domains/auth"), exports);
|
|
20
|
+
__exportStar(require("./domains/users"), exports);
|
|
21
|
+
__exportStar(require("./domains/orders"), exports);
|
|
22
|
+
__exportStar(require("./domains/catalog"), exports);
|
|
23
|
+
__exportStar(require("./domains/products"), exports);
|
|
24
|
+
__exportStar(require("./domains/payments"), exports);
|
|
25
|
+
__exportStar(require("./domains/promo-codes"), exports);
|
|
26
|
+
__exportStar(require("./domains/stats"), exports);
|
|
27
|
+
__exportStar(require("./domains/config"), exports);
|
|
28
|
+
__exportStar(require("./domains/admin"), exports);
|
|
29
|
+
const auth_1 = require("./domains/auth");
|
|
30
|
+
const users_1 = require("./domains/users");
|
|
31
|
+
const orders_1 = require("./domains/orders");
|
|
32
|
+
const catalog_1 = require("./domains/catalog");
|
|
33
|
+
const products_1 = require("./domains/products");
|
|
34
|
+
const payments_1 = require("./domains/payments");
|
|
35
|
+
const promo_codes_1 = require("./domains/promo-codes");
|
|
36
|
+
const stats_1 = require("./domains/stats");
|
|
37
|
+
const config_1 = require("./domains/config");
|
|
38
|
+
const admin_1 = require("./domains/admin");
|
|
39
|
+
exports.AllEndpoints = {
|
|
40
|
+
auth: auth_1.AuthEndpoints,
|
|
41
|
+
users: users_1.UsersEndpoints,
|
|
42
|
+
orders: orders_1.OrderEndpoints,
|
|
43
|
+
catalog: catalog_1.CatalogEndpoints,
|
|
44
|
+
products: products_1.ProductEndpoints,
|
|
45
|
+
payments: payments_1.PaymentEndpoints,
|
|
46
|
+
promoCodes: promo_codes_1.PromoCodeEndpoints,
|
|
47
|
+
stats: stats_1.StatsEndpoints,
|
|
48
|
+
config: config_1.ConfigEndpoints,
|
|
49
|
+
admin: admin_1.AdminEndpoints,
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,iDAA+B;AAC/B,kDAAgC;AAChC,mDAAiC;AACjC,oDAAkC;AAClC,qDAAmC;AACnC,qDAAmC;AACnC,wDAAsC;AACtC,kDAAgC;AAChC,mDAAiC;AACjC,kDAAgC;AAEhC,yCAA+C;AAC/C,2CAAiD;AACjD,6CAAkD;AAClD,+CAAqD;AACrD,iDAAsD;AACtD,iDAAsD;AACtD,uDAA2D;AAC3D,2CAAiD;AACjD,6CAAmD;AACnD,2CAAiD;AAEpC,QAAA,YAAY,GAAG;IAC3B,IAAI,EAAE,oBAAa;IACnB,KAAK,EAAE,sBAAc;IACrB,MAAM,EAAE,uBAAc;IACtB,OAAO,EAAE,0BAAgB;IACzB,QAAQ,EAAE,2BAAgB;IAC1B,QAAQ,EAAE,2BAAgB;IAC1B,UAAU,EAAE,gCAAkB;IAC9B,KAAK,EAAE,sBAAc;IACrB,MAAM,EAAE,wBAAe;IACvB,KAAK,EAAE,sBAAc;CACZ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare function ApiResponseSchema<T extends z.ZodTypeAny>(dataSchema: T): z.ZodObject<{
|
|
3
|
+
ok: z.ZodLiteral<true>;
|
|
4
|
+
data: T;
|
|
5
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const ApiErrorSchema: z.ZodObject<{
|
|
8
|
+
ok: z.ZodLiteral<false>;
|
|
9
|
+
error: z.ZodObject<{
|
|
10
|
+
code: z.ZodString;
|
|
11
|
+
message: z.ZodString;
|
|
12
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export type ApiError = z.infer<typeof ApiErrorSchema>;
|
|
17
|
+
//# sourceMappingURL=api-response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-response.d.ts","sourceRoot":"","sources":["../../src/shared/api-response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,CAAC;;;;kBAMtE;AAED,eAAO,MAAM,cAAc;;;;;;;;iBAQzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApiErrorSchema = void 0;
|
|
4
|
+
exports.ApiResponseSchema = ApiResponseSchema;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
function ApiResponseSchema(dataSchema) {
|
|
7
|
+
return zod_1.z.object({
|
|
8
|
+
ok: zod_1.z.literal(true),
|
|
9
|
+
data: dataSchema,
|
|
10
|
+
requestId: zod_1.z.string().optional(),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
exports.ApiErrorSchema = zod_1.z.object({
|
|
14
|
+
ok: zod_1.z.literal(false),
|
|
15
|
+
error: zod_1.z.object({
|
|
16
|
+
code: zod_1.z.string(),
|
|
17
|
+
message: zod_1.z.string(),
|
|
18
|
+
details: zod_1.z.unknown().optional(),
|
|
19
|
+
}),
|
|
20
|
+
requestId: zod_1.z.string().optional(),
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=api-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-response.js","sourceRoot":"","sources":["../../src/shared/api-response.ts"],"names":[],"mappings":";;;AAEA,8CAMC;AARD,6BAAwB;AAExB,SAAgB,iBAAiB,CAAyB,UAAa;IACtE,OAAO,OAAC,CAAC,MAAM,CAAC;QACf,EAAE,EAAE,OAAC,CAAC,OAAO,CAAC,IAAI,CAAC;QACnB,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAChC,CAAC,CAAC;AACJ,CAAC;AAEY,QAAA,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IACtC,EAAE,EAAE,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IACpB,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;QAChB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;QACnB,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KAC/B,CAAC;IACF,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const IdParamSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export type IdParam = z.infer<typeof IdParamSchema>;
|
|
6
|
+
export declare const SlugParamSchema: z.ZodObject<{
|
|
7
|
+
slug: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export type SlugParam = z.infer<typeof SlugParamSchema>;
|
|
10
|
+
export declare const SuccessResponseSchema: z.ZodObject<{
|
|
11
|
+
ok: z.ZodLiteral<true>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export type SuccessResponse = z.infer<typeof SuccessResponseSchema>;
|
|
14
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/shared/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,aAAa;;iBAAuD,CAAC;AAClF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,eAAO,MAAM,eAAe;;iBAAgD,CAAC;AAC7E,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,qBAAqB;;iBAAoC,CAAC;AACvE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SuccessResponseSchema = exports.SlugParamSchema = exports.IdParamSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.IdParamSchema = zod_1.z.object({ id: zod_1.z.coerce.number().int().positive() });
|
|
6
|
+
exports.SlugParamSchema = zod_1.z.object({ slug: zod_1.z.string().min(1).max(64) });
|
|
7
|
+
exports.SuccessResponseSchema = zod_1.z.object({ ok: zod_1.z.literal(true) });
|
|
8
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/shared/common.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAGrE,QAAA,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAGhE,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,OAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const ERROR_CODES: {
|
|
2
|
+
readonly UNAUTHORIZED: "UNAUTHORIZED";
|
|
3
|
+
readonly FORBIDDEN: "FORBIDDEN";
|
|
4
|
+
readonly NOT_FOUND: "NOT_FOUND";
|
|
5
|
+
readonly VALIDATION_ERROR: "VALIDATION_ERROR";
|
|
6
|
+
readonly CAPTCHA_REQUIRED: "CAPTCHA_REQUIRED";
|
|
7
|
+
readonly CAPTCHA_INVALID: "CAPTCHA_INVALID";
|
|
8
|
+
readonly RATE_LIMIT_EXCEEDED: "RATE_LIMIT_EXCEEDED";
|
|
9
|
+
readonly IDEMPOTENCY_CONFLICT: "IDEMPOTENCY_CONFLICT";
|
|
10
|
+
readonly USER_NOT_FOUND: "USER_NOT_FOUND";
|
|
11
|
+
readonly EMAIL_TAKEN: "EMAIL_TAKEN";
|
|
12
|
+
readonly INVALID_CREDENTIALS: "INVALID_CREDENTIALS";
|
|
13
|
+
readonly SESSION_EXPIRED: "SESSION_EXPIRED";
|
|
14
|
+
readonly TOTP_REQUIRED: "TOTP_REQUIRED";
|
|
15
|
+
readonly TOTP_INVALID: "TOTP_INVALID";
|
|
16
|
+
readonly PRODUCT_NOT_FOUND: "PRODUCT_NOT_FOUND";
|
|
17
|
+
readonly VARIANT_NOT_FOUND: "VARIANT_NOT_FOUND";
|
|
18
|
+
readonly PRODUCT_ALREADY_EXISTS: "PRODUCT_ALREADY_EXISTS";
|
|
19
|
+
readonly OUT_OF_STOCK: "OUT_OF_STOCK";
|
|
20
|
+
readonly ORDER_NOT_FOUND: "ORDER_NOT_FOUND";
|
|
21
|
+
readonly ORDER_FORBIDDEN: "ORDER_FORBIDDEN";
|
|
22
|
+
readonly PAYMENT_RATE_UNAVAILABLE: "PAYMENT_RATE_UNAVAILABLE";
|
|
23
|
+
readonly PAYMENT_PROVIDER_UNAVAILABLE: "PAYMENT_PROVIDER_UNAVAILABLE";
|
|
24
|
+
readonly WEBHOOK_SIGNATURE_INVALID: "WEBHOOK_SIGNATURE_INVALID";
|
|
25
|
+
readonly UNKNOWN_PAYMENT_STRATEGY: "UNKNOWN_PAYMENT_STRATEGY";
|
|
26
|
+
readonly PROMO_NOT_FOUND: "PROMO_NOT_FOUND";
|
|
27
|
+
readonly PROMO_EXPIRED: "PROMO_EXPIRED";
|
|
28
|
+
readonly PROMO_LIMIT_REACHED: "PROMO_LIMIT_REACHED";
|
|
29
|
+
readonly PROMO_BUDGET_EXCEEDED: "PROMO_BUDGET_EXCEEDED";
|
|
30
|
+
readonly CATALOG_NOT_FOUND: "CATALOG_NOT_FOUND";
|
|
31
|
+
readonly CATALOG_HAS_LINKED_NODES: "CATALOG_HAS_LINKED_NODES";
|
|
32
|
+
};
|
|
33
|
+
export type ErrorCode = (typeof ERROR_CODES)[keyof typeof ERROR_CODES];
|
|
34
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/shared/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCd,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ERROR_CODES = void 0;
|
|
4
|
+
exports.ERROR_CODES = {
|
|
5
|
+
UNAUTHORIZED: "UNAUTHORIZED",
|
|
6
|
+
FORBIDDEN: "FORBIDDEN",
|
|
7
|
+
NOT_FOUND: "NOT_FOUND",
|
|
8
|
+
VALIDATION_ERROR: "VALIDATION_ERROR",
|
|
9
|
+
CAPTCHA_REQUIRED: "CAPTCHA_REQUIRED",
|
|
10
|
+
CAPTCHA_INVALID: "CAPTCHA_INVALID",
|
|
11
|
+
RATE_LIMIT_EXCEEDED: "RATE_LIMIT_EXCEEDED",
|
|
12
|
+
IDEMPOTENCY_CONFLICT: "IDEMPOTENCY_CONFLICT",
|
|
13
|
+
USER_NOT_FOUND: "USER_NOT_FOUND",
|
|
14
|
+
EMAIL_TAKEN: "EMAIL_TAKEN",
|
|
15
|
+
INVALID_CREDENTIALS: "INVALID_CREDENTIALS",
|
|
16
|
+
SESSION_EXPIRED: "SESSION_EXPIRED",
|
|
17
|
+
TOTP_REQUIRED: "TOTP_REQUIRED",
|
|
18
|
+
TOTP_INVALID: "TOTP_INVALID",
|
|
19
|
+
PRODUCT_NOT_FOUND: "PRODUCT_NOT_FOUND",
|
|
20
|
+
VARIANT_NOT_FOUND: "VARIANT_NOT_FOUND",
|
|
21
|
+
PRODUCT_ALREADY_EXISTS: "PRODUCT_ALREADY_EXISTS",
|
|
22
|
+
OUT_OF_STOCK: "OUT_OF_STOCK",
|
|
23
|
+
ORDER_NOT_FOUND: "ORDER_NOT_FOUND",
|
|
24
|
+
ORDER_FORBIDDEN: "ORDER_FORBIDDEN",
|
|
25
|
+
PAYMENT_RATE_UNAVAILABLE: "PAYMENT_RATE_UNAVAILABLE",
|
|
26
|
+
PAYMENT_PROVIDER_UNAVAILABLE: "PAYMENT_PROVIDER_UNAVAILABLE",
|
|
27
|
+
WEBHOOK_SIGNATURE_INVALID: "WEBHOOK_SIGNATURE_INVALID",
|
|
28
|
+
UNKNOWN_PAYMENT_STRATEGY: "UNKNOWN_PAYMENT_STRATEGY",
|
|
29
|
+
PROMO_NOT_FOUND: "PROMO_NOT_FOUND",
|
|
30
|
+
PROMO_EXPIRED: "PROMO_EXPIRED",
|
|
31
|
+
PROMO_LIMIT_REACHED: "PROMO_LIMIT_REACHED",
|
|
32
|
+
PROMO_BUDGET_EXCEEDED: "PROMO_BUDGET_EXCEEDED",
|
|
33
|
+
CATALOG_NOT_FOUND: "CATALOG_NOT_FOUND",
|
|
34
|
+
CATALOG_HAS_LINKED_NODES: "CATALOG_HAS_LINKED_NODES",
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/shared/errors.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IAC1B,YAAY,EAAE,cAAc;IAC5B,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,gBAAgB,EAAE,kBAAkB;IACpC,gBAAgB,EAAE,kBAAkB;IACpC,eAAe,EAAE,iBAAiB;IAClC,mBAAmB,EAAE,qBAAqB;IAC1C,oBAAoB,EAAE,sBAAsB;IAE5C,cAAc,EAAE,gBAAgB;IAChC,WAAW,EAAE,aAAa;IAC1B,mBAAmB,EAAE,qBAAqB;IAC1C,eAAe,EAAE,iBAAiB;IAClC,aAAa,EAAE,eAAe;IAC9B,YAAY,EAAE,cAAc;IAE5B,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;IACtC,sBAAsB,EAAE,wBAAwB;IAChD,YAAY,EAAE,cAAc;IAE5B,eAAe,EAAE,iBAAiB;IAClC,eAAe,EAAE,iBAAiB;IAElC,wBAAwB,EAAE,0BAA0B;IACpD,4BAA4B,EAAE,8BAA8B;IAC5D,yBAAyB,EAAE,2BAA2B;IACtD,wBAAwB,EAAE,0BAA0B;IAEpD,eAAe,EAAE,iBAAiB;IAClC,aAAa,EAAE,eAAe;IAC9B,mBAAmB,EAAE,qBAAqB;IAC1C,qBAAqB,EAAE,uBAAuB;IAE9C,iBAAiB,EAAE,mBAAmB;IACtC,wBAAwB,EAAE,0BAA0B;CAC3C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
|
@@ -14,9 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
21
|
-
__exportStar(require("./
|
|
22
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./money"), exports);
|
|
19
|
+
__exportStar(require("./pagination"), exports);
|
|
20
|
+
__exportStar(require("./api-response"), exports);
|
|
21
|
+
__exportStar(require("./common"), exports);
|
|
22
|
+
__exportStar(require("./errors"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,0CAAwB;AACxB,+CAA6B;AAC7B,iDAA+B;AAC/B,2CAAyB;AACzB,2CAAyB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const CurrencySchema: z.ZodEnum<{
|
|
3
|
+
USD: "USD";
|
|
4
|
+
RUB: "RUB";
|
|
5
|
+
UAH: "UAH";
|
|
6
|
+
}>;
|
|
7
|
+
export type Currency = z.infer<typeof CurrencySchema>;
|
|
8
|
+
export declare const MoneyAmountSchema: z.ZodString;
|
|
9
|
+
export type MoneyAmount = z.infer<typeof MoneyAmountSchema>;
|
|
10
|
+
export declare const MoneyTripletSchema: z.ZodObject<{
|
|
11
|
+
usd: z.ZodString;
|
|
12
|
+
rub: z.ZodString;
|
|
13
|
+
uah: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type MoneyTriplet = z.infer<typeof MoneyTripletSchema>;
|
|
16
|
+
export declare const ExchangeRateSnapshotSchema: z.ZodObject<{
|
|
17
|
+
source: z.ZodEnum<{
|
|
18
|
+
dessly: "dessly";
|
|
19
|
+
cbr: "cbr";
|
|
20
|
+
nbu: "nbu";
|
|
21
|
+
cache: "cache";
|
|
22
|
+
fallback: "fallback";
|
|
23
|
+
mixed: "mixed";
|
|
24
|
+
}>;
|
|
25
|
+
fetchedAt: z.ZodString;
|
|
26
|
+
rates: z.ZodObject<{
|
|
27
|
+
usdRub: z.ZodString;
|
|
28
|
+
usdUah: z.ZodString;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export type ExchangeRateSnapshot = z.infer<typeof ExchangeRateSnapshotSchema>;
|
|
32
|
+
//# sourceMappingURL=money.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"money.d.ts","sourceRoot":"","sources":["../../src/shared/money.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc;;;;EAAgC,CAAC;AAC5D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,iBAAiB,aAA0F,CAAC;AACzH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,kBAAkB;;;;iBAI7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;iBAOrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExchangeRateSnapshotSchema = exports.MoneyTripletSchema = exports.MoneyAmountSchema = exports.CurrencySchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.CurrencySchema = zod_1.z.enum(["USD", "RUB", "UAH"]);
|
|
6
|
+
exports.MoneyAmountSchema = zod_1.z.string().regex(/^\d+(\.\d{1,8})?$/, "must be a decimal string with up to 8 decimals");
|
|
7
|
+
exports.MoneyTripletSchema = zod_1.z.object({
|
|
8
|
+
usd: exports.MoneyAmountSchema,
|
|
9
|
+
rub: exports.MoneyAmountSchema,
|
|
10
|
+
uah: exports.MoneyAmountSchema,
|
|
11
|
+
});
|
|
12
|
+
exports.ExchangeRateSnapshotSchema = zod_1.z.object({
|
|
13
|
+
source: zod_1.z.enum(["dessly", "cbr", "nbu", "cache", "fallback", "mixed"]),
|
|
14
|
+
fetchedAt: zod_1.z.string(),
|
|
15
|
+
rates: zod_1.z.object({
|
|
16
|
+
usdRub: exports.MoneyAmountSchema,
|
|
17
|
+
usdUah: exports.MoneyAmountSchema,
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=money.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"money.js","sourceRoot":"","sources":["../../src/shared/money.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,cAAc,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AAG/C,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mBAAmB,EAAE,gDAAgD,CAAC,CAAC;AAG5G,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,GAAG,EAAE,yBAAiB;IACtB,GAAG,EAAE,yBAAiB;IACtB,GAAG,EAAE,yBAAiB;CACtB,CAAC,CAAC;AAGU,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IACtE,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC;QACf,MAAM,EAAE,yBAAiB;QACzB,MAAM,EAAE,yBAAiB;KACzB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare function PaginatedResponseSchema<T extends z.ZodTypeAny>(itemSchema: T): z.ZodObject<{
|
|
3
|
+
items: z.ZodArray<T>;
|
|
4
|
+
total: z.ZodNumber;
|
|
5
|
+
skip: z.ZodNumber;
|
|
6
|
+
take: z.ZodNumber;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type PaginatedResponse<T> = {
|
|
9
|
+
items: T[];
|
|
10
|
+
total: number;
|
|
11
|
+
skip: number;
|
|
12
|
+
take: number;
|
|
13
|
+
};
|
|
14
|
+
export declare const PaginationQuerySchema: z.ZodObject<{
|
|
15
|
+
skip: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
16
|
+
take: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export type PaginationQuery = z.infer<typeof PaginationQuerySchema>;
|
|
19
|
+
export declare const SortQuerySchema: z.ZodObject<{
|
|
20
|
+
sortBy: z.ZodDefault<z.ZodString>;
|
|
21
|
+
sortDir: z.ZodDefault<z.ZodEnum<{
|
|
22
|
+
asc: "asc";
|
|
23
|
+
desc: "desc";
|
|
24
|
+
}>>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export type SortQuery = z.infer<typeof SortQuerySchema>;
|
|
27
|
+
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/shared/pagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,CAAC;;;;;kBAO5E;AAED,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI;IAClC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;iBAGhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,eAAe;;;;;;iBAG1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SortQuerySchema = exports.PaginationQuerySchema = void 0;
|
|
4
|
+
exports.PaginatedResponseSchema = PaginatedResponseSchema;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
function PaginatedResponseSchema(itemSchema) {
|
|
7
|
+
return zod_1.z.object({
|
|
8
|
+
items: zod_1.z.array(itemSchema),
|
|
9
|
+
total: zod_1.z.number().int().nonnegative(),
|
|
10
|
+
skip: zod_1.z.number().int().nonnegative(),
|
|
11
|
+
take: zod_1.z.number().int().nonnegative(),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
exports.PaginationQuerySchema = zod_1.z.object({
|
|
15
|
+
skip: zod_1.z.coerce.number().int().nonnegative().default(0),
|
|
16
|
+
take: zod_1.z.coerce.number().int().min(1).max(100).default(20),
|
|
17
|
+
});
|
|
18
|
+
exports.SortQuerySchema = zod_1.z.object({
|
|
19
|
+
sortBy: zod_1.z.string().default("createdAt"),
|
|
20
|
+
sortDir: zod_1.z.enum(["asc", "desc"]).default("desc"),
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../src/shared/pagination.ts"],"names":[],"mappings":";;;AAEA,0DAOC;AATD,6BAAwB;AAExB,SAAgB,uBAAuB,CAAyB,UAAa;IAC5E,OAAO,OAAC,CAAC,MAAM,CAAC;QACf,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,UAAU,CAAC;QAC1B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;QACrC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;QACpC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;KACpC,CAAC,CAAC;AACJ,CAAC;AASY,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACtD,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CACzD,CAAC,CAAC;AAGU,QAAA,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC;IACvC,OAAO,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;CAChD,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export type RequestMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
3
|
+
export type CaptchaAction = "order_create" | "login" | "register" | "forgot_password" | "promo_activate";
|
|
4
|
+
export type RateLimitSpec = {
|
|
5
|
+
limit: number;
|
|
6
|
+
ttlSec: number;
|
|
7
|
+
};
|
|
8
|
+
export type EndpointContract<TRequest extends z.ZodTypeAny = z.ZodTypeAny, TResponse extends z.ZodTypeAny = z.ZodTypeAny, TParams extends z.ZodTypeAny = z.ZodTypeAny, TQuery extends z.ZodTypeAny = z.ZodTypeAny> = {
|
|
9
|
+
method: RequestMethod;
|
|
10
|
+
path: string;
|
|
11
|
+
request?: TRequest;
|
|
12
|
+
response?: TResponse;
|
|
13
|
+
params?: TParams;
|
|
14
|
+
query?: TQuery;
|
|
15
|
+
requiresAuth?: boolean;
|
|
16
|
+
requiresAdmin?: boolean;
|
|
17
|
+
requiresCaptcha?: CaptchaAction;
|
|
18
|
+
rateLimit?: RateLimitSpec;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/shared/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AAExE,MAAM,MAAM,aAAa,GACtB,cAAc,GACd,OAAO,GACP,UAAU,GACV,iBAAiB,GACjB,gBAAgB,CAAC;AAEpB,MAAM,MAAM,aAAa,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,gBAAgB,CAC3B,QAAQ,SAAS,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,EAC5C,SAAS,SAAS,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,EAC7C,OAAO,SAAS,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,EAC3C,MAAM,SAAS,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,IACvC;IACH,MAAM,EAAE,aAAa,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,aAAa,CAAC;IAChC,SAAS,CAAC,EAAE,aAAa,CAAC;CAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/shared/types.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,17 +1,43 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
"name": "@gigapay-dev/contracts",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "API contracts for GigaPay v3 platform — Zod schemas, endpoint definitions, typed client",
|
|
5
|
+
"main": "./build/index.js",
|
|
6
|
+
"types": "./build/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./build/index.d.ts",
|
|
10
|
+
"import": "./build/index.js",
|
|
11
|
+
"require": "./build/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"build/**"
|
|
16
|
+
],
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc",
|
|
22
|
+
"typecheck": "tsc --noEmit",
|
|
23
|
+
"prepublishOnly": "npm run build",
|
|
24
|
+
"version:patch": "npm version patch",
|
|
25
|
+
"version:minor": "npm version minor",
|
|
26
|
+
"version:major": "npm version major"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"gigapay",
|
|
30
|
+
"contracts",
|
|
31
|
+
"api",
|
|
32
|
+
"zod",
|
|
33
|
+
"typescript"
|
|
34
|
+
],
|
|
35
|
+
"author": "sergei-js",
|
|
36
|
+
"license": "ISC",
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"zod": "^4.4.3"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"typescript": "^5.7.3"
|
|
42
|
+
}
|
|
17
43
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import z from "zod";
|
|
2
|
-
export declare const ApiResponseSchema: z.ZodObject<{
|
|
3
|
-
status: z.ZodNumber;
|
|
4
|
-
error: z.ZodUnion<[z.ZodString, z.ZodLiteral<false>]>;
|
|
5
|
-
error_code: z.ZodUnion<[z.ZodString, z.ZodLiteral<false>]>;
|
|
6
|
-
data: z.ZodOptional<z.ZodAny>;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
status: number;
|
|
9
|
-
error: string | false;
|
|
10
|
-
error_code: string | false;
|
|
11
|
-
data?: any;
|
|
12
|
-
}, {
|
|
13
|
-
status: number;
|
|
14
|
-
error: string | false;
|
|
15
|
-
error_code: string | false;
|
|
16
|
-
data?: any;
|
|
17
|
-
}>;
|
|
18
|
-
export type ApiResponse = z.infer<typeof ApiResponseSchema>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ApiResponseSchema = void 0;
|
|
7
|
-
const zod_1 = __importDefault(require("zod"));
|
|
8
|
-
exports.ApiResponseSchema = zod_1.default.object({
|
|
9
|
-
status: zod_1.default.coerce.number(),
|
|
10
|
-
error: zod_1.default.union([zod_1.default.string(), zod_1.default.literal(false)]),
|
|
11
|
-
error_code: zod_1.default.union([zod_1.default.string(), zod_1.default.literal(false)]),
|
|
12
|
-
data: zod_1.default.any().optional(),
|
|
13
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import z from "zod";
|
|
2
|
-
import { UserLoginResponseSchema } from "./login";
|
|
3
|
-
export declare const ConfirmCodeRequestSchema: z.ZodObject<{
|
|
4
|
-
code: z.ZodString;
|
|
5
|
-
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
code: string;
|
|
7
|
-
}, {
|
|
8
|
-
code: string;
|
|
9
|
-
}>;
|
|
10
|
-
export type ConfirmCodeRequest = z.infer<typeof ConfirmCodeRequestSchema>;
|
|
11
|
-
export type ConfirmCodeResponse = z.infer<typeof UserLoginResponseSchema>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ConfirmCodeRequestSchema = void 0;
|
|
7
|
-
const zod_1 = __importDefault(require("zod"));
|
|
8
|
-
const consts_1 = require("../consts");
|
|
9
|
-
exports.ConfirmCodeRequestSchema = zod_1.default.object({
|
|
10
|
-
code: zod_1.default.string().min(consts_1.CONFIRMATION_CODE_LENGTH),
|
|
11
|
-
});
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import z from "zod";
|
|
2
|
-
export declare const AuthEndpoints: {
|
|
3
|
-
login: {
|
|
4
|
-
method: "POST";
|
|
5
|
-
path: string;
|
|
6
|
-
request: z.ZodObject<{
|
|
7
|
-
email: z.ZodString;
|
|
8
|
-
password: z.ZodString;
|
|
9
|
-
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
email: string;
|
|
11
|
-
password: string;
|
|
12
|
-
}, {
|
|
13
|
-
email: string;
|
|
14
|
-
password: string;
|
|
15
|
-
}>;
|
|
16
|
-
response: z.ZodObject<{
|
|
17
|
-
accessToken: z.ZodString;
|
|
18
|
-
}, "strip", z.ZodTypeAny, {
|
|
19
|
-
accessToken: string;
|
|
20
|
-
}, {
|
|
21
|
-
accessToken: string;
|
|
22
|
-
}>;
|
|
23
|
-
};
|
|
24
|
-
register: {
|
|
25
|
-
method: "POST";
|
|
26
|
-
path: string;
|
|
27
|
-
request: z.ZodObject<{
|
|
28
|
-
email: z.ZodString;
|
|
29
|
-
password: z.ZodString;
|
|
30
|
-
}, "strip", z.ZodTypeAny, {
|
|
31
|
-
email: string;
|
|
32
|
-
password: string;
|
|
33
|
-
}, {
|
|
34
|
-
email: string;
|
|
35
|
-
password: string;
|
|
36
|
-
}>;
|
|
37
|
-
response: z.ZodObject<{
|
|
38
|
-
accessToken: z.ZodString;
|
|
39
|
-
}, "strip", z.ZodTypeAny, {
|
|
40
|
-
accessToken: string;
|
|
41
|
-
}, {
|
|
42
|
-
accessToken: string;
|
|
43
|
-
}>;
|
|
44
|
-
};
|
|
45
|
-
refresh: {
|
|
46
|
-
method: "GET";
|
|
47
|
-
path: string;
|
|
48
|
-
request: z.ZodVoid;
|
|
49
|
-
response: z.ZodObject<{
|
|
50
|
-
accessToken: z.ZodString;
|
|
51
|
-
}, "strip", z.ZodTypeAny, {
|
|
52
|
-
accessToken: string;
|
|
53
|
-
}, {
|
|
54
|
-
accessToken: string;
|
|
55
|
-
}>;
|
|
56
|
-
};
|
|
57
|
-
reset: {
|
|
58
|
-
method: "POST";
|
|
59
|
-
path: string;
|
|
60
|
-
request: z.ZodObject<{
|
|
61
|
-
code: z.ZodString;
|
|
62
|
-
password: z.ZodString;
|
|
63
|
-
}, "strip", z.ZodTypeAny, {
|
|
64
|
-
password: string;
|
|
65
|
-
code: string;
|
|
66
|
-
}, {
|
|
67
|
-
password: string;
|
|
68
|
-
code: string;
|
|
69
|
-
}>;
|
|
70
|
-
response: z.ZodVoid;
|
|
71
|
-
};
|
|
72
|
-
confirm: {
|
|
73
|
-
method: "GET";
|
|
74
|
-
path: string;
|
|
75
|
-
request: z.ZodObject<{
|
|
76
|
-
code: z.ZodString;
|
|
77
|
-
}, "strip", z.ZodTypeAny, {
|
|
78
|
-
code: string;
|
|
79
|
-
}, {
|
|
80
|
-
code: string;
|
|
81
|
-
}>;
|
|
82
|
-
response: z.ZodObject<{
|
|
83
|
-
accessToken: z.ZodString;
|
|
84
|
-
}, "strip", z.ZodTypeAny, {
|
|
85
|
-
accessToken: string;
|
|
86
|
-
}, {
|
|
87
|
-
accessToken: string;
|
|
88
|
-
}>;
|
|
89
|
-
};
|
|
90
|
-
profile: {
|
|
91
|
-
method: "GET";
|
|
92
|
-
path: string;
|
|
93
|
-
request: z.ZodVoid;
|
|
94
|
-
response: z.ZodObject<{
|
|
95
|
-
id: z.ZodNumber;
|
|
96
|
-
username: z.ZodString;
|
|
97
|
-
email: z.ZodString;
|
|
98
|
-
avatar: z.ZodNullable<z.ZodString>;
|
|
99
|
-
}, "strip", z.ZodTypeAny, {
|
|
100
|
-
email: string;
|
|
101
|
-
id: number;
|
|
102
|
-
username: string;
|
|
103
|
-
avatar: string | null;
|
|
104
|
-
}, {
|
|
105
|
-
email: string;
|
|
106
|
-
id: number;
|
|
107
|
-
username: string;
|
|
108
|
-
avatar: string | null;
|
|
109
|
-
}>;
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
export type AuthEndpointKey = keyof typeof AuthEndpoints;
|
|
113
|
-
export type GetAuthRequest<K extends AuthEndpointKey> = z.infer<typeof AuthEndpoints[K]["request"]>;
|
|
114
|
-
export type GetAuthResponse<K extends AuthEndpointKey> = z.infer<typeof AuthEndpoints[K]["response"]>;
|