@gigapay-dev/contracts 3.26.0 → 3.28.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/build/domains/admin/index.d.ts +103 -0
- package/build/domains/admin/index.d.ts.map +1 -1
- package/build/domains/admin/index.js +22 -0
- package/build/domains/admin/index.js.map +1 -1
- package/build/domains/admin/payment-methods.d.ts +108 -0
- package/build/domains/admin/payment-methods.d.ts.map +1 -0
- package/build/domains/admin/payment-methods.js +55 -0
- package/build/domains/admin/payment-methods.js.map +1 -0
- package/build/domains/admin/settings.d.ts +46 -0
- package/build/domains/admin/settings.d.ts.map +1 -0
- package/build/domains/admin/settings.js +35 -0
- package/build/domains/admin/settings.js.map +1 -0
- package/build/domains/auth/index.d.ts +120 -0
- package/build/domains/auth/index.d.ts.map +1 -1
- package/build/domains/auth/index.js +3 -0
- package/build/domains/auth/index.js.map +1 -1
- package/build/domains/auth/passkeys.d.ts +345 -0
- package/build/domains/auth/passkeys.d.ts.map +1 -0
- package/build/domains/auth/passkeys.js +107 -0
- package/build/domains/auth/passkeys.js.map +1 -0
- package/build/domains/products/commands.d.ts +6 -6
- package/build/domains/products/dtos.d.ts +2 -2
- package/build/domains/products/index.d.ts +4 -4
- package/build/domains/products/queries.d.ts +4 -4
- package/build/domains/users/dtos.d.ts +27 -0
- package/build/domains/users/dtos.d.ts.map +1 -1
- package/build/domains/users/dtos.js +18 -1
- package/build/domains/users/dtos.js.map +1 -1
- package/build/domains/users/index.d.ts +76 -0
- package/build/domains/users/index.d.ts.map +1 -1
- package/build/domains/users/index.js +2 -2
- package/build/domains/users/index.js.map +1 -1
- package/build/index.d.ts +262 -4
- package/build/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from "./payment-methods";
|
|
2
|
+
export * from "./settings";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
export declare const AdminDashboardSummarySchema: z.ZodObject<{
|
|
3
5
|
usersTotal: z.ZodNumber;
|
|
@@ -196,5 +198,106 @@ export declare const AdminEndpoints: {
|
|
|
196
198
|
readonly requiresAuth: true;
|
|
197
199
|
readonly requiresAdmin: true;
|
|
198
200
|
};
|
|
201
|
+
readonly listPaymentMethods: {
|
|
202
|
+
readonly method: "GET";
|
|
203
|
+
readonly path: "/api/admin/payment-methods";
|
|
204
|
+
readonly response: z.ZodArray<z.ZodObject<{
|
|
205
|
+
id: z.ZodNumber;
|
|
206
|
+
key: z.ZodString;
|
|
207
|
+
uniqueKey: z.ZodString;
|
|
208
|
+
name: z.ZodString;
|
|
209
|
+
label: z.ZodString;
|
|
210
|
+
type: z.ZodString;
|
|
211
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
212
|
+
image: z.ZodNullable<z.ZodString>;
|
|
213
|
+
provider: z.ZodEnum<{
|
|
214
|
+
antilopay: "antilopay";
|
|
215
|
+
cryptopayo: "cryptopayo";
|
|
216
|
+
}>;
|
|
217
|
+
currencies: z.ZodArray<z.ZodString>;
|
|
218
|
+
minAmountUsd: z.ZodString;
|
|
219
|
+
maxAmountUsd: z.ZodString;
|
|
220
|
+
acquiringFeePct: z.ZodString;
|
|
221
|
+
serviceFeePct: z.ZodString;
|
|
222
|
+
cryptoNetwork: z.ZodNullable<z.ZodString>;
|
|
223
|
+
cryptoToken: z.ZodNullable<z.ZodString>;
|
|
224
|
+
isActive: z.ZodBoolean;
|
|
225
|
+
enabled: z.ZodBoolean;
|
|
226
|
+
isEnabled: z.ZodBoolean;
|
|
227
|
+
}, z.core.$strip>>;
|
|
228
|
+
readonly requiresAuth: true;
|
|
229
|
+
readonly requiresAdmin: true;
|
|
230
|
+
};
|
|
231
|
+
readonly updatePaymentMethod: {
|
|
232
|
+
readonly method: "PATCH";
|
|
233
|
+
readonly path: "/api/admin/payment-methods/:id";
|
|
234
|
+
readonly params: z.ZodObject<{
|
|
235
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
236
|
+
}, z.core.$strip>;
|
|
237
|
+
readonly request: z.ZodObject<{
|
|
238
|
+
minAmountUsd: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
239
|
+
maxAmountUsd: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
240
|
+
acquiringFeePct: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
241
|
+
cryptoNetwork: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
242
|
+
cryptoToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
243
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
244
|
+
}, z.core.$strip>;
|
|
245
|
+
readonly response: z.ZodObject<{
|
|
246
|
+
id: z.ZodNumber;
|
|
247
|
+
key: z.ZodString;
|
|
248
|
+
uniqueKey: z.ZodString;
|
|
249
|
+
name: z.ZodString;
|
|
250
|
+
label: z.ZodString;
|
|
251
|
+
type: z.ZodString;
|
|
252
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
253
|
+
image: z.ZodNullable<z.ZodString>;
|
|
254
|
+
provider: z.ZodEnum<{
|
|
255
|
+
antilopay: "antilopay";
|
|
256
|
+
cryptopayo: "cryptopayo";
|
|
257
|
+
}>;
|
|
258
|
+
currencies: z.ZodArray<z.ZodString>;
|
|
259
|
+
minAmountUsd: z.ZodString;
|
|
260
|
+
maxAmountUsd: z.ZodString;
|
|
261
|
+
acquiringFeePct: z.ZodString;
|
|
262
|
+
serviceFeePct: z.ZodString;
|
|
263
|
+
cryptoNetwork: z.ZodNullable<z.ZodString>;
|
|
264
|
+
cryptoToken: z.ZodNullable<z.ZodString>;
|
|
265
|
+
isActive: z.ZodBoolean;
|
|
266
|
+
enabled: z.ZodBoolean;
|
|
267
|
+
isEnabled: z.ZodBoolean;
|
|
268
|
+
}, z.core.$strip>;
|
|
269
|
+
readonly requiresAuth: true;
|
|
270
|
+
readonly requiresAdmin: true;
|
|
271
|
+
};
|
|
272
|
+
readonly getSettings: {
|
|
273
|
+
readonly method: "GET";
|
|
274
|
+
readonly path: "/api/admin/settings";
|
|
275
|
+
readonly response: z.ZodObject<{
|
|
276
|
+
desslyDiscount: z.ZodString;
|
|
277
|
+
steamMarkupPct: z.ZodString;
|
|
278
|
+
serviceEnabled: z.ZodBoolean;
|
|
279
|
+
worksEnabled: z.ZodBoolean;
|
|
280
|
+
paymentsEnabled: z.ZodBoolean;
|
|
281
|
+
}, z.core.$strip>;
|
|
282
|
+
readonly requiresAuth: true;
|
|
283
|
+
readonly requiresAdmin: true;
|
|
284
|
+
};
|
|
285
|
+
readonly updateSettings: {
|
|
286
|
+
readonly method: "PATCH";
|
|
287
|
+
readonly path: "/api/admin/settings";
|
|
288
|
+
readonly request: z.ZodObject<{
|
|
289
|
+
desslyDiscount: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
290
|
+
steamMarkupPct: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
291
|
+
}, z.core.$strict>;
|
|
292
|
+
readonly response: z.ZodObject<{
|
|
293
|
+
desslyDiscount: z.ZodString;
|
|
294
|
+
steamMarkupPct: z.ZodString;
|
|
295
|
+
serviceEnabled: z.ZodBoolean;
|
|
296
|
+
worksEnabled: z.ZodBoolean;
|
|
297
|
+
paymentsEnabled: z.ZodBoolean;
|
|
298
|
+
}, z.core.$strip>;
|
|
299
|
+
readonly requiresAuth: true;
|
|
300
|
+
readonly requiresAdmin: true;
|
|
301
|
+
};
|
|
199
302
|
};
|
|
200
303
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domains/admin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domains/admin/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,2BAA2B;;;;;;iBAMtC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;CAMH,CAAC;AAEtC,eAAO,MAAM,qBAAqB;;iBAAwC,CAAC;AAE3E,eAAO,MAAM,qBAAqB;;;;;;;;CAMG,CAAC;AAEtC,eAAO,MAAM,wBAAwB;;;;;;;;;;;CAQA,CAAC;AAEtC,eAAO,MAAM,yBAAyB;;;;;;;;;;;CAQD,CAAC;AAEtC,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;CAqBF,CAAC;AAEtC,eAAO,MAAM,0BAA0B;;;;iBAIwE,CAAC;AAEhH,eAAO,MAAM,2BAA2B;;;;;;iBAMtC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;CAOE,CAAC;AAEtC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWjB,CAAC"}
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
17
|
exports.AdminEndpoints = exports.ManualInvoicesEndpoint = exports.ManualInvoiceResponseSchema = exports.ManualInvoiceRequestSchema = exports.DesslyTransactionsEndpoint = exports.DesslyMobileGamesEndpoint = exports.DesslySteamGamesEndpoint = exports.DesslyBalanceEndpoint = exports.DesslyTxIdParamSchema = exports.GetDashboardSummaryEndpoint = exports.AdminDashboardSummarySchema = void 0;
|
|
18
|
+
__exportStar(require("./payment-methods"), exports);
|
|
19
|
+
__exportStar(require("./settings"), exports);
|
|
4
20
|
const zod_1 = require("zod");
|
|
21
|
+
const payment_methods_1 = require("./payment-methods");
|
|
22
|
+
const settings_1 = require("./settings");
|
|
5
23
|
exports.AdminDashboardSummarySchema = zod_1.z.object({
|
|
6
24
|
usersTotal: zod_1.z.number().int().nonnegative(),
|
|
7
25
|
ordersPending: zod_1.z.number().int().nonnegative(),
|
|
@@ -89,5 +107,9 @@ exports.AdminEndpoints = {
|
|
|
89
107
|
desslyMobileGames: exports.DesslyMobileGamesEndpoint,
|
|
90
108
|
desslyTransactions: exports.DesslyTransactionsEndpoint,
|
|
91
109
|
manualInvoices: exports.ManualInvoicesEndpoint,
|
|
110
|
+
listPaymentMethods: payment_methods_1.ListAdminPaymentMethodsEndpoint,
|
|
111
|
+
updatePaymentMethod: payment_methods_1.UpdateAdminPaymentMethodEndpoint,
|
|
112
|
+
getSettings: settings_1.GetAdminSettingsEndpoint,
|
|
113
|
+
updateSettings: settings_1.UpdateAdminSettingsEndpoint,
|
|
92
114
|
};
|
|
93
115
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domains/admin/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domains/admin/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,6CAA2B;AAC3B,6BAAwB;AAExB,uDAAsG;AACtG,yCAAmF;AAEtE,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC1C,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC7C,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC/C,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC7C,sBAAsB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC;AAEU,QAAA,2BAA2B,GAAG;IAC1C,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,8BAA8B;IACpC,QAAQ,EAAE,mCAA2B;IACrC,YAAY,EAAE,IAAI;IAClB,aAAa,EAAE,IAAI;CACiB,CAAC;AAEzB,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAE9D,QAAA,qBAAqB,GAAG;IACpC,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,2BAA2B;IACjC,QAAQ,EAAE,OA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E;IACtC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC5B,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACpC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAKU,QAAA,sBAAsB,GAAG;IACrC,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,4BAA4B;IAClC,OAAO,EAAE,kCAA0B;IACnC,QAAQ,EAAE,mCAA2B;IACrC,YAAY,EAAE,IAAI;IAClB,aAAa,EAAE,IAAI;CACiB,CAAC;AAEzB,QAAA,cAAc,GAAG;IAC7B,gBAAgB,EAAE,mCAA2B;IAC7C,aAAa,EAAE,6BAAqB;IACpC,gBAAgB,EAAE,gCAAwB;IAC1C,iBAAiB,EAAE,iCAAyB;IAC5C,kBAAkB,EAAE,kCAA0B;IAC9C,cAAc,EAAE,8BAAsB;IACtC,kBAAkB,EAAE,iDAA+B;IACnD,mBAAmB,EAAE,kDAAgC;IACrD,WAAW,EAAE,mCAAwB;IACrC,cAAc,EAAE,sCAA2B;CAClC,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Платёжная система в админке: лимиты, комиссии и флаги, как отдаёт `GET /api/admin/payment-methods`. */
|
|
3
|
+
export declare const AdminPaymentMethodSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodNumber;
|
|
5
|
+
key: z.ZodString;
|
|
6
|
+
uniqueKey: z.ZodString;
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
label: z.ZodString;
|
|
9
|
+
type: z.ZodString;
|
|
10
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
11
|
+
image: z.ZodNullable<z.ZodString>;
|
|
12
|
+
provider: z.ZodEnum<{
|
|
13
|
+
antilopay: "antilopay";
|
|
14
|
+
cryptopayo: "cryptopayo";
|
|
15
|
+
}>;
|
|
16
|
+
currencies: z.ZodArray<z.ZodString>;
|
|
17
|
+
minAmountUsd: z.ZodString;
|
|
18
|
+
maxAmountUsd: z.ZodString;
|
|
19
|
+
acquiringFeePct: z.ZodString;
|
|
20
|
+
serviceFeePct: z.ZodString;
|
|
21
|
+
cryptoNetwork: z.ZodNullable<z.ZodString>;
|
|
22
|
+
cryptoToken: z.ZodNullable<z.ZodString>;
|
|
23
|
+
isActive: z.ZodBoolean;
|
|
24
|
+
enabled: z.ZodBoolean;
|
|
25
|
+
isEnabled: z.ZodBoolean;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export type AdminPaymentMethod = z.infer<typeof AdminPaymentMethodSchema>;
|
|
28
|
+
export declare const UpdateAdminPaymentMethodRequestSchema: z.ZodObject<{
|
|
29
|
+
minAmountUsd: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
30
|
+
maxAmountUsd: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
31
|
+
acquiringFeePct: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
32
|
+
cryptoNetwork: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
cryptoToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
34
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export type UpdateAdminPaymentMethodRequest = z.infer<typeof UpdateAdminPaymentMethodRequestSchema>;
|
|
37
|
+
export declare const ListAdminPaymentMethodsEndpoint: {
|
|
38
|
+
readonly method: "GET";
|
|
39
|
+
readonly path: "/api/admin/payment-methods";
|
|
40
|
+
readonly response: z.ZodArray<z.ZodObject<{
|
|
41
|
+
id: z.ZodNumber;
|
|
42
|
+
key: z.ZodString;
|
|
43
|
+
uniqueKey: z.ZodString;
|
|
44
|
+
name: z.ZodString;
|
|
45
|
+
label: z.ZodString;
|
|
46
|
+
type: z.ZodString;
|
|
47
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
48
|
+
image: z.ZodNullable<z.ZodString>;
|
|
49
|
+
provider: z.ZodEnum<{
|
|
50
|
+
antilopay: "antilopay";
|
|
51
|
+
cryptopayo: "cryptopayo";
|
|
52
|
+
}>;
|
|
53
|
+
currencies: z.ZodArray<z.ZodString>;
|
|
54
|
+
minAmountUsd: z.ZodString;
|
|
55
|
+
maxAmountUsd: z.ZodString;
|
|
56
|
+
acquiringFeePct: z.ZodString;
|
|
57
|
+
serviceFeePct: z.ZodString;
|
|
58
|
+
cryptoNetwork: z.ZodNullable<z.ZodString>;
|
|
59
|
+
cryptoToken: z.ZodNullable<z.ZodString>;
|
|
60
|
+
isActive: z.ZodBoolean;
|
|
61
|
+
enabled: z.ZodBoolean;
|
|
62
|
+
isEnabled: z.ZodBoolean;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
readonly requiresAuth: true;
|
|
65
|
+
readonly requiresAdmin: true;
|
|
66
|
+
};
|
|
67
|
+
export declare const UpdateAdminPaymentMethodEndpoint: {
|
|
68
|
+
readonly method: "PATCH";
|
|
69
|
+
readonly path: "/api/admin/payment-methods/:id";
|
|
70
|
+
readonly params: z.ZodObject<{
|
|
71
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
readonly request: z.ZodObject<{
|
|
74
|
+
minAmountUsd: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
75
|
+
maxAmountUsd: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
76
|
+
acquiringFeePct: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
77
|
+
cryptoNetwork: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
|
+
cryptoToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
79
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
readonly response: z.ZodObject<{
|
|
82
|
+
id: z.ZodNumber;
|
|
83
|
+
key: z.ZodString;
|
|
84
|
+
uniqueKey: z.ZodString;
|
|
85
|
+
name: z.ZodString;
|
|
86
|
+
label: z.ZodString;
|
|
87
|
+
type: z.ZodString;
|
|
88
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
89
|
+
image: z.ZodNullable<z.ZodString>;
|
|
90
|
+
provider: z.ZodEnum<{
|
|
91
|
+
antilopay: "antilopay";
|
|
92
|
+
cryptopayo: "cryptopayo";
|
|
93
|
+
}>;
|
|
94
|
+
currencies: z.ZodArray<z.ZodString>;
|
|
95
|
+
minAmountUsd: z.ZodString;
|
|
96
|
+
maxAmountUsd: z.ZodString;
|
|
97
|
+
acquiringFeePct: z.ZodString;
|
|
98
|
+
serviceFeePct: z.ZodString;
|
|
99
|
+
cryptoNetwork: z.ZodNullable<z.ZodString>;
|
|
100
|
+
cryptoToken: z.ZodNullable<z.ZodString>;
|
|
101
|
+
isActive: z.ZodBoolean;
|
|
102
|
+
enabled: z.ZodBoolean;
|
|
103
|
+
isEnabled: z.ZodBoolean;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
readonly requiresAuth: true;
|
|
106
|
+
readonly requiresAdmin: true;
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=payment-methods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-methods.d.ts","sourceRoot":"","sources":["../../../src/domains/admin/payment-methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,0GAA0G;AAC1G,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;iBAoBnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAI1E,eAAO,MAAM,qCAAqC;;;;;;;iBAYhD,CAAC;AACH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAEpG,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMP,CAAC;AAEtC,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQR,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateAdminPaymentMethodEndpoint = exports.ListAdminPaymentMethodsEndpoint = exports.UpdateAdminPaymentMethodRequestSchema = exports.AdminPaymentMethodSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../shared/common");
|
|
6
|
+
/** Платёжная система в админке: лимиты, комиссии и флаги, как отдаёт `GET /api/admin/payment-methods`. */
|
|
7
|
+
exports.AdminPaymentMethodSchema = zod_1.z.object({
|
|
8
|
+
id: zod_1.z.number().int().positive(),
|
|
9
|
+
key: zod_1.z.string(),
|
|
10
|
+
uniqueKey: zod_1.z.string(),
|
|
11
|
+
name: zod_1.z.string(),
|
|
12
|
+
label: zod_1.z.string(),
|
|
13
|
+
type: zod_1.z.string(),
|
|
14
|
+
imageUrl: zod_1.z.string().nullable(),
|
|
15
|
+
image: zod_1.z.string().nullable(),
|
|
16
|
+
provider: zod_1.z.enum(["antilopay", "cryptopayo"]),
|
|
17
|
+
currencies: zod_1.z.array(zod_1.z.string()),
|
|
18
|
+
minAmountUsd: zod_1.z.string(),
|
|
19
|
+
maxAmountUsd: zod_1.z.string(),
|
|
20
|
+
acquiringFeePct: zod_1.z.string(),
|
|
21
|
+
serviceFeePct: zod_1.z.string(),
|
|
22
|
+
cryptoNetwork: zod_1.z.string().nullable(),
|
|
23
|
+
cryptoToken: zod_1.z.string().nullable(),
|
|
24
|
+
isActive: zod_1.z.boolean(),
|
|
25
|
+
enabled: zod_1.z.boolean(),
|
|
26
|
+
isEnabled: zod_1.z.boolean(),
|
|
27
|
+
});
|
|
28
|
+
const Amount = zod_1.z.coerce.number().finite().nonnegative();
|
|
29
|
+
exports.UpdateAdminPaymentMethodRequestSchema = zod_1.z
|
|
30
|
+
.object({
|
|
31
|
+
minAmountUsd: Amount.optional(),
|
|
32
|
+
maxAmountUsd: Amount.optional(),
|
|
33
|
+
acquiringFeePct: Amount.optional(),
|
|
34
|
+
cryptoNetwork: zod_1.z.string().trim().max(64).nullable().optional(),
|
|
35
|
+
cryptoToken: zod_1.z.string().trim().max(64).nullable().optional(),
|
|
36
|
+
isActive: zod_1.z.boolean().optional(),
|
|
37
|
+
})
|
|
38
|
+
.refine(value => value.minAmountUsd === undefined || value.maxAmountUsd === undefined || value.minAmountUsd <= value.maxAmountUsd, { message: "minAmountUsd must not exceed maxAmountUsd", path: ["minAmountUsd"] });
|
|
39
|
+
exports.ListAdminPaymentMethodsEndpoint = {
|
|
40
|
+
method: "GET",
|
|
41
|
+
path: "/api/admin/payment-methods",
|
|
42
|
+
response: zod_1.z.array(exports.AdminPaymentMethodSchema),
|
|
43
|
+
requiresAuth: true,
|
|
44
|
+
requiresAdmin: true,
|
|
45
|
+
};
|
|
46
|
+
exports.UpdateAdminPaymentMethodEndpoint = {
|
|
47
|
+
method: "PATCH",
|
|
48
|
+
path: "/api/admin/payment-methods/:id",
|
|
49
|
+
params: common_1.IdParamSchema,
|
|
50
|
+
request: exports.UpdateAdminPaymentMethodRequestSchema,
|
|
51
|
+
response: exports.AdminPaymentMethodSchema,
|
|
52
|
+
requiresAuth: true,
|
|
53
|
+
requiresAdmin: true,
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=payment-methods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-methods.js","sourceRoot":"","sources":["../../../src/domains/admin/payment-methods.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,gDAAoD;AAEpD,0GAA0G;AAC7F,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,EAAE,EAAE,OAAC,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eAAe,EAAE,MAAM,CAAC,QAAQ,EAAE;IAClC,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC9D,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5D,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC;KACD,MAAM,CACN,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,KAAK,SAAS,IAAI,KAAK,CAAC,YAAY,KAAK,SAAS,IAAI,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,YAAY,EACzH,EAAE,OAAO,EAAE,2CAA2C,EAAE,IAAI,EAAE,CAAC,cAAc,CAAC,EAAE,CAChF,CAAC;AAGU,QAAA,+BAA+B,GAAG;IAC9C,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,4BAA4B;IAClC,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,gCAAwB,CAAC;IAC3C,YAAY,EAAE,IAAI;IAClB,aAAa,EAAE,IAAI;CACiB,CAAC;AAEzB,QAAA,gCAAgC,GAAG;IAC/C,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,gCAAgC;IACtC,MAAM,EAAE,sBAAa;IACrB,OAAO,EAAE,6CAAqC;IAC9C,QAAQ,EAAE,gCAAwB;IAClC,YAAY,EAAE,IAAI;IAClB,aAAa,EAAE,IAAI;CACiB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Настройки магазина: `GET/PATCH /api/admin/settings`. Флаги статуса отдаются, но через этот эндпоинт не меняются. */
|
|
3
|
+
export declare const AdminSettingsSchema: z.ZodObject<{
|
|
4
|
+
desslyDiscount: z.ZodString;
|
|
5
|
+
steamMarkupPct: z.ZodString;
|
|
6
|
+
serviceEnabled: z.ZodBoolean;
|
|
7
|
+
worksEnabled: z.ZodBoolean;
|
|
8
|
+
paymentsEnabled: z.ZodBoolean;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type AdminSettings = z.infer<typeof AdminSettingsSchema>;
|
|
11
|
+
export declare const UpdateAdminSettingsRequestSchema: z.ZodObject<{
|
|
12
|
+
desslyDiscount: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
13
|
+
steamMarkupPct: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
14
|
+
}, z.core.$strict>;
|
|
15
|
+
export type UpdateAdminSettingsRequest = z.infer<typeof UpdateAdminSettingsRequestSchema>;
|
|
16
|
+
export declare const GetAdminSettingsEndpoint: {
|
|
17
|
+
readonly method: "GET";
|
|
18
|
+
readonly path: "/api/admin/settings";
|
|
19
|
+
readonly response: z.ZodObject<{
|
|
20
|
+
desslyDiscount: z.ZodString;
|
|
21
|
+
steamMarkupPct: z.ZodString;
|
|
22
|
+
serviceEnabled: z.ZodBoolean;
|
|
23
|
+
worksEnabled: z.ZodBoolean;
|
|
24
|
+
paymentsEnabled: z.ZodBoolean;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
readonly requiresAuth: true;
|
|
27
|
+
readonly requiresAdmin: true;
|
|
28
|
+
};
|
|
29
|
+
export declare const UpdateAdminSettingsEndpoint: {
|
|
30
|
+
readonly method: "PATCH";
|
|
31
|
+
readonly path: "/api/admin/settings";
|
|
32
|
+
readonly request: z.ZodObject<{
|
|
33
|
+
desslyDiscount: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
34
|
+
steamMarkupPct: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
readonly response: z.ZodObject<{
|
|
37
|
+
desslyDiscount: z.ZodString;
|
|
38
|
+
steamMarkupPct: z.ZodString;
|
|
39
|
+
serviceEnabled: z.ZodBoolean;
|
|
40
|
+
worksEnabled: z.ZodBoolean;
|
|
41
|
+
paymentsEnabled: z.ZodBoolean;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
readonly requiresAuth: true;
|
|
44
|
+
readonly requiresAdmin: true;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/domains/admin/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,uHAAuH;AACvH,eAAO,MAAM,mBAAmB;;;;;;iBAM9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAIhE,eAAO,MAAM,gCAAgC;;;kBAKnC,CAAC;AACX,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,eAAO,MAAM,wBAAwB;;;;;;;;;;;;CAMA,CAAC;AAEtC,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;CAOH,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateAdminSettingsEndpoint = exports.GetAdminSettingsEndpoint = exports.UpdateAdminSettingsRequestSchema = exports.AdminSettingsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/** Настройки магазина: `GET/PATCH /api/admin/settings`. Флаги статуса отдаются, но через этот эндпоинт не меняются. */
|
|
6
|
+
exports.AdminSettingsSchema = zod_1.z.object({
|
|
7
|
+
desslyDiscount: zod_1.z.string(),
|
|
8
|
+
steamMarkupPct: zod_1.z.string(),
|
|
9
|
+
serviceEnabled: zod_1.z.boolean(),
|
|
10
|
+
worksEnabled: zod_1.z.boolean(),
|
|
11
|
+
paymentsEnabled: zod_1.z.boolean(),
|
|
12
|
+
});
|
|
13
|
+
const PercentValue = zod_1.z.union([zod_1.z.string().regex(/^\d+(\.\d{1,8})?$/), zod_1.z.number()]);
|
|
14
|
+
exports.UpdateAdminSettingsRequestSchema = zod_1.z
|
|
15
|
+
.object({
|
|
16
|
+
desslyDiscount: PercentValue,
|
|
17
|
+
steamMarkupPct: PercentValue,
|
|
18
|
+
})
|
|
19
|
+
.strict();
|
|
20
|
+
exports.GetAdminSettingsEndpoint = {
|
|
21
|
+
method: "GET",
|
|
22
|
+
path: "/api/admin/settings",
|
|
23
|
+
response: exports.AdminSettingsSchema,
|
|
24
|
+
requiresAuth: true,
|
|
25
|
+
requiresAdmin: true,
|
|
26
|
+
};
|
|
27
|
+
exports.UpdateAdminSettingsEndpoint = {
|
|
28
|
+
method: "PATCH",
|
|
29
|
+
path: "/api/admin/settings",
|
|
30
|
+
request: exports.UpdateAdminSettingsRequestSchema,
|
|
31
|
+
response: exports.AdminSettingsSchema,
|
|
32
|
+
requiresAuth: true,
|
|
33
|
+
requiresAdmin: true,
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/domains/admin/settings.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAGxB,uHAAuH;AAC1G,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,cAAc,EAAE,OAAC,CAAC,OAAO,EAAE;IAC3B,YAAY,EAAE,OAAC,CAAC,OAAO,EAAE;IACzB,eAAe,EAAE,OAAC,CAAC,OAAO,EAAE;CAC5B,CAAC,CAAC;AAGH,MAAM,YAAY,GAAG,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mBAAmB,CAAC,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAErE,QAAA,gCAAgC,GAAG,OAAC;KAC/C,MAAM,CAAC;IACP,cAAc,EAAE,YAAY;IAC5B,cAAc,EAAE,YAAY;CAC5B,CAAC;KACD,MAAM,EAAE,CAAC;AAGE,QAAA,wBAAwB,GAAG;IACvC,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,qBAAqB;IAC3B,QAAQ,EAAE,2BAAmB;IAC7B,YAAY,EAAE,IAAI;IAClB,aAAa,EAAE,IAAI;CACiB,CAAC;AAEzB,QAAA,2BAA2B,GAAG;IAC1C,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,qBAAqB;IAC3B,OAAO,EAAE,wCAAgC;IACzC,QAAQ,EAAE,2BAAmB;IAC7B,YAAY,EAAE,IAAI;IAClB,aAAa,EAAE,IAAI;CACiB,CAAC"}
|
|
@@ -2,7 +2,127 @@ export * from "./dtos";
|
|
|
2
2
|
export * from "./commands";
|
|
3
3
|
export * from "./queries";
|
|
4
4
|
export * from "./events";
|
|
5
|
+
export * from "./passkeys";
|
|
5
6
|
export declare const AuthEndpoints: {
|
|
7
|
+
readonly passkeyRegistrationOptions: {
|
|
8
|
+
readonly method: "POST";
|
|
9
|
+
readonly path: "/api/auth/passkeys/registration/options";
|
|
10
|
+
readonly response: import("zod").ZodObject<{
|
|
11
|
+
challenge: import("zod").ZodString;
|
|
12
|
+
rp: import("zod").ZodObject<{
|
|
13
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
14
|
+
name: import("zod").ZodString;
|
|
15
|
+
}, import("zod/v4/core").$loose>;
|
|
16
|
+
user: import("zod").ZodObject<{
|
|
17
|
+
id: import("zod").ZodString;
|
|
18
|
+
name: import("zod").ZodString;
|
|
19
|
+
displayName: import("zod").ZodString;
|
|
20
|
+
}, import("zod/v4/core").$loose>;
|
|
21
|
+
pubKeyCredParams: import("zod").ZodArray<import("zod").ZodObject<{
|
|
22
|
+
type: import("zod").ZodLiteral<"public-key">;
|
|
23
|
+
alg: import("zod").ZodNumber;
|
|
24
|
+
}, import("zod/v4/core").$strip>>;
|
|
25
|
+
timeout: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
26
|
+
attestation: import("zod").ZodOptional<import("zod").ZodString>;
|
|
27
|
+
excludeCredentials: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>;
|
|
28
|
+
authenticatorSelection: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
29
|
+
}, import("zod/v4/core").$loose>;
|
|
30
|
+
readonly requiresAuth: true;
|
|
31
|
+
};
|
|
32
|
+
readonly passkeyRegistrationVerify: {
|
|
33
|
+
readonly method: "POST";
|
|
34
|
+
readonly path: "/api/auth/passkeys/registration/verify";
|
|
35
|
+
readonly request: import("zod").ZodObject<{
|
|
36
|
+
response: import("zod").ZodObject<{
|
|
37
|
+
id: import("zod").ZodString;
|
|
38
|
+
rawId: import("zod").ZodString;
|
|
39
|
+
type: import("zod").ZodLiteral<"public-key">;
|
|
40
|
+
response: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
41
|
+
clientExtensionResults: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
42
|
+
authenticatorAttachment: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
43
|
+
platform: "platform";
|
|
44
|
+
"cross-platform": "cross-platform";
|
|
45
|
+
}>>;
|
|
46
|
+
}, import("zod/v4/core").$loose>;
|
|
47
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
48
|
+
}, import("zod/v4/core").$strip>;
|
|
49
|
+
readonly response: import("zod").ZodObject<{
|
|
50
|
+
id: import("zod").ZodNumber;
|
|
51
|
+
name: import("zod").ZodNullable<import("zod").ZodString>;
|
|
52
|
+
deviceType: import("zod").ZodString;
|
|
53
|
+
backedUp: import("zod").ZodBoolean;
|
|
54
|
+
createdAt: import("zod").ZodString;
|
|
55
|
+
lastUsedAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
56
|
+
}, import("zod/v4/core").$strip>;
|
|
57
|
+
readonly requiresAuth: true;
|
|
58
|
+
};
|
|
59
|
+
readonly passkeyLoginOptions: {
|
|
60
|
+
readonly method: "POST";
|
|
61
|
+
readonly path: "/api/auth/passkeys/login/options";
|
|
62
|
+
readonly response: import("zod").ZodObject<{
|
|
63
|
+
challenge: import("zod").ZodString;
|
|
64
|
+
rpId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
65
|
+
timeout: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
66
|
+
userVerification: import("zod").ZodOptional<import("zod").ZodString>;
|
|
67
|
+
allowCredentials: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>;
|
|
68
|
+
}, import("zod/v4/core").$loose>;
|
|
69
|
+
readonly rateLimit: {
|
|
70
|
+
readonly limit: 10;
|
|
71
|
+
readonly ttlSec: 900;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
readonly passkeyLoginVerify: {
|
|
75
|
+
readonly method: "POST";
|
|
76
|
+
readonly path: "/api/auth/passkeys/login/verify";
|
|
77
|
+
readonly request: import("zod").ZodObject<{
|
|
78
|
+
response: import("zod").ZodObject<{
|
|
79
|
+
id: import("zod").ZodString;
|
|
80
|
+
rawId: import("zod").ZodString;
|
|
81
|
+
type: import("zod").ZodLiteral<"public-key">;
|
|
82
|
+
response: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
83
|
+
clientExtensionResults: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
84
|
+
authenticatorAttachment: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
85
|
+
platform: "platform";
|
|
86
|
+
"cross-platform": "cross-platform";
|
|
87
|
+
}>>;
|
|
88
|
+
}, import("zod/v4/core").$loose>;
|
|
89
|
+
}, import("zod/v4/core").$strip>;
|
|
90
|
+
readonly response: import("zod").ZodObject<{
|
|
91
|
+
accessToken: import("zod").ZodString;
|
|
92
|
+
role: import("zod").ZodEnum<{
|
|
93
|
+
USER: "USER";
|
|
94
|
+
ADMIN: "ADMIN";
|
|
95
|
+
}>;
|
|
96
|
+
}, import("zod/v4/core").$strip>;
|
|
97
|
+
readonly rateLimit: {
|
|
98
|
+
readonly limit: 5;
|
|
99
|
+
readonly ttlSec: 900;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
readonly passkeyList: {
|
|
103
|
+
readonly method: "GET";
|
|
104
|
+
readonly path: "/api/auth/passkeys";
|
|
105
|
+
readonly response: import("zod").ZodArray<import("zod").ZodObject<{
|
|
106
|
+
id: import("zod").ZodNumber;
|
|
107
|
+
name: import("zod").ZodNullable<import("zod").ZodString>;
|
|
108
|
+
deviceType: import("zod").ZodString;
|
|
109
|
+
backedUp: import("zod").ZodBoolean;
|
|
110
|
+
createdAt: import("zod").ZodString;
|
|
111
|
+
lastUsedAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
112
|
+
}, import("zod/v4/core").$strip>>;
|
|
113
|
+
readonly requiresAuth: true;
|
|
114
|
+
};
|
|
115
|
+
readonly passkeyRemove: {
|
|
116
|
+
readonly method: "DELETE";
|
|
117
|
+
readonly path: "/api/auth/passkeys/:id";
|
|
118
|
+
readonly params: import("zod").ZodObject<{
|
|
119
|
+
id: import("zod").ZodCoercedNumber<unknown>;
|
|
120
|
+
}, import("zod/v4/core").$strip>;
|
|
121
|
+
readonly response: import("zod").ZodObject<{
|
|
122
|
+
ok: import("zod").ZodLiteral<true>;
|
|
123
|
+
}, import("zod/v4/core").$strip>;
|
|
124
|
+
readonly requiresAuth: true;
|
|
125
|
+
};
|
|
6
126
|
readonly getCurrentUser: {
|
|
7
127
|
readonly method: "GET";
|
|
8
128
|
readonly path: "/api/auth/me";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domains/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domains/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAM3B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIhB,CAAC"}
|
|
@@ -19,10 +19,13 @@ __exportStar(require("./dtos"), exports);
|
|
|
19
19
|
__exportStar(require("./commands"), exports);
|
|
20
20
|
__exportStar(require("./queries"), exports);
|
|
21
21
|
__exportStar(require("./events"), exports);
|
|
22
|
+
__exportStar(require("./passkeys"), exports);
|
|
22
23
|
const commands_1 = require("./commands");
|
|
23
24
|
const queries_1 = require("./queries");
|
|
25
|
+
const passkeys_1 = require("./passkeys");
|
|
24
26
|
exports.AuthEndpoints = {
|
|
25
27
|
...commands_1.AuthCommands,
|
|
26
28
|
...queries_1.AuthQueries,
|
|
29
|
+
...passkeys_1.AuthPasskeys,
|
|
27
30
|
};
|
|
28
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domains/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,6CAA2B;AAC3B,4CAA0B;AAC1B,2CAAyB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domains/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,6CAA2B;AAC3B,4CAA0B;AAC1B,2CAAyB;AACzB,6CAA2B;AAE3B,yCAA0C;AAC1C,uCAAwC;AACxC,yCAA0C;AAE7B,QAAA,aAAa,GAAG;IAC5B,GAAG,uBAAY;IACf,GAAG,qBAAW;IACd,GAAG,uBAAY;CACN,CAAC"}
|