@veruna/api-contracts 1.1.0 → 1.1.2
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/controllers/daily-rewards.controllers.d.ts +2 -0
- package/build/controllers/daily-rewards.controllers.js +6 -0
- package/build/controllers/daily-rewards.controllers.js.map +1 -0
- package/build/controllers/index.d.ts +1 -0
- package/build/controllers/index.js +4 -1
- package/build/controllers/index.js.map +1 -1
- package/build/locales/validation.d.ts +86 -0
- package/build/locales/validation.js +86 -0
- package/build/locales/validation.js.map +1 -1
- package/build/rest-api.d.ts +11 -0
- package/build/rest-api.js +11 -0
- package/build/rest-api.js.map +1 -1
- package/build/routes/daily-rewards.routes.d.ts +11 -0
- package/build/routes/daily-rewards.routes.js +15 -0
- package/build/routes/daily-rewards.routes.js.map +1 -0
- package/build/routes/index.d.ts +1 -0
- package/build/routes/index.js +4 -1
- package/build/routes/index.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/v1/daily-rewards/commands/admin-delete-reward-config.command.d.ts +9 -0
- package/build/v1/daily-rewards/commands/admin-delete-reward-config.command.js +12 -0
- package/build/v1/daily-rewards/commands/admin-delete-reward-config.command.js.map +1 -0
- package/build/v1/daily-rewards/commands/admin-update-reward-config.command.d.ts +22 -0
- package/build/v1/daily-rewards/commands/admin-update-reward-config.command.js +12 -0
- package/build/v1/daily-rewards/commands/admin-update-reward-config.command.js.map +1 -0
- package/build/v1/daily-rewards/commands/admin-upsert-reward-config.command.d.ts +23 -0
- package/build/v1/daily-rewards/commands/admin-upsert-reward-config.command.js +14 -0
- package/build/v1/daily-rewards/commands/admin-upsert-reward-config.command.js.map +1 -0
- package/build/v1/daily-rewards/commands/claim-daily-reward.command.d.ts +16 -0
- package/build/v1/daily-rewards/commands/claim-daily-reward.command.js +15 -0
- package/build/v1/daily-rewards/commands/claim-daily-reward.command.js.map +1 -0
- package/build/v1/daily-rewards/commands/index.d.ts +5 -0
- package/build/v1/daily-rewards/commands/index.js +14 -0
- package/build/v1/daily-rewards/commands/index.js.map +1 -0
- package/build/v1/daily-rewards/commands/restore-streak-with-grace.command.d.ts +16 -0
- package/build/v1/daily-rewards/commands/restore-streak-with-grace.command.js +15 -0
- package/build/v1/daily-rewards/commands/restore-streak-with-grace.command.js.map +1 -0
- package/build/v1/daily-rewards/daily-rewards.constants.d.ts +3 -0
- package/build/v1/daily-rewards/daily-rewards.constants.js +7 -0
- package/build/v1/daily-rewards/daily-rewards.constants.js.map +1 -0
- package/build/v1/daily-rewards/daily-rewards.errors.d.ts +14 -0
- package/build/v1/daily-rewards/daily-rewards.errors.js +59 -0
- package/build/v1/daily-rewards/daily-rewards.errors.js.map +1 -0
- package/build/v1/daily-rewards/index.d.ts +7 -0
- package/build/v1/daily-rewards/index.js +29 -0
- package/build/v1/daily-rewards/index.js.map +1 -0
- package/build/v1/daily-rewards/queries/admin-get-reward-configs.query.d.ts +20 -0
- package/build/v1/daily-rewards/queries/admin-get-reward-configs.query.js +15 -0
- package/build/v1/daily-rewards/queries/admin-get-reward-configs.query.js.map +1 -0
- package/build/v1/daily-rewards/queries/get-claim-history.query.d.ts +23 -0
- package/build/v1/daily-rewards/queries/get-claim-history.query.js +14 -0
- package/build/v1/daily-rewards/queries/get-claim-history.query.js.map +1 -0
- package/build/v1/daily-rewards/queries/get-reward-table.query.d.ts +16 -0
- package/build/v1/daily-rewards/queries/get-reward-table.query.js +15 -0
- package/build/v1/daily-rewards/queries/get-reward-table.query.js.map +1 -0
- package/build/v1/daily-rewards/queries/get-streak-status.query.d.ts +19 -0
- package/build/v1/daily-rewards/queries/get-streak-status.query.js +15 -0
- package/build/v1/daily-rewards/queries/get-streak-status.query.js.map +1 -0
- package/build/v1/daily-rewards/queries/index.d.ts +4 -0
- package/build/v1/daily-rewards/queries/index.js +12 -0
- package/build/v1/daily-rewards/queries/index.js.map +1 -0
- package/build/v1/daily-rewards/schemas/admin-reward-config.schema.d.ts +33 -0
- package/build/v1/daily-rewards/schemas/admin-reward-config.schema.js +59 -0
- package/build/v1/daily-rewards/schemas/admin-reward-config.schema.js.map +1 -0
- package/build/v1/daily-rewards/schemas/claim-history-request.schema.d.ts +5 -0
- package/build/v1/daily-rewards/schemas/claim-history-request.schema.js +18 -0
- package/build/v1/daily-rewards/schemas/claim-history-request.schema.js.map +1 -0
- package/build/v1/daily-rewards/schemas/claim-history-response.schema.d.ts +20 -0
- package/build/v1/daily-rewards/schemas/claim-history-response.schema.js +17 -0
- package/build/v1/daily-rewards/schemas/claim-history-response.schema.js.map +1 -0
- package/build/v1/daily-rewards/schemas/claim-response.schema.d.ts +8 -0
- package/build/v1/daily-rewards/schemas/claim-response.schema.js +12 -0
- package/build/v1/daily-rewards/schemas/claim-response.schema.js.map +1 -0
- package/build/v1/daily-rewards/schemas/index.d.ts +6 -0
- package/build/v1/daily-rewards/schemas/index.js +23 -0
- package/build/v1/daily-rewards/schemas/index.js.map +1 -0
- package/build/v1/daily-rewards/schemas/reward-table-response.schema.d.ts +13 -0
- package/build/v1/daily-rewards/schemas/reward-table-response.schema.js +13 -0
- package/build/v1/daily-rewards/schemas/reward-table-response.schema.js.map +1 -0
- package/build/v1/daily-rewards/schemas/streak-status-response.schema.d.ts +11 -0
- package/build/v1/daily-rewards/schemas/streak-status-response.schema.js +15 -0
- package/build/v1/daily-rewards/schemas/streak-status-response.schema.js.map +1 -0
- package/build/v1/index.d.ts +1 -0
- package/build/v1/index.js +1 -0
- package/build/v1/index.js.map +1 -1
- package/build/v1/notifications/schemas/email-template.enum.d.ts +3 -1
- package/build/v1/notifications/schemas/email-template.enum.js +2 -0
- package/build/v1/notifications/schemas/email-template.enum.js.map +1 -1
- package/build/v1/wallet/schemas/balance-type-code.enum.d.ts +5 -0
- package/build/v1/wallet/schemas/balance-type-code.enum.js +10 -0
- package/build/v1/wallet/schemas/balance-type-code.enum.js.map +1 -0
- package/build/v1/wallet/schemas/index.d.ts +1 -0
- package/build/v1/wallet/schemas/index.js +3 -1
- package/build/v1/wallet/schemas/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace AdminDeleteRewardConfigCommand {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodVoid;
|
|
6
|
+
const METHOD = HttpMethod.DELETE;
|
|
7
|
+
type RequestType = z.infer<typeof Request>;
|
|
8
|
+
type ResponseType = z.infer<typeof Response>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminDeleteRewardConfigCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const http_method_1 = require("../../../shared/http-method");
|
|
6
|
+
var AdminDeleteRewardConfigCommand;
|
|
7
|
+
(function (AdminDeleteRewardConfigCommand) {
|
|
8
|
+
AdminDeleteRewardConfigCommand.Request = zod_1.z.object({});
|
|
9
|
+
AdminDeleteRewardConfigCommand.Response = zod_1.z.void();
|
|
10
|
+
AdminDeleteRewardConfigCommand.METHOD = http_method_1.HttpMethod.DELETE;
|
|
11
|
+
})(AdminDeleteRewardConfigCommand || (exports.AdminDeleteRewardConfigCommand = AdminDeleteRewardConfigCommand = {}));
|
|
12
|
+
//# sourceMappingURL=admin-delete-reward-config.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-delete-reward-config.command.js","sourceRoot":"","sources":["../../../../v1/daily-rewards/commands/admin-delete-reward-config.command.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,6DAAyD;AAEzD,IAAiB,8BAA8B,CAS9C;AATD,WAAiB,8BAA8B;IAC9B,sCAAO,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvB,uCAAQ,GAAG,OAAC,CAAC,IAAI,EAAE,CAAC;IAGpB,qCAAM,GAAG,wBAAU,CAAC,MAAM,CAAC;AAI5C,CAAC,EATgB,8BAA8B,8CAA9B,8BAA8B,QAS9C"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace AdminUpdateRewardConfigCommand {
|
|
4
|
+
const Request: z.ZodObject<{
|
|
5
|
+
day: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
amount: z.ZodOptional<z.ZodString>;
|
|
7
|
+
isMaxDay: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
const Response: z.ZodObject<{
|
|
11
|
+
uuid: z.ZodString;
|
|
12
|
+
day: z.ZodNumber;
|
|
13
|
+
amount: z.ZodString;
|
|
14
|
+
isMaxDay: z.ZodBoolean;
|
|
15
|
+
isActive: z.ZodBoolean;
|
|
16
|
+
createdAt: z.ZodString;
|
|
17
|
+
updatedAt: z.ZodString;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
const METHOD = HttpMethod.PUT;
|
|
20
|
+
type RequestType = z.infer<typeof Request>;
|
|
21
|
+
type ResponseType = z.infer<typeof Response>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminUpdateRewardConfigCommand = void 0;
|
|
4
|
+
const schemas_1 = require("../schemas");
|
|
5
|
+
const http_method_1 = require("../../../shared/http-method");
|
|
6
|
+
var AdminUpdateRewardConfigCommand;
|
|
7
|
+
(function (AdminUpdateRewardConfigCommand) {
|
|
8
|
+
AdminUpdateRewardConfigCommand.Request = schemas_1.AdminUpdateRewardConfigRequestSchema;
|
|
9
|
+
AdminUpdateRewardConfigCommand.Response = schemas_1.AdminRewardConfigSchema;
|
|
10
|
+
AdminUpdateRewardConfigCommand.METHOD = http_method_1.HttpMethod.PUT;
|
|
11
|
+
})(AdminUpdateRewardConfigCommand || (exports.AdminUpdateRewardConfigCommand = AdminUpdateRewardConfigCommand = {}));
|
|
12
|
+
//# sourceMappingURL=admin-update-reward-config.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-update-reward-config.command.js","sourceRoot":"","sources":["../../../../v1/daily-rewards/commands/admin-update-reward-config.command.ts"],"names":[],"mappings":";;;AACA,wCAA2F;AAC3F,6DAAyD;AAEzD,IAAiB,8BAA8B,CAS9C;AATD,WAAiB,8BAA8B;IAC9B,sCAAO,GAAG,8CAAoC,CAAC;IAC/C,uCAAQ,GAAG,iCAAuB,CAAC;IAGnC,qCAAM,GAAG,wBAAU,CAAC,GAAG,CAAC;AAIzC,CAAC,EATgB,8BAA8B,8CAA9B,8BAA8B,QAS9C"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace AdminCreateRewardConfigCommand {
|
|
4
|
+
const Request: z.ZodObject<{
|
|
5
|
+
day: z.ZodNumber;
|
|
6
|
+
amount: z.ZodString;
|
|
7
|
+
isMaxDay: z.ZodBoolean;
|
|
8
|
+
isActive: z.ZodBoolean;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
const Response: z.ZodObject<{
|
|
11
|
+
uuid: z.ZodString;
|
|
12
|
+
day: z.ZodNumber;
|
|
13
|
+
amount: z.ZodString;
|
|
14
|
+
isMaxDay: z.ZodBoolean;
|
|
15
|
+
isActive: z.ZodBoolean;
|
|
16
|
+
createdAt: z.ZodString;
|
|
17
|
+
updatedAt: z.ZodString;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
const URL: "/api/v1/admin/daily-rewards/reward-configs";
|
|
20
|
+
const METHOD = HttpMethod.POST;
|
|
21
|
+
type RequestType = z.infer<typeof Request>;
|
|
22
|
+
type ResponseType = z.infer<typeof Response>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminCreateRewardConfigCommand = void 0;
|
|
4
|
+
const schemas_1 = require("../schemas");
|
|
5
|
+
const rest_api_1 = require("../../../rest-api");
|
|
6
|
+
const http_method_1 = require("../../../shared/http-method");
|
|
7
|
+
var AdminCreateRewardConfigCommand;
|
|
8
|
+
(function (AdminCreateRewardConfigCommand) {
|
|
9
|
+
AdminCreateRewardConfigCommand.Request = schemas_1.AdminUpsertRewardConfigRequestSchema;
|
|
10
|
+
AdminCreateRewardConfigCommand.Response = schemas_1.AdminRewardConfigSchema;
|
|
11
|
+
AdminCreateRewardConfigCommand.URL = rest_api_1.REST_API.V1.DAILY_REWARDS_ADMIN.REWARD_CONFIGS;
|
|
12
|
+
AdminCreateRewardConfigCommand.METHOD = http_method_1.HttpMethod.POST;
|
|
13
|
+
})(AdminCreateRewardConfigCommand || (exports.AdminCreateRewardConfigCommand = AdminCreateRewardConfigCommand = {}));
|
|
14
|
+
//# sourceMappingURL=admin-upsert-reward-config.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-upsert-reward-config.command.js","sourceRoot":"","sources":["../../../../v1/daily-rewards/commands/admin-upsert-reward-config.command.ts"],"names":[],"mappings":";;;AACA,wCAA2F;AAC3F,gDAA6C;AAC7C,6DAAyD;AAEzD,IAAiB,8BAA8B,CAS9C;AATD,WAAiB,8BAA8B;IAC9B,sCAAO,GAAG,8CAAoC,CAAC;IAC/C,uCAAQ,GAAG,iCAAuB,CAAC;IAEnC,kCAAG,GAAG,mBAAQ,CAAC,EAAE,CAAC,mBAAmB,CAAC,cAAc,CAAC;IACrD,qCAAM,GAAG,wBAAU,CAAC,IAAI,CAAC;AAI1C,CAAC,EATgB,8BAA8B,8CAA9B,8BAA8B,QAS9C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace ClaimDailyRewardCommand {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
|
+
claimId: z.ZodString;
|
|
7
|
+
streakDay: z.ZodNumber;
|
|
8
|
+
amount: z.ZodString;
|
|
9
|
+
claimDate: z.ZodString;
|
|
10
|
+
isGrace: z.ZodBoolean;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
const URL: "/api/v1/daily-rewards/claim";
|
|
13
|
+
const METHOD = HttpMethod.POST;
|
|
14
|
+
type RequestType = z.infer<typeof Request>;
|
|
15
|
+
type ResponseType = z.infer<typeof Response>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClaimDailyRewardCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../schemas");
|
|
6
|
+
const rest_api_1 = require("../../../rest-api");
|
|
7
|
+
const http_method_1 = require("../../../shared/http-method");
|
|
8
|
+
var ClaimDailyRewardCommand;
|
|
9
|
+
(function (ClaimDailyRewardCommand) {
|
|
10
|
+
ClaimDailyRewardCommand.Request = zod_1.z.object({});
|
|
11
|
+
ClaimDailyRewardCommand.Response = schemas_1.ClaimResponseSchema;
|
|
12
|
+
ClaimDailyRewardCommand.URL = rest_api_1.REST_API.V1.DAILY_REWARDS.CLAIM;
|
|
13
|
+
ClaimDailyRewardCommand.METHOD = http_method_1.HttpMethod.POST;
|
|
14
|
+
})(ClaimDailyRewardCommand || (exports.ClaimDailyRewardCommand = ClaimDailyRewardCommand = {}));
|
|
15
|
+
//# sourceMappingURL=claim-daily-reward.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claim-daily-reward.command.js","sourceRoot":"","sources":["../../../../v1/daily-rewards/commands/claim-daily-reward.command.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAAiD;AACjD,gDAA6C;AAC7C,6DAAyD;AAEzD,IAAiB,uBAAuB,CASvC;AATD,WAAiB,uBAAuB;IACvB,+BAAO,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvB,gCAAQ,GAAG,6BAAmB,CAAC;IAE/B,2BAAG,GAAG,mBAAQ,CAAC,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC;IACtC,8BAAM,GAAG,wBAAU,CAAC,IAAI,CAAC;AAI1C,CAAC,EATgB,uBAAuB,uCAAvB,uBAAuB,QASvC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ClaimDailyRewardCommand } from './claim-daily-reward.command';
|
|
2
|
+
export { RestoreStreakWithGraceCommand } from './restore-streak-with-grace.command';
|
|
3
|
+
export { AdminCreateRewardConfigCommand } from './admin-upsert-reward-config.command';
|
|
4
|
+
export { AdminUpdateRewardConfigCommand } from './admin-update-reward-config.command';
|
|
5
|
+
export { AdminDeleteRewardConfigCommand } from './admin-delete-reward-config.command';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminDeleteRewardConfigCommand = exports.AdminUpdateRewardConfigCommand = exports.AdminCreateRewardConfigCommand = exports.RestoreStreakWithGraceCommand = exports.ClaimDailyRewardCommand = void 0;
|
|
4
|
+
var claim_daily_reward_command_1 = require("./claim-daily-reward.command");
|
|
5
|
+
Object.defineProperty(exports, "ClaimDailyRewardCommand", { enumerable: true, get: function () { return claim_daily_reward_command_1.ClaimDailyRewardCommand; } });
|
|
6
|
+
var restore_streak_with_grace_command_1 = require("./restore-streak-with-grace.command");
|
|
7
|
+
Object.defineProperty(exports, "RestoreStreakWithGraceCommand", { enumerable: true, get: function () { return restore_streak_with_grace_command_1.RestoreStreakWithGraceCommand; } });
|
|
8
|
+
var admin_upsert_reward_config_command_1 = require("./admin-upsert-reward-config.command");
|
|
9
|
+
Object.defineProperty(exports, "AdminCreateRewardConfigCommand", { enumerable: true, get: function () { return admin_upsert_reward_config_command_1.AdminCreateRewardConfigCommand; } });
|
|
10
|
+
var admin_update_reward_config_command_1 = require("./admin-update-reward-config.command");
|
|
11
|
+
Object.defineProperty(exports, "AdminUpdateRewardConfigCommand", { enumerable: true, get: function () { return admin_update_reward_config_command_1.AdminUpdateRewardConfigCommand; } });
|
|
12
|
+
var admin_delete_reward_config_command_1 = require("./admin-delete-reward-config.command");
|
|
13
|
+
Object.defineProperty(exports, "AdminDeleteRewardConfigCommand", { enumerable: true, get: function () { return admin_delete_reward_config_command_1.AdminDeleteRewardConfigCommand; } });
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/daily-rewards/commands/index.ts"],"names":[],"mappings":";;;AAAA,2EAAuE;AAA9D,qIAAA,uBAAuB,OAAA;AAChC,yFAAoF;AAA3E,kJAAA,6BAA6B,OAAA;AACtC,2FAAsF;AAA7E,oJAAA,8BAA8B,OAAA;AACvC,2FAAsF;AAA7E,oJAAA,8BAA8B,OAAA;AACvC,2FAAsF;AAA7E,oJAAA,8BAA8B,OAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace RestoreStreakWithGraceCommand {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
|
+
claimId: z.ZodString;
|
|
7
|
+
streakDay: z.ZodNumber;
|
|
8
|
+
amount: z.ZodString;
|
|
9
|
+
claimDate: z.ZodString;
|
|
10
|
+
isGrace: z.ZodBoolean;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
const URL: "/api/v1/daily-rewards/grace";
|
|
13
|
+
const METHOD = HttpMethod.POST;
|
|
14
|
+
type RequestType = z.infer<typeof Request>;
|
|
15
|
+
type ResponseType = z.infer<typeof Response>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RestoreStreakWithGraceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../schemas");
|
|
6
|
+
const rest_api_1 = require("../../../rest-api");
|
|
7
|
+
const http_method_1 = require("../../../shared/http-method");
|
|
8
|
+
var RestoreStreakWithGraceCommand;
|
|
9
|
+
(function (RestoreStreakWithGraceCommand) {
|
|
10
|
+
RestoreStreakWithGraceCommand.Request = zod_1.z.object({});
|
|
11
|
+
RestoreStreakWithGraceCommand.Response = schemas_1.ClaimResponseSchema;
|
|
12
|
+
RestoreStreakWithGraceCommand.URL = rest_api_1.REST_API.V1.DAILY_REWARDS.GRACE;
|
|
13
|
+
RestoreStreakWithGraceCommand.METHOD = http_method_1.HttpMethod.POST;
|
|
14
|
+
})(RestoreStreakWithGraceCommand || (exports.RestoreStreakWithGraceCommand = RestoreStreakWithGraceCommand = {}));
|
|
15
|
+
//# sourceMappingURL=restore-streak-with-grace.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restore-streak-with-grace.command.js","sourceRoot":"","sources":["../../../../v1/daily-rewards/commands/restore-streak-with-grace.command.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAAiD;AACjD,gDAA6C;AAC7C,6DAAyD;AAEzD,IAAiB,6BAA6B,CAS7C;AATD,WAAiB,6BAA6B;IAC7B,qCAAO,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvB,sCAAQ,GAAG,6BAAmB,CAAC;IAE/B,iCAAG,GAAG,mBAAQ,CAAC,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC;IACtC,oCAAM,GAAG,wBAAU,CAAC,IAAI,CAAC;AAI1C,CAAC,EATgB,6BAA6B,6CAA7B,6BAA6B,QAS7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daily-rewards.constants.js","sourceRoot":"","sources":["../../../v1/daily-rewards/daily-rewards.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG;IAC/B,iBAAiB,EAAE,aAAa;CAC1B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ErrorMetadata } from '../../shared';
|
|
2
|
+
export declare enum DailyRewardErrorCode {
|
|
3
|
+
ALREADY_CLAIMED_TODAY = "ALREADY_CLAIMED_TODAY",
|
|
4
|
+
GRACE_REQUIRED = "GRACE_REQUIRED",
|
|
5
|
+
GRACE_NOT_AVAILABLE = "GRACE_NOT_AVAILABLE",
|
|
6
|
+
USER_NOT_VERIFIED = "USER_NOT_VERIFIED",
|
|
7
|
+
REWARD_CONFIG_NOT_FOUND = "REWARD_CONFIG_NOT_FOUND",
|
|
8
|
+
REWARD_CONFIG_DAY_ALREADY_EXISTS = "REWARD_CONFIG_DAY_ALREADY_EXISTS",
|
|
9
|
+
REWARD_CONFIG_STRUCTURE_INVALID = "REWARD_CONFIG_STRUCTURE_INVALID",
|
|
10
|
+
MAX_DAY_NOT_CONFIGURED = "MAX_DAY_NOT_CONFIGURED",
|
|
11
|
+
STREAK_NOT_FOUND = "STREAK_NOT_FOUND",
|
|
12
|
+
NO_GRACE_NEEDED = "NO_GRACE_NEEDED"
|
|
13
|
+
}
|
|
14
|
+
export declare const DAILY_REWARD_ERRORS: Record<DailyRewardErrorCode, ErrorMetadata>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DAILY_REWARD_ERRORS = exports.DailyRewardErrorCode = void 0;
|
|
4
|
+
var DailyRewardErrorCode;
|
|
5
|
+
(function (DailyRewardErrorCode) {
|
|
6
|
+
DailyRewardErrorCode["ALREADY_CLAIMED_TODAY"] = "ALREADY_CLAIMED_TODAY";
|
|
7
|
+
DailyRewardErrorCode["GRACE_REQUIRED"] = "GRACE_REQUIRED";
|
|
8
|
+
DailyRewardErrorCode["GRACE_NOT_AVAILABLE"] = "GRACE_NOT_AVAILABLE";
|
|
9
|
+
DailyRewardErrorCode["USER_NOT_VERIFIED"] = "USER_NOT_VERIFIED";
|
|
10
|
+
DailyRewardErrorCode["REWARD_CONFIG_NOT_FOUND"] = "REWARD_CONFIG_NOT_FOUND";
|
|
11
|
+
DailyRewardErrorCode["REWARD_CONFIG_DAY_ALREADY_EXISTS"] = "REWARD_CONFIG_DAY_ALREADY_EXISTS";
|
|
12
|
+
DailyRewardErrorCode["REWARD_CONFIG_STRUCTURE_INVALID"] = "REWARD_CONFIG_STRUCTURE_INVALID";
|
|
13
|
+
DailyRewardErrorCode["MAX_DAY_NOT_CONFIGURED"] = "MAX_DAY_NOT_CONFIGURED";
|
|
14
|
+
DailyRewardErrorCode["STREAK_NOT_FOUND"] = "STREAK_NOT_FOUND";
|
|
15
|
+
DailyRewardErrorCode["NO_GRACE_NEEDED"] = "NO_GRACE_NEEDED";
|
|
16
|
+
})(DailyRewardErrorCode || (exports.DailyRewardErrorCode = DailyRewardErrorCode = {}));
|
|
17
|
+
exports.DAILY_REWARD_ERRORS = {
|
|
18
|
+
[DailyRewardErrorCode.ALREADY_CLAIMED_TODAY]: {
|
|
19
|
+
code: DailyRewardErrorCode.ALREADY_CLAIMED_TODAY,
|
|
20
|
+
statusCode: 409,
|
|
21
|
+
},
|
|
22
|
+
[DailyRewardErrorCode.GRACE_REQUIRED]: {
|
|
23
|
+
code: DailyRewardErrorCode.GRACE_REQUIRED,
|
|
24
|
+
statusCode: 409,
|
|
25
|
+
},
|
|
26
|
+
[DailyRewardErrorCode.GRACE_NOT_AVAILABLE]: {
|
|
27
|
+
code: DailyRewardErrorCode.GRACE_NOT_AVAILABLE,
|
|
28
|
+
statusCode: 409,
|
|
29
|
+
},
|
|
30
|
+
[DailyRewardErrorCode.USER_NOT_VERIFIED]: {
|
|
31
|
+
code: DailyRewardErrorCode.USER_NOT_VERIFIED,
|
|
32
|
+
statusCode: 403,
|
|
33
|
+
},
|
|
34
|
+
[DailyRewardErrorCode.REWARD_CONFIG_NOT_FOUND]: {
|
|
35
|
+
code: DailyRewardErrorCode.REWARD_CONFIG_NOT_FOUND,
|
|
36
|
+
statusCode: 404,
|
|
37
|
+
},
|
|
38
|
+
[DailyRewardErrorCode.REWARD_CONFIG_DAY_ALREADY_EXISTS]: {
|
|
39
|
+
code: DailyRewardErrorCode.REWARD_CONFIG_DAY_ALREADY_EXISTS,
|
|
40
|
+
statusCode: 409,
|
|
41
|
+
},
|
|
42
|
+
[DailyRewardErrorCode.REWARD_CONFIG_STRUCTURE_INVALID]: {
|
|
43
|
+
code: DailyRewardErrorCode.REWARD_CONFIG_STRUCTURE_INVALID,
|
|
44
|
+
statusCode: 409,
|
|
45
|
+
},
|
|
46
|
+
[DailyRewardErrorCode.MAX_DAY_NOT_CONFIGURED]: {
|
|
47
|
+
code: DailyRewardErrorCode.MAX_DAY_NOT_CONFIGURED,
|
|
48
|
+
statusCode: 500,
|
|
49
|
+
},
|
|
50
|
+
[DailyRewardErrorCode.STREAK_NOT_FOUND]: {
|
|
51
|
+
code: DailyRewardErrorCode.STREAK_NOT_FOUND,
|
|
52
|
+
statusCode: 404,
|
|
53
|
+
},
|
|
54
|
+
[DailyRewardErrorCode.NO_GRACE_NEEDED]: {
|
|
55
|
+
code: DailyRewardErrorCode.NO_GRACE_NEEDED,
|
|
56
|
+
statusCode: 409,
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=daily-rewards.errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daily-rewards.errors.js","sourceRoot":"","sources":["../../../v1/daily-rewards/daily-rewards.errors.ts"],"names":[],"mappings":";;;AAEA,IAAY,oBAWX;AAXD,WAAY,oBAAoB;IAC5B,uEAA+C,CAAA;IAC/C,yDAAiC,CAAA;IACjC,mEAA2C,CAAA;IAC3C,+DAAuC,CAAA;IACvC,2EAAmD,CAAA;IACnD,6FAAqE,CAAA;IACrE,2FAAmE,CAAA;IACnE,yEAAiD,CAAA;IACjD,6DAAqC,CAAA;IACrC,2DAAmC,CAAA;AACvC,CAAC,EAXW,oBAAoB,oCAApB,oBAAoB,QAW/B;AAEY,QAAA,mBAAmB,GAAgD;IAC5E,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,EAAE;QAC1C,IAAI,EAAE,oBAAoB,CAAC,qBAAqB;QAChD,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,oBAAoB,CAAC,cAAc,CAAC,EAAE;QACnC,IAAI,EAAE,oBAAoB,CAAC,cAAc;QACzC,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,EAAE;QACxC,IAAI,EAAE,oBAAoB,CAAC,mBAAmB;QAC9C,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE;QACtC,IAAI,EAAE,oBAAoB,CAAC,iBAAiB;QAC5C,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,EAAE;QAC5C,IAAI,EAAE,oBAAoB,CAAC,uBAAuB;QAClD,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,oBAAoB,CAAC,gCAAgC,CAAC,EAAE;QACrD,IAAI,EAAE,oBAAoB,CAAC,gCAAgC;QAC3D,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,oBAAoB,CAAC,+BAA+B,CAAC,EAAE;QACpD,IAAI,EAAE,oBAAoB,CAAC,+BAA+B;QAC1D,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,oBAAoB,CAAC,sBAAsB,CAAC,EAAE;QAC3C,IAAI,EAAE,oBAAoB,CAAC,sBAAsB;QACjD,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,EAAE;QACrC,IAAI,EAAE,oBAAoB,CAAC,gBAAgB;QAC3C,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,oBAAoB,CAAC,eAAe,CAAC,EAAE;QACpC,IAAI,EAAE,oBAAoB,CAAC,eAAe;QAC1C,UAAU,EAAE,GAAG;KAClB;CACK,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './schemas';
|
|
2
|
+
export * from './daily-rewards.constants';
|
|
3
|
+
export * from './daily-rewards.errors';
|
|
4
|
+
export * from './commands';
|
|
5
|
+
export * from './queries';
|
|
6
|
+
export { DAILY_REWARDS_CONTROLLER, DAILY_REWARDS_ADMIN_CONTROLLER } from '../../controllers';
|
|
7
|
+
export { DAILY_REWARDS_ROUTES, DAILY_REWARDS_ADMIN_ROUTES } from '../../routes';
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
exports.DAILY_REWARDS_ADMIN_ROUTES = exports.DAILY_REWARDS_ROUTES = exports.DAILY_REWARDS_ADMIN_CONTROLLER = exports.DAILY_REWARDS_CONTROLLER = void 0;
|
|
18
|
+
__exportStar(require("./schemas"), exports);
|
|
19
|
+
__exportStar(require("./daily-rewards.constants"), exports);
|
|
20
|
+
__exportStar(require("./daily-rewards.errors"), exports);
|
|
21
|
+
__exportStar(require("./commands"), exports);
|
|
22
|
+
__exportStar(require("./queries"), exports);
|
|
23
|
+
var controllers_1 = require("../../controllers");
|
|
24
|
+
Object.defineProperty(exports, "DAILY_REWARDS_CONTROLLER", { enumerable: true, get: function () { return controllers_1.DAILY_REWARDS_CONTROLLER; } });
|
|
25
|
+
Object.defineProperty(exports, "DAILY_REWARDS_ADMIN_CONTROLLER", { enumerable: true, get: function () { return controllers_1.DAILY_REWARDS_ADMIN_CONTROLLER; } });
|
|
26
|
+
var routes_1 = require("../../routes");
|
|
27
|
+
Object.defineProperty(exports, "DAILY_REWARDS_ROUTES", { enumerable: true, get: function () { return routes_1.DAILY_REWARDS_ROUTES; } });
|
|
28
|
+
Object.defineProperty(exports, "DAILY_REWARDS_ADMIN_ROUTES", { enumerable: true, get: function () { return routes_1.DAILY_REWARDS_ADMIN_ROUTES; } });
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../v1/daily-rewards/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,4DAA0C;AAC1C,yDAAuC;AACvC,6CAA2B;AAC3B,4CAA0B;AAC1B,iDAA6F;AAApF,uHAAA,wBAAwB,OAAA;AAAE,6HAAA,8BAA8B,OAAA;AACjE,uCAAgF;AAAvE,8GAAA,oBAAoB,OAAA;AAAE,oHAAA,0BAA0B,OAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace AdminGetRewardConfigsQuery {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
|
+
items: z.ZodArray<z.ZodObject<{
|
|
7
|
+
uuid: z.ZodString;
|
|
8
|
+
day: z.ZodNumber;
|
|
9
|
+
amount: z.ZodString;
|
|
10
|
+
isMaxDay: z.ZodBoolean;
|
|
11
|
+
isActive: z.ZodBoolean;
|
|
12
|
+
createdAt: z.ZodString;
|
|
13
|
+
updatedAt: z.ZodString;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
const URL: "/api/v1/admin/daily-rewards/reward-configs";
|
|
17
|
+
const METHOD = HttpMethod.GET;
|
|
18
|
+
type RequestType = z.infer<typeof Request>;
|
|
19
|
+
type ResponseType = z.infer<typeof Response>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminGetRewardConfigsQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../schemas");
|
|
6
|
+
const rest_api_1 = require("../../../rest-api");
|
|
7
|
+
const http_method_1 = require("../../../shared/http-method");
|
|
8
|
+
var AdminGetRewardConfigsQuery;
|
|
9
|
+
(function (AdminGetRewardConfigsQuery) {
|
|
10
|
+
AdminGetRewardConfigsQuery.Request = zod_1.z.object({});
|
|
11
|
+
AdminGetRewardConfigsQuery.Response = schemas_1.AdminRewardConfigsResponseSchema;
|
|
12
|
+
AdminGetRewardConfigsQuery.URL = rest_api_1.REST_API.V1.DAILY_REWARDS_ADMIN.REWARD_CONFIGS;
|
|
13
|
+
AdminGetRewardConfigsQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
14
|
+
})(AdminGetRewardConfigsQuery || (exports.AdminGetRewardConfigsQuery = AdminGetRewardConfigsQuery = {}));
|
|
15
|
+
//# sourceMappingURL=admin-get-reward-configs.query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-get-reward-configs.query.js","sourceRoot":"","sources":["../../../../v1/daily-rewards/queries/admin-get-reward-configs.query.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAA8D;AAC9D,gDAA6C;AAC7C,6DAAyD;AAEzD,IAAiB,0BAA0B,CAS1C;AATD,WAAiB,0BAA0B;IAC1B,kCAAO,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvB,mCAAQ,GAAG,0CAAgC,CAAC;IAE5C,8BAAG,GAAG,mBAAQ,CAAC,EAAE,CAAC,mBAAmB,CAAC,cAAc,CAAC;IACrD,iCAAM,GAAG,wBAAU,CAAC,GAAG,CAAC;AAIzC,CAAC,EATgB,0BAA0B,0CAA1B,0BAA0B,QAS1C"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace GetClaimHistoryQuery {
|
|
4
|
+
const Request: z.ZodObject<{
|
|
5
|
+
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
6
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
const Response: z.ZodObject<{
|
|
9
|
+
items: z.ZodArray<z.ZodObject<{
|
|
10
|
+
claimId: z.ZodString;
|
|
11
|
+
claimDate: z.ZodString;
|
|
12
|
+
streakDay: z.ZodNumber;
|
|
13
|
+
amount: z.ZodString;
|
|
14
|
+
isGrace: z.ZodBoolean;
|
|
15
|
+
createdAt: z.ZodString;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
total: z.ZodNumber;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
const URL: "/api/v1/daily-rewards/history";
|
|
20
|
+
const METHOD = HttpMethod.GET;
|
|
21
|
+
type RequestType = z.infer<typeof Request>;
|
|
22
|
+
type ResponseType = z.infer<typeof Response>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetClaimHistoryQuery = void 0;
|
|
4
|
+
const schemas_1 = require("../schemas");
|
|
5
|
+
const rest_api_1 = require("../../../rest-api");
|
|
6
|
+
const http_method_1 = require("../../../shared/http-method");
|
|
7
|
+
var GetClaimHistoryQuery;
|
|
8
|
+
(function (GetClaimHistoryQuery) {
|
|
9
|
+
GetClaimHistoryQuery.Request = schemas_1.ClaimHistoryRequestSchema;
|
|
10
|
+
GetClaimHistoryQuery.Response = schemas_1.ClaimHistoryResponseSchema;
|
|
11
|
+
GetClaimHistoryQuery.URL = rest_api_1.REST_API.V1.DAILY_REWARDS.HISTORY;
|
|
12
|
+
GetClaimHistoryQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
13
|
+
})(GetClaimHistoryQuery || (exports.GetClaimHistoryQuery = GetClaimHistoryQuery = {}));
|
|
14
|
+
//# sourceMappingURL=get-claim-history.query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-claim-history.query.js","sourceRoot":"","sources":["../../../../v1/daily-rewards/queries/get-claim-history.query.ts"],"names":[],"mappings":";;;AACA,wCAAmF;AACnF,gDAA6C;AAC7C,6DAAyD;AAEzD,IAAiB,oBAAoB,CASpC;AATD,WAAiB,oBAAoB;IACpB,4BAAO,GAAG,mCAAyB,CAAC;IACpC,6BAAQ,GAAG,oCAA0B,CAAC;IAEtC,wBAAG,GAAG,mBAAQ,CAAC,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;IACxC,2BAAM,GAAG,wBAAU,CAAC,GAAG,CAAC;AAIzC,CAAC,EATgB,oBAAoB,oCAApB,oBAAoB,QASpC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace GetRewardTableQuery {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
|
+
items: z.ZodArray<z.ZodObject<{
|
|
7
|
+
day: z.ZodNumber;
|
|
8
|
+
amount: z.ZodString;
|
|
9
|
+
isMaxDay: z.ZodBoolean;
|
|
10
|
+
}, z.core.$strip>>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
const URL: "/api/v1/daily-rewards/reward-table";
|
|
13
|
+
const METHOD = HttpMethod.GET;
|
|
14
|
+
type RequestType = z.infer<typeof Request>;
|
|
15
|
+
type ResponseType = z.infer<typeof Response>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetRewardTableQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../schemas");
|
|
6
|
+
const rest_api_1 = require("../../../rest-api");
|
|
7
|
+
const http_method_1 = require("../../../shared/http-method");
|
|
8
|
+
var GetRewardTableQuery;
|
|
9
|
+
(function (GetRewardTableQuery) {
|
|
10
|
+
GetRewardTableQuery.Request = zod_1.z.object({});
|
|
11
|
+
GetRewardTableQuery.Response = schemas_1.RewardTableResponseSchema;
|
|
12
|
+
GetRewardTableQuery.URL = rest_api_1.REST_API.V1.DAILY_REWARDS.REWARD_TABLE;
|
|
13
|
+
GetRewardTableQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
14
|
+
})(GetRewardTableQuery || (exports.GetRewardTableQuery = GetRewardTableQuery = {}));
|
|
15
|
+
//# sourceMappingURL=get-reward-table.query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-reward-table.query.js","sourceRoot":"","sources":["../../../../v1/daily-rewards/queries/get-reward-table.query.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAAuD;AACvD,gDAA6C;AAC7C,6DAAyD;AAEzD,IAAiB,mBAAmB,CASnC;AATD,WAAiB,mBAAmB;IACnB,2BAAO,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvB,4BAAQ,GAAG,mCAAyB,CAAC;IAErC,uBAAG,GAAG,mBAAQ,CAAC,EAAE,CAAC,aAAa,CAAC,YAAY,CAAC;IAC7C,0BAAM,GAAG,wBAAU,CAAC,GAAG,CAAC;AAIzC,CAAC,EATgB,mBAAmB,mCAAnB,mBAAmB,QASnC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace GetStreakStatusQuery {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
|
+
currentDay: z.ZodNumber;
|
|
7
|
+
canClaim: z.ZodBoolean;
|
|
8
|
+
graceAvailable: z.ZodBoolean;
|
|
9
|
+
graceRequired: z.ZodBoolean;
|
|
10
|
+
lastClaimedDate: z.ZodNullable<z.ZodString>;
|
|
11
|
+
streakStartDate: z.ZodNullable<z.ZodString>;
|
|
12
|
+
nextRewardAmount: z.ZodString;
|
|
13
|
+
todayRewardAmount: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
const URL: "/api/v1/daily-rewards/status";
|
|
16
|
+
const METHOD = HttpMethod.GET;
|
|
17
|
+
type RequestType = z.infer<typeof Request>;
|
|
18
|
+
type ResponseType = z.infer<typeof Response>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetStreakStatusQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../schemas");
|
|
6
|
+
const rest_api_1 = require("../../../rest-api");
|
|
7
|
+
const http_method_1 = require("../../../shared/http-method");
|
|
8
|
+
var GetStreakStatusQuery;
|
|
9
|
+
(function (GetStreakStatusQuery) {
|
|
10
|
+
GetStreakStatusQuery.Request = zod_1.z.object({});
|
|
11
|
+
GetStreakStatusQuery.Response = schemas_1.StreakStatusResponseSchema;
|
|
12
|
+
GetStreakStatusQuery.URL = rest_api_1.REST_API.V1.DAILY_REWARDS.STATUS;
|
|
13
|
+
GetStreakStatusQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
14
|
+
})(GetStreakStatusQuery || (exports.GetStreakStatusQuery = GetStreakStatusQuery = {}));
|
|
15
|
+
//# sourceMappingURL=get-streak-status.query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-streak-status.query.js","sourceRoot":"","sources":["../../../../v1/daily-rewards/queries/get-streak-status.query.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAAwD;AACxD,gDAA6C;AAC7C,6DAAyD;AAEzD,IAAiB,oBAAoB,CASpC;AATD,WAAiB,oBAAoB;IACpB,4BAAO,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvB,6BAAQ,GAAG,oCAA0B,CAAC;IAEtC,wBAAG,GAAG,mBAAQ,CAAC,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC;IACvC,2BAAM,GAAG,wBAAU,CAAC,GAAG,CAAC;AAIzC,CAAC,EATgB,oBAAoB,oCAApB,oBAAoB,QASpC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { GetStreakStatusQuery } from './get-streak-status.query';
|
|
2
|
+
export { GetRewardTableQuery } from './get-reward-table.query';
|
|
3
|
+
export { GetClaimHistoryQuery } from './get-claim-history.query';
|
|
4
|
+
export { AdminGetRewardConfigsQuery } from './admin-get-reward-configs.query';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminGetRewardConfigsQuery = exports.GetClaimHistoryQuery = exports.GetRewardTableQuery = exports.GetStreakStatusQuery = void 0;
|
|
4
|
+
var get_streak_status_query_1 = require("./get-streak-status.query");
|
|
5
|
+
Object.defineProperty(exports, "GetStreakStatusQuery", { enumerable: true, get: function () { return get_streak_status_query_1.GetStreakStatusQuery; } });
|
|
6
|
+
var get_reward_table_query_1 = require("./get-reward-table.query");
|
|
7
|
+
Object.defineProperty(exports, "GetRewardTableQuery", { enumerable: true, get: function () { return get_reward_table_query_1.GetRewardTableQuery; } });
|
|
8
|
+
var get_claim_history_query_1 = require("./get-claim-history.query");
|
|
9
|
+
Object.defineProperty(exports, "GetClaimHistoryQuery", { enumerable: true, get: function () { return get_claim_history_query_1.GetClaimHistoryQuery; } });
|
|
10
|
+
var admin_get_reward_configs_query_1 = require("./admin-get-reward-configs.query");
|
|
11
|
+
Object.defineProperty(exports, "AdminGetRewardConfigsQuery", { enumerable: true, get: function () { return admin_get_reward_configs_query_1.AdminGetRewardConfigsQuery; } });
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/daily-rewards/queries/index.ts"],"names":[],"mappings":";;;AAAA,qEAAiE;AAAxD,+HAAA,oBAAoB,OAAA;AAC7B,mEAA+D;AAAtD,6HAAA,mBAAmB,OAAA;AAC5B,qEAAiE;AAAxD,+HAAA,oBAAoB,OAAA;AAC7B,mFAA8E;AAArE,4IAAA,0BAA0B,OAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AdminRewardConfigSchema: z.ZodObject<{
|
|
3
|
+
uuid: z.ZodString;
|
|
4
|
+
day: z.ZodNumber;
|
|
5
|
+
amount: z.ZodString;
|
|
6
|
+
isMaxDay: z.ZodBoolean;
|
|
7
|
+
isActive: z.ZodBoolean;
|
|
8
|
+
createdAt: z.ZodString;
|
|
9
|
+
updatedAt: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const AdminRewardConfigsResponseSchema: z.ZodObject<{
|
|
12
|
+
items: z.ZodArray<z.ZodObject<{
|
|
13
|
+
uuid: z.ZodString;
|
|
14
|
+
day: z.ZodNumber;
|
|
15
|
+
amount: z.ZodString;
|
|
16
|
+
isMaxDay: z.ZodBoolean;
|
|
17
|
+
isActive: z.ZodBoolean;
|
|
18
|
+
createdAt: z.ZodString;
|
|
19
|
+
updatedAt: z.ZodString;
|
|
20
|
+
}, z.core.$strip>>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export declare const AdminUpsertRewardConfigRequestSchema: z.ZodObject<{
|
|
23
|
+
day: z.ZodNumber;
|
|
24
|
+
amount: z.ZodString;
|
|
25
|
+
isMaxDay: z.ZodBoolean;
|
|
26
|
+
isActive: z.ZodBoolean;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export declare const AdminUpdateRewardConfigRequestSchema: z.ZodObject<{
|
|
29
|
+
day: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
amount: z.ZodOptional<z.ZodString>;
|
|
31
|
+
isMaxDay: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
+
}, z.core.$strip>;
|