@gigapay-dev/contracts 3.26.0 → 3.27.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/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/index.d.ts +123 -4
- package/build/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -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"}
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Passkey (WebAuthn). Объекты options и credential описаны минимально:
|
|
4
|
+
* полную структуру проверяет браузер и @simplewebauthn/server на бэкенде.
|
|
5
|
+
*/
|
|
6
|
+
declare const PublicKeyCredentialJSONSchema: z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
rawId: z.ZodString;
|
|
9
|
+
type: z.ZodLiteral<"public-key">;
|
|
10
|
+
response: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
11
|
+
clientExtensionResults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
12
|
+
authenticatorAttachment: z.ZodOptional<z.ZodEnum<{
|
|
13
|
+
platform: "platform";
|
|
14
|
+
"cross-platform": "cross-platform";
|
|
15
|
+
}>>;
|
|
16
|
+
}, z.core.$loose>;
|
|
17
|
+
export type PublicKeyCredentialJSON = z.infer<typeof PublicKeyCredentialJSONSchema>;
|
|
18
|
+
export declare const PasskeyRegistrationOptionsSchema: z.ZodObject<{
|
|
19
|
+
challenge: z.ZodString;
|
|
20
|
+
rp: z.ZodObject<{
|
|
21
|
+
id: z.ZodOptional<z.ZodString>;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
}, z.core.$loose>;
|
|
24
|
+
user: z.ZodObject<{
|
|
25
|
+
id: z.ZodString;
|
|
26
|
+
name: z.ZodString;
|
|
27
|
+
displayName: z.ZodString;
|
|
28
|
+
}, z.core.$loose>;
|
|
29
|
+
pubKeyCredParams: z.ZodArray<z.ZodObject<{
|
|
30
|
+
type: z.ZodLiteral<"public-key">;
|
|
31
|
+
alg: z.ZodNumber;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
attestation: z.ZodOptional<z.ZodString>;
|
|
35
|
+
excludeCredentials: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
36
|
+
authenticatorSelection: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
37
|
+
}, z.core.$loose>;
|
|
38
|
+
export type PasskeyRegistrationOptions = z.infer<typeof PasskeyRegistrationOptionsSchema>;
|
|
39
|
+
export declare const PasskeyLoginOptionsSchema: z.ZodObject<{
|
|
40
|
+
challenge: z.ZodString;
|
|
41
|
+
rpId: z.ZodOptional<z.ZodString>;
|
|
42
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
userVerification: z.ZodOptional<z.ZodString>;
|
|
44
|
+
allowCredentials: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
45
|
+
}, z.core.$loose>;
|
|
46
|
+
export type PasskeyLoginOptions = z.infer<typeof PasskeyLoginOptionsSchema>;
|
|
47
|
+
export declare const PasskeySchema: z.ZodObject<{
|
|
48
|
+
id: z.ZodNumber;
|
|
49
|
+
name: z.ZodNullable<z.ZodString>;
|
|
50
|
+
deviceType: z.ZodString;
|
|
51
|
+
backedUp: z.ZodBoolean;
|
|
52
|
+
createdAt: z.ZodString;
|
|
53
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
export type Passkey = z.infer<typeof PasskeySchema>;
|
|
56
|
+
export declare const PasskeyRegistrationVerifyRequestSchema: z.ZodObject<{
|
|
57
|
+
response: z.ZodObject<{
|
|
58
|
+
id: z.ZodString;
|
|
59
|
+
rawId: z.ZodString;
|
|
60
|
+
type: z.ZodLiteral<"public-key">;
|
|
61
|
+
response: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
62
|
+
clientExtensionResults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
63
|
+
authenticatorAttachment: z.ZodOptional<z.ZodEnum<{
|
|
64
|
+
platform: "platform";
|
|
65
|
+
"cross-platform": "cross-platform";
|
|
66
|
+
}>>;
|
|
67
|
+
}, z.core.$loose>;
|
|
68
|
+
name: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
export type PasskeyRegistrationVerifyRequest = z.infer<typeof PasskeyRegistrationVerifyRequestSchema>;
|
|
71
|
+
export declare const PasskeyLoginVerifyRequestSchema: z.ZodObject<{
|
|
72
|
+
response: z.ZodObject<{
|
|
73
|
+
id: z.ZodString;
|
|
74
|
+
rawId: z.ZodString;
|
|
75
|
+
type: z.ZodLiteral<"public-key">;
|
|
76
|
+
response: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
77
|
+
clientExtensionResults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
78
|
+
authenticatorAttachment: z.ZodOptional<z.ZodEnum<{
|
|
79
|
+
platform: "platform";
|
|
80
|
+
"cross-platform": "cross-platform";
|
|
81
|
+
}>>;
|
|
82
|
+
}, z.core.$loose>;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
export type PasskeyLoginVerifyRequest = z.infer<typeof PasskeyLoginVerifyRequestSchema>;
|
|
85
|
+
export declare const PasskeyLoginResponseSchema: z.ZodObject<{
|
|
86
|
+
accessToken: z.ZodString;
|
|
87
|
+
role: z.ZodEnum<{
|
|
88
|
+
USER: "USER";
|
|
89
|
+
ADMIN: "ADMIN";
|
|
90
|
+
}>;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
export type PasskeyLoginResponse = z.infer<typeof PasskeyLoginResponseSchema>;
|
|
93
|
+
export declare const PasskeyListResponseSchema: z.ZodArray<z.ZodObject<{
|
|
94
|
+
id: z.ZodNumber;
|
|
95
|
+
name: z.ZodNullable<z.ZodString>;
|
|
96
|
+
deviceType: z.ZodString;
|
|
97
|
+
backedUp: z.ZodBoolean;
|
|
98
|
+
createdAt: z.ZodString;
|
|
99
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
100
|
+
}, z.core.$strip>>;
|
|
101
|
+
export declare const PasskeyIdParamsSchema: z.ZodObject<{
|
|
102
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
export declare const PasskeyRegistrationOptionsEndpoint: {
|
|
105
|
+
readonly method: "POST";
|
|
106
|
+
readonly path: "/api/auth/passkeys/registration/options";
|
|
107
|
+
readonly response: z.ZodObject<{
|
|
108
|
+
challenge: z.ZodString;
|
|
109
|
+
rp: z.ZodObject<{
|
|
110
|
+
id: z.ZodOptional<z.ZodString>;
|
|
111
|
+
name: z.ZodString;
|
|
112
|
+
}, z.core.$loose>;
|
|
113
|
+
user: z.ZodObject<{
|
|
114
|
+
id: z.ZodString;
|
|
115
|
+
name: z.ZodString;
|
|
116
|
+
displayName: z.ZodString;
|
|
117
|
+
}, z.core.$loose>;
|
|
118
|
+
pubKeyCredParams: z.ZodArray<z.ZodObject<{
|
|
119
|
+
type: z.ZodLiteral<"public-key">;
|
|
120
|
+
alg: z.ZodNumber;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
123
|
+
attestation: z.ZodOptional<z.ZodString>;
|
|
124
|
+
excludeCredentials: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
125
|
+
authenticatorSelection: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
126
|
+
}, z.core.$loose>;
|
|
127
|
+
readonly requiresAuth: true;
|
|
128
|
+
};
|
|
129
|
+
export declare const PasskeyRegistrationVerifyEndpoint: {
|
|
130
|
+
readonly method: "POST";
|
|
131
|
+
readonly path: "/api/auth/passkeys/registration/verify";
|
|
132
|
+
readonly request: z.ZodObject<{
|
|
133
|
+
response: z.ZodObject<{
|
|
134
|
+
id: z.ZodString;
|
|
135
|
+
rawId: z.ZodString;
|
|
136
|
+
type: z.ZodLiteral<"public-key">;
|
|
137
|
+
response: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
138
|
+
clientExtensionResults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
139
|
+
authenticatorAttachment: z.ZodOptional<z.ZodEnum<{
|
|
140
|
+
platform: "platform";
|
|
141
|
+
"cross-platform": "cross-platform";
|
|
142
|
+
}>>;
|
|
143
|
+
}, z.core.$loose>;
|
|
144
|
+
name: z.ZodOptional<z.ZodString>;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
readonly response: z.ZodObject<{
|
|
147
|
+
id: z.ZodNumber;
|
|
148
|
+
name: z.ZodNullable<z.ZodString>;
|
|
149
|
+
deviceType: z.ZodString;
|
|
150
|
+
backedUp: z.ZodBoolean;
|
|
151
|
+
createdAt: z.ZodString;
|
|
152
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
readonly requiresAuth: true;
|
|
155
|
+
};
|
|
156
|
+
export declare const PasskeyLoginOptionsEndpoint: {
|
|
157
|
+
readonly method: "POST";
|
|
158
|
+
readonly path: "/api/auth/passkeys/login/options";
|
|
159
|
+
readonly response: z.ZodObject<{
|
|
160
|
+
challenge: z.ZodString;
|
|
161
|
+
rpId: z.ZodOptional<z.ZodString>;
|
|
162
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
userVerification: z.ZodOptional<z.ZodString>;
|
|
164
|
+
allowCredentials: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
165
|
+
}, z.core.$loose>;
|
|
166
|
+
readonly rateLimit: {
|
|
167
|
+
readonly limit: 10;
|
|
168
|
+
readonly ttlSec: 900;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
export declare const PasskeyLoginVerifyEndpoint: {
|
|
172
|
+
readonly method: "POST";
|
|
173
|
+
readonly path: "/api/auth/passkeys/login/verify";
|
|
174
|
+
readonly request: z.ZodObject<{
|
|
175
|
+
response: z.ZodObject<{
|
|
176
|
+
id: z.ZodString;
|
|
177
|
+
rawId: z.ZodString;
|
|
178
|
+
type: z.ZodLiteral<"public-key">;
|
|
179
|
+
response: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
180
|
+
clientExtensionResults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
181
|
+
authenticatorAttachment: z.ZodOptional<z.ZodEnum<{
|
|
182
|
+
platform: "platform";
|
|
183
|
+
"cross-platform": "cross-platform";
|
|
184
|
+
}>>;
|
|
185
|
+
}, z.core.$loose>;
|
|
186
|
+
}, z.core.$strip>;
|
|
187
|
+
readonly response: z.ZodObject<{
|
|
188
|
+
accessToken: z.ZodString;
|
|
189
|
+
role: z.ZodEnum<{
|
|
190
|
+
USER: "USER";
|
|
191
|
+
ADMIN: "ADMIN";
|
|
192
|
+
}>;
|
|
193
|
+
}, z.core.$strip>;
|
|
194
|
+
readonly rateLimit: {
|
|
195
|
+
readonly limit: 5;
|
|
196
|
+
readonly ttlSec: 900;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
export declare const PasskeyListEndpoint: {
|
|
200
|
+
readonly method: "GET";
|
|
201
|
+
readonly path: "/api/auth/passkeys";
|
|
202
|
+
readonly response: z.ZodArray<z.ZodObject<{
|
|
203
|
+
id: z.ZodNumber;
|
|
204
|
+
name: z.ZodNullable<z.ZodString>;
|
|
205
|
+
deviceType: z.ZodString;
|
|
206
|
+
backedUp: z.ZodBoolean;
|
|
207
|
+
createdAt: z.ZodString;
|
|
208
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
209
|
+
}, z.core.$strip>>;
|
|
210
|
+
readonly requiresAuth: true;
|
|
211
|
+
};
|
|
212
|
+
export declare const PasskeyRemoveEndpoint: {
|
|
213
|
+
readonly method: "DELETE";
|
|
214
|
+
readonly path: "/api/auth/passkeys/:id";
|
|
215
|
+
readonly params: z.ZodObject<{
|
|
216
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
217
|
+
}, z.core.$strip>;
|
|
218
|
+
readonly response: z.ZodObject<{
|
|
219
|
+
ok: z.ZodLiteral<true>;
|
|
220
|
+
}, z.core.$strip>;
|
|
221
|
+
readonly requiresAuth: true;
|
|
222
|
+
};
|
|
223
|
+
export declare const AuthPasskeys: {
|
|
224
|
+
readonly passkeyRegistrationOptions: {
|
|
225
|
+
readonly method: "POST";
|
|
226
|
+
readonly path: "/api/auth/passkeys/registration/options";
|
|
227
|
+
readonly response: z.ZodObject<{
|
|
228
|
+
challenge: z.ZodString;
|
|
229
|
+
rp: z.ZodObject<{
|
|
230
|
+
id: z.ZodOptional<z.ZodString>;
|
|
231
|
+
name: z.ZodString;
|
|
232
|
+
}, z.core.$loose>;
|
|
233
|
+
user: z.ZodObject<{
|
|
234
|
+
id: z.ZodString;
|
|
235
|
+
name: z.ZodString;
|
|
236
|
+
displayName: z.ZodString;
|
|
237
|
+
}, z.core.$loose>;
|
|
238
|
+
pubKeyCredParams: z.ZodArray<z.ZodObject<{
|
|
239
|
+
type: z.ZodLiteral<"public-key">;
|
|
240
|
+
alg: z.ZodNumber;
|
|
241
|
+
}, z.core.$strip>>;
|
|
242
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
243
|
+
attestation: z.ZodOptional<z.ZodString>;
|
|
244
|
+
excludeCredentials: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
245
|
+
authenticatorSelection: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
246
|
+
}, z.core.$loose>;
|
|
247
|
+
readonly requiresAuth: true;
|
|
248
|
+
};
|
|
249
|
+
readonly passkeyRegistrationVerify: {
|
|
250
|
+
readonly method: "POST";
|
|
251
|
+
readonly path: "/api/auth/passkeys/registration/verify";
|
|
252
|
+
readonly request: z.ZodObject<{
|
|
253
|
+
response: z.ZodObject<{
|
|
254
|
+
id: z.ZodString;
|
|
255
|
+
rawId: z.ZodString;
|
|
256
|
+
type: z.ZodLiteral<"public-key">;
|
|
257
|
+
response: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
258
|
+
clientExtensionResults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
259
|
+
authenticatorAttachment: z.ZodOptional<z.ZodEnum<{
|
|
260
|
+
platform: "platform";
|
|
261
|
+
"cross-platform": "cross-platform";
|
|
262
|
+
}>>;
|
|
263
|
+
}, z.core.$loose>;
|
|
264
|
+
name: z.ZodOptional<z.ZodString>;
|
|
265
|
+
}, z.core.$strip>;
|
|
266
|
+
readonly response: z.ZodObject<{
|
|
267
|
+
id: z.ZodNumber;
|
|
268
|
+
name: z.ZodNullable<z.ZodString>;
|
|
269
|
+
deviceType: z.ZodString;
|
|
270
|
+
backedUp: z.ZodBoolean;
|
|
271
|
+
createdAt: z.ZodString;
|
|
272
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
273
|
+
}, z.core.$strip>;
|
|
274
|
+
readonly requiresAuth: true;
|
|
275
|
+
};
|
|
276
|
+
readonly passkeyLoginOptions: {
|
|
277
|
+
readonly method: "POST";
|
|
278
|
+
readonly path: "/api/auth/passkeys/login/options";
|
|
279
|
+
readonly response: z.ZodObject<{
|
|
280
|
+
challenge: z.ZodString;
|
|
281
|
+
rpId: z.ZodOptional<z.ZodString>;
|
|
282
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
283
|
+
userVerification: z.ZodOptional<z.ZodString>;
|
|
284
|
+
allowCredentials: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
285
|
+
}, z.core.$loose>;
|
|
286
|
+
readonly rateLimit: {
|
|
287
|
+
readonly limit: 10;
|
|
288
|
+
readonly ttlSec: 900;
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
readonly passkeyLoginVerify: {
|
|
292
|
+
readonly method: "POST";
|
|
293
|
+
readonly path: "/api/auth/passkeys/login/verify";
|
|
294
|
+
readonly request: z.ZodObject<{
|
|
295
|
+
response: z.ZodObject<{
|
|
296
|
+
id: z.ZodString;
|
|
297
|
+
rawId: z.ZodString;
|
|
298
|
+
type: z.ZodLiteral<"public-key">;
|
|
299
|
+
response: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
300
|
+
clientExtensionResults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
301
|
+
authenticatorAttachment: z.ZodOptional<z.ZodEnum<{
|
|
302
|
+
platform: "platform";
|
|
303
|
+
"cross-platform": "cross-platform";
|
|
304
|
+
}>>;
|
|
305
|
+
}, z.core.$loose>;
|
|
306
|
+
}, z.core.$strip>;
|
|
307
|
+
readonly response: z.ZodObject<{
|
|
308
|
+
accessToken: z.ZodString;
|
|
309
|
+
role: z.ZodEnum<{
|
|
310
|
+
USER: "USER";
|
|
311
|
+
ADMIN: "ADMIN";
|
|
312
|
+
}>;
|
|
313
|
+
}, z.core.$strip>;
|
|
314
|
+
readonly rateLimit: {
|
|
315
|
+
readonly limit: 5;
|
|
316
|
+
readonly ttlSec: 900;
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
readonly passkeyList: {
|
|
320
|
+
readonly method: "GET";
|
|
321
|
+
readonly path: "/api/auth/passkeys";
|
|
322
|
+
readonly response: z.ZodArray<z.ZodObject<{
|
|
323
|
+
id: z.ZodNumber;
|
|
324
|
+
name: z.ZodNullable<z.ZodString>;
|
|
325
|
+
deviceType: z.ZodString;
|
|
326
|
+
backedUp: z.ZodBoolean;
|
|
327
|
+
createdAt: z.ZodString;
|
|
328
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
329
|
+
}, z.core.$strip>>;
|
|
330
|
+
readonly requiresAuth: true;
|
|
331
|
+
};
|
|
332
|
+
readonly passkeyRemove: {
|
|
333
|
+
readonly method: "DELETE";
|
|
334
|
+
readonly path: "/api/auth/passkeys/:id";
|
|
335
|
+
readonly params: z.ZodObject<{
|
|
336
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
337
|
+
}, z.core.$strip>;
|
|
338
|
+
readonly response: z.ZodObject<{
|
|
339
|
+
ok: z.ZodLiteral<true>;
|
|
340
|
+
}, z.core.$strip>;
|
|
341
|
+
readonly requiresAuth: true;
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
export {};
|
|
345
|
+
//# sourceMappingURL=passkeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passkeys.d.ts","sourceRoot":"","sources":["../../../src/domains/auth/passkeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;GAGG;AAEH,QAAA,MAAM,6BAA6B;;;;;;;;;;iBAS1B,CAAC;AACV,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;iBAWpC,CAAC;AACV,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,eAAO,MAAM,yBAAyB;;;;;;iBAQ7B,CAAC;AACV,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO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"__esModule", { value: true });
|
|
3
|
+
exports.AuthPasskeys = exports.PasskeyRemoveEndpoint = exports.PasskeyListEndpoint = exports.PasskeyLoginVerifyEndpoint = exports.PasskeyLoginOptionsEndpoint = exports.PasskeyRegistrationVerifyEndpoint = exports.PasskeyRegistrationOptionsEndpoint = exports.PasskeyIdParamsSchema = exports.PasskeyListResponseSchema = exports.PasskeyLoginResponseSchema = exports.PasskeyLoginVerifyRequestSchema = exports.PasskeyRegistrationVerifyRequestSchema = exports.PasskeySchema = exports.PasskeyLoginOptionsSchema = exports.PasskeyRegistrationOptionsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../shared/common");
|
|
6
|
+
const dtos_1 = require("./dtos");
|
|
7
|
+
/**
|
|
8
|
+
* Passkey (WebAuthn). Объекты options и credential описаны минимально:
|
|
9
|
+
* полную структуру проверяет браузер и @simplewebauthn/server на бэкенде.
|
|
10
|
+
*/
|
|
11
|
+
const PublicKeyCredentialJSONSchema = zod_1.z
|
|
12
|
+
.object({
|
|
13
|
+
id: zod_1.z.string().min(1),
|
|
14
|
+
rawId: zod_1.z.string().min(1),
|
|
15
|
+
type: zod_1.z.literal("public-key"),
|
|
16
|
+
response: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
|
|
17
|
+
clientExtensionResults: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
|
|
18
|
+
authenticatorAttachment: zod_1.z.enum(["platform", "cross-platform"]).optional(),
|
|
19
|
+
})
|
|
20
|
+
.loose();
|
|
21
|
+
exports.PasskeyRegistrationOptionsSchema = zod_1.z
|
|
22
|
+
.object({
|
|
23
|
+
challenge: zod_1.z.string().min(1),
|
|
24
|
+
rp: zod_1.z.object({ id: zod_1.z.string().optional(), name: zod_1.z.string() }).loose(),
|
|
25
|
+
user: zod_1.z.object({ id: zod_1.z.string(), name: zod_1.z.string(), displayName: zod_1.z.string() }).loose(),
|
|
26
|
+
pubKeyCredParams: zod_1.z.array(zod_1.z.object({ type: zod_1.z.literal("public-key"), alg: zod_1.z.number() })),
|
|
27
|
+
timeout: zod_1.z.number().optional(),
|
|
28
|
+
attestation: zod_1.z.string().optional(),
|
|
29
|
+
excludeCredentials: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown())).optional(),
|
|
30
|
+
authenticatorSelection: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
|
|
31
|
+
})
|
|
32
|
+
.loose();
|
|
33
|
+
exports.PasskeyLoginOptionsSchema = zod_1.z
|
|
34
|
+
.object({
|
|
35
|
+
challenge: zod_1.z.string().min(1),
|
|
36
|
+
rpId: zod_1.z.string().optional(),
|
|
37
|
+
timeout: zod_1.z.number().optional(),
|
|
38
|
+
userVerification: zod_1.z.string().optional(),
|
|
39
|
+
allowCredentials: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown())).optional(),
|
|
40
|
+
})
|
|
41
|
+
.loose();
|
|
42
|
+
exports.PasskeySchema = zod_1.z.object({
|
|
43
|
+
id: zod_1.z.number().int().positive(),
|
|
44
|
+
name: zod_1.z.string().nullable(),
|
|
45
|
+
deviceType: zod_1.z.string(),
|
|
46
|
+
backedUp: zod_1.z.boolean(),
|
|
47
|
+
createdAt: zod_1.z.string(),
|
|
48
|
+
lastUsedAt: zod_1.z.string().nullable(),
|
|
49
|
+
});
|
|
50
|
+
exports.PasskeyRegistrationVerifyRequestSchema = zod_1.z.object({
|
|
51
|
+
response: PublicKeyCredentialJSONSchema,
|
|
52
|
+
name: zod_1.z.string().trim().min(1).max(64).optional(),
|
|
53
|
+
});
|
|
54
|
+
exports.PasskeyLoginVerifyRequestSchema = zod_1.z.object({
|
|
55
|
+
response: PublicKeyCredentialJSONSchema,
|
|
56
|
+
});
|
|
57
|
+
exports.PasskeyLoginResponseSchema = dtos_1.TokensResponseSchema.extend({ role: dtos_1.UserRoleSchema });
|
|
58
|
+
exports.PasskeyListResponseSchema = zod_1.z.array(exports.PasskeySchema);
|
|
59
|
+
exports.PasskeyIdParamsSchema = zod_1.z.object({ id: zod_1.z.coerce.number().int().positive() });
|
|
60
|
+
exports.PasskeyRegistrationOptionsEndpoint = {
|
|
61
|
+
method: "POST",
|
|
62
|
+
path: "/api/auth/passkeys/registration/options",
|
|
63
|
+
response: exports.PasskeyRegistrationOptionsSchema,
|
|
64
|
+
requiresAuth: true,
|
|
65
|
+
};
|
|
66
|
+
exports.PasskeyRegistrationVerifyEndpoint = {
|
|
67
|
+
method: "POST",
|
|
68
|
+
path: "/api/auth/passkeys/registration/verify",
|
|
69
|
+
request: exports.PasskeyRegistrationVerifyRequestSchema,
|
|
70
|
+
response: exports.PasskeySchema,
|
|
71
|
+
requiresAuth: true,
|
|
72
|
+
};
|
|
73
|
+
exports.PasskeyLoginOptionsEndpoint = {
|
|
74
|
+
method: "POST",
|
|
75
|
+
path: "/api/auth/passkeys/login/options",
|
|
76
|
+
response: exports.PasskeyLoginOptionsSchema,
|
|
77
|
+
rateLimit: { limit: 10, ttlSec: 900 },
|
|
78
|
+
};
|
|
79
|
+
exports.PasskeyLoginVerifyEndpoint = {
|
|
80
|
+
method: "POST",
|
|
81
|
+
path: "/api/auth/passkeys/login/verify",
|
|
82
|
+
request: exports.PasskeyLoginVerifyRequestSchema,
|
|
83
|
+
response: exports.PasskeyLoginResponseSchema,
|
|
84
|
+
rateLimit: { limit: 5, ttlSec: 900 },
|
|
85
|
+
};
|
|
86
|
+
exports.PasskeyListEndpoint = {
|
|
87
|
+
method: "GET",
|
|
88
|
+
path: "/api/auth/passkeys",
|
|
89
|
+
response: exports.PasskeyListResponseSchema,
|
|
90
|
+
requiresAuth: true,
|
|
91
|
+
};
|
|
92
|
+
exports.PasskeyRemoveEndpoint = {
|
|
93
|
+
method: "DELETE",
|
|
94
|
+
path: "/api/auth/passkeys/:id",
|
|
95
|
+
params: exports.PasskeyIdParamsSchema,
|
|
96
|
+
response: common_1.SuccessResponseSchema,
|
|
97
|
+
requiresAuth: true,
|
|
98
|
+
};
|
|
99
|
+
exports.AuthPasskeys = {
|
|
100
|
+
passkeyRegistrationOptions: exports.PasskeyRegistrationOptionsEndpoint,
|
|
101
|
+
passkeyRegistrationVerify: exports.PasskeyRegistrationVerifyEndpoint,
|
|
102
|
+
passkeyLoginOptions: exports.PasskeyLoginOptionsEndpoint,
|
|
103
|
+
passkeyLoginVerify: exports.PasskeyLoginVerifyEndpoint,
|
|
104
|
+
passkeyList: exports.PasskeyListEndpoint,
|
|
105
|
+
passkeyRemove: exports.PasskeyRemoveEndpoint,
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=passkeys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passkeys.js","sourceRoot":"","sources":["../../../src/domains/auth/passkeys.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,gDAA4D;AAC5D,iCAA8D;AAE9D;;;GAGG;AAEH,MAAM,6BAA6B,GAAG,OAAC;KACrC,MAAM,CAAC;IACP,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,YAAY,CAAC;IAC7B,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC;IAC3C,sBAAsB,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpE,uBAAuB,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC1E,CAAC;KACD,KAAK,EAAE,CAAC;AAGG,QAAA,gCAAgC,GAAG,OAAC;KAC/C,MAAM,CAAC;IAC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AAE,0CAAkC;IAC9D,yBAAyB,EAAE,yCAAiC;IAC5D,mBAAmB,EAAE,mCAA2B;IAChD,kBAAkB,EAAE,kCAA0B;IAC9C,WAAW,EAAE,2BAAmB;IAChC,aAAa,EAAE,6BAAqB;CAC3B,CAAC"}
|
|
@@ -64,12 +64,13 @@ export declare const CreateVariantRequestSchema: z.ZodObject<{
|
|
|
64
64
|
export type CreateVariantRequest = z.infer<typeof CreateVariantRequestSchema>;
|
|
65
65
|
/** Частичное обновление торгового варианта из админки. */
|
|
66
66
|
export declare const UpdateVariantRequestSchema: z.ZodObject<{
|
|
67
|
+
platform: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
68
|
+
name: z.ZodOptional<z.ZodString>;
|
|
67
69
|
deliveryType: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
68
70
|
AUTOMATIC: "AUTOMATIC";
|
|
69
71
|
MANUAL: "MANUAL";
|
|
70
72
|
BOT: "BOT";
|
|
71
73
|
}>>>;
|
|
72
|
-
name: z.ZodOptional<z.ZodString>;
|
|
73
74
|
sku: z.ZodOptional<z.ZodString>;
|
|
74
75
|
imageUrl: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodURL>>>;
|
|
75
76
|
desslyServiceType: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
@@ -79,7 +80,6 @@ export declare const UpdateVariantRequestSchema: z.ZodObject<{
|
|
|
79
80
|
MOBILE_REFILL: "MOBILE_REFILL";
|
|
80
81
|
CRYPTO_REFILL: "CRYPTO_REFILL";
|
|
81
82
|
}>>>;
|
|
82
|
-
platform: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
83
83
|
regionCode: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
84
84
|
desslyRegion: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
85
85
|
priceUsd: z.ZodOptional<z.ZodString>;
|
|
@@ -612,12 +612,13 @@ export declare const UpdateVariantEndpoint: {
|
|
|
612
612
|
id: z.ZodCoercedNumber<unknown>;
|
|
613
613
|
}, z.core.$strip>;
|
|
614
614
|
readonly request: z.ZodObject<{
|
|
615
|
+
platform: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
616
|
+
name: z.ZodOptional<z.ZodString>;
|
|
615
617
|
deliveryType: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
616
618
|
AUTOMATIC: "AUTOMATIC";
|
|
617
619
|
MANUAL: "MANUAL";
|
|
618
620
|
BOT: "BOT";
|
|
619
621
|
}>>>;
|
|
620
|
-
name: z.ZodOptional<z.ZodString>;
|
|
621
622
|
sku: z.ZodOptional<z.ZodString>;
|
|
622
623
|
imageUrl: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodURL>>>;
|
|
623
624
|
desslyServiceType: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
@@ -627,7 +628,6 @@ export declare const UpdateVariantEndpoint: {
|
|
|
627
628
|
MOBILE_REFILL: "MOBILE_REFILL";
|
|
628
629
|
CRYPTO_REFILL: "CRYPTO_REFILL";
|
|
629
630
|
}>>>;
|
|
630
|
-
platform: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
631
631
|
regionCode: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
632
632
|
desslyRegion: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
633
633
|
priceUsd: z.ZodOptional<z.ZodString>;
|
|
@@ -1088,12 +1088,13 @@ export declare const ProductCommands: {
|
|
|
1088
1088
|
id: z.ZodCoercedNumber<unknown>;
|
|
1089
1089
|
}, z.core.$strip>;
|
|
1090
1090
|
readonly request: z.ZodObject<{
|
|
1091
|
+
platform: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1092
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1091
1093
|
deliveryType: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
1092
1094
|
AUTOMATIC: "AUTOMATIC";
|
|
1093
1095
|
MANUAL: "MANUAL";
|
|
1094
1096
|
BOT: "BOT";
|
|
1095
1097
|
}>>>;
|
|
1096
|
-
name: z.ZodOptional<z.ZodString>;
|
|
1097
1098
|
sku: z.ZodOptional<z.ZodString>;
|
|
1098
1099
|
imageUrl: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodURL>>>;
|
|
1099
1100
|
desslyServiceType: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
@@ -1103,7 +1104,6 @@ export declare const ProductCommands: {
|
|
|
1103
1104
|
MOBILE_REFILL: "MOBILE_REFILL";
|
|
1104
1105
|
CRYPTO_REFILL: "CRYPTO_REFILL";
|
|
1105
1106
|
}>>>;
|
|
1106
|
-
platform: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1107
1107
|
regionCode: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1108
1108
|
desslyRegion: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1109
1109
|
priceUsd: z.ZodOptional<z.ZodString>;
|
|
@@ -158,6 +158,7 @@ export declare const VariantStockSchema: z.ZodObject<{
|
|
|
158
158
|
export type VariantStock = z.infer<typeof VariantStockSchema>;
|
|
159
159
|
export declare const AdminProductVariantSchema: z.ZodObject<{
|
|
160
160
|
id: z.ZodNumber;
|
|
161
|
+
name: z.ZodString;
|
|
161
162
|
price: z.ZodObject<{
|
|
162
163
|
usd: z.ZodString;
|
|
163
164
|
rub: z.ZodString;
|
|
@@ -169,7 +170,6 @@ export declare const AdminProductVariantSchema: z.ZodObject<{
|
|
|
169
170
|
MANUAL: "MANUAL";
|
|
170
171
|
BOT: "BOT";
|
|
171
172
|
}>;
|
|
172
|
-
name: z.ZodString;
|
|
173
173
|
sku: z.ZodString;
|
|
174
174
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
175
175
|
desslyServiceType: z.ZodNullable<z.ZodEnum<{
|
|
@@ -530,6 +530,7 @@ export declare const AdminProductSchema: z.ZodObject<{
|
|
|
530
530
|
steamDetailsSyncedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
531
531
|
variants: z.ZodArray<z.ZodObject<{
|
|
532
532
|
id: z.ZodNumber;
|
|
533
|
+
name: z.ZodString;
|
|
533
534
|
price: z.ZodObject<{
|
|
534
535
|
usd: z.ZodString;
|
|
535
536
|
rub: z.ZodString;
|
|
@@ -541,7 +542,6 @@ export declare const AdminProductSchema: z.ZodObject<{
|
|
|
541
542
|
MANUAL: "MANUAL";
|
|
542
543
|
BOT: "BOT";
|
|
543
544
|
}>;
|
|
544
|
-
name: z.ZodString;
|
|
545
545
|
sku: z.ZodString;
|
|
546
546
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
547
547
|
desslyServiceType: z.ZodNullable<z.ZodEnum<{
|
|
@@ -233,12 +233,13 @@ export declare const ProductEndpoints: {
|
|
|
233
233
|
id: import("zod").ZodCoercedNumber<unknown>;
|
|
234
234
|
}, import("zod/v4/core").$strip>;
|
|
235
235
|
readonly request: import("zod").ZodObject<{
|
|
236
|
+
platform: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
237
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
236
238
|
deliveryType: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
237
239
|
AUTOMATIC: "AUTOMATIC";
|
|
238
240
|
MANUAL: "MANUAL";
|
|
239
241
|
BOT: "BOT";
|
|
240
242
|
}>>>;
|
|
241
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
242
243
|
sku: import("zod").ZodOptional<import("zod").ZodString>;
|
|
243
244
|
imageUrl: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodURL>>>;
|
|
244
245
|
desslyServiceType: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
@@ -248,7 +249,6 @@ export declare const ProductEndpoints: {
|
|
|
248
249
|
MOBILE_REFILL: "MOBILE_REFILL";
|
|
249
250
|
CRYPTO_REFILL: "CRYPTO_REFILL";
|
|
250
251
|
}>>>;
|
|
251
|
-
platform: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
252
252
|
regionCode: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
253
253
|
desslyRegion: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
254
254
|
priceUsd: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -905,6 +905,7 @@ export declare const ProductEndpoints: {
|
|
|
905
905
|
steamDetailsSyncedAt: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
906
906
|
variants: import("zod").ZodArray<import("zod").ZodObject<{
|
|
907
907
|
id: import("zod").ZodNumber;
|
|
908
|
+
name: import("zod").ZodString;
|
|
908
909
|
price: import("zod").ZodObject<{
|
|
909
910
|
usd: import("zod").ZodString;
|
|
910
911
|
rub: import("zod").ZodString;
|
|
@@ -916,7 +917,6 @@ export declare const ProductEndpoints: {
|
|
|
916
917
|
MANUAL: "MANUAL";
|
|
917
918
|
BOT: "BOT";
|
|
918
919
|
}>;
|
|
919
|
-
name: import("zod").ZodString;
|
|
920
920
|
sku: import("zod").ZodString;
|
|
921
921
|
imageUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
922
922
|
desslyServiceType: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
@@ -1118,6 +1118,7 @@ export declare const ProductEndpoints: {
|
|
|
1118
1118
|
steamDetailsSyncedAt: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1119
1119
|
variants: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1120
1120
|
id: import("zod").ZodNumber;
|
|
1121
|
+
name: import("zod").ZodString;
|
|
1121
1122
|
price: import("zod").ZodObject<{
|
|
1122
1123
|
usd: import("zod").ZodString;
|
|
1123
1124
|
rub: import("zod").ZodString;
|
|
@@ -1129,7 +1130,6 @@ export declare const ProductEndpoints: {
|
|
|
1129
1130
|
MANUAL: "MANUAL";
|
|
1130
1131
|
BOT: "BOT";
|
|
1131
1132
|
}>;
|
|
1132
|
-
name: import("zod").ZodString;
|
|
1133
1133
|
sku: import("zod").ZodString;
|
|
1134
1134
|
imageUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1135
1135
|
desslyServiceType: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
@@ -575,6 +575,7 @@ export declare const ListAdminProductsEndpoint: {
|
|
|
575
575
|
steamDetailsSyncedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
576
576
|
variants: z.ZodArray<z.ZodObject<{
|
|
577
577
|
id: z.ZodNumber;
|
|
578
|
+
name: z.ZodString;
|
|
578
579
|
price: z.ZodObject<{
|
|
579
580
|
usd: z.ZodString;
|
|
580
581
|
rub: z.ZodString;
|
|
@@ -586,7 +587,6 @@ export declare const ListAdminProductsEndpoint: {
|
|
|
586
587
|
MANUAL: "MANUAL";
|
|
587
588
|
BOT: "BOT";
|
|
588
589
|
}>;
|
|
589
|
-
name: z.ZodString;
|
|
590
590
|
sku: z.ZodString;
|
|
591
591
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
592
592
|
desslyServiceType: z.ZodNullable<z.ZodEnum<{
|
|
@@ -788,6 +788,7 @@ export declare const GetAdminProductBySlugEndpoint: {
|
|
|
788
788
|
steamDetailsSyncedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
789
789
|
variants: z.ZodArray<z.ZodObject<{
|
|
790
790
|
id: z.ZodNumber;
|
|
791
|
+
name: z.ZodString;
|
|
791
792
|
price: z.ZodObject<{
|
|
792
793
|
usd: z.ZodString;
|
|
793
794
|
rub: z.ZodString;
|
|
@@ -799,7 +800,6 @@ export declare const GetAdminProductBySlugEndpoint: {
|
|
|
799
800
|
MANUAL: "MANUAL";
|
|
800
801
|
BOT: "BOT";
|
|
801
802
|
}>;
|
|
802
|
-
name: z.ZodString;
|
|
803
803
|
sku: z.ZodString;
|
|
804
804
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
805
805
|
desslyServiceType: z.ZodNullable<z.ZodEnum<{
|
|
@@ -1371,6 +1371,7 @@ export declare const ProductQueries: {
|
|
|
1371
1371
|
steamDetailsSyncedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1372
1372
|
variants: z.ZodArray<z.ZodObject<{
|
|
1373
1373
|
id: z.ZodNumber;
|
|
1374
|
+
name: z.ZodString;
|
|
1374
1375
|
price: z.ZodObject<{
|
|
1375
1376
|
usd: z.ZodString;
|
|
1376
1377
|
rub: z.ZodString;
|
|
@@ -1382,7 +1383,6 @@ export declare const ProductQueries: {
|
|
|
1382
1383
|
MANUAL: "MANUAL";
|
|
1383
1384
|
BOT: "BOT";
|
|
1384
1385
|
}>;
|
|
1385
|
-
name: z.ZodString;
|
|
1386
1386
|
sku: z.ZodString;
|
|
1387
1387
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
1388
1388
|
desslyServiceType: z.ZodNullable<z.ZodEnum<{
|
|
@@ -1584,6 +1584,7 @@ export declare const ProductQueries: {
|
|
|
1584
1584
|
steamDetailsSyncedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1585
1585
|
variants: z.ZodArray<z.ZodObject<{
|
|
1586
1586
|
id: z.ZodNumber;
|
|
1587
|
+
name: z.ZodString;
|
|
1587
1588
|
price: z.ZodObject<{
|
|
1588
1589
|
usd: z.ZodString;
|
|
1589
1590
|
rub: z.ZodString;
|
|
@@ -1595,7 +1596,6 @@ export declare const ProductQueries: {
|
|
|
1595
1596
|
MANUAL: "MANUAL";
|
|
1596
1597
|
BOT: "BOT";
|
|
1597
1598
|
}>;
|
|
1598
|
-
name: z.ZodString;
|
|
1599
1599
|
sku: z.ZodString;
|
|
1600
1600
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
1601
1601
|
desslyServiceType: z.ZodNullable<z.ZodEnum<{
|
package/build/index.d.ts
CHANGED
|
@@ -13,6 +13,125 @@ export * from "./domains/admin";
|
|
|
13
13
|
export * from "./domains/telemetry";
|
|
14
14
|
export declare const AllEndpoints: {
|
|
15
15
|
readonly auth: {
|
|
16
|
+
readonly passkeyRegistrationOptions: {
|
|
17
|
+
readonly method: "POST";
|
|
18
|
+
readonly path: "/api/auth/passkeys/registration/options";
|
|
19
|
+
readonly response: import("zod").ZodObject<{
|
|
20
|
+
challenge: import("zod").ZodString;
|
|
21
|
+
rp: import("zod").ZodObject<{
|
|
22
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
23
|
+
name: import("zod").ZodString;
|
|
24
|
+
}, import("zod/v4/core").$loose>;
|
|
25
|
+
user: import("zod").ZodObject<{
|
|
26
|
+
id: import("zod").ZodString;
|
|
27
|
+
name: import("zod").ZodString;
|
|
28
|
+
displayName: import("zod").ZodString;
|
|
29
|
+
}, import("zod/v4/core").$loose>;
|
|
30
|
+
pubKeyCredParams: import("zod").ZodArray<import("zod").ZodObject<{
|
|
31
|
+
type: import("zod").ZodLiteral<"public-key">;
|
|
32
|
+
alg: import("zod").ZodNumber;
|
|
33
|
+
}, import("zod/v4/core").$strip>>;
|
|
34
|
+
timeout: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
35
|
+
attestation: import("zod").ZodOptional<import("zod").ZodString>;
|
|
36
|
+
excludeCredentials: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>;
|
|
37
|
+
authenticatorSelection: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
38
|
+
}, import("zod/v4/core").$loose>;
|
|
39
|
+
readonly requiresAuth: true;
|
|
40
|
+
};
|
|
41
|
+
readonly passkeyRegistrationVerify: {
|
|
42
|
+
readonly method: "POST";
|
|
43
|
+
readonly path: "/api/auth/passkeys/registration/verify";
|
|
44
|
+
readonly request: import("zod").ZodObject<{
|
|
45
|
+
response: import("zod").ZodObject<{
|
|
46
|
+
id: import("zod").ZodString;
|
|
47
|
+
rawId: import("zod").ZodString;
|
|
48
|
+
type: import("zod").ZodLiteral<"public-key">;
|
|
49
|
+
response: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
50
|
+
clientExtensionResults: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
51
|
+
authenticatorAttachment: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
52
|
+
platform: "platform";
|
|
53
|
+
"cross-platform": "cross-platform";
|
|
54
|
+
}>>;
|
|
55
|
+
}, import("zod/v4/core").$loose>;
|
|
56
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
57
|
+
}, import("zod/v4/core").$strip>;
|
|
58
|
+
readonly response: import("zod").ZodObject<{
|
|
59
|
+
id: import("zod").ZodNumber;
|
|
60
|
+
name: import("zod").ZodNullable<import("zod").ZodString>;
|
|
61
|
+
deviceType: import("zod").ZodString;
|
|
62
|
+
backedUp: import("zod").ZodBoolean;
|
|
63
|
+
createdAt: import("zod").ZodString;
|
|
64
|
+
lastUsedAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
65
|
+
}, import("zod/v4/core").$strip>;
|
|
66
|
+
readonly requiresAuth: true;
|
|
67
|
+
};
|
|
68
|
+
readonly passkeyLoginOptions: {
|
|
69
|
+
readonly method: "POST";
|
|
70
|
+
readonly path: "/api/auth/passkeys/login/options";
|
|
71
|
+
readonly response: import("zod").ZodObject<{
|
|
72
|
+
challenge: import("zod").ZodString;
|
|
73
|
+
rpId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
74
|
+
timeout: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
75
|
+
userVerification: import("zod").ZodOptional<import("zod").ZodString>;
|
|
76
|
+
allowCredentials: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>;
|
|
77
|
+
}, import("zod/v4/core").$loose>;
|
|
78
|
+
readonly rateLimit: {
|
|
79
|
+
readonly limit: 10;
|
|
80
|
+
readonly ttlSec: 900;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
readonly passkeyLoginVerify: {
|
|
84
|
+
readonly method: "POST";
|
|
85
|
+
readonly path: "/api/auth/passkeys/login/verify";
|
|
86
|
+
readonly request: import("zod").ZodObject<{
|
|
87
|
+
response: import("zod").ZodObject<{
|
|
88
|
+
id: import("zod").ZodString;
|
|
89
|
+
rawId: import("zod").ZodString;
|
|
90
|
+
type: import("zod").ZodLiteral<"public-key">;
|
|
91
|
+
response: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
92
|
+
clientExtensionResults: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
93
|
+
authenticatorAttachment: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
94
|
+
platform: "platform";
|
|
95
|
+
"cross-platform": "cross-platform";
|
|
96
|
+
}>>;
|
|
97
|
+
}, import("zod/v4/core").$loose>;
|
|
98
|
+
}, import("zod/v4/core").$strip>;
|
|
99
|
+
readonly response: import("zod").ZodObject<{
|
|
100
|
+
accessToken: import("zod").ZodString;
|
|
101
|
+
role: import("zod").ZodEnum<{
|
|
102
|
+
USER: "USER";
|
|
103
|
+
ADMIN: "ADMIN";
|
|
104
|
+
}>;
|
|
105
|
+
}, import("zod/v4/core").$strip>;
|
|
106
|
+
readonly rateLimit: {
|
|
107
|
+
readonly limit: 5;
|
|
108
|
+
readonly ttlSec: 900;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
readonly passkeyList: {
|
|
112
|
+
readonly method: "GET";
|
|
113
|
+
readonly path: "/api/auth/passkeys";
|
|
114
|
+
readonly response: import("zod").ZodArray<import("zod").ZodObject<{
|
|
115
|
+
id: import("zod").ZodNumber;
|
|
116
|
+
name: import("zod").ZodNullable<import("zod").ZodString>;
|
|
117
|
+
deviceType: import("zod").ZodString;
|
|
118
|
+
backedUp: import("zod").ZodBoolean;
|
|
119
|
+
createdAt: import("zod").ZodString;
|
|
120
|
+
lastUsedAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
121
|
+
}, import("zod/v4/core").$strip>>;
|
|
122
|
+
readonly requiresAuth: true;
|
|
123
|
+
};
|
|
124
|
+
readonly passkeyRemove: {
|
|
125
|
+
readonly method: "DELETE";
|
|
126
|
+
readonly path: "/api/auth/passkeys/:id";
|
|
127
|
+
readonly params: import("zod").ZodObject<{
|
|
128
|
+
id: import("zod").ZodCoercedNumber<unknown>;
|
|
129
|
+
}, import("zod/v4/core").$strip>;
|
|
130
|
+
readonly response: import("zod").ZodObject<{
|
|
131
|
+
ok: import("zod").ZodLiteral<true>;
|
|
132
|
+
}, import("zod/v4/core").$strip>;
|
|
133
|
+
readonly requiresAuth: true;
|
|
134
|
+
};
|
|
16
135
|
readonly getCurrentUser: {
|
|
17
136
|
readonly method: "GET";
|
|
18
137
|
readonly path: "/api/auth/me";
|
|
@@ -1485,12 +1604,13 @@ export declare const AllEndpoints: {
|
|
|
1485
1604
|
id: import("zod").ZodCoercedNumber<unknown>;
|
|
1486
1605
|
}, import("zod/v4/core").$strip>;
|
|
1487
1606
|
readonly request: import("zod").ZodObject<{
|
|
1607
|
+
platform: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
1608
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1488
1609
|
deliveryType: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1489
1610
|
AUTOMATIC: "AUTOMATIC";
|
|
1490
1611
|
MANUAL: "MANUAL";
|
|
1491
1612
|
BOT: "BOT";
|
|
1492
1613
|
}>>>;
|
|
1493
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1494
1614
|
sku: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1495
1615
|
imageUrl: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodURL>>>;
|
|
1496
1616
|
desslyServiceType: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
@@ -1500,7 +1620,6 @@ export declare const AllEndpoints: {
|
|
|
1500
1620
|
MOBILE_REFILL: "MOBILE_REFILL";
|
|
1501
1621
|
CRYPTO_REFILL: "CRYPTO_REFILL";
|
|
1502
1622
|
}>>>;
|
|
1503
|
-
platform: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
1504
1623
|
regionCode: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
1505
1624
|
desslyRegion: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
1506
1625
|
priceUsd: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -2157,6 +2276,7 @@ export declare const AllEndpoints: {
|
|
|
2157
2276
|
steamDetailsSyncedAt: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
2158
2277
|
variants: import("zod").ZodArray<import("zod").ZodObject<{
|
|
2159
2278
|
id: import("zod").ZodNumber;
|
|
2279
|
+
name: import("zod").ZodString;
|
|
2160
2280
|
price: import("zod").ZodObject<{
|
|
2161
2281
|
usd: import("zod").ZodString;
|
|
2162
2282
|
rub: import("zod").ZodString;
|
|
@@ -2168,7 +2288,6 @@ export declare const AllEndpoints: {
|
|
|
2168
2288
|
MANUAL: "MANUAL";
|
|
2169
2289
|
BOT: "BOT";
|
|
2170
2290
|
}>;
|
|
2171
|
-
name: import("zod").ZodString;
|
|
2172
2291
|
sku: import("zod").ZodString;
|
|
2173
2292
|
imageUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2174
2293
|
desslyServiceType: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
@@ -2370,6 +2489,7 @@ export declare const AllEndpoints: {
|
|
|
2370
2489
|
steamDetailsSyncedAt: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
2371
2490
|
variants: import("zod").ZodArray<import("zod").ZodObject<{
|
|
2372
2491
|
id: import("zod").ZodNumber;
|
|
2492
|
+
name: import("zod").ZodString;
|
|
2373
2493
|
price: import("zod").ZodObject<{
|
|
2374
2494
|
usd: import("zod").ZodString;
|
|
2375
2495
|
rub: import("zod").ZodString;
|
|
@@ -2381,7 +2501,6 @@ export declare const AllEndpoints: {
|
|
|
2381
2501
|
MANUAL: "MANUAL";
|
|
2382
2502
|
BOT: "BOT";
|
|
2383
2503
|
}>;
|
|
2384
|
-
name: import("zod").ZodString;
|
|
2385
2504
|
sku: import("zod").ZodString;
|
|
2386
2505
|
imageUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2387
2506
|
desslyServiceType: import("zod").ZodNullable<import("zod").ZodEnum<{
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +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,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AAepC,eAAO,MAAM,YAAY
|
|
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,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,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