@purpleschool/gptbot 0.8.11 → 0.8.14
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/api/controllers/http/community.ts +22 -0
- package/api/controllers/http/index.ts +1 -0
- package/api/controllers/http/paraphrase.ts +6 -0
- package/api/routes.ts +46 -0
- package/build/api/controllers/http/community.js +23 -0
- package/build/api/controllers/http/index.js +1 -0
- package/build/api/controllers/http/paraphrase.js +6 -0
- package/build/api/routes.js +30 -0
- package/build/commands/community/archive-community-post.command.js +13 -0
- package/build/commands/community/create-community-post.command.js +35 -0
- package/build/commands/community/delete-community-post.command.js +13 -0
- package/build/commands/community/get-all-community-posts-by-criteria.command.js +25 -0
- package/build/commands/community/get-community-post-by-uuid.command.js +14 -0
- package/build/commands/community/get-my-community-posts-by-criteria.command.js +32 -0
- package/build/commands/community/get-my-favorite-community-posts.command.js +19 -0
- package/build/commands/community/get-my-likes-community-posts.command.js +19 -0
- package/build/commands/community/index.js +27 -0
- package/build/commands/community/set-favorite-community-post.command.js +13 -0
- package/build/commands/community/set-like-community-post.command.js +14 -0
- package/build/commands/community/share-my-community-post.command.js +13 -0
- package/build/commands/index.js +1 -0
- package/build/commands/tools/paraphrase/delete-all-paraphrase-jobs.command.js +8 -0
- package/build/commands/tools/paraphrase/delete-paraphrase-job-by-uuid.command.js +11 -0
- package/build/commands/tools/paraphrase/find-paraphrase-jobs.command.js +18 -0
- package/build/commands/tools/paraphrase/index.js +7 -1
- package/build/commands/tools/paraphrase/retry-paraphrase-job.command.js +14 -0
- package/build/commands/tools/paraphrase/set-reaction-to-paraphrase-job.command.js +18 -0
- package/build/commands/tools/paraphrase/update-paraphrase-job-title.command.js +17 -0
- package/build/constants/community/default-pagination.constant.js +6 -0
- package/build/constants/community/enums/community-aspect-ratio.enum.js +11 -0
- package/build/constants/community/enums/community-post-visibility.enum.js +8 -0
- package/build/constants/community/enums/community-status.enum.js +9 -0
- package/build/constants/community/enums/community-tool-type.enum.js +10 -0
- package/build/constants/community/enums/community-type.enum.js +11 -0
- package/build/constants/community/enums/index.js +21 -0
- package/build/constants/community/index.js +18 -0
- package/build/constants/errors/errors.js +115 -0
- package/build/constants/index.js +1 -0
- package/build/constants/tool/enums/tool-job-status.enum.js +1 -0
- package/build/models/community/community-post-media-data.schema.js +53 -0
- package/build/models/community/community-post.schema.js +43 -0
- package/build/models/community/index.js +18 -0
- package/build/models/index.js +1 -0
- package/build/models/tools/paraphrase/paraphrase-job.schema.js +3 -0
- package/commands/community/archive-community-post.command.ts +13 -0
- package/commands/community/create-community-post.command.ts +45 -0
- package/commands/community/delete-community-post.command.ts +13 -0
- package/commands/community/get-all-community-posts-by-criteria.command.ts +29 -0
- package/commands/community/get-community-post-by-uuid.command.ts +16 -0
- package/commands/community/get-my-community-posts-by-criteria.command.ts +40 -0
- package/commands/community/get-my-favorite-community-posts.command.ts +19 -0
- package/commands/community/get-my-likes-community-posts.command.ts +19 -0
- package/commands/community/index.ts +11 -0
- package/commands/community/set-favorite-community-post.command.ts +13 -0
- package/commands/community/set-like-community-post.command.ts +14 -0
- package/commands/community/share-my-community-post.command.ts +13 -0
- package/commands/index.ts +1 -0
- package/commands/tools/paraphrase/delete-all-paraphrase-jobs.command.ts +6 -0
- package/commands/tools/paraphrase/delete-paraphrase-job-by-uuid.command.ts +11 -0
- package/commands/tools/paraphrase/find-paraphrase-jobs.command.ts +18 -0
- package/commands/tools/paraphrase/index.ts +7 -1
- package/commands/tools/paraphrase/retry-paraphrase-job.command.ts +14 -0
- package/commands/tools/paraphrase/set-reaction-to-paraphrase-job.command.ts +20 -0
- package/commands/tools/paraphrase/update-paraphrase-job-title.command.ts +19 -0
- package/constants/community/default-pagination.constant.ts +4 -0
- package/constants/community/enums/community-aspect-ratio.enum.ts +7 -0
- package/constants/community/enums/community-post-visibility.enum.ts +4 -0
- package/constants/community/enums/community-status.enum.ts +5 -0
- package/constants/community/enums/community-tool-type.enum.ts +6 -0
- package/constants/community/enums/community-type.enum.ts +7 -0
- package/constants/community/enums/index.ts +5 -0
- package/constants/community/index.ts +2 -0
- package/constants/errors/errors.ts +115 -0
- package/constants/index.ts +1 -0
- package/constants/tool/enums/tool-job-status.enum.ts +1 -0
- package/models/community/community-post-media-data.schema.ts +65 -0
- package/models/community/community-post.schema.ts +47 -0
- package/models/community/index.ts +2 -0
- package/models/index.ts +1 -0
- package/models/tools/paraphrase/paraphrase-job.schema.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const COMMUNITY_CONTROLLER_PRIVATE = 'community/posts/private' as const;
|
|
2
|
+
export const COMMUNITY_CONTROLLER_PUBLIC = 'community/posts/public' as const;
|
|
3
|
+
|
|
4
|
+
export const COMMUNITY_ROUTES_PRIVATE = {
|
|
5
|
+
GET_ALL: '',
|
|
6
|
+
GET_MY: 'my',
|
|
7
|
+
GET_MY_LIKE: 'my/likes',
|
|
8
|
+
GET_MY_FAVORITE: 'my/favorites',
|
|
9
|
+
GET_BY_UUID: (uuid: string) => `by/uuid/${uuid}`,
|
|
10
|
+
GET_BY_USER_ID: (uuid: string) => `by/user/${uuid}`,
|
|
11
|
+
CREATE: '',
|
|
12
|
+
UPDATE: (uuid: string) => `${uuid}`,
|
|
13
|
+
DELETE: (uuid: string) => `${uuid}`,
|
|
14
|
+
ARCHIVE: (uuid: string) => `${uuid}/archive`,
|
|
15
|
+
LIKE: (uuid: string) => `${uuid}/like`,
|
|
16
|
+
FAVORITE: (uuid: string) => `${uuid}/favorite`,
|
|
17
|
+
} as const;
|
|
18
|
+
|
|
19
|
+
export const COMMUNITY_ROUTES_PUBLIC = {
|
|
20
|
+
GET_ALL: '',
|
|
21
|
+
GET_BY_UUID: (uuid: string) => `by/uuid/${uuid}`,
|
|
22
|
+
} as const;
|
|
@@ -4,5 +4,11 @@ export const PARAPHRASE_CONTROLLER_PUBLIC = 'public/tools/paraphrase' as const;
|
|
|
4
4
|
export const PARAPHRASE_ROUTES = {
|
|
5
5
|
CONFIG: 'config',
|
|
6
6
|
EXECUTE: 'execute',
|
|
7
|
+
GET_JOBS: 'jobs',
|
|
7
8
|
GET_JOB: (uuid: string) => `jobs/${uuid}`,
|
|
9
|
+
UPDATE: (uuid: string) => `jobs/${uuid}`,
|
|
10
|
+
SET_REACTION: (uuid: string) => `jobs/${uuid}/reaction`,
|
|
11
|
+
DELETE: (uuid: string) => `jobs/${uuid}`,
|
|
12
|
+
DELETE_ALL: 'jobs',
|
|
13
|
+
RETRY: (uuid: string) => `jobs/${uuid}/retry`,
|
|
8
14
|
} as const;
|
package/api/routes.ts
CHANGED
|
@@ -530,14 +530,34 @@ export const REST_API = {
|
|
|
530
530
|
PARAPHRASE_PUBLIC: {
|
|
531
531
|
CONFIG: `${ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PUBLIC}/${CONTROLLERS.PARAPHRASE_ROUTES.CONFIG}`,
|
|
532
532
|
EXECUTE: `${ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PUBLIC}/${CONTROLLERS.PARAPHRASE_ROUTES.EXECUTE}`,
|
|
533
|
+
GET_JOBS: `${ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PUBLIC}/${CONTROLLERS.PARAPHRASE_ROUTES.GET_JOBS}`,
|
|
533
534
|
GET_JOB: (uuid: string) =>
|
|
534
535
|
`${ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PUBLIC}/${CONTROLLERS.PARAPHRASE_ROUTES.GET_JOB(uuid)}`,
|
|
536
|
+
UPDATE: (uuid: string) =>
|
|
537
|
+
`${ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PUBLIC}/${CONTROLLERS.PARAPHRASE_ROUTES.UPDATE(uuid)}`,
|
|
538
|
+
SET_REACTION: (uuid: string) =>
|
|
539
|
+
`${ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PUBLIC}/${CONTROLLERS.PARAPHRASE_ROUTES.SET_REACTION(uuid)}`,
|
|
540
|
+
DELETE: (uuid: string) =>
|
|
541
|
+
`${ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PUBLIC}/${CONTROLLERS.PARAPHRASE_ROUTES.DELETE(uuid)}`,
|
|
542
|
+
DELETE_ALL: `${ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PUBLIC}/${CONTROLLERS.PARAPHRASE_ROUTES.DELETE_ALL}`,
|
|
543
|
+
RETRY: (uuid: string) =>
|
|
544
|
+
`${ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PUBLIC}/${CONTROLLERS.PARAPHRASE_ROUTES.RETRY(uuid)}`,
|
|
535
545
|
},
|
|
536
546
|
PARAPHRASE_PRIVATE: {
|
|
537
547
|
CONFIG: `${ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PRIVATE}/${CONTROLLERS.PARAPHRASE_ROUTES.CONFIG}`,
|
|
538
548
|
EXECUTE: `${ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PRIVATE}/${CONTROLLERS.PARAPHRASE_ROUTES.EXECUTE}`,
|
|
549
|
+
GET_JOBS: `${ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PRIVATE}/${CONTROLLERS.PARAPHRASE_ROUTES.GET_JOBS}`,
|
|
539
550
|
GET_JOB: (uuid: string) =>
|
|
540
551
|
`${ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PRIVATE}/${CONTROLLERS.PARAPHRASE_ROUTES.GET_JOB(uuid)}`,
|
|
552
|
+
UPDATE: (uuid: string) =>
|
|
553
|
+
`${ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PRIVATE}/${CONTROLLERS.PARAPHRASE_ROUTES.UPDATE(uuid)}`,
|
|
554
|
+
SET_REACTION: (uuid: string) =>
|
|
555
|
+
`${ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PRIVATE}/${CONTROLLERS.PARAPHRASE_ROUTES.SET_REACTION(uuid)}`,
|
|
556
|
+
DELETE: (uuid: string) =>
|
|
557
|
+
`${ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PRIVATE}/${CONTROLLERS.PARAPHRASE_ROUTES.DELETE(uuid)}`,
|
|
558
|
+
DELETE_ALL: `${ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PRIVATE}/${CONTROLLERS.PARAPHRASE_ROUTES.DELETE_ALL}`,
|
|
559
|
+
RETRY: (uuid: string) =>
|
|
560
|
+
`${ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PRIVATE}/${CONTROLLERS.PARAPHRASE_ROUTES.RETRY(uuid)}`,
|
|
541
561
|
},
|
|
542
562
|
PRESENTATION_PUBLIC: {
|
|
543
563
|
CONFIG: `${ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.CONFIG}`,
|
|
@@ -796,6 +816,32 @@ export const REST_API = {
|
|
|
796
816
|
CLOUD_PAYMENTS: {
|
|
797
817
|
CALLBACK: `${ROOT}/${CONTROLLERS.CLOUD_PAYMENTS_CONTROLLER}/${CONTROLLERS.CLOUD_PAYMENTS_ROUTES.CALLBACK}`,
|
|
798
818
|
},
|
|
819
|
+
COMMUNITY_PRIVATE: {
|
|
820
|
+
GET_ALL: `${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.GET_ALL}`,
|
|
821
|
+
GET_MY: `${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.GET_MY}`,
|
|
822
|
+
GET_BY_UUID: (uuid: string) =>
|
|
823
|
+
`${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.GET_BY_UUID(uuid)}`,
|
|
824
|
+
GET_BY_USER_ID: (uuid: string) =>
|
|
825
|
+
`${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.GET_BY_USER_ID(uuid)}`,
|
|
826
|
+
CREATE: `${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.CREATE}`,
|
|
827
|
+
UPDATE: (uuid: string) =>
|
|
828
|
+
`${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.UPDATE(uuid)}`,
|
|
829
|
+
DELETE: (uuid: string) =>
|
|
830
|
+
`${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.DELETE(uuid)}`,
|
|
831
|
+
ARCHIVE: (uuid: string) =>
|
|
832
|
+
`${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.ARCHIVE(uuid)}`,
|
|
833
|
+
GET_MY_LIKE: `${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.GET_MY_LIKE}`,
|
|
834
|
+
GET_MY_FAVORITE: `${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.GET_MY_FAVORITE}`,
|
|
835
|
+
LIKE: (uuid: string) =>
|
|
836
|
+
`${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.LIKE(uuid)}`,
|
|
837
|
+
FAVORITE: (uuid: string) =>
|
|
838
|
+
`${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.FAVORITE(uuid)}`,
|
|
839
|
+
},
|
|
840
|
+
COMMUNITY_PUBLIC: {
|
|
841
|
+
GET_ALL: `${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PUBLIC}/${CONTROLLERS.COMMUNITY_ROUTES_PUBLIC.GET_ALL}`,
|
|
842
|
+
GET_BY_UUID: (uuid: string) =>
|
|
843
|
+
`${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PUBLIC}/${CONTROLLERS.COMMUNITY_ROUTES_PUBLIC.GET_BY_UUID(uuid)}`,
|
|
844
|
+
},
|
|
799
845
|
USER_PROFILE: {
|
|
800
846
|
GET_PROFILE_INFO: `${ROOT}/${CONTROLLERS.USER_PROFILE_CONTROLLER}/${CONTROLLERS.USER_PROFILE_ROUTES.GET_PROFILE_INFO}`,
|
|
801
847
|
UPLOAD_AVATAR: `${ROOT}/${CONTROLLERS.USER_PROFILE_CONTROLLER}/${CONTROLLERS.USER_PROFILE_ROUTES.UPLOAD_AVATAR}`,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.COMMUNITY_ROUTES_PUBLIC = exports.COMMUNITY_ROUTES_PRIVATE = exports.COMMUNITY_CONTROLLER_PUBLIC = exports.COMMUNITY_CONTROLLER_PRIVATE = void 0;
|
|
4
|
+
exports.COMMUNITY_CONTROLLER_PRIVATE = 'community/posts/private';
|
|
5
|
+
exports.COMMUNITY_CONTROLLER_PUBLIC = 'community/posts/public';
|
|
6
|
+
exports.COMMUNITY_ROUTES_PRIVATE = {
|
|
7
|
+
GET_ALL: '',
|
|
8
|
+
GET_MY: 'my',
|
|
9
|
+
GET_MY_LIKE: 'my/likes',
|
|
10
|
+
GET_MY_FAVORITE: 'my/favorites',
|
|
11
|
+
GET_BY_UUID: (uuid) => `by/uuid/${uuid}`,
|
|
12
|
+
GET_BY_USER_ID: (uuid) => `by/user/${uuid}`,
|
|
13
|
+
CREATE: '',
|
|
14
|
+
UPDATE: (uuid) => `${uuid}`,
|
|
15
|
+
DELETE: (uuid) => `${uuid}`,
|
|
16
|
+
ARCHIVE: (uuid) => `${uuid}/archive`,
|
|
17
|
+
LIKE: (uuid) => `${uuid}/like`,
|
|
18
|
+
FAVORITE: (uuid) => `${uuid}/favorite`,
|
|
19
|
+
};
|
|
20
|
+
exports.COMMUNITY_ROUTES_PUBLIC = {
|
|
21
|
+
GET_ALL: '',
|
|
22
|
+
GET_BY_UUID: (uuid) => `by/uuid/${uuid}`,
|
|
23
|
+
};
|
|
@@ -69,4 +69,5 @@ __exportStar(require("./cabinet"), exports);
|
|
|
69
69
|
__exportStar(require("./webmaster"), exports);
|
|
70
70
|
__exportStar(require("./music"), exports);
|
|
71
71
|
__exportStar(require("./webmaster-click"), exports);
|
|
72
|
+
__exportStar(require("./community"), exports);
|
|
72
73
|
__exportStar(require("./user-profile"), exports);
|
|
@@ -6,5 +6,11 @@ exports.PARAPHRASE_CONTROLLER_PUBLIC = 'public/tools/paraphrase';
|
|
|
6
6
|
exports.PARAPHRASE_ROUTES = {
|
|
7
7
|
CONFIG: 'config',
|
|
8
8
|
EXECUTE: 'execute',
|
|
9
|
+
GET_JOBS: 'jobs',
|
|
9
10
|
GET_JOB: (uuid) => `jobs/${uuid}`,
|
|
11
|
+
UPDATE: (uuid) => `jobs/${uuid}`,
|
|
12
|
+
SET_REACTION: (uuid) => `jobs/${uuid}/reaction`,
|
|
13
|
+
DELETE: (uuid) => `jobs/${uuid}`,
|
|
14
|
+
DELETE_ALL: 'jobs',
|
|
15
|
+
RETRY: (uuid) => `jobs/${uuid}/retry`,
|
|
10
16
|
};
|
package/build/api/routes.js
CHANGED
|
@@ -432,12 +432,24 @@ exports.REST_API = {
|
|
|
432
432
|
PARAPHRASE_PUBLIC: {
|
|
433
433
|
CONFIG: `${exports.ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PUBLIC}/${CONTROLLERS.PARAPHRASE_ROUTES.CONFIG}`,
|
|
434
434
|
EXECUTE: `${exports.ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PUBLIC}/${CONTROLLERS.PARAPHRASE_ROUTES.EXECUTE}`,
|
|
435
|
+
GET_JOBS: `${exports.ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PUBLIC}/${CONTROLLERS.PARAPHRASE_ROUTES.GET_JOBS}`,
|
|
435
436
|
GET_JOB: (uuid) => `${exports.ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PUBLIC}/${CONTROLLERS.PARAPHRASE_ROUTES.GET_JOB(uuid)}`,
|
|
437
|
+
UPDATE: (uuid) => `${exports.ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PUBLIC}/${CONTROLLERS.PARAPHRASE_ROUTES.UPDATE(uuid)}`,
|
|
438
|
+
SET_REACTION: (uuid) => `${exports.ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PUBLIC}/${CONTROLLERS.PARAPHRASE_ROUTES.SET_REACTION(uuid)}`,
|
|
439
|
+
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PUBLIC}/${CONTROLLERS.PARAPHRASE_ROUTES.DELETE(uuid)}`,
|
|
440
|
+
DELETE_ALL: `${exports.ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PUBLIC}/${CONTROLLERS.PARAPHRASE_ROUTES.DELETE_ALL}`,
|
|
441
|
+
RETRY: (uuid) => `${exports.ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PUBLIC}/${CONTROLLERS.PARAPHRASE_ROUTES.RETRY(uuid)}`,
|
|
436
442
|
},
|
|
437
443
|
PARAPHRASE_PRIVATE: {
|
|
438
444
|
CONFIG: `${exports.ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PRIVATE}/${CONTROLLERS.PARAPHRASE_ROUTES.CONFIG}`,
|
|
439
445
|
EXECUTE: `${exports.ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PRIVATE}/${CONTROLLERS.PARAPHRASE_ROUTES.EXECUTE}`,
|
|
446
|
+
GET_JOBS: `${exports.ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PRIVATE}/${CONTROLLERS.PARAPHRASE_ROUTES.GET_JOBS}`,
|
|
440
447
|
GET_JOB: (uuid) => `${exports.ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PRIVATE}/${CONTROLLERS.PARAPHRASE_ROUTES.GET_JOB(uuid)}`,
|
|
448
|
+
UPDATE: (uuid) => `${exports.ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PRIVATE}/${CONTROLLERS.PARAPHRASE_ROUTES.UPDATE(uuid)}`,
|
|
449
|
+
SET_REACTION: (uuid) => `${exports.ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PRIVATE}/${CONTROLLERS.PARAPHRASE_ROUTES.SET_REACTION(uuid)}`,
|
|
450
|
+
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PRIVATE}/${CONTROLLERS.PARAPHRASE_ROUTES.DELETE(uuid)}`,
|
|
451
|
+
DELETE_ALL: `${exports.ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PRIVATE}/${CONTROLLERS.PARAPHRASE_ROUTES.DELETE_ALL}`,
|
|
452
|
+
RETRY: (uuid) => `${exports.ROOT}/${CONTROLLERS.PARAPHRASE_CONTROLLER_PRIVATE}/${CONTROLLERS.PARAPHRASE_ROUTES.RETRY(uuid)}`,
|
|
441
453
|
},
|
|
442
454
|
PRESENTATION_PUBLIC: {
|
|
443
455
|
CONFIG: `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.CONFIG}`,
|
|
@@ -625,6 +637,24 @@ exports.REST_API = {
|
|
|
625
637
|
CLOUD_PAYMENTS: {
|
|
626
638
|
CALLBACK: `${exports.ROOT}/${CONTROLLERS.CLOUD_PAYMENTS_CONTROLLER}/${CONTROLLERS.CLOUD_PAYMENTS_ROUTES.CALLBACK}`,
|
|
627
639
|
},
|
|
640
|
+
COMMUNITY_PRIVATE: {
|
|
641
|
+
GET_ALL: `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.GET_ALL}`,
|
|
642
|
+
GET_MY: `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.GET_MY}`,
|
|
643
|
+
GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.GET_BY_UUID(uuid)}`,
|
|
644
|
+
GET_BY_USER_ID: (uuid) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.GET_BY_USER_ID(uuid)}`,
|
|
645
|
+
CREATE: `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.CREATE}`,
|
|
646
|
+
UPDATE: (uuid) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.UPDATE(uuid)}`,
|
|
647
|
+
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.DELETE(uuid)}`,
|
|
648
|
+
ARCHIVE: (uuid) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.ARCHIVE(uuid)}`,
|
|
649
|
+
GET_MY_LIKE: `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.GET_MY_LIKE}`,
|
|
650
|
+
GET_MY_FAVORITE: `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.GET_MY_FAVORITE}`,
|
|
651
|
+
LIKE: (uuid) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.LIKE(uuid)}`,
|
|
652
|
+
FAVORITE: (uuid) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.FAVORITE(uuid)}`,
|
|
653
|
+
},
|
|
654
|
+
COMMUNITY_PUBLIC: {
|
|
655
|
+
GET_ALL: `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PUBLIC}/${CONTROLLERS.COMMUNITY_ROUTES_PUBLIC.GET_ALL}`,
|
|
656
|
+
GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PUBLIC}/${CONTROLLERS.COMMUNITY_ROUTES_PUBLIC.GET_BY_UUID(uuid)}`,
|
|
657
|
+
},
|
|
628
658
|
USER_PROFILE: {
|
|
629
659
|
GET_PROFILE_INFO: `${exports.ROOT}/${CONTROLLERS.USER_PROFILE_CONTROLLER}/${CONTROLLERS.USER_PROFILE_ROUTES.GET_PROFILE_INFO}`,
|
|
630
660
|
UPLOAD_AVATAR: `${exports.ROOT}/${CONTROLLERS.USER_PROFILE_CONTROLLER}/${CONTROLLERS.USER_PROFILE_ROUTES.UPLOAD_AVATAR}`,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ArchiveCommunityPostCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var ArchiveCommunityPostCommand;
|
|
6
|
+
(function (ArchiveCommunityPostCommand) {
|
|
7
|
+
ArchiveCommunityPostCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
ArchiveCommunityPostCommand.ResponseSchema = zod_1.z.object({
|
|
11
|
+
data: zod_1.z.boolean(),
|
|
12
|
+
});
|
|
13
|
+
})(ArchiveCommunityPostCommand || (exports.ArchiveCommunityPostCommand = ArchiveCommunityPostCommand = {}));
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateCommunityPostCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
var CreateCommunityPostCommand;
|
|
8
|
+
(function (CreateCommunityPostCommand) {
|
|
9
|
+
CreateCommunityPostCommand.RequestBodySchema = zod_1.z
|
|
10
|
+
.object({
|
|
11
|
+
status: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_STATUS),
|
|
12
|
+
visibility: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_VISIBILITY),
|
|
13
|
+
caption: zod_1.z.string().max(500).nullable().optional(),
|
|
14
|
+
messageId: zod_1.z.string().uuid().nullable().optional(),
|
|
15
|
+
toolJobId: zod_1.z.string().uuid().nullable().optional(),
|
|
16
|
+
toolType: zod_1.z.nativeEnum(constants_1.COMMUNITY_TOOL_TYPE).nullable().optional(),
|
|
17
|
+
})
|
|
18
|
+
.refine((data) => {
|
|
19
|
+
const hasMessageId = data.messageId != null;
|
|
20
|
+
const hasToolJobId = data.toolJobId != null;
|
|
21
|
+
if (!(hasMessageId !== hasToolJobId)) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
if (hasToolJobId && data.toolType == null) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
return true;
|
|
28
|
+
}, {
|
|
29
|
+
message: 'Either messageId or toolJobId must be provided, but not both.',
|
|
30
|
+
path: ['messageId'],
|
|
31
|
+
});
|
|
32
|
+
CreateCommunityPostCommand.ResponseSchema = zod_1.z.object({
|
|
33
|
+
data: models_1.ResponseCommunityPostSchema,
|
|
34
|
+
});
|
|
35
|
+
})(CreateCommunityPostCommand || (exports.CreateCommunityPostCommand = CreateCommunityPostCommand = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteCommunityPostCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var DeleteCommunityPostCommand;
|
|
6
|
+
(function (DeleteCommunityPostCommand) {
|
|
7
|
+
DeleteCommunityPostCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
DeleteCommunityPostCommand.ResponseSchema = zod_1.z.object({
|
|
11
|
+
data: zod_1.z.boolean(),
|
|
12
|
+
});
|
|
13
|
+
})(DeleteCommunityPostCommand || (exports.DeleteCommunityPostCommand = DeleteCommunityPostCommand = {}));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetAllCommunityPostsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
var GetAllCommunityPostsCommand;
|
|
8
|
+
(function (GetAllCommunityPostsCommand) {
|
|
9
|
+
GetAllCommunityPostsCommand.RequestQuerySchema = zod_1.z.object({
|
|
10
|
+
// Pagination
|
|
11
|
+
cursor: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
limit: zod_1.z.coerce.number().int().positive().max(100).default(30).optional(),
|
|
13
|
+
// Sorting
|
|
14
|
+
sortBy: zod_1.z.enum(['publishedAt', 'views', 'likesCount']).optional(),
|
|
15
|
+
sortOrder: zod_1.z.nativeEnum(constants_1.SORT_ORDER).optional(),
|
|
16
|
+
// Criteria
|
|
17
|
+
userId: zod_1.z.string().uuid().optional(),
|
|
18
|
+
type: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_TYPE).optional(),
|
|
19
|
+
});
|
|
20
|
+
GetAllCommunityPostsCommand.ResponseSchema = zod_1.z.object({
|
|
21
|
+
data: zod_1.z.array(models_1.ResponseCommunityPostSchema),
|
|
22
|
+
cursor: zod_1.z.string().uuid().nullable(),
|
|
23
|
+
hasNext: zod_1.z.boolean(),
|
|
24
|
+
});
|
|
25
|
+
})(GetAllCommunityPostsCommand || (exports.GetAllCommunityPostsCommand = GetAllCommunityPostsCommand = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetCommunityPostByUuidCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var GetCommunityPostByUuidCommand;
|
|
7
|
+
(function (GetCommunityPostByUuidCommand) {
|
|
8
|
+
GetCommunityPostByUuidCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
uuid: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
GetCommunityPostByUuidCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
+
data: models_1.ResponseCommunityPostSchema,
|
|
13
|
+
});
|
|
14
|
+
})(GetCommunityPostByUuidCommand || (exports.GetCommunityPostByUuidCommand = GetCommunityPostByUuidCommand = {}));
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetMyCommunityPostsByCriteriaCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
var GetMyCommunityPostsByCriteriaCommand;
|
|
8
|
+
(function (GetMyCommunityPostsByCriteriaCommand) {
|
|
9
|
+
GetMyCommunityPostsByCriteriaCommand.RequestQuerySchema = zod_1.z.object({
|
|
10
|
+
// Pagination
|
|
11
|
+
cursor: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
limit: zod_1.z.coerce
|
|
13
|
+
.number()
|
|
14
|
+
.int()
|
|
15
|
+
.positive()
|
|
16
|
+
.max(100)
|
|
17
|
+
.default(constants_1.DEFAULT_PAGINATION_LIMIT)
|
|
18
|
+
.optional(),
|
|
19
|
+
// Sorting
|
|
20
|
+
sortBy: zod_1.z.enum(['publishedAt', 'views', 'likesCount']).optional(),
|
|
21
|
+
sortOrder: zod_1.z.nativeEnum(constants_1.SORT_ORDER).optional(),
|
|
22
|
+
// Criteria
|
|
23
|
+
visibility: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_VISIBILITY).optional(),
|
|
24
|
+
type: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_TYPE).optional(),
|
|
25
|
+
status: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_STATUS).optional(),
|
|
26
|
+
});
|
|
27
|
+
GetMyCommunityPostsByCriteriaCommand.ResponseSchema = zod_1.z.object({
|
|
28
|
+
data: zod_1.z.array(models_1.ResponseCommunityPostSchema),
|
|
29
|
+
cursor: zod_1.z.string().uuid().nullable(),
|
|
30
|
+
hasNext: zod_1.z.boolean(),
|
|
31
|
+
});
|
|
32
|
+
})(GetMyCommunityPostsByCriteriaCommand || (exports.GetMyCommunityPostsByCriteriaCommand = GetMyCommunityPostsByCriteriaCommand = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetMyFavoriteCommunityPostsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const models_1 = require("../../models");
|
|
7
|
+
var GetMyFavoriteCommunityPostsCommand;
|
|
8
|
+
(function (GetMyFavoriteCommunityPostsCommand) {
|
|
9
|
+
GetMyFavoriteCommunityPostsCommand.RequestQuerySchema = zod_1.z.object({
|
|
10
|
+
offset: zod_1.z.coerce.number().int().min(0).default(0).optional(),
|
|
11
|
+
limit: zod_1.z.coerce.number().int().min(1).max(100).default(constants_1.DEFAULT_PAGINATION_LIMIT).optional(),
|
|
12
|
+
sortOrder: zod_1.z.nativeEnum(constants_1.SORT_ORDER).optional(),
|
|
13
|
+
});
|
|
14
|
+
GetMyFavoriteCommunityPostsCommand.ResponseSchema = zod_1.z.object({
|
|
15
|
+
data: zod_1.z.array(models_1.ResponseCommunityPostSchema),
|
|
16
|
+
page: zod_1.z.number(),
|
|
17
|
+
totalPages: zod_1.z.number(),
|
|
18
|
+
});
|
|
19
|
+
})(GetMyFavoriteCommunityPostsCommand || (exports.GetMyFavoriteCommunityPostsCommand = GetMyFavoriteCommunityPostsCommand = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetMyLikesCommunityPostsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const models_1 = require("../../models");
|
|
7
|
+
var GetMyLikesCommunityPostsCommand;
|
|
8
|
+
(function (GetMyLikesCommunityPostsCommand) {
|
|
9
|
+
GetMyLikesCommunityPostsCommand.RequestQuerySchema = zod_1.z.object({
|
|
10
|
+
offset: zod_1.z.coerce.number().int().min(0).default(0).optional(),
|
|
11
|
+
limit: zod_1.z.coerce.number().int().min(1).max(100).default(constants_1.DEFAULT_PAGINATION_LIMIT).optional(),
|
|
12
|
+
sortOrder: zod_1.z.nativeEnum(constants_1.SORT_ORDER).optional(),
|
|
13
|
+
});
|
|
14
|
+
GetMyLikesCommunityPostsCommand.ResponseSchema = zod_1.z.object({
|
|
15
|
+
data: zod_1.z.array(models_1.ResponseCommunityPostSchema),
|
|
16
|
+
page: zod_1.z.number(),
|
|
17
|
+
totalPages: zod_1.z.number(),
|
|
18
|
+
});
|
|
19
|
+
})(GetMyLikesCommunityPostsCommand || (exports.GetMyLikesCommunityPostsCommand = GetMyLikesCommunityPostsCommand = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
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("./get-all-community-posts-by-criteria.command"), exports);
|
|
18
|
+
__exportStar(require("./get-community-post-by-uuid.command"), exports);
|
|
19
|
+
__exportStar(require("./create-community-post.command"), exports);
|
|
20
|
+
__exportStar(require("./set-like-community-post.command"), exports);
|
|
21
|
+
__exportStar(require("./set-favorite-community-post.command"), exports);
|
|
22
|
+
__exportStar(require("./delete-community-post.command"), exports);
|
|
23
|
+
__exportStar(require("./archive-community-post.command"), exports);
|
|
24
|
+
__exportStar(require("./get-my-community-posts-by-criteria.command"), exports);
|
|
25
|
+
__exportStar(require("./share-my-community-post.command"), exports);
|
|
26
|
+
__exportStar(require("./get-my-likes-community-posts.command"), exports);
|
|
27
|
+
__exportStar(require("./get-my-favorite-community-posts.command"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetFavoriteCommunityPostCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var SetFavoriteCommunityPostCommand;
|
|
6
|
+
(function (SetFavoriteCommunityPostCommand) {
|
|
7
|
+
SetFavoriteCommunityPostCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
SetFavoriteCommunityPostCommand.ResponseSchema = zod_1.z.object({
|
|
11
|
+
data: zod_1.z.boolean(),
|
|
12
|
+
});
|
|
13
|
+
})(SetFavoriteCommunityPostCommand || (exports.SetFavoriteCommunityPostCommand = SetFavoriteCommunityPostCommand = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetLikeCommunityPostCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var SetLikeCommunityPostCommand;
|
|
7
|
+
(function (SetLikeCommunityPostCommand) {
|
|
8
|
+
SetLikeCommunityPostCommand.RequestParamsSchema = zod_1.z.object({
|
|
9
|
+
uuid: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
SetLikeCommunityPostCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
+
data: models_1.ResponseCommunityPostSchema,
|
|
13
|
+
});
|
|
14
|
+
})(SetLikeCommunityPostCommand || (exports.SetLikeCommunityPostCommand = SetLikeCommunityPostCommand = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShareMyCommunityPostCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var ShareMyCommunityPostCommand;
|
|
6
|
+
(function (ShareMyCommunityPostCommand) {
|
|
7
|
+
ShareMyCommunityPostCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
ShareMyCommunityPostCommand.ResponseSchema = zod_1.z.object({
|
|
11
|
+
data: zod_1.z.string().url(),
|
|
12
|
+
});
|
|
13
|
+
})(ShareMyCommunityPostCommand || (exports.ShareMyCommunityPostCommand = ShareMyCommunityPostCommand = {}));
|
package/build/commands/index.js
CHANGED
|
@@ -55,4 +55,5 @@ __exportStar(require("./daily-streak"), exports);
|
|
|
55
55
|
__exportStar(require("./cabinet"), exports);
|
|
56
56
|
__exportStar(require("./webmaster"), exports);
|
|
57
57
|
__exportStar(require("./webmaster-click"), exports);
|
|
58
|
+
__exportStar(require("./community"), exports);
|
|
58
59
|
__exportStar(require("./user-profile"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteAllParaphraseJobsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var DeleteAllParaphraseJobsCommand;
|
|
6
|
+
(function (DeleteAllParaphraseJobsCommand) {
|
|
7
|
+
DeleteAllParaphraseJobsCommand.ResponseSchema = zod_1.z.void();
|
|
8
|
+
})(DeleteAllParaphraseJobsCommand || (exports.DeleteAllParaphraseJobsCommand = DeleteAllParaphraseJobsCommand = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteParaphraseJobByUUIDCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var DeleteParaphraseJobByUUIDCommand;
|
|
6
|
+
(function (DeleteParaphraseJobByUUIDCommand) {
|
|
7
|
+
DeleteParaphraseJobByUUIDCommand.RequestParamsSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
DeleteParaphraseJobByUUIDCommand.ResponseSchema = zod_1.z.void();
|
|
11
|
+
})(DeleteParaphraseJobByUUIDCommand || (exports.DeleteParaphraseJobByUUIDCommand = DeleteParaphraseJobByUUIDCommand = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindParaphraseJobsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
var FindParaphraseJobsCommand;
|
|
7
|
+
(function (FindParaphraseJobsCommand) {
|
|
8
|
+
FindParaphraseJobsCommand.RequestQuerySchema = zod_1.z.object({
|
|
9
|
+
limit: zod_1.z.coerce.number().min(1).optional(),
|
|
10
|
+
offset: zod_1.z.coerce.number().min(0).default(0).optional(),
|
|
11
|
+
title: zod_1.z.string().optional(),
|
|
12
|
+
});
|
|
13
|
+
FindParaphraseJobsCommand.ResponseSchema = zod_1.z.object({
|
|
14
|
+
data: zod_1.z.array(models_1.ParaphraseToolJobSchema),
|
|
15
|
+
totalPages: zod_1.z.number(),
|
|
16
|
+
page: zod_1.z.number(),
|
|
17
|
+
});
|
|
18
|
+
})(FindParaphraseJobsCommand || (exports.FindParaphraseJobsCommand = FindParaphraseJobsCommand = {}));
|
|
@@ -14,6 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./paraphrase.command"), exports);
|
|
18
|
+
__exportStar(require("./delete-paraphrase-job-by-uuid.command"), exports);
|
|
19
|
+
__exportStar(require("./delete-all-paraphrase-jobs.command"), exports);
|
|
20
|
+
__exportStar(require("./set-reaction-to-paraphrase-job.command"), exports);
|
|
21
|
+
__exportStar(require("./update-paraphrase-job-title.command"), exports);
|
|
22
|
+
__exportStar(require("./retry-paraphrase-job.command"), exports);
|
|
17
23
|
__exportStar(require("./find-paraphrase-job-by-uuid.command"), exports);
|
|
24
|
+
__exportStar(require("./find-paraphrase-jobs.command"), exports);
|
|
18
25
|
__exportStar(require("./get-paraphrase-tool-config.command"), exports);
|
|
19
|
-
__exportStar(require("./paraphrase.command"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetryParaphraseJobCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
var RetryParaphraseJobCommand;
|
|
7
|
+
(function (RetryParaphraseJobCommand) {
|
|
8
|
+
RetryParaphraseJobCommand.RequestParamsSchema = zod_1.z.object({
|
|
9
|
+
uuid: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
RetryParaphraseJobCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
+
data: models_1.ParaphraseToolJobSchema,
|
|
13
|
+
});
|
|
14
|
+
})(RetryParaphraseJobCommand || (exports.RetryParaphraseJobCommand = RetryParaphraseJobCommand = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetReactionToParaphraseJobCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
const constants_1 = require("../../../constants");
|
|
7
|
+
var SetReactionToParaphraseJobCommand;
|
|
8
|
+
(function (SetReactionToParaphraseJobCommand) {
|
|
9
|
+
SetReactionToParaphraseJobCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
|
|
11
|
+
});
|
|
12
|
+
SetReactionToParaphraseJobCommand.RequestParamsSchema = zod_1.z.object({
|
|
13
|
+
uuid: zod_1.z.string().uuid(),
|
|
14
|
+
});
|
|
15
|
+
SetReactionToParaphraseJobCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
data: models_1.ParaphraseToolJobSchema,
|
|
17
|
+
});
|
|
18
|
+
})(SetReactionToParaphraseJobCommand || (exports.SetReactionToParaphraseJobCommand = SetReactionToParaphraseJobCommand = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateParaphraseJobTitleCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
var UpdateParaphraseJobTitleCommand;
|
|
7
|
+
(function (UpdateParaphraseJobTitleCommand) {
|
|
8
|
+
UpdateParaphraseJobTitleCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
title: zod_1.z.string().min(1).max(40).trim(),
|
|
10
|
+
});
|
|
11
|
+
UpdateParaphraseJobTitleCommand.RequestParamsSchema = zod_1.z.object({
|
|
12
|
+
uuid: zod_1.z.string().uuid(),
|
|
13
|
+
});
|
|
14
|
+
UpdateParaphraseJobTitleCommand.ResponseSchema = zod_1.z.object({
|
|
15
|
+
data: models_1.ParaphraseToolJobSchema,
|
|
16
|
+
});
|
|
17
|
+
})(UpdateParaphraseJobTitleCommand || (exports.UpdateParaphraseJobTitleCommand = UpdateParaphraseJobTitleCommand = {}));
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_PAGINATION_SORT_BY = exports.DEFAULT_PAGINATION_SORT_ORDER = exports.DEFAULT_PAGINATION_LIMIT = void 0;
|
|
4
|
+
exports.DEFAULT_PAGINATION_LIMIT = 30;
|
|
5
|
+
exports.DEFAULT_PAGINATION_SORT_ORDER = 'desc';
|
|
6
|
+
exports.DEFAULT_PAGINATION_SORT_BY = 'publishedAt';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.COMMUNITY_POST_ASPECT_RATIO = void 0;
|
|
4
|
+
var COMMUNITY_POST_ASPECT_RATIO;
|
|
5
|
+
(function (COMMUNITY_POST_ASPECT_RATIO) {
|
|
6
|
+
COMMUNITY_POST_ASPECT_RATIO["HORIZONTAL_16_9"] = "16:9";
|
|
7
|
+
COMMUNITY_POST_ASPECT_RATIO["VERTICAL_9_16"] = "9:16";
|
|
8
|
+
COMMUNITY_POST_ASPECT_RATIO["SQUARE"] = "1:1";
|
|
9
|
+
COMMUNITY_POST_ASPECT_RATIO["HORIZONTAL_4_3"] = "4:3";
|
|
10
|
+
COMMUNITY_POST_ASPECT_RATIO["VERTICAL_3_4"] = "3:4";
|
|
11
|
+
})(COMMUNITY_POST_ASPECT_RATIO || (exports.COMMUNITY_POST_ASPECT_RATIO = COMMUNITY_POST_ASPECT_RATIO = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.COMMUNITY_POST_VISIBILITY = void 0;
|
|
4
|
+
var COMMUNITY_POST_VISIBILITY;
|
|
5
|
+
(function (COMMUNITY_POST_VISIBILITY) {
|
|
6
|
+
COMMUNITY_POST_VISIBILITY["PUBLIC"] = "public";
|
|
7
|
+
COMMUNITY_POST_VISIBILITY["UNLISTED"] = "unlisted";
|
|
8
|
+
})(COMMUNITY_POST_VISIBILITY || (exports.COMMUNITY_POST_VISIBILITY = COMMUNITY_POST_VISIBILITY = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.COMMUNITY_POST_STATUS = void 0;
|
|
4
|
+
var COMMUNITY_POST_STATUS;
|
|
5
|
+
(function (COMMUNITY_POST_STATUS) {
|
|
6
|
+
COMMUNITY_POST_STATUS["PUBLISHED"] = "published";
|
|
7
|
+
COMMUNITY_POST_STATUS["ARCHIVED"] = "archived";
|
|
8
|
+
COMMUNITY_POST_STATUS["DELETED"] = "deleted";
|
|
9
|
+
})(COMMUNITY_POST_STATUS || (exports.COMMUNITY_POST_STATUS = COMMUNITY_POST_STATUS = {}));
|