@jh-tech/be-content-shared 0.0.47 → 0.0.49
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/definitions/creatorProjectRelation.zod.d.ts +7 -0
- package/dist/definitions/creatorProjectRelation.zod.js +6 -0
- package/dist/definitions/update.zod.d.ts +2 -4
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/route-definitions/creator-project-relation/creatorProjectRelation.delete.d.ts +82 -0
- package/dist/route-definitions/creator-project-relation/creatorProjectRelation.delete.js +16 -0
- package/dist/route-definitions/creator-project-relation/creatorProjectRelations.list.d.ts +62 -0
- package/dist/route-definitions/creator-project-relation/creatorProjectRelations.list.js +25 -0
- package/dist/route-definitions/update/update.create.d.ts +2 -6
- package/dist/route-definitions/update/update.get.d.ts +0 -2
- package/dist/route-definitions/update/update.update.d.ts +2 -6
- package/dist/route-definitions/update/updates.bulkCreate.d.ts +2 -6
- package/dist/route-definitions/update/updates.list.d.ts +0 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const creatorProjectRelationFilters: z.ZodObject<{
|
|
3
|
+
creatorIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4
|
+
projectIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5
|
+
primaryOnly: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type CreatorProjectRelationFilters = z.infer<typeof creatorProjectRelationFilters>;
|
|
@@ -5,6 +5,8 @@ export declare const updateCreationData: z.ZodObject<{
|
|
|
5
5
|
"associated-project": "associated-project";
|
|
6
6
|
release: "release";
|
|
7
7
|
}>;
|
|
8
|
+
title: z.ZodString;
|
|
9
|
+
projectId: z.ZodUUID;
|
|
8
10
|
subType: z.ZodUnion<readonly [z.ZodEnum<{
|
|
9
11
|
trailer: "trailer";
|
|
10
12
|
teaser: "teaser";
|
|
@@ -27,8 +29,6 @@ export declare const updateCreationData: z.ZodObject<{
|
|
|
27
29
|
patch: "patch";
|
|
28
30
|
"special-edition": "special-edition";
|
|
29
31
|
season: "season";
|
|
30
|
-
adaptation: "adaptation";
|
|
31
|
-
reboot: "reboot";
|
|
32
32
|
beta: "beta";
|
|
33
33
|
demo: "demo";
|
|
34
34
|
}>, z.ZodEnum<{
|
|
@@ -40,9 +40,7 @@ export declare const updateCreationData: z.ZodObject<{
|
|
|
40
40
|
prequel: "prequel";
|
|
41
41
|
sequel: "sequel";
|
|
42
42
|
}>]>;
|
|
43
|
-
title: z.ZodString;
|
|
44
43
|
links: z.ZodArray<z.ZodString>;
|
|
45
|
-
projectId: z.ZodUUID;
|
|
46
44
|
publishedAt: z.ZodOptional<z.ZodString>;
|
|
47
45
|
}, z.core.$strip>;
|
|
48
46
|
export type UpdateCreationData = z.infer<typeof updateCreationData>;
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export * as UpdateProjectDef from './route-definitions/project/project.update.js
|
|
|
16
16
|
export * as BulkCreateProjectsDef from './route-definitions/project/projects.bulkCreate.js';
|
|
17
17
|
export * as ListProjectsDef from './route-definitions/project/projects.list.js';
|
|
18
18
|
export * as CreateCreatorProjectRelationDef from './route-definitions/creator-project-relation/creatorProjectRelation.create.js';
|
|
19
|
+
export * as DeleteCreatorProjectRelationDef from './route-definitions/creator-project-relation/creatorProjectRelation.delete.js';
|
|
20
|
+
export * as ListCreatorProjectRelationsDef from './route-definitions/creator-project-relation/creatorProjectRelations.list.js';
|
|
19
21
|
export * as ListProjectCreatorsDef from './route-definitions/project-creator/projectCreators.list.js';
|
|
20
22
|
export * as CreateUpdateDef from './route-definitions/update/update.create.js';
|
|
21
23
|
export * as GetUpdateDef from './route-definitions/update/update.get.js';
|
|
@@ -28,3 +30,4 @@ export * from './definitions/update.zod.js';
|
|
|
28
30
|
export * from './definitions/collection.zod.js';
|
|
29
31
|
export * from './definitions/collectionItem.zod.js';
|
|
30
32
|
export * from './definitions/pagination.zod.js';
|
|
33
|
+
export * from './definitions/creatorProjectRelation.zod.js';
|
package/dist/index.js
CHANGED
|
@@ -16,6 +16,8 @@ export * as UpdateProjectDef from './route-definitions/project/project.update.js
|
|
|
16
16
|
export * as BulkCreateProjectsDef from './route-definitions/project/projects.bulkCreate.js';
|
|
17
17
|
export * as ListProjectsDef from './route-definitions/project/projects.list.js';
|
|
18
18
|
export * as CreateCreatorProjectRelationDef from './route-definitions/creator-project-relation/creatorProjectRelation.create.js';
|
|
19
|
+
export * as DeleteCreatorProjectRelationDef from './route-definitions/creator-project-relation/creatorProjectRelation.delete.js';
|
|
20
|
+
export * as ListCreatorProjectRelationsDef from './route-definitions/creator-project-relation/creatorProjectRelations.list.js';
|
|
19
21
|
export * as ListProjectCreatorsDef from './route-definitions/project-creator/projectCreators.list.js';
|
|
20
22
|
export * as CreateUpdateDef from './route-definitions/update/update.create.js';
|
|
21
23
|
export * as GetUpdateDef from './route-definitions/update/update.get.js';
|
|
@@ -28,3 +30,4 @@ export * from './definitions/update.zod.js';
|
|
|
28
30
|
export * from './definitions/collection.zod.js';
|
|
29
31
|
export * from './definitions/collectionItem.zod.js';
|
|
30
32
|
export * from './definitions/pagination.zod.js';
|
|
33
|
+
export * from './definitions/creatorProjectRelation.zod.js';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { RouteDef, RouteSchema } from '@jh-tech/util-tools-be';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
declare const params: z.ZodObject<{
|
|
4
|
+
creatorId: z.ZodUUID;
|
|
5
|
+
projectId: z.ZodUUID;
|
|
6
|
+
role: z.ZodUnion<readonly [z.ZodEnum<{
|
|
7
|
+
"film-director": "film-director";
|
|
8
|
+
"film-producer": "film-producer";
|
|
9
|
+
"film-writer": "film-writer";
|
|
10
|
+
"film-actor": "film-actor";
|
|
11
|
+
"film-studio": "film-studio";
|
|
12
|
+
"film-publisher": "film-publisher";
|
|
13
|
+
}>, z.ZodEnum<{
|
|
14
|
+
"video_game-studio": "video_game-studio";
|
|
15
|
+
"video_game-publisher": "video_game-publisher";
|
|
16
|
+
"video_game-developer": "video_game-developer";
|
|
17
|
+
}>, z.ZodEnum<{
|
|
18
|
+
"music-artist": "music-artist";
|
|
19
|
+
"music-producer": "music-producer";
|
|
20
|
+
"music-label": "music-label";
|
|
21
|
+
"music-band": "music-band";
|
|
22
|
+
}>, z.ZodEnum<{
|
|
23
|
+
"tv-director": "tv-director";
|
|
24
|
+
"tv-producer": "tv-producer";
|
|
25
|
+
"tv-writer": "tv-writer";
|
|
26
|
+
"tv-actor": "tv-actor";
|
|
27
|
+
"tv-studio": "tv-studio";
|
|
28
|
+
"tv-network": "tv-network";
|
|
29
|
+
}>, z.ZodEnum<{
|
|
30
|
+
"comic-artist": "comic-artist";
|
|
31
|
+
"comic-writer": "comic-writer";
|
|
32
|
+
"comic-publisher": "comic-publisher";
|
|
33
|
+
}>, z.ZodEnum<{
|
|
34
|
+
"book-author": "book-author";
|
|
35
|
+
"book-publisher": "book-publisher";
|
|
36
|
+
}>]>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
declare const request: z.ZodObject<{
|
|
39
|
+
params: z.ZodObject<{
|
|
40
|
+
creatorId: z.ZodUUID;
|
|
41
|
+
projectId: z.ZodUUID;
|
|
42
|
+
role: z.ZodUnion<readonly [z.ZodEnum<{
|
|
43
|
+
"film-director": "film-director";
|
|
44
|
+
"film-producer": "film-producer";
|
|
45
|
+
"film-writer": "film-writer";
|
|
46
|
+
"film-actor": "film-actor";
|
|
47
|
+
"film-studio": "film-studio";
|
|
48
|
+
"film-publisher": "film-publisher";
|
|
49
|
+
}>, z.ZodEnum<{
|
|
50
|
+
"video_game-studio": "video_game-studio";
|
|
51
|
+
"video_game-publisher": "video_game-publisher";
|
|
52
|
+
"video_game-developer": "video_game-developer";
|
|
53
|
+
}>, z.ZodEnum<{
|
|
54
|
+
"music-artist": "music-artist";
|
|
55
|
+
"music-producer": "music-producer";
|
|
56
|
+
"music-label": "music-label";
|
|
57
|
+
"music-band": "music-band";
|
|
58
|
+
}>, z.ZodEnum<{
|
|
59
|
+
"tv-director": "tv-director";
|
|
60
|
+
"tv-producer": "tv-producer";
|
|
61
|
+
"tv-writer": "tv-writer";
|
|
62
|
+
"tv-actor": "tv-actor";
|
|
63
|
+
"tv-studio": "tv-studio";
|
|
64
|
+
"tv-network": "tv-network";
|
|
65
|
+
}>, z.ZodEnum<{
|
|
66
|
+
"comic-artist": "comic-artist";
|
|
67
|
+
"comic-writer": "comic-writer";
|
|
68
|
+
"comic-publisher": "comic-publisher";
|
|
69
|
+
}>, z.ZodEnum<{
|
|
70
|
+
"book-author": "book-author";
|
|
71
|
+
"book-publisher": "book-publisher";
|
|
72
|
+
}>]>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export declare const routeSchema: RouteSchema;
|
|
76
|
+
export type Request = z.infer<typeof request>;
|
|
77
|
+
export type Response = {
|
|
78
|
+
status?: number;
|
|
79
|
+
};
|
|
80
|
+
export type Params = z.infer<typeof params>;
|
|
81
|
+
export declare const definition: RouteDef;
|
|
82
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { creatorRole } from '@jackhayes/util-types';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
const params = z.object({
|
|
4
|
+
creatorId: z.uuid(),
|
|
5
|
+
projectId: z.uuid(),
|
|
6
|
+
role: creatorRole,
|
|
7
|
+
});
|
|
8
|
+
const request = z.object({
|
|
9
|
+
params,
|
|
10
|
+
});
|
|
11
|
+
export const routeSchema = {
|
|
12
|
+
request,
|
|
13
|
+
};
|
|
14
|
+
const method = 'delete';
|
|
15
|
+
const path = '/creator-project-relation/:creatorId/:projectId/:role';
|
|
16
|
+
export const definition = { method, path, routeSchema };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type RouteSchema, type RouteDef } from '@jh-tech/util-tools-be';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
declare const query: z.ZodObject<{
|
|
4
|
+
filters: z.ZodOptional<z.ZodObject<{
|
|
5
|
+
creatorIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6
|
+
projectIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7
|
+
primaryOnly: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
|
|
8
|
+
}, z.core.$strip>>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
declare const request: z.ZodObject<{
|
|
11
|
+
query: z.ZodObject<{
|
|
12
|
+
filters: z.ZodOptional<z.ZodObject<{
|
|
13
|
+
creatorIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14
|
+
projectIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
15
|
+
primaryOnly: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
declare const response: z.ZodObject<{
|
|
20
|
+
data: z.ZodArray<z.ZodObject<{
|
|
21
|
+
creatorId: z.ZodUUID;
|
|
22
|
+
projectId: z.ZodUUID;
|
|
23
|
+
primary: z.ZodBoolean;
|
|
24
|
+
role: z.ZodUnion<readonly [z.ZodEnum<{
|
|
25
|
+
"film-director": "film-director";
|
|
26
|
+
"film-producer": "film-producer";
|
|
27
|
+
"film-writer": "film-writer";
|
|
28
|
+
"film-actor": "film-actor";
|
|
29
|
+
"film-studio": "film-studio";
|
|
30
|
+
"film-publisher": "film-publisher";
|
|
31
|
+
}>, z.ZodEnum<{
|
|
32
|
+
"video_game-studio": "video_game-studio";
|
|
33
|
+
"video_game-publisher": "video_game-publisher";
|
|
34
|
+
"video_game-developer": "video_game-developer";
|
|
35
|
+
}>, z.ZodEnum<{
|
|
36
|
+
"music-artist": "music-artist";
|
|
37
|
+
"music-producer": "music-producer";
|
|
38
|
+
"music-label": "music-label";
|
|
39
|
+
"music-band": "music-band";
|
|
40
|
+
}>, z.ZodEnum<{
|
|
41
|
+
"tv-director": "tv-director";
|
|
42
|
+
"tv-producer": "tv-producer";
|
|
43
|
+
"tv-writer": "tv-writer";
|
|
44
|
+
"tv-actor": "tv-actor";
|
|
45
|
+
"tv-studio": "tv-studio";
|
|
46
|
+
"tv-network": "tv-network";
|
|
47
|
+
}>, z.ZodEnum<{
|
|
48
|
+
"comic-artist": "comic-artist";
|
|
49
|
+
"comic-writer": "comic-writer";
|
|
50
|
+
"comic-publisher": "comic-publisher";
|
|
51
|
+
}>, z.ZodEnum<{
|
|
52
|
+
"book-author": "book-author";
|
|
53
|
+
"book-publisher": "book-publisher";
|
|
54
|
+
}>]>;
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
export declare const routeSchema: RouteSchema;
|
|
58
|
+
export type Request = z.infer<typeof request>;
|
|
59
|
+
export type Response = z.infer<typeof response>;
|
|
60
|
+
export type Query = z.infer<typeof query>;
|
|
61
|
+
export declare const definition: RouteDef;
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { creatorProjectRelation } from '@jackhayes/util-types';
|
|
2
|
+
import {} from '@jh-tech/util-tools-be';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { creatorProjectRelationFilters } from '../../definitions/creatorProjectRelation.zod.js';
|
|
5
|
+
const query = z
|
|
6
|
+
.object({
|
|
7
|
+
filters: creatorProjectRelationFilters.optional(),
|
|
8
|
+
})
|
|
9
|
+
.refine((q) => Object.values(q.filters ?? {}).some((value) => value !== undefined), {
|
|
10
|
+
message: 'At least one filter must be provided',
|
|
11
|
+
path: ['filters'],
|
|
12
|
+
});
|
|
13
|
+
const request = z.object({
|
|
14
|
+
query: query,
|
|
15
|
+
});
|
|
16
|
+
const response = z.object({
|
|
17
|
+
data: z.array(creatorProjectRelation),
|
|
18
|
+
});
|
|
19
|
+
export const routeSchema = {
|
|
20
|
+
request,
|
|
21
|
+
response,
|
|
22
|
+
};
|
|
23
|
+
const path = '/creator-project-relations';
|
|
24
|
+
const method = 'get';
|
|
25
|
+
export const definition = { method, path, routeSchema };
|
|
@@ -9,6 +9,8 @@ declare const request: z.ZodObject<{
|
|
|
9
9
|
"associated-project": "associated-project";
|
|
10
10
|
release: "release";
|
|
11
11
|
}>;
|
|
12
|
+
title: z.ZodString;
|
|
13
|
+
projectId: z.ZodUUID;
|
|
12
14
|
subType: z.ZodUnion<readonly [z.ZodEnum<{
|
|
13
15
|
trailer: "trailer";
|
|
14
16
|
teaser: "teaser";
|
|
@@ -31,8 +33,6 @@ declare const request: z.ZodObject<{
|
|
|
31
33
|
patch: "patch";
|
|
32
34
|
"special-edition": "special-edition";
|
|
33
35
|
season: "season";
|
|
34
|
-
adaptation: "adaptation";
|
|
35
|
-
reboot: "reboot";
|
|
36
36
|
beta: "beta";
|
|
37
37
|
demo: "demo";
|
|
38
38
|
}>, z.ZodEnum<{
|
|
@@ -44,9 +44,7 @@ declare const request: z.ZodObject<{
|
|
|
44
44
|
prequel: "prequel";
|
|
45
45
|
sequel: "sequel";
|
|
46
46
|
}>]>;
|
|
47
|
-
title: z.ZodString;
|
|
48
47
|
links: z.ZodArray<z.ZodString>;
|
|
49
|
-
projectId: z.ZodUUID;
|
|
50
48
|
publishedAt: z.ZodOptional<z.ZodString>;
|
|
51
49
|
}, z.core.$strip>;
|
|
52
50
|
}, z.core.$strip>;
|
|
@@ -108,8 +106,6 @@ declare const response: z.ZodObject<{
|
|
|
108
106
|
patch: "patch";
|
|
109
107
|
"special-edition": "special-edition";
|
|
110
108
|
season: "season";
|
|
111
|
-
adaptation: "adaptation";
|
|
112
|
-
reboot: "reboot";
|
|
113
109
|
beta: "beta";
|
|
114
110
|
demo: "demo";
|
|
115
111
|
}>;
|
|
@@ -11,6 +11,8 @@ declare const request: z.ZodObject<{
|
|
|
11
11
|
"associated-project": "associated-project";
|
|
12
12
|
release: "release";
|
|
13
13
|
}>>;
|
|
14
|
+
title: z.ZodOptional<z.ZodString>;
|
|
15
|
+
projectId: z.ZodOptional<z.ZodUUID>;
|
|
14
16
|
subType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
15
17
|
trailer: "trailer";
|
|
16
18
|
teaser: "teaser";
|
|
@@ -33,8 +35,6 @@ declare const request: z.ZodObject<{
|
|
|
33
35
|
patch: "patch";
|
|
34
36
|
"special-edition": "special-edition";
|
|
35
37
|
season: "season";
|
|
36
|
-
adaptation: "adaptation";
|
|
37
|
-
reboot: "reboot";
|
|
38
38
|
beta: "beta";
|
|
39
39
|
demo: "demo";
|
|
40
40
|
}>, z.ZodEnum<{
|
|
@@ -46,9 +46,7 @@ declare const request: z.ZodObject<{
|
|
|
46
46
|
prequel: "prequel";
|
|
47
47
|
sequel: "sequel";
|
|
48
48
|
}>]>>;
|
|
49
|
-
title: z.ZodOptional<z.ZodString>;
|
|
50
49
|
links: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
|
-
projectId: z.ZodOptional<z.ZodUUID>;
|
|
52
50
|
publishedAt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
53
51
|
}, z.core.$strip>;
|
|
54
52
|
}, z.core.$strip>;
|
|
@@ -110,8 +108,6 @@ declare const response: z.ZodObject<{
|
|
|
110
108
|
patch: "patch";
|
|
111
109
|
"special-edition": "special-edition";
|
|
112
110
|
season: "season";
|
|
113
|
-
adaptation: "adaptation";
|
|
114
|
-
reboot: "reboot";
|
|
115
111
|
beta: "beta";
|
|
116
112
|
demo: "demo";
|
|
117
113
|
}>;
|
|
@@ -8,6 +8,8 @@ declare const request: z.ZodObject<{
|
|
|
8
8
|
"associated-project": "associated-project";
|
|
9
9
|
release: "release";
|
|
10
10
|
}>;
|
|
11
|
+
title: z.ZodString;
|
|
12
|
+
projectId: z.ZodUUID;
|
|
11
13
|
subType: z.ZodUnion<readonly [z.ZodEnum<{
|
|
12
14
|
trailer: "trailer";
|
|
13
15
|
teaser: "teaser";
|
|
@@ -30,8 +32,6 @@ declare const request: z.ZodObject<{
|
|
|
30
32
|
patch: "patch";
|
|
31
33
|
"special-edition": "special-edition";
|
|
32
34
|
season: "season";
|
|
33
|
-
adaptation: "adaptation";
|
|
34
|
-
reboot: "reboot";
|
|
35
35
|
beta: "beta";
|
|
36
36
|
demo: "demo";
|
|
37
37
|
}>, z.ZodEnum<{
|
|
@@ -43,9 +43,7 @@ declare const request: z.ZodObject<{
|
|
|
43
43
|
prequel: "prequel";
|
|
44
44
|
sequel: "sequel";
|
|
45
45
|
}>]>;
|
|
46
|
-
title: z.ZodString;
|
|
47
46
|
links: z.ZodArray<z.ZodString>;
|
|
48
|
-
projectId: z.ZodUUID;
|
|
49
47
|
publishedAt: z.ZodOptional<z.ZodString>;
|
|
50
48
|
}, z.core.$strip>>;
|
|
51
49
|
}, z.core.$strip>;
|
|
@@ -107,8 +105,6 @@ declare const response: z.ZodObject<{
|
|
|
107
105
|
patch: "patch";
|
|
108
106
|
"special-edition": "special-edition";
|
|
109
107
|
season: "season";
|
|
110
|
-
adaptation: "adaptation";
|
|
111
|
-
reboot: "reboot";
|
|
112
108
|
beta: "beta";
|
|
113
109
|
demo: "demo";
|
|
114
110
|
}>;
|