@gigapay-dev/contracts 1.0.6 → 1.0.8
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/commands/index.js +1 -0
- package/build/commands/orders/create.js +1 -0
- package/build/commands/orders/read.js +1 -0
- package/build/commands/orders/update.js +1 -0
- package/build/commands/pagination.js +11 -0
- package/build/commands/promocode-activations/create.js +10 -0
- package/build/commands/promocode-activations/index.js +19 -0
- package/build/commands/promocode-activations/read.js +14 -0
- package/build/commands/promocode-activations/update.js +10 -0
- package/commands/index.ts +2 -1
- package/commands/pagination.ts +8 -0
- package/commands/promocode-activations/create.ts +10 -0
- package/commands/promocode-activations/index.ts +3 -0
- package/commands/promocode-activations/read.ts +11 -0
- package/commands/promocode-activations/update.ts +10 -0
- package/package.json +1 -1
package/build/commands/index.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.OrderCreateResponseSchema = exports.OrderCreateRequestSchema = void 0;
|
|
|
7
7
|
const zod_1 = __importDefault(require("zod"));
|
|
8
8
|
exports.OrderCreateRequestSchema = zod_1.default.object({
|
|
9
9
|
email: zod_1.default.string().email(),
|
|
10
|
+
steamUsername: zod_1.default.string(),
|
|
10
11
|
amount: zod_1.default.number().positive(),
|
|
11
12
|
userId: zod_1.default.number().positive().optional(),
|
|
12
13
|
paymentMethodId: zod_1.default.number().positive().optional(),
|
|
@@ -7,6 +7,7 @@ exports.OrderReadResponseSchema = zod_1.z.object({
|
|
|
7
7
|
userId: zod_1.z.number().positive().optional(),
|
|
8
8
|
promocodeId: zod_1.z.number().positive().optional(),
|
|
9
9
|
status: zod_1.z.string(),
|
|
10
|
+
steamUsername: zod_1.z.string(),
|
|
10
11
|
paymentId: zod_1.z.number().positive(),
|
|
11
12
|
paymentMethodId: zod_1.z.number().positive().optional(),
|
|
12
13
|
amount: zod_1.z.number().positive(),
|
|
@@ -5,6 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
exports.OrderUpdateRequestSchema = zod_1.z.object({
|
|
6
6
|
email: zod_1.z.string().email().optional(),
|
|
7
7
|
amount: zod_1.z.number().positive().optional(),
|
|
8
|
+
steamUsername: zod_1.z.string().optional(),
|
|
8
9
|
userId: zod_1.z.number().positive().optional(),
|
|
9
10
|
paymentMethodId: zod_1.z.number().positive().optional(),
|
|
10
11
|
promocodeId: zod_1.z.number().positive().optional(),
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PaginationQuery = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
exports.PaginationQuery = zod_1.default.object({
|
|
9
|
+
take: zod_1.default.number().positive().optional(),
|
|
10
|
+
skip: zod_1.default.number().positive().optional(),
|
|
11
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PromoCodeActivationCreateSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.PromoCodeActivationCreateSchema = zod_1.z.object({
|
|
6
|
+
promocodeId: zod_1.z.coerce.number(),
|
|
7
|
+
refferalId: zod_1.z.coerce.number(),
|
|
8
|
+
discountValue: zod_1.z.coerce.number(),
|
|
9
|
+
activatedAt: zod_1.z.coerce.date(),
|
|
10
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./create"), exports);
|
|
18
|
+
__exportStar(require("./read"), exports);
|
|
19
|
+
__exportStar(require("./update"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PromoCodeActivationReadResponseSchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
exports.PromoCodeActivationReadResponseSchema = zod_1.default.object({
|
|
9
|
+
id: zod_1.default.number().positive(),
|
|
10
|
+
promocodeId: zod_1.default.number().positive(),
|
|
11
|
+
refferalId: zod_1.default.number().positive(),
|
|
12
|
+
discountValue: zod_1.default.string(),
|
|
13
|
+
activatedAt: zod_1.default.coerce.date(),
|
|
14
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PromoCodeActivationUpdateSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.PromoCodeActivationUpdateSchema = zod_1.z.object({
|
|
6
|
+
promocodeId: zod_1.z.coerce.number().optional(),
|
|
7
|
+
refferalId: zod_1.z.coerce.number().optional(),
|
|
8
|
+
discountValue: zod_1.z.coerce.number().optional(),
|
|
9
|
+
activatedAt: zod_1.z.coerce.date().nullable().optional(),
|
|
10
|
+
});
|
package/commands/index.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
export const PromoCodeActivationCreateSchema = z.object({
|
|
4
|
+
promocodeId: z.coerce.number(),
|
|
5
|
+
refferalId: z.coerce.number(),
|
|
6
|
+
discountValue: z.coerce.number(),
|
|
7
|
+
activatedAt: z.coerce.date(),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export type PromoCodeActivationCreate = z.infer<typeof PromoCodeActivationCreateSchema>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
|
|
3
|
+
export const PromoCodeActivationReadResponseSchema = z.object({
|
|
4
|
+
id: z.number().positive(),
|
|
5
|
+
promocodeId: z.number().positive(),
|
|
6
|
+
refferalId: z.number().positive(),
|
|
7
|
+
discountValue: z.string(),
|
|
8
|
+
activatedAt: z.coerce.date(),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export type PromoCodeActivationReadResponse = z.infer<typeof PromoCodeActivationReadResponseSchema>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
export const PromoCodeActivationUpdateSchema = z.object({
|
|
4
|
+
promocodeId: z.coerce.number().optional(),
|
|
5
|
+
refferalId: z.coerce.number().optional(),
|
|
6
|
+
discountValue: z.coerce.number().optional(),
|
|
7
|
+
activatedAt: z.coerce.date().nullable().optional(),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export type PromoCodeActivationUpdate = z.infer<typeof PromoCodeActivationUpdateSchema>;
|