@jsdev_ninja/core 0.8.49 → 0.8.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.cjs.js +1 -1
- package/dist/core.cjs.js.map +1 -0
- package/dist/core.es.js +3422 -0
- package/dist/core.es.js.map +1 -0
- package/dist/core.umd.js +2 -0
- package/dist/core.umd.js.map +1 -0
- package/dist/entities/Address.d.ts +28 -0
- package/dist/entities/Address.d.ts.map +1 -0
- package/dist/entities/Address.js +10 -0
- package/dist/entities/Atoms.d.ts +5 -0
- package/dist/entities/Atoms.d.ts.map +1 -0
- package/dist/entities/Atoms.js +5 -0
- package/dist/entities/Cart.d.ts +715 -0
- package/dist/entities/Cart.d.ts.map +1 -0
- package/dist/entities/Cart.js +14 -0
- package/dist/entities/Category.d.ts +103 -0
- package/dist/entities/Category.d.ts.map +1 -0
- package/dist/entities/Category.js +20 -0
- package/dist/entities/Company.d.ts +48 -0
- package/dist/entities/Company.d.ts.map +1 -0
- package/dist/entities/Company.js +12 -0
- package/dist/entities/FavoriteProduct.d.ts +25 -0
- package/dist/entities/FavoriteProduct.d.ts.map +1 -0
- package/dist/entities/FavoriteProduct.js +9 -0
- package/dist/entities/Locale.d.ts +22 -0
- package/dist/entities/Locale.d.ts.map +1 -0
- package/dist/entities/Locale.js +6 -0
- package/dist/entities/Order.d.ts +1084 -0
- package/dist/entities/Order.d.ts.map +1 -0
- package/dist/entities/Order.js +38 -0
- package/dist/entities/Payment.d.ts +368 -0
- package/dist/entities/Payment.d.ts.map +1 -0
- package/dist/entities/Payment.js +108 -0
- package/dist/entities/Product.d.ts +1000 -0
- package/dist/entities/Product.d.ts.map +1 -0
- package/dist/entities/Product.js +64 -0
- package/dist/entities/Profile.d.ts +102 -0
- package/dist/entities/Profile.d.ts.map +1 -0
- package/dist/entities/Profile.js +45 -0
- package/dist/entities/Store.d.ts +62 -0
- package/dist/entities/Store.d.ts.map +1 -0
- package/dist/entities/Store.js +20 -0
- package/dist/entities/index.d.ts +13 -0
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/entities/index.js +12 -0
- package/dist/firebase-api/index.d.ts +37 -0
- package/dist/firebase-api/index.d.ts.map +1 -0
- package/dist/firebase-api/index.js +23 -0
- package/dist/hypPaymentService/index.d.ts +33 -0
- package/dist/hypPaymentService/index.d.ts.map +1 -0
- package/dist/hypPaymentService/index.js +100 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -0
- package/dist/tsconfig.node.tsbuildinfo +1 -0
- package/dist/vite.config.d.ts +3 -0
- package/dist/vite.config.d.ts.map +1 -0
- package/dist/vite.config.js +25 -0
- package/lib/entities/Order.ts +3 -1
- package/lib/entities/Payment.ts +1 -0
- package/lib/hypPaymentService/index.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Order.d.ts","sourceRoot":"","sources":["../../lib/entities/Order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BtB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ProfileSchema } from "./Profile";
|
|
3
|
+
import { ProductSchema } from "./Product";
|
|
4
|
+
// pending - order created / by user
|
|
5
|
+
// processing order accepted by store by admin
|
|
6
|
+
// delivered - order delivered by admin
|
|
7
|
+
// canceled - order canceled by user/admin
|
|
8
|
+
// completed - order paid by admin
|
|
9
|
+
// type PaymentMethod = "credit_card" | "paypal" | "bank_transfer" | "cash_on_delivery";
|
|
10
|
+
export const OrderSchema = z.object({
|
|
11
|
+
type: z.literal("Order"),
|
|
12
|
+
id: z.string(),
|
|
13
|
+
companyId: z.string(),
|
|
14
|
+
storeId: z.string(),
|
|
15
|
+
userId: z.string(),
|
|
16
|
+
status: z.enum([
|
|
17
|
+
"pending",
|
|
18
|
+
"processing",
|
|
19
|
+
"in_delivery",
|
|
20
|
+
"delivered",
|
|
21
|
+
"canceled",
|
|
22
|
+
"completed",
|
|
23
|
+
"refunded",
|
|
24
|
+
]),
|
|
25
|
+
paymentStatus: z.enum(["pending", "completed", "failed", "refunded"]), //todo check if hyp support partial refund
|
|
26
|
+
cart: z.object({
|
|
27
|
+
id: z.string(),
|
|
28
|
+
items: z.array(z.object({ product: ProductSchema, amount: z.number() })),
|
|
29
|
+
cartDiscount: z.number(),
|
|
30
|
+
cartTotal: z.number(),
|
|
31
|
+
cartVat: z.number(),
|
|
32
|
+
}),
|
|
33
|
+
originalAmount: z.number().positive().optional(), // what client pay
|
|
34
|
+
actualAmount: z.number().positive().optional(), // what store charge
|
|
35
|
+
date: z.number(),
|
|
36
|
+
deliveryDate: z.number().optional(),
|
|
37
|
+
client: ProfileSchema,
|
|
38
|
+
});
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const PayProtocolGeneralSchema: z.ZodObject<{
|
|
3
|
+
Masof: z.ZodString;
|
|
4
|
+
PassP: z.ZodString;
|
|
5
|
+
KEY: z.ZodOptional<z.ZodString>;
|
|
6
|
+
Amount: z.ZodString;
|
|
7
|
+
Order: z.ZodOptional<z.ZodString>;
|
|
8
|
+
Tash: z.ZodString;
|
|
9
|
+
FixTash: z.ZodOptional<z.ZodEnum<["True", "False"]>>;
|
|
10
|
+
UTF8: z.ZodEnum<["True", "False"]>;
|
|
11
|
+
UTF8out: z.ZodEnum<["True", "False"]>;
|
|
12
|
+
MoreData: z.ZodOptional<z.ZodEnum<["True", "False"]>>;
|
|
13
|
+
J5: z.ZodOptional<z.ZodEnum<["True", "False"]>>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
Masof: string;
|
|
16
|
+
PassP: string;
|
|
17
|
+
Amount: string;
|
|
18
|
+
Tash: string;
|
|
19
|
+
UTF8: "True" | "False";
|
|
20
|
+
UTF8out: "True" | "False";
|
|
21
|
+
Order?: string | undefined;
|
|
22
|
+
KEY?: string | undefined;
|
|
23
|
+
FixTash?: "True" | "False" | undefined;
|
|
24
|
+
MoreData?: "True" | "False" | undefined;
|
|
25
|
+
J5?: "True" | "False" | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
Masof: string;
|
|
28
|
+
PassP: string;
|
|
29
|
+
Amount: string;
|
|
30
|
+
Tash: string;
|
|
31
|
+
UTF8: "True" | "False";
|
|
32
|
+
UTF8out: "True" | "False";
|
|
33
|
+
Order?: string | undefined;
|
|
34
|
+
KEY?: string | undefined;
|
|
35
|
+
FixTash?: "True" | "False" | undefined;
|
|
36
|
+
MoreData?: "True" | "False" | undefined;
|
|
37
|
+
J5?: "True" | "False" | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
export declare const HypSoftTransactionRequestSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
40
|
+
Masof: z.ZodString;
|
|
41
|
+
PassP: z.ZodString;
|
|
42
|
+
KEY: z.ZodOptional<z.ZodString>;
|
|
43
|
+
Amount: z.ZodString;
|
|
44
|
+
Order: z.ZodOptional<z.ZodString>;
|
|
45
|
+
Tash: z.ZodString;
|
|
46
|
+
FixTash: z.ZodOptional<z.ZodEnum<["True", "False"]>>;
|
|
47
|
+
UTF8: z.ZodEnum<["True", "False"]>;
|
|
48
|
+
UTF8out: z.ZodEnum<["True", "False"]>;
|
|
49
|
+
MoreData: z.ZodOptional<z.ZodEnum<["True", "False"]>>;
|
|
50
|
+
J5: z.ZodOptional<z.ZodEnum<["True", "False"]>>;
|
|
51
|
+
}, {
|
|
52
|
+
action: z.ZodLiteral<"soft">;
|
|
53
|
+
Info: z.ZodString;
|
|
54
|
+
CC: z.ZodString;
|
|
55
|
+
Tmonth: z.ZodString;
|
|
56
|
+
Tyear: z.ZodString;
|
|
57
|
+
AuthNum: z.ZodString;
|
|
58
|
+
cvv: z.ZodOptional<z.ZodString>;
|
|
59
|
+
UserId: z.ZodString;
|
|
60
|
+
"inputObj.originalUid": z.ZodString;
|
|
61
|
+
"inputObj.originalAmount": z.ZodString;
|
|
62
|
+
"inputObj.authorizationCodeManpik": z.ZodLiteral<"7">;
|
|
63
|
+
ClientName: z.ZodString;
|
|
64
|
+
ClientLName: z.ZodString;
|
|
65
|
+
Token: z.ZodLiteral<"True">;
|
|
66
|
+
}>, "strip", z.ZodTypeAny, {
|
|
67
|
+
Masof: string;
|
|
68
|
+
PassP: string;
|
|
69
|
+
Amount: string;
|
|
70
|
+
Tash: string;
|
|
71
|
+
UTF8: "True" | "False";
|
|
72
|
+
UTF8out: "True" | "False";
|
|
73
|
+
action: "soft";
|
|
74
|
+
Info: string;
|
|
75
|
+
CC: string;
|
|
76
|
+
Tmonth: string;
|
|
77
|
+
Tyear: string;
|
|
78
|
+
AuthNum: string;
|
|
79
|
+
UserId: string;
|
|
80
|
+
"inputObj.originalUid": string;
|
|
81
|
+
"inputObj.originalAmount": string;
|
|
82
|
+
"inputObj.authorizationCodeManpik": "7";
|
|
83
|
+
ClientName: string;
|
|
84
|
+
ClientLName: string;
|
|
85
|
+
Token: "True";
|
|
86
|
+
Order?: string | undefined;
|
|
87
|
+
KEY?: string | undefined;
|
|
88
|
+
FixTash?: "True" | "False" | undefined;
|
|
89
|
+
MoreData?: "True" | "False" | undefined;
|
|
90
|
+
J5?: "True" | "False" | undefined;
|
|
91
|
+
cvv?: string | undefined;
|
|
92
|
+
}, {
|
|
93
|
+
Masof: string;
|
|
94
|
+
PassP: string;
|
|
95
|
+
Amount: string;
|
|
96
|
+
Tash: string;
|
|
97
|
+
UTF8: "True" | "False";
|
|
98
|
+
UTF8out: "True" | "False";
|
|
99
|
+
action: "soft";
|
|
100
|
+
Info: string;
|
|
101
|
+
CC: string;
|
|
102
|
+
Tmonth: string;
|
|
103
|
+
Tyear: string;
|
|
104
|
+
AuthNum: string;
|
|
105
|
+
UserId: string;
|
|
106
|
+
"inputObj.originalUid": string;
|
|
107
|
+
"inputObj.originalAmount": string;
|
|
108
|
+
"inputObj.authorizationCodeManpik": "7";
|
|
109
|
+
ClientName: string;
|
|
110
|
+
ClientLName: string;
|
|
111
|
+
Token: "True";
|
|
112
|
+
Order?: string | undefined;
|
|
113
|
+
KEY?: string | undefined;
|
|
114
|
+
FixTash?: "True" | "False" | undefined;
|
|
115
|
+
MoreData?: "True" | "False" | undefined;
|
|
116
|
+
J5?: "True" | "False" | undefined;
|
|
117
|
+
cvv?: string | undefined;
|
|
118
|
+
}>;
|
|
119
|
+
export type THypSoftTransactionRequest = z.infer<typeof HypSoftTransactionRequestSchema>;
|
|
120
|
+
export declare const HypTokenRequestSchema: z.ZodObject<{
|
|
121
|
+
action: z.ZodLiteral<"getToken">;
|
|
122
|
+
allowFalse: z.ZodLiteral<"True">;
|
|
123
|
+
Masof: z.ZodString;
|
|
124
|
+
PassP: z.ZodString;
|
|
125
|
+
TransId: z.ZodString;
|
|
126
|
+
}, "strip", z.ZodTypeAny, {
|
|
127
|
+
Masof: string;
|
|
128
|
+
PassP: string;
|
|
129
|
+
action: "getToken";
|
|
130
|
+
allowFalse: "True";
|
|
131
|
+
TransId: string;
|
|
132
|
+
}, {
|
|
133
|
+
Masof: string;
|
|
134
|
+
PassP: string;
|
|
135
|
+
action: "getToken";
|
|
136
|
+
allowFalse: "True";
|
|
137
|
+
TransId: string;
|
|
138
|
+
}>;
|
|
139
|
+
export type THypTokenRequest = z.infer<typeof HypTokenRequestSchema>;
|
|
140
|
+
export declare const HypTokenResponseSchema: z.ZodObject<{
|
|
141
|
+
Id: z.ZodString;
|
|
142
|
+
Token: z.ZodString;
|
|
143
|
+
Tokef: z.ZodString;
|
|
144
|
+
CCode: z.ZodString;
|
|
145
|
+
}, "strip", z.ZodTypeAny, {
|
|
146
|
+
Token: string;
|
|
147
|
+
Id: string;
|
|
148
|
+
Tokef: string;
|
|
149
|
+
CCode: string;
|
|
150
|
+
}, {
|
|
151
|
+
Token: string;
|
|
152
|
+
Id: string;
|
|
153
|
+
Tokef: string;
|
|
154
|
+
CCode: string;
|
|
155
|
+
}>;
|
|
156
|
+
export type THypTokenResponse = z.infer<typeof HypTokenResponseSchema>;
|
|
157
|
+
export declare const PayProtocolResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
158
|
+
Masof: z.ZodString;
|
|
159
|
+
PassP: z.ZodString;
|
|
160
|
+
KEY: z.ZodOptional<z.ZodString>;
|
|
161
|
+
Amount: z.ZodString;
|
|
162
|
+
Order: z.ZodOptional<z.ZodString>;
|
|
163
|
+
Tash: z.ZodString;
|
|
164
|
+
FixTash: z.ZodOptional<z.ZodEnum<["True", "False"]>>;
|
|
165
|
+
UTF8: z.ZodEnum<["True", "False"]>;
|
|
166
|
+
UTF8out: z.ZodEnum<["True", "False"]>;
|
|
167
|
+
MoreData: z.ZodOptional<z.ZodEnum<["True", "False"]>>;
|
|
168
|
+
J5: z.ZodOptional<z.ZodEnum<["True", "False"]>>;
|
|
169
|
+
}, {
|
|
170
|
+
Id: z.ZodString;
|
|
171
|
+
ACode: z.ZodString;
|
|
172
|
+
CCode: z.ZodString;
|
|
173
|
+
Sign: z.ZodString;
|
|
174
|
+
Fild1: z.ZodString;
|
|
175
|
+
Fild2: z.ZodString;
|
|
176
|
+
Fild3: z.ZodString;
|
|
177
|
+
Bank: z.ZodOptional<z.ZodString>;
|
|
178
|
+
TransType: z.ZodOptional<z.ZodString>;
|
|
179
|
+
Payments: z.ZodOptional<z.ZodString>;
|
|
180
|
+
UserId: z.ZodOptional<z.ZodString>;
|
|
181
|
+
Brand: z.ZodOptional<z.ZodString>;
|
|
182
|
+
Issuer: z.ZodOptional<z.ZodString>;
|
|
183
|
+
L4digit: z.ZodOptional<z.ZodString>;
|
|
184
|
+
street: z.ZodOptional<z.ZodString>;
|
|
185
|
+
city: z.ZodOptional<z.ZodString>;
|
|
186
|
+
zip: z.ZodOptional<z.ZodString>;
|
|
187
|
+
cell: z.ZodOptional<z.ZodString>;
|
|
188
|
+
Coin: z.ZodOptional<z.ZodString>;
|
|
189
|
+
Tmonth: z.ZodOptional<z.ZodString>;
|
|
190
|
+
Tyear: z.ZodOptional<z.ZodString>;
|
|
191
|
+
Hesh: z.ZodOptional<z.ZodString>;
|
|
192
|
+
UID: z.ZodOptional<z.ZodString>;
|
|
193
|
+
spType: z.ZodOptional<z.ZodString>;
|
|
194
|
+
bincard: z.ZodOptional<z.ZodString>;
|
|
195
|
+
}>, "strip", z.ZodTypeAny, {
|
|
196
|
+
Masof: string;
|
|
197
|
+
PassP: string;
|
|
198
|
+
Amount: string;
|
|
199
|
+
Tash: string;
|
|
200
|
+
UTF8: "True" | "False";
|
|
201
|
+
UTF8out: "True" | "False";
|
|
202
|
+
Id: string;
|
|
203
|
+
CCode: string;
|
|
204
|
+
ACode: string;
|
|
205
|
+
Sign: string;
|
|
206
|
+
Fild1: string;
|
|
207
|
+
Fild2: string;
|
|
208
|
+
Fild3: string;
|
|
209
|
+
city?: string | undefined;
|
|
210
|
+
street?: string | undefined;
|
|
211
|
+
Order?: string | undefined;
|
|
212
|
+
KEY?: string | undefined;
|
|
213
|
+
FixTash?: "True" | "False" | undefined;
|
|
214
|
+
MoreData?: "True" | "False" | undefined;
|
|
215
|
+
J5?: "True" | "False" | undefined;
|
|
216
|
+
Tmonth?: string | undefined;
|
|
217
|
+
Tyear?: string | undefined;
|
|
218
|
+
UserId?: string | undefined;
|
|
219
|
+
Bank?: string | undefined;
|
|
220
|
+
TransType?: string | undefined;
|
|
221
|
+
Payments?: string | undefined;
|
|
222
|
+
Brand?: string | undefined;
|
|
223
|
+
Issuer?: string | undefined;
|
|
224
|
+
L4digit?: string | undefined;
|
|
225
|
+
zip?: string | undefined;
|
|
226
|
+
cell?: string | undefined;
|
|
227
|
+
Coin?: string | undefined;
|
|
228
|
+
Hesh?: string | undefined;
|
|
229
|
+
UID?: string | undefined;
|
|
230
|
+
spType?: string | undefined;
|
|
231
|
+
bincard?: string | undefined;
|
|
232
|
+
}, {
|
|
233
|
+
Masof: string;
|
|
234
|
+
PassP: string;
|
|
235
|
+
Amount: string;
|
|
236
|
+
Tash: string;
|
|
237
|
+
UTF8: "True" | "False";
|
|
238
|
+
UTF8out: "True" | "False";
|
|
239
|
+
Id: string;
|
|
240
|
+
CCode: string;
|
|
241
|
+
ACode: string;
|
|
242
|
+
Sign: string;
|
|
243
|
+
Fild1: string;
|
|
244
|
+
Fild2: string;
|
|
245
|
+
Fild3: string;
|
|
246
|
+
city?: string | undefined;
|
|
247
|
+
street?: string | undefined;
|
|
248
|
+
Order?: string | undefined;
|
|
249
|
+
KEY?: string | undefined;
|
|
250
|
+
FixTash?: "True" | "False" | undefined;
|
|
251
|
+
MoreData?: "True" | "False" | undefined;
|
|
252
|
+
J5?: "True" | "False" | undefined;
|
|
253
|
+
Tmonth?: string | undefined;
|
|
254
|
+
Tyear?: string | undefined;
|
|
255
|
+
UserId?: string | undefined;
|
|
256
|
+
Bank?: string | undefined;
|
|
257
|
+
TransType?: string | undefined;
|
|
258
|
+
Payments?: string | undefined;
|
|
259
|
+
Brand?: string | undefined;
|
|
260
|
+
Issuer?: string | undefined;
|
|
261
|
+
L4digit?: string | undefined;
|
|
262
|
+
zip?: string | undefined;
|
|
263
|
+
cell?: string | undefined;
|
|
264
|
+
Coin?: string | undefined;
|
|
265
|
+
Hesh?: string | undefined;
|
|
266
|
+
UID?: string | undefined;
|
|
267
|
+
spType?: string | undefined;
|
|
268
|
+
bincard?: string | undefined;
|
|
269
|
+
}>;
|
|
270
|
+
export declare const HypPaymentLinkRequestSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
271
|
+
Masof: z.ZodString;
|
|
272
|
+
PassP: z.ZodString;
|
|
273
|
+
KEY: z.ZodOptional<z.ZodString>;
|
|
274
|
+
Amount: z.ZodString;
|
|
275
|
+
Order: z.ZodOptional<z.ZodString>;
|
|
276
|
+
Tash: z.ZodString;
|
|
277
|
+
FixTash: z.ZodOptional<z.ZodEnum<["True", "False"]>>;
|
|
278
|
+
UTF8: z.ZodEnum<["True", "False"]>;
|
|
279
|
+
UTF8out: z.ZodEnum<["True", "False"]>;
|
|
280
|
+
MoreData: z.ZodOptional<z.ZodEnum<["True", "False"]>>;
|
|
281
|
+
J5: z.ZodOptional<z.ZodEnum<["True", "False"]>>;
|
|
282
|
+
}, {
|
|
283
|
+
Masof: z.ZodString;
|
|
284
|
+
PassP: z.ZodString;
|
|
285
|
+
KEY: z.ZodString;
|
|
286
|
+
action: z.ZodLiteral<"APISign">;
|
|
287
|
+
What: z.ZodLiteral<"SIGN">;
|
|
288
|
+
Info: z.ZodString;
|
|
289
|
+
Sign: z.ZodEnum<["True", "False"]>;
|
|
290
|
+
UTF8: z.ZodEnum<["True", "False"]>;
|
|
291
|
+
UTF8out: z.ZodEnum<["True", "False"]>;
|
|
292
|
+
Tash: z.ZodString;
|
|
293
|
+
FixTash: z.ZodOptional<z.ZodEnum<["True", "False"]>>;
|
|
294
|
+
sendemail: z.ZodOptional<z.ZodEnum<["True", "False"]>>;
|
|
295
|
+
SendHesh: z.ZodOptional<z.ZodEnum<["True", "False"]>>;
|
|
296
|
+
heshDesc: z.ZodString;
|
|
297
|
+
Pritim: z.ZodOptional<z.ZodEnum<["True", "False"]>>;
|
|
298
|
+
UserId: z.ZodString;
|
|
299
|
+
ClientName: z.ZodString;
|
|
300
|
+
ClientLName: z.ZodOptional<z.ZodString>;
|
|
301
|
+
street: z.ZodOptional<z.ZodString>;
|
|
302
|
+
city: z.ZodOptional<z.ZodString>;
|
|
303
|
+
zip: z.ZodOptional<z.ZodString>;
|
|
304
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
305
|
+
cell: z.ZodOptional<z.ZodString>;
|
|
306
|
+
email: z.ZodOptional<z.ZodString>;
|
|
307
|
+
}>, "strip", z.ZodTypeAny, {
|
|
308
|
+
Masof: string;
|
|
309
|
+
PassP: string;
|
|
310
|
+
KEY: string;
|
|
311
|
+
Amount: string;
|
|
312
|
+
Tash: string;
|
|
313
|
+
UTF8: "True" | "False";
|
|
314
|
+
UTF8out: "True" | "False";
|
|
315
|
+
action: "APISign";
|
|
316
|
+
Info: string;
|
|
317
|
+
UserId: string;
|
|
318
|
+
ClientName: string;
|
|
319
|
+
Sign: "True" | "False";
|
|
320
|
+
What: "SIGN";
|
|
321
|
+
heshDesc: string;
|
|
322
|
+
city?: string | undefined;
|
|
323
|
+
street?: string | undefined;
|
|
324
|
+
email?: string | undefined;
|
|
325
|
+
Order?: string | undefined;
|
|
326
|
+
FixTash?: "True" | "False" | undefined;
|
|
327
|
+
MoreData?: "True" | "False" | undefined;
|
|
328
|
+
J5?: "True" | "False" | undefined;
|
|
329
|
+
ClientLName?: string | undefined;
|
|
330
|
+
zip?: string | undefined;
|
|
331
|
+
cell?: string | undefined;
|
|
332
|
+
sendemail?: "True" | "False" | undefined;
|
|
333
|
+
SendHesh?: "True" | "False" | undefined;
|
|
334
|
+
Pritim?: "True" | "False" | undefined;
|
|
335
|
+
phone?: string | undefined;
|
|
336
|
+
}, {
|
|
337
|
+
Masof: string;
|
|
338
|
+
PassP: string;
|
|
339
|
+
KEY: string;
|
|
340
|
+
Amount: string;
|
|
341
|
+
Tash: string;
|
|
342
|
+
UTF8: "True" | "False";
|
|
343
|
+
UTF8out: "True" | "False";
|
|
344
|
+
action: "APISign";
|
|
345
|
+
Info: string;
|
|
346
|
+
UserId: string;
|
|
347
|
+
ClientName: string;
|
|
348
|
+
Sign: "True" | "False";
|
|
349
|
+
What: "SIGN";
|
|
350
|
+
heshDesc: string;
|
|
351
|
+
city?: string | undefined;
|
|
352
|
+
street?: string | undefined;
|
|
353
|
+
email?: string | undefined;
|
|
354
|
+
Order?: string | undefined;
|
|
355
|
+
FixTash?: "True" | "False" | undefined;
|
|
356
|
+
MoreData?: "True" | "False" | undefined;
|
|
357
|
+
J5?: "True" | "False" | undefined;
|
|
358
|
+
ClientLName?: string | undefined;
|
|
359
|
+
zip?: string | undefined;
|
|
360
|
+
cell?: string | undefined;
|
|
361
|
+
sendemail?: "True" | "False" | undefined;
|
|
362
|
+
SendHesh?: "True" | "False" | undefined;
|
|
363
|
+
Pritim?: "True" | "False" | undefined;
|
|
364
|
+
phone?: string | undefined;
|
|
365
|
+
}>;
|
|
366
|
+
export type TPaymentLinkRequest = z.infer<typeof HypPaymentLinkRequestSchema>;
|
|
367
|
+
export type TPayProtocolResponse = z.infer<typeof PayProtocolResponseSchema>;
|
|
368
|
+
//# sourceMappingURL=Payment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Payment.d.ts","sourceRoot":"","sources":["../../lib/entities/Payment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBnC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiB1C,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAEzF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;EAOhC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAErE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;EAKjC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEvE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BpC,CAAC;AAGH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BtC,CAAC;AAGH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAG9E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { hypBooleanSchema } from "./Atoms";
|
|
3
|
+
// 600 - Checking a card number700 - Approved without charge800 - Postpone transaction - success handle ass error
|
|
4
|
+
const textSchema = z.string().min(1);
|
|
5
|
+
const numericTextSchema = z.string().regex(/^\d+$/, "Must be a numeric string");
|
|
6
|
+
export const PayProtocolGeneralSchema = z.object({
|
|
7
|
+
Masof: textSchema, // store masof number
|
|
8
|
+
PassP: textSchema, // store masof password,
|
|
9
|
+
KEY: textSchema.optional(), // hyp api key
|
|
10
|
+
Amount: textSchema,
|
|
11
|
+
Order: textSchema.optional(), // order id generated by store
|
|
12
|
+
Tash: numericTextSchema, // Max number of payments that can be selected by the customer
|
|
13
|
+
FixTash: hypBooleanSchema.optional(),
|
|
14
|
+
// tashType: - Payment type optional NOT_IN_USE
|
|
15
|
+
UTF8: hypBooleanSchema, // request is utf8
|
|
16
|
+
UTF8out: hypBooleanSchema, // response is utf8
|
|
17
|
+
MoreData: hypBooleanSchema.optional(), // extra data in response
|
|
18
|
+
J5: hypBooleanSchema.optional(),
|
|
19
|
+
});
|
|
20
|
+
export const HypSoftTransactionRequestSchema = PayProtocolGeneralSchema.extend({
|
|
21
|
+
action: z.literal("soft"),
|
|
22
|
+
Info: textSchema, // text that will be displayed in transaction, report and the management system.
|
|
23
|
+
CC: numericTextSchema, // token number
|
|
24
|
+
Tmonth: textSchema, // MM
|
|
25
|
+
Tyear: textSchema, // YYYY
|
|
26
|
+
AuthNum: textSchema, // confirmation number
|
|
27
|
+
cvv: z.string().optional(), // only if required
|
|
28
|
+
UserId: textSchema,
|
|
29
|
+
"inputObj.originalUid": textSchema,
|
|
30
|
+
"inputObj.originalAmount": textSchema,
|
|
31
|
+
"inputObj.authorizationCodeManpik": z.literal("7"),
|
|
32
|
+
ClientName: textSchema,
|
|
33
|
+
ClientLName: textSchema,
|
|
34
|
+
Token: z.literal("True"),
|
|
35
|
+
// CC2
|
|
36
|
+
// Coin
|
|
37
|
+
});
|
|
38
|
+
export const HypTokenRequestSchema = z.object({
|
|
39
|
+
action: z.literal("getToken"),
|
|
40
|
+
allowFalse: z.literal("True"),
|
|
41
|
+
Masof: textSchema, // store masof number
|
|
42
|
+
PassP: textSchema, // store masof password,
|
|
43
|
+
TransId: numericTextSchema,
|
|
44
|
+
//todo api key is not required???
|
|
45
|
+
});
|
|
46
|
+
export const HypTokenResponseSchema = z.object({
|
|
47
|
+
Id: numericTextSchema,
|
|
48
|
+
Token: numericTextSchema,
|
|
49
|
+
Tokef: numericTextSchema, // credit card validity date in the format YYMM
|
|
50
|
+
CCode: numericTextSchema, //0 code is valid
|
|
51
|
+
});
|
|
52
|
+
export const PayProtocolResponseSchema = PayProtocolGeneralSchema.extend({
|
|
53
|
+
Id: textSchema, // transaction Id in Hypay
|
|
54
|
+
ACode: numericTextSchema, // confirmation code from credit card company
|
|
55
|
+
CCode: z.string(), // todo,
|
|
56
|
+
Sign: z.string(), //
|
|
57
|
+
Fild1: z.string(), // client full name
|
|
58
|
+
Fild2: z.string(), // client email
|
|
59
|
+
Fild3: z.string(), // client phone number
|
|
60
|
+
// if more data equal to True
|
|
61
|
+
Bank: z.string().optional(),
|
|
62
|
+
TransType: z.string().optional(),
|
|
63
|
+
Payments: z.string().optional(), // Number of payments charged
|
|
64
|
+
UserId: z.string().optional(),
|
|
65
|
+
Brand: z.string().optional(),
|
|
66
|
+
Issuer: z.string().optional(),
|
|
67
|
+
L4digit: z.string().optional(),
|
|
68
|
+
street: z.string().optional(),
|
|
69
|
+
city: z.string().optional(),
|
|
70
|
+
zip: z.string().optional(),
|
|
71
|
+
cell: z.string().optional(),
|
|
72
|
+
Coin: z.string().optional(),
|
|
73
|
+
Tmonth: z.string().optional(), // MM format
|
|
74
|
+
Tyear: z.string().optional(), // YYYY format
|
|
75
|
+
Hesh: z.string().optional(), // invoice number (if invoice module is not active Hesh would get 0)
|
|
76
|
+
UID: z.string().optional(), // UID unique value receive from response after successful transaction from request with action pay/soft
|
|
77
|
+
spType: z.string().optional(),
|
|
78
|
+
bincard: z.string().optional(),
|
|
79
|
+
});
|
|
80
|
+
// generate payment link
|
|
81
|
+
export const HypPaymentLinkRequestSchema = PayProtocolGeneralSchema.extend({
|
|
82
|
+
Masof: textSchema, // store masof number
|
|
83
|
+
PassP: textSchema, // store masof password,
|
|
84
|
+
KEY: textSchema, // hyp api key
|
|
85
|
+
action: z.literal("APISign"),
|
|
86
|
+
What: z.literal("SIGN"),
|
|
87
|
+
Info: textSchema, // text that will be displayed in transaction, report and the management system.
|
|
88
|
+
Sign: hypBooleanSchema, // Sign on sent parameters in answer
|
|
89
|
+
UTF8: hypBooleanSchema, // request is utf8
|
|
90
|
+
UTF8out: hypBooleanSchema, // response is utf8
|
|
91
|
+
Tash: numericTextSchema, // Max number of payments that can be selected by the customer
|
|
92
|
+
FixTash: hypBooleanSchema.optional(),
|
|
93
|
+
sendemail: hypBooleanSchema.optional(),
|
|
94
|
+
// EzCount Invoice parameters - Pay Protocol
|
|
95
|
+
SendHesh: hypBooleanSchema.optional(), // send invoice in email
|
|
96
|
+
heshDesc: textSchema, // [0~Item 1~1~8][0~Item 2~2~1]
|
|
97
|
+
Pritim: hypBooleanSchema.optional(), // The invoice description contains items
|
|
98
|
+
// client data
|
|
99
|
+
UserId: numericTextSchema,
|
|
100
|
+
ClientName: textSchema, // first name
|
|
101
|
+
ClientLName: textSchema.optional(), // last name
|
|
102
|
+
street: textSchema.optional(),
|
|
103
|
+
city: textSchema.optional(),
|
|
104
|
+
zip: textSchema.optional(),
|
|
105
|
+
phone: textSchema.optional(),
|
|
106
|
+
cell: textSchema.optional(),
|
|
107
|
+
email: textSchema.optional(),
|
|
108
|
+
});
|