@groovenet/contracts 0.0.0-stage → 1.0.1
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/README.md +139 -2
- package/build/albums.d.ts +692 -0
- package/build/albums.d.ts.map +1 -0
- package/build/albums.js +119 -0
- package/build/albums.js.map +1 -0
- package/build/friends.d.ts +63 -0
- package/build/friends.d.ts.map +1 -0
- package/build/friends.js +37 -0
- package/build/friends.js.map +1 -0
- package/build/index.d.ts +8 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +8 -0
- package/build/index.js.map +1 -0
- package/build/liveSets.d.ts +288 -0
- package/build/liveSets.d.ts.map +1 -0
- package/build/liveSets.js +85 -0
- package/build/liveSets.js.map +1 -0
- package/build/playlists.d.ts +432 -0
- package/build/playlists.d.ts.map +1 -0
- package/build/playlists.js +149 -0
- package/build/playlists.js.map +1 -0
- package/build/recordCare.d.ts +961 -0
- package/build/recordCare.d.ts.map +1 -0
- package/build/recordCare.js +245 -0
- package/build/recordCare.js.map +1 -0
- package/build/spins.d.ts +1026 -0
- package/build/spins.d.ts.map +1 -0
- package/build/spins.js +258 -0
- package/build/spins.js.map +1 -0
- package/build/tracks.d.ts +476 -0
- package/build/tracks.d.ts.map +1 -0
- package/build/tracks.js +171 -0
- package/build/tracks.js.map +1 -0
- package/package.json +38 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"albums.d.ts","sourceRoot":"","sources":["../src/albums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,oBAAoB;;;;EAA+C,CAAC;AACjF,eAAO,MAAM,yBAAyB;;;;;EAAkE,CAAC;AAEzG,0EAA0E;AAC1E,eAAO,MAAM,4BAA4B;;;iBAGvC,CAAC;AAEH,uEAAuE;AACvE,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoC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,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAC5F,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAC1F,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,gBAAgB;IAC3B,cAAc;;;;;IACd,mBAAmB;;;;;;IACnB,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACL,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACnB,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACX,mBAAmB;;;IACnB,iBAAiB;;;;;;;;;;;;;;;;;;;;IACjB,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACvB,CAAC"}
|
package/build/albums.js
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { genreFilterRefSchema, trackSchema } from "./tracks.js";
|
|
3
|
+
export const albumArtSourceSchema = z.enum(["discogs", "apple_music", "upload"]);
|
|
4
|
+
export const albumArtMatchStatusSchema = z.enum(["matched", "mismatch", "no_reference", "no_candidate"]);
|
|
5
|
+
/** Omitted: unchanged; null: reset to Discogs; []: deliberately empty. */
|
|
6
|
+
export const albumTaxonomyOverridesSchema = z.object({
|
|
7
|
+
genre_override_ids: z.array(z.string().uuid()).max(100).nullable().optional(),
|
|
8
|
+
style_override_ids: z.array(z.string().uuid()).max(100).nullable().optional(),
|
|
9
|
+
});
|
|
10
|
+
/** The album/release entity. Unknown database columns pass through. */
|
|
11
|
+
const albumShape = z.object({
|
|
12
|
+
...albumTaxonomyOverridesSchema.shape,
|
|
13
|
+
/** Display/search values after the per-friend replacement layer. */
|
|
14
|
+
effective_genres: z.array(z.string()).optional(),
|
|
15
|
+
effective_styles: z.array(z.string()).optional(),
|
|
16
|
+
release_id: z.string(),
|
|
17
|
+
friend_id: z.number().int(),
|
|
18
|
+
username: z.string().optional(),
|
|
19
|
+
title: z.string(),
|
|
20
|
+
artist: z.string(),
|
|
21
|
+
year: z.union([z.string(), z.number()]).nullable().optional(),
|
|
22
|
+
genres: z.array(z.string()).nullable().optional(),
|
|
23
|
+
styles: z.array(z.string()).nullable().optional(),
|
|
24
|
+
album_thumbnail: z.string().nullable().optional(),
|
|
25
|
+
audio_file_album_art_url: z.string().nullable().optional(),
|
|
26
|
+
discogs_url: z.string().nullable().optional(),
|
|
27
|
+
date_added: z.string().nullable().optional(),
|
|
28
|
+
date_changed: z.string().nullable().optional(),
|
|
29
|
+
track_count: z.number().int().optional(),
|
|
30
|
+
album_rating: z.number().nullable().optional(),
|
|
31
|
+
album_notes: z.string().nullable().optional(),
|
|
32
|
+
purchase_price: z.number().nullable().optional(),
|
|
33
|
+
condition: z.string().nullable().optional(),
|
|
34
|
+
label: z.string().nullable().optional(),
|
|
35
|
+
catalog_number: z.string().nullable().optional(),
|
|
36
|
+
country: z.string().nullable().optional(),
|
|
37
|
+
format: z.string().nullable().optional(),
|
|
38
|
+
created_at: z.string().optional(),
|
|
39
|
+
updated_at: z.string().optional(),
|
|
40
|
+
library_identifier: z.string().nullable().optional(),
|
|
41
|
+
// Artwork provenance (#494); the displayed cover is still audio_file_album_art_url || album_thumbnail.
|
|
42
|
+
album_art_source: albumArtSourceSchema.nullable().optional(),
|
|
43
|
+
discogs_art_url: z.string().nullable().optional(),
|
|
44
|
+
apple_music_art_url: z.string().nullable().optional(),
|
|
45
|
+
art_match_status: albumArtMatchStatusSchema.nullable().optional(),
|
|
46
|
+
art_match_distance: z.number().nullable().optional(),
|
|
47
|
+
});
|
|
48
|
+
export const albumSchema = albumShape.passthrough();
|
|
49
|
+
/** Wire shape of `GET /api/albums` query params once coerced from strings. */
|
|
50
|
+
export const albumSearchQuerySchema = z.object({
|
|
51
|
+
q: z.string().optional(),
|
|
52
|
+
sort: z.string().optional(),
|
|
53
|
+
friend_id: z.number().int().optional(),
|
|
54
|
+
limit: z.number().int().min(0).optional(),
|
|
55
|
+
offset: z.number().int().min(0).optional(),
|
|
56
|
+
missing_library_identifier: z.boolean().optional(),
|
|
57
|
+
missing_local_cover_art_url: z.boolean().optional(),
|
|
58
|
+
missing_audio: z.boolean().optional(),
|
|
59
|
+
genre: z.array(z.string()).max(20).optional(),
|
|
60
|
+
include_similar: z.boolean().optional(),
|
|
61
|
+
similar_limit: z.number().int().min(0).optional(),
|
|
62
|
+
similar_exclude: z.array(z.string()).max(20).optional(),
|
|
63
|
+
});
|
|
64
|
+
export const albumSearchResponseSchema = z.object({
|
|
65
|
+
hits: z.array(albumSchema),
|
|
66
|
+
estimatedTotalHits: z.number().int(),
|
|
67
|
+
offset: z.number().int(),
|
|
68
|
+
limit: z.number().int(),
|
|
69
|
+
query: z.string(),
|
|
70
|
+
sort: z.string(),
|
|
71
|
+
added_genres: z.array(genreFilterRefSchema).optional(),
|
|
72
|
+
});
|
|
73
|
+
export const albumDetailSchema = z.object({
|
|
74
|
+
album: albumSchema,
|
|
75
|
+
tracks: z.array(trackSchema),
|
|
76
|
+
});
|
|
77
|
+
export const albumDeleteResponseSchema = z.object({ success: z.boolean() });
|
|
78
|
+
export const albumArtworkStateSchema = z.object({
|
|
79
|
+
release_id: z.string(),
|
|
80
|
+
friend_id: z.number().int(),
|
|
81
|
+
current_url: z.string().nullable(),
|
|
82
|
+
source: albumArtSourceSchema.nullable(),
|
|
83
|
+
discogs_art_url: z.string().nullable(),
|
|
84
|
+
apple_music_art_url: z.string().nullable(),
|
|
85
|
+
art_match_status: albumArtMatchStatusSchema.nullable(),
|
|
86
|
+
art_match_distance: z.number().int().nullable(),
|
|
87
|
+
has_local_audio: z.boolean(),
|
|
88
|
+
});
|
|
89
|
+
export const albumPlayableStructureTrackSchema = z
|
|
90
|
+
.object({
|
|
91
|
+
track_id: z.string(),
|
|
92
|
+
friend_id: z.number().int(),
|
|
93
|
+
position: z.union([z.string(), z.number()]).nullable().optional(),
|
|
94
|
+
title: z.string(),
|
|
95
|
+
artist: z.string(),
|
|
96
|
+
})
|
|
97
|
+
.passthrough();
|
|
98
|
+
export const albumPlayableStructureSideSchema = z.object({
|
|
99
|
+
side_key: z.string(),
|
|
100
|
+
side_label: z.string(),
|
|
101
|
+
ordinal: z.number().int(),
|
|
102
|
+
track_count: z.number().int(),
|
|
103
|
+
tracks: z.array(albumPlayableStructureTrackSchema),
|
|
104
|
+
});
|
|
105
|
+
export const albumPlayableStructureSchema = z.object({
|
|
106
|
+
album: albumSchema,
|
|
107
|
+
sides: z.array(albumPlayableStructureSideSchema),
|
|
108
|
+
});
|
|
109
|
+
export const albumJsonSchemas = {
|
|
110
|
+
AlbumArtSource: z.toJSONSchema(albumArtSourceSchema),
|
|
111
|
+
AlbumArtMatchStatus: z.toJSONSchema(albumArtMatchStatusSchema),
|
|
112
|
+
Album: z.toJSONSchema(albumSchema),
|
|
113
|
+
AlbumSearchResponse: z.toJSONSchema(albumSearchResponseSchema),
|
|
114
|
+
AlbumDetail: z.toJSONSchema(albumDetailSchema),
|
|
115
|
+
AlbumDeleteResponse: z.toJSONSchema(albumDeleteResponseSchema),
|
|
116
|
+
AlbumArtworkState: z.toJSONSchema(albumArtworkStateSchema),
|
|
117
|
+
AlbumPlayableStructure: z.toJSONSchema(albumPlayableStructureSchema),
|
|
118
|
+
};
|
|
119
|
+
//# sourceMappingURL=albums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"albums.js","sourceRoot":"","sources":["../src/albums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC;AACjF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC;AAEzG,0EAA0E;AAC1E,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC7E,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC9E,CAAC,CAAC;AAEH,uEAAuE;AACvE,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IACxB,GAAG,4BAA4B,CAAC,KAAK;IACrC,oEAAoE;IACpE,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAChD,gBAAgB,EAAE,CAAC,CAAC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mBAAmB,EAAE,CAAC,CAAC,YAAY,CAAC,yBAAyB,CAAC;IAC9D,WAAW,EAAE,CAAC,CAAC,YAAY,CAAC,iBAAiB,CAAC;IAC9C,mBAAmB,EAAE,CAAC,CAAC,YAAY,CAAC,yBAAyB,CAAC;IAC9D,iBAAiB,EAAE,CAAC,CAAC,YAAY,CAAC,uBAAuB,CAAC;IAC1D,sBAAsB,EAAE,CAAC,CAAC,YAAY,CAAC,4BAA4B,CAAC;CACrE,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** A friend is a library: one Discogs collection, owner of its tracks and albums. */
|
|
3
|
+
export declare const friendSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodNumber;
|
|
5
|
+
username: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const friendListResponseSchema: z.ZodObject<{
|
|
8
|
+
results: z.ZodArray<z.ZodObject<{
|
|
9
|
+
id: z.ZodNumber;
|
|
10
|
+
username: z.ZodString;
|
|
11
|
+
}, z.core.$strip>>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export declare const friendCreateSchema: z.ZodObject<{
|
|
14
|
+
username: z.ZodString;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export declare const friendCreateResponseSchema: z.ZodObject<{
|
|
17
|
+
message: z.ZodString;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
/** The library new sessions open on; null until one is chosen. */
|
|
20
|
+
export declare const defaultLibrarySettingsSchema: z.ZodObject<{
|
|
21
|
+
friend_id: z.ZodNullable<z.ZodNumber>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export declare const defaultLibrarySettingsUpdateSchema: z.ZodObject<{
|
|
24
|
+
friend_id: z.ZodNumber;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export declare const defaultLibrarySettingsUpdateResponseSchema: z.ZodObject<{
|
|
27
|
+
friend_id: z.ZodNumber;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export type Friend = z.infer<typeof friendSchema>;
|
|
30
|
+
export type FriendListResponse = z.infer<typeof friendListResponseSchema>;
|
|
31
|
+
export type FriendCreate = z.infer<typeof friendCreateSchema>;
|
|
32
|
+
export type FriendCreateResponse = z.infer<typeof friendCreateResponseSchema>;
|
|
33
|
+
export type DefaultLibrarySettings = z.infer<typeof defaultLibrarySettingsSchema>;
|
|
34
|
+
export type DefaultLibrarySettingsUpdate = z.infer<typeof defaultLibrarySettingsUpdateSchema>;
|
|
35
|
+
export type DefaultLibrarySettingsUpdateResponse = z.infer<typeof defaultLibrarySettingsUpdateResponseSchema>;
|
|
36
|
+
export declare const friendJsonSchemas: {
|
|
37
|
+
Friend: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
38
|
+
id: z.ZodNumber;
|
|
39
|
+
username: z.ZodString;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
FriendListResponse: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
42
|
+
results: z.ZodArray<z.ZodObject<{
|
|
43
|
+
id: z.ZodNumber;
|
|
44
|
+
username: z.ZodString;
|
|
45
|
+
}, z.core.$strip>>;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
FriendCreate: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
48
|
+
username: z.ZodString;
|
|
49
|
+
}, z.core.$strip>>;
|
|
50
|
+
FriendCreateResponse: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
51
|
+
message: z.ZodString;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
DefaultLibrarySettings: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
54
|
+
friend_id: z.ZodNullable<z.ZodNumber>;
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
DefaultLibrarySettingsUpdate: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
57
|
+
friend_id: z.ZodNumber;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
DefaultLibrarySettingsUpdateResponse: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
60
|
+
friend_id: z.ZodNumber;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=friends.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"friends.d.ts","sourceRoot":"","sources":["../src/friends.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,qFAAqF;AACrF,eAAO,MAAM,YAAY;;;iBAGvB,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;iBAEnC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;iBAE7B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;iBAErC,CAAC;AAEH,kEAAkE;AAClE,eAAO,MAAM,4BAA4B;;iBAEvC,CAAC;AAEH,eAAO,MAAM,kCAAkC;;iBAE7C,CAAC;AAEH,eAAO,MAAM,0CAA0C;;iBAErD,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAClD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAC9F,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,0CAA0C,CAClD,CAAC;AAIF,eAAO,MAAM,iBAAiB;IAC5B,MAAM;;;;IACN,kBAAkB;;;;;;IAClB,YAAY;;;IACZ,oBAAoB;;;IACpB,sBAAsB;;;IACtB,4BAA4B;;;IAC5B,oCAAoC;;;CACrC,CAAC"}
|
package/build/friends.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** A friend is a library: one Discogs collection, owner of its tracks and albums. */
|
|
3
|
+
export const friendSchema = z.object({
|
|
4
|
+
id: z.number().int(),
|
|
5
|
+
username: z.string(),
|
|
6
|
+
});
|
|
7
|
+
export const friendListResponseSchema = z.object({
|
|
8
|
+
results: z.array(friendSchema),
|
|
9
|
+
});
|
|
10
|
+
export const friendCreateSchema = z.object({
|
|
11
|
+
username: z.string().min(1),
|
|
12
|
+
});
|
|
13
|
+
export const friendCreateResponseSchema = z.object({
|
|
14
|
+
message: z.string(),
|
|
15
|
+
});
|
|
16
|
+
/** The library new sessions open on; null until one is chosen. */
|
|
17
|
+
export const defaultLibrarySettingsSchema = z.object({
|
|
18
|
+
friend_id: z.number().int().nullable(),
|
|
19
|
+
});
|
|
20
|
+
export const defaultLibrarySettingsUpdateSchema = z.object({
|
|
21
|
+
friend_id: z.number().int(),
|
|
22
|
+
});
|
|
23
|
+
export const defaultLibrarySettingsUpdateResponseSchema = z.object({
|
|
24
|
+
friend_id: z.number().int(),
|
|
25
|
+
});
|
|
26
|
+
// Request bodies publish their input shape: the routes strip unknown fields
|
|
27
|
+
// rather than reject them, so OpenAPI must not claim `additionalProperties: false`.
|
|
28
|
+
export const friendJsonSchemas = {
|
|
29
|
+
Friend: z.toJSONSchema(friendSchema),
|
|
30
|
+
FriendListResponse: z.toJSONSchema(friendListResponseSchema),
|
|
31
|
+
FriendCreate: z.toJSONSchema(friendCreateSchema, { io: "input" }),
|
|
32
|
+
FriendCreateResponse: z.toJSONSchema(friendCreateResponseSchema),
|
|
33
|
+
DefaultLibrarySettings: z.toJSONSchema(defaultLibrarySettingsSchema),
|
|
34
|
+
DefaultLibrarySettingsUpdate: z.toJSONSchema(defaultLibrarySettingsUpdateSchema, { io: "input" }),
|
|
35
|
+
DefaultLibrarySettingsUpdateResponse: z.toJSONSchema(defaultLibrarySettingsUpdateResponseSchema),
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=friends.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"friends.js","sourceRoot":"","sources":["../src/friends.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,qFAAqF;AACrF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACpB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC;CAC/B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC5B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAEH,kEAAkE;AAClE,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CAAC;IACzD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CAC5B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0CAA0C,GAAG,CAAC,CAAC,MAAM,CAAC;IACjE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CAC5B,CAAC,CAAC;AAYH,4EAA4E;AAC5E,oFAAoF;AACpF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAE,CAAC,CAAC,YAAY,CAAC,YAAY,CAAC;IACpC,kBAAkB,EAAE,CAAC,CAAC,YAAY,CAAC,wBAAwB,CAAC;IAC5D,YAAY,EAAE,CAAC,CAAC,YAAY,CAAC,kBAAkB,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC;IACjE,oBAAoB,EAAE,CAAC,CAAC,YAAY,CAAC,0BAA0B,CAAC;IAChE,sBAAsB,EAAE,CAAC,CAAC,YAAY,CAAC,4BAA4B,CAAC;IACpE,4BAA4B,EAAE,CAAC,CAAC,YAAY,CAAC,kCAAkC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC;IACjG,oCAAoC,EAAE,CAAC,CAAC,YAAY,CAAC,0CAA0C,CAAC;CACjG,CAAC"}
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
|
package/build/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const liveSetStatusSchema: z.ZodEnum<{
|
|
3
|
+
archived: "archived";
|
|
4
|
+
draft: "draft";
|
|
5
|
+
performed: "performed";
|
|
6
|
+
}>;
|
|
7
|
+
export declare const liveSetMediaTypeSchema: z.ZodEnum<{
|
|
8
|
+
audio: "audio";
|
|
9
|
+
flyer: "flyer";
|
|
10
|
+
image: "image";
|
|
11
|
+
link: "link";
|
|
12
|
+
youtube: "youtube";
|
|
13
|
+
}>;
|
|
14
|
+
export declare const liveSetCollaboratorSchema: z.ZodObject<{
|
|
15
|
+
friend_id: z.ZodNumber;
|
|
16
|
+
username: z.ZodString;
|
|
17
|
+
role: z.ZodString;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export declare const liveSetPerformanceSchema: z.ZodObject<{
|
|
20
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
performed_at: z.ZodString;
|
|
22
|
+
venue_name: z.ZodNullable<z.ZodString>;
|
|
23
|
+
location_city: z.ZodNullable<z.ZodString>;
|
|
24
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
25
|
+
}, z.core.$loose>;
|
|
26
|
+
export declare const liveSetMediaSchema: z.ZodObject<{
|
|
27
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
media_type: z.ZodEnum<{
|
|
29
|
+
audio: "audio";
|
|
30
|
+
flyer: "flyer";
|
|
31
|
+
image: "image";
|
|
32
|
+
link: "link";
|
|
33
|
+
youtube: "youtube";
|
|
34
|
+
}>;
|
|
35
|
+
url: z.ZodString;
|
|
36
|
+
filename: z.ZodNullable<z.ZodString>;
|
|
37
|
+
caption: z.ZodNullable<z.ZodString>;
|
|
38
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
}, z.core.$loose>;
|
|
40
|
+
export declare const liveSetSummarySchema: z.ZodObject<{
|
|
41
|
+
id: z.ZodNumber;
|
|
42
|
+
title: z.ZodNullable<z.ZodString>;
|
|
43
|
+
status: z.ZodEnum<{
|
|
44
|
+
archived: "archived";
|
|
45
|
+
draft: "draft";
|
|
46
|
+
performed: "performed";
|
|
47
|
+
}>;
|
|
48
|
+
cover_image_url: z.ZodNullable<z.ZodString>;
|
|
49
|
+
last_performed_at: z.ZodNullable<z.ZodString>;
|
|
50
|
+
venue_name: z.ZodNullable<z.ZodString>;
|
|
51
|
+
location_city: z.ZodNullable<z.ZodString>;
|
|
52
|
+
collaborators: z.ZodArray<z.ZodObject<{
|
|
53
|
+
friend_id: z.ZodNumber;
|
|
54
|
+
username: z.ZodString;
|
|
55
|
+
role: z.ZodString;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
}, z.core.$loose>;
|
|
58
|
+
export declare const liveSetSchema: z.ZodObject<{
|
|
59
|
+
id: z.ZodNumber;
|
|
60
|
+
playlist_id: z.ZodNumber;
|
|
61
|
+
title: z.ZodNullable<z.ZodString>;
|
|
62
|
+
status: z.ZodEnum<{
|
|
63
|
+
archived: "archived";
|
|
64
|
+
draft: "draft";
|
|
65
|
+
performed: "performed";
|
|
66
|
+
}>;
|
|
67
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
68
|
+
location_name: z.ZodNullable<z.ZodString>;
|
|
69
|
+
location_city: z.ZodNullable<z.ZodString>;
|
|
70
|
+
cover_image_url: z.ZodNullable<z.ZodString>;
|
|
71
|
+
collaborators: z.ZodArray<z.ZodObject<{
|
|
72
|
+
friend_id: z.ZodNumber;
|
|
73
|
+
username: z.ZodString;
|
|
74
|
+
role: z.ZodString;
|
|
75
|
+
}, z.core.$strip>>;
|
|
76
|
+
performances: z.ZodArray<z.ZodObject<{
|
|
77
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
performed_at: z.ZodString;
|
|
79
|
+
venue_name: z.ZodNullable<z.ZodString>;
|
|
80
|
+
location_city: z.ZodNullable<z.ZodString>;
|
|
81
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
82
|
+
}, z.core.$loose>>;
|
|
83
|
+
media: z.ZodArray<z.ZodObject<{
|
|
84
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
media_type: z.ZodEnum<{
|
|
86
|
+
audio: "audio";
|
|
87
|
+
flyer: "flyer";
|
|
88
|
+
image: "image";
|
|
89
|
+
link: "link";
|
|
90
|
+
youtube: "youtube";
|
|
91
|
+
}>;
|
|
92
|
+
url: z.ZodString;
|
|
93
|
+
filename: z.ZodNullable<z.ZodString>;
|
|
94
|
+
caption: z.ZodNullable<z.ZodString>;
|
|
95
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
}, z.core.$loose>>;
|
|
97
|
+
}, z.core.$loose>;
|
|
98
|
+
export declare const liveSetMutationResponseSchema: z.ZodObject<{
|
|
99
|
+
id: z.ZodNumber;
|
|
100
|
+
playlist_id: z.ZodNumber;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
export declare const liveSetDeleteResponseSchema: z.ZodObject<{
|
|
103
|
+
success: z.ZodLiteral<true>;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
export declare const liveSetUpdateSchema: z.ZodObject<{
|
|
106
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
107
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
108
|
+
archived: "archived";
|
|
109
|
+
draft: "draft";
|
|
110
|
+
performed: "performed";
|
|
111
|
+
}>>;
|
|
112
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
113
|
+
location_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
114
|
+
location_city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
115
|
+
cover_image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
116
|
+
collaborators: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
117
|
+
friend_id: z.ZodNumber;
|
|
118
|
+
role: z.ZodOptional<z.ZodString>;
|
|
119
|
+
}, z.core.$strip>>>;
|
|
120
|
+
performances: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
121
|
+
performed_at: z.ZodString;
|
|
122
|
+
venue_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
123
|
+
location_city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
124
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
125
|
+
}, z.core.$strip>>>;
|
|
126
|
+
media: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
127
|
+
media_type: z.ZodEnum<{
|
|
128
|
+
audio: "audio";
|
|
129
|
+
flyer: "flyer";
|
|
130
|
+
image: "image";
|
|
131
|
+
link: "link";
|
|
132
|
+
youtube: "youtube";
|
|
133
|
+
}>;
|
|
134
|
+
url: z.ZodString;
|
|
135
|
+
filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
136
|
+
caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
137
|
+
}, z.core.$strip>>>;
|
|
138
|
+
}, z.core.$loose>;
|
|
139
|
+
export type LiveSetStatus = z.infer<typeof liveSetStatusSchema>;
|
|
140
|
+
export type LiveSetMediaType = z.infer<typeof liveSetMediaTypeSchema>;
|
|
141
|
+
export type LiveSetCollaborator = z.infer<typeof liveSetCollaboratorSchema>;
|
|
142
|
+
export type LiveSetPerformance = z.infer<typeof liveSetPerformanceSchema>;
|
|
143
|
+
export type LiveSetMedia = z.infer<typeof liveSetMediaSchema>;
|
|
144
|
+
export type LiveSetSummary = z.infer<typeof liveSetSummarySchema>;
|
|
145
|
+
export type LiveSet = z.infer<typeof liveSetSchema>;
|
|
146
|
+
export type LiveSetMutationResponse = z.infer<typeof liveSetMutationResponseSchema>;
|
|
147
|
+
export type LiveSetDeleteResponse = z.infer<typeof liveSetDeleteResponseSchema>;
|
|
148
|
+
export type LiveSetUpdate = z.infer<typeof liveSetUpdateSchema>;
|
|
149
|
+
export declare const liveSetJsonSchemas: {
|
|
150
|
+
LiveSetStatus: z.core.ZodStandardJSONSchemaPayload<z.ZodEnum<{
|
|
151
|
+
archived: "archived";
|
|
152
|
+
draft: "draft";
|
|
153
|
+
performed: "performed";
|
|
154
|
+
}>>;
|
|
155
|
+
LiveSetMediaType: z.core.ZodStandardJSONSchemaPayload<z.ZodEnum<{
|
|
156
|
+
audio: "audio";
|
|
157
|
+
flyer: "flyer";
|
|
158
|
+
image: "image";
|
|
159
|
+
link: "link";
|
|
160
|
+
youtube: "youtube";
|
|
161
|
+
}>>;
|
|
162
|
+
LiveSetCollaborator: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
163
|
+
friend_id: z.ZodNumber;
|
|
164
|
+
username: z.ZodString;
|
|
165
|
+
role: z.ZodString;
|
|
166
|
+
}, z.core.$strip>>;
|
|
167
|
+
LiveSetPerformance: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
168
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
performed_at: z.ZodString;
|
|
170
|
+
venue_name: z.ZodNullable<z.ZodString>;
|
|
171
|
+
location_city: z.ZodNullable<z.ZodString>;
|
|
172
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
173
|
+
}, z.core.$loose>>;
|
|
174
|
+
LiveSetMedia: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
175
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
176
|
+
media_type: z.ZodEnum<{
|
|
177
|
+
audio: "audio";
|
|
178
|
+
flyer: "flyer";
|
|
179
|
+
image: "image";
|
|
180
|
+
link: "link";
|
|
181
|
+
youtube: "youtube";
|
|
182
|
+
}>;
|
|
183
|
+
url: z.ZodString;
|
|
184
|
+
filename: z.ZodNullable<z.ZodString>;
|
|
185
|
+
caption: z.ZodNullable<z.ZodString>;
|
|
186
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
}, z.core.$loose>>;
|
|
188
|
+
LiveSetSummary: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
189
|
+
id: z.ZodNumber;
|
|
190
|
+
title: z.ZodNullable<z.ZodString>;
|
|
191
|
+
status: z.ZodEnum<{
|
|
192
|
+
archived: "archived";
|
|
193
|
+
draft: "draft";
|
|
194
|
+
performed: "performed";
|
|
195
|
+
}>;
|
|
196
|
+
cover_image_url: z.ZodNullable<z.ZodString>;
|
|
197
|
+
last_performed_at: z.ZodNullable<z.ZodString>;
|
|
198
|
+
venue_name: z.ZodNullable<z.ZodString>;
|
|
199
|
+
location_city: z.ZodNullable<z.ZodString>;
|
|
200
|
+
collaborators: z.ZodArray<z.ZodObject<{
|
|
201
|
+
friend_id: z.ZodNumber;
|
|
202
|
+
username: z.ZodString;
|
|
203
|
+
role: z.ZodString;
|
|
204
|
+
}, z.core.$strip>>;
|
|
205
|
+
}, z.core.$loose>>;
|
|
206
|
+
LiveSet: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
207
|
+
id: z.ZodNumber;
|
|
208
|
+
playlist_id: z.ZodNumber;
|
|
209
|
+
title: z.ZodNullable<z.ZodString>;
|
|
210
|
+
status: z.ZodEnum<{
|
|
211
|
+
archived: "archived";
|
|
212
|
+
draft: "draft";
|
|
213
|
+
performed: "performed";
|
|
214
|
+
}>;
|
|
215
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
216
|
+
location_name: z.ZodNullable<z.ZodString>;
|
|
217
|
+
location_city: z.ZodNullable<z.ZodString>;
|
|
218
|
+
cover_image_url: z.ZodNullable<z.ZodString>;
|
|
219
|
+
collaborators: z.ZodArray<z.ZodObject<{
|
|
220
|
+
friend_id: z.ZodNumber;
|
|
221
|
+
username: z.ZodString;
|
|
222
|
+
role: z.ZodString;
|
|
223
|
+
}, z.core.$strip>>;
|
|
224
|
+
performances: z.ZodArray<z.ZodObject<{
|
|
225
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
226
|
+
performed_at: z.ZodString;
|
|
227
|
+
venue_name: z.ZodNullable<z.ZodString>;
|
|
228
|
+
location_city: z.ZodNullable<z.ZodString>;
|
|
229
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
230
|
+
}, z.core.$loose>>;
|
|
231
|
+
media: z.ZodArray<z.ZodObject<{
|
|
232
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
233
|
+
media_type: z.ZodEnum<{
|
|
234
|
+
audio: "audio";
|
|
235
|
+
flyer: "flyer";
|
|
236
|
+
image: "image";
|
|
237
|
+
link: "link";
|
|
238
|
+
youtube: "youtube";
|
|
239
|
+
}>;
|
|
240
|
+
url: z.ZodString;
|
|
241
|
+
filename: z.ZodNullable<z.ZodString>;
|
|
242
|
+
caption: z.ZodNullable<z.ZodString>;
|
|
243
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
244
|
+
}, z.core.$loose>>;
|
|
245
|
+
}, z.core.$loose>>;
|
|
246
|
+
LiveSetMutationResponse: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
247
|
+
id: z.ZodNumber;
|
|
248
|
+
playlist_id: z.ZodNumber;
|
|
249
|
+
}, z.core.$strip>>;
|
|
250
|
+
LiveSetDeleteResponse: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
251
|
+
success: z.ZodLiteral<true>;
|
|
252
|
+
}, z.core.$strip>>;
|
|
253
|
+
LiveSetUpdate: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
254
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
255
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
256
|
+
archived: "archived";
|
|
257
|
+
draft: "draft";
|
|
258
|
+
performed: "performed";
|
|
259
|
+
}>>;
|
|
260
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
261
|
+
location_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
262
|
+
location_city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
263
|
+
cover_image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
264
|
+
collaborators: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
265
|
+
friend_id: z.ZodNumber;
|
|
266
|
+
role: z.ZodOptional<z.ZodString>;
|
|
267
|
+
}, z.core.$strip>>>;
|
|
268
|
+
performances: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
269
|
+
performed_at: z.ZodString;
|
|
270
|
+
venue_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
271
|
+
location_city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
272
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
273
|
+
}, z.core.$strip>>>;
|
|
274
|
+
media: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
275
|
+
media_type: z.ZodEnum<{
|
|
276
|
+
audio: "audio";
|
|
277
|
+
flyer: "flyer";
|
|
278
|
+
image: "image";
|
|
279
|
+
link: "link";
|
|
280
|
+
youtube: "youtube";
|
|
281
|
+
}>;
|
|
282
|
+
url: z.ZodString;
|
|
283
|
+
filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
284
|
+
caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
285
|
+
}, z.core.$strip>>>;
|
|
286
|
+
}, z.core.$loose>>;
|
|
287
|
+
};
|
|
288
|
+
//# sourceMappingURL=liveSets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liveSets.d.ts","sourceRoot":"","sources":["../src/liveSets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB;;;;EAA6C,CAAC;AAC9E,eAAO,MAAM,sBAAsB;;;;;;EAAyD,CAAC;AAE7F,eAAO,MAAM,yBAA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AO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,kBAAkB;IAC7B,aAAa;;;;;IACb,gBAAgB;;;;;;;IAChB,mBAAmB;;;;;IACnB,kBAAkB;;;;;;;IAClB,YAAY;;;;;;;;;;;;;;IACZ,cAAc;;;;;;;;;;;;;;;;;;IACd,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACP,uBAAuB;;;;IACvB,qBAAqB;;;IACrB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACd,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const liveSetStatusSchema = z.enum(["draft", "performed", "archived"]);
|
|
3
|
+
export const liveSetMediaTypeSchema = z.enum(["image", "flyer", "audio", "youtube", "link"]);
|
|
4
|
+
export const liveSetCollaboratorSchema = z.object({
|
|
5
|
+
friend_id: z.number().int(),
|
|
6
|
+
username: z.string(),
|
|
7
|
+
role: z.string(),
|
|
8
|
+
});
|
|
9
|
+
export const liveSetPerformanceSchema = z.object({
|
|
10
|
+
id: z.number().int().optional(),
|
|
11
|
+
performed_at: z.string(),
|
|
12
|
+
venue_name: z.string().nullable(),
|
|
13
|
+
location_city: z.string().nullable(),
|
|
14
|
+
notes: z.string().nullable(),
|
|
15
|
+
}).passthrough();
|
|
16
|
+
export const liveSetMediaSchema = z.object({
|
|
17
|
+
id: z.number().int().optional(),
|
|
18
|
+
media_type: liveSetMediaTypeSchema,
|
|
19
|
+
url: z.string(),
|
|
20
|
+
filename: z.string().nullable(),
|
|
21
|
+
caption: z.string().nullable(),
|
|
22
|
+
position: z.number().int().optional(),
|
|
23
|
+
}).passthrough();
|
|
24
|
+
export const liveSetSummarySchema = z.object({
|
|
25
|
+
id: z.number().int(),
|
|
26
|
+
title: z.string().nullable(),
|
|
27
|
+
status: liveSetStatusSchema,
|
|
28
|
+
cover_image_url: z.string().nullable(),
|
|
29
|
+
last_performed_at: z.string().nullable(),
|
|
30
|
+
venue_name: z.string().nullable(),
|
|
31
|
+
location_city: z.string().nullable(),
|
|
32
|
+
collaborators: z.array(liveSetCollaboratorSchema),
|
|
33
|
+
}).passthrough();
|
|
34
|
+
export const liveSetSchema = z.object({
|
|
35
|
+
id: z.number().int(),
|
|
36
|
+
playlist_id: z.number().int(),
|
|
37
|
+
title: z.string().nullable(),
|
|
38
|
+
status: liveSetStatusSchema,
|
|
39
|
+
notes: z.string().nullable(),
|
|
40
|
+
location_name: z.string().nullable(),
|
|
41
|
+
location_city: z.string().nullable(),
|
|
42
|
+
cover_image_url: z.string().nullable(),
|
|
43
|
+
collaborators: z.array(liveSetCollaboratorSchema),
|
|
44
|
+
performances: z.array(liveSetPerformanceSchema),
|
|
45
|
+
media: z.array(liveSetMediaSchema),
|
|
46
|
+
}).passthrough();
|
|
47
|
+
export const liveSetMutationResponseSchema = z.object({
|
|
48
|
+
id: z.number().int(),
|
|
49
|
+
playlist_id: z.number().int(),
|
|
50
|
+
});
|
|
51
|
+
export const liveSetDeleteResponseSchema = z.object({ success: z.literal(true) });
|
|
52
|
+
export const liveSetUpdateSchema = z.object({
|
|
53
|
+
title: z.string().nullable().optional(),
|
|
54
|
+
status: liveSetStatusSchema.optional(),
|
|
55
|
+
notes: z.string().nullable().optional(),
|
|
56
|
+
location_name: z.string().nullable().optional(),
|
|
57
|
+
location_city: z.string().nullable().optional(),
|
|
58
|
+
cover_image_url: z.string().nullable().optional(),
|
|
59
|
+
collaborators: z.array(z.object({ friend_id: z.number().int(), role: z.string().optional() })).optional(),
|
|
60
|
+
performances: z.array(z.object({
|
|
61
|
+
performed_at: z.string(),
|
|
62
|
+
venue_name: z.string().nullable().optional(),
|
|
63
|
+
location_city: z.string().nullable().optional(),
|
|
64
|
+
notes: z.string().nullable().optional(),
|
|
65
|
+
})).optional(),
|
|
66
|
+
media: z.array(z.object({
|
|
67
|
+
media_type: liveSetMediaTypeSchema,
|
|
68
|
+
url: z.string(),
|
|
69
|
+
filename: z.string().nullable().optional(),
|
|
70
|
+
caption: z.string().nullable().optional(),
|
|
71
|
+
})).optional(),
|
|
72
|
+
}).passthrough();
|
|
73
|
+
export const liveSetJsonSchemas = {
|
|
74
|
+
LiveSetStatus: z.toJSONSchema(liveSetStatusSchema),
|
|
75
|
+
LiveSetMediaType: z.toJSONSchema(liveSetMediaTypeSchema),
|
|
76
|
+
LiveSetCollaborator: z.toJSONSchema(liveSetCollaboratorSchema),
|
|
77
|
+
LiveSetPerformance: z.toJSONSchema(liveSetPerformanceSchema),
|
|
78
|
+
LiveSetMedia: z.toJSONSchema(liveSetMediaSchema),
|
|
79
|
+
LiveSetSummary: z.toJSONSchema(liveSetSummarySchema),
|
|
80
|
+
LiveSet: z.toJSONSchema(liveSetSchema),
|
|
81
|
+
LiveSetMutationResponse: z.toJSONSchema(liveSetMutationResponseSchema),
|
|
82
|
+
LiveSetDeleteResponse: z.toJSONSchema(liveSetDeleteResponseSchema),
|
|
83
|
+
LiveSetUpdate: z.toJSONSchema(liveSetUpdateSchema),
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=liveSets.js.map
|