@digicap-web/sdk 0.1.0-dev.13
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 +9 -0
- package/dist/index.cjs +1613 -0
- package/dist/index.d.cts +646 -0
- package/dist/index.d.ts +646 -0
- package/dist/index.js +1500 -0
- package/package.json +50 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1500 @@
|
|
|
1
|
+
// src/schema/article.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var ArticleIdSchema = z.uuid().transform((id) => id);
|
|
4
|
+
var ArticleIdListSchema = z.array(ArticleIdSchema);
|
|
5
|
+
var ArticleSchema = z.object({
|
|
6
|
+
id: ArticleIdSchema,
|
|
7
|
+
name: z.string().min(1).max(255),
|
|
8
|
+
body: z.string().min(0).max(4096),
|
|
9
|
+
published: z.boolean().default(false),
|
|
10
|
+
createdAt: z.union([
|
|
11
|
+
z.date(),
|
|
12
|
+
z.iso.datetime().transform((s) => new Date(s))
|
|
13
|
+
]),
|
|
14
|
+
updatedAt: z.union([
|
|
15
|
+
z.date(),
|
|
16
|
+
z.iso.datetime().transform((s) => new Date(s))
|
|
17
|
+
])
|
|
18
|
+
}).strip();
|
|
19
|
+
var CreateArticleSchema = ArticleSchema.pick({
|
|
20
|
+
name: true,
|
|
21
|
+
body: true,
|
|
22
|
+
published: true
|
|
23
|
+
}).strip();
|
|
24
|
+
var UpdateArticleSchema = CreateArticleSchema;
|
|
25
|
+
var ArticleListSchema = z.array(ArticleSchema);
|
|
26
|
+
|
|
27
|
+
// src/schema/area.ts
|
|
28
|
+
import { z as z2 } from "zod";
|
|
29
|
+
var AreaIdSchema = z2.uuid().transform((id) => id);
|
|
30
|
+
var AreaIdListSchema = z2.array(AreaIdSchema);
|
|
31
|
+
var AreaSchema = z2.object({
|
|
32
|
+
id: AreaIdSchema,
|
|
33
|
+
name: z2.string().min(1).max(255),
|
|
34
|
+
createdAt: z2.union([
|
|
35
|
+
z2.date(),
|
|
36
|
+
z2.iso.datetime().transform((s) => new Date(s))
|
|
37
|
+
]),
|
|
38
|
+
updatedAt: z2.union([
|
|
39
|
+
z2.date(),
|
|
40
|
+
z2.iso.datetime().transform((s) => new Date(s))
|
|
41
|
+
])
|
|
42
|
+
}).strip();
|
|
43
|
+
var CreateAreaSchema = AreaSchema.pick({
|
|
44
|
+
name: true
|
|
45
|
+
}).strip();
|
|
46
|
+
var UpdateAreaSchema = CreateAreaSchema;
|
|
47
|
+
var AreaListSchema = z2.array(AreaSchema);
|
|
48
|
+
|
|
49
|
+
// src/schema/spot.ts
|
|
50
|
+
import { z as z3 } from "zod";
|
|
51
|
+
var SpotIdSchema = z3.uuid().transform((id) => id);
|
|
52
|
+
var SpotIdListSchema = z3.array(SpotIdSchema);
|
|
53
|
+
var SpotSchema = z3.object({
|
|
54
|
+
id: SpotIdSchema,
|
|
55
|
+
name: z3.string().min(1).max(255),
|
|
56
|
+
createdAt: z3.union([
|
|
57
|
+
z3.date(),
|
|
58
|
+
z3.iso.datetime().transform((s) => new Date(s))
|
|
59
|
+
]),
|
|
60
|
+
updatedAt: z3.union([
|
|
61
|
+
z3.date(),
|
|
62
|
+
z3.iso.datetime().transform((s) => new Date(s))
|
|
63
|
+
]),
|
|
64
|
+
areaId: z3.lazy(() => AreaIdSchema),
|
|
65
|
+
articleId: z3.lazy(() => ArticleIdSchema.nullable())
|
|
66
|
+
}).strip();
|
|
67
|
+
var CreateSpotSchema = SpotSchema.pick({
|
|
68
|
+
name: true,
|
|
69
|
+
areaId: true
|
|
70
|
+
}).strip();
|
|
71
|
+
var UpdateSpotSchema = CreateSpotSchema;
|
|
72
|
+
var SpotListSchema = z3.array(SpotSchema);
|
|
73
|
+
|
|
74
|
+
// src/schema/tag.ts
|
|
75
|
+
import { z as z4 } from "zod";
|
|
76
|
+
var TagIdSchema = z4.uuid().transform((id) => id);
|
|
77
|
+
var TagIdListSchema = z4.array(TagIdSchema);
|
|
78
|
+
var TagSchema = z4.object({
|
|
79
|
+
id: TagIdSchema,
|
|
80
|
+
name: z4.string().min(1).max(255),
|
|
81
|
+
color: z4.string().min(1).max(255),
|
|
82
|
+
createdAt: z4.union([
|
|
83
|
+
z4.date(),
|
|
84
|
+
z4.iso.datetime().transform((s) => new Date(s))
|
|
85
|
+
]),
|
|
86
|
+
updatedAt: z4.union([
|
|
87
|
+
z4.date(),
|
|
88
|
+
z4.iso.datetime().transform((s) => new Date(s))
|
|
89
|
+
])
|
|
90
|
+
}).strip();
|
|
91
|
+
var CreateTagSchema = TagSchema.pick({
|
|
92
|
+
name: true,
|
|
93
|
+
color: true
|
|
94
|
+
}).strip();
|
|
95
|
+
var UpdateTagSchema = CreateTagSchema;
|
|
96
|
+
var TagListSchema = z4.array(TagSchema);
|
|
97
|
+
|
|
98
|
+
// src/schema/user.ts
|
|
99
|
+
import { z as z5 } from "zod";
|
|
100
|
+
var UserIdSchema = z5.uuid().transform((id) => id);
|
|
101
|
+
var UserIdListSchema = z5.array(UserIdSchema);
|
|
102
|
+
var UserSchema = z5.object({
|
|
103
|
+
id: UserIdSchema,
|
|
104
|
+
email: z5.email(),
|
|
105
|
+
createdAt: z5.union([
|
|
106
|
+
z5.date(),
|
|
107
|
+
z5.iso.datetime().transform((s) => new Date(s))
|
|
108
|
+
]),
|
|
109
|
+
updatedAt: z5.union([
|
|
110
|
+
z5.date(),
|
|
111
|
+
z5.iso.datetime().transform((s) => new Date(s))
|
|
112
|
+
])
|
|
113
|
+
}).strip();
|
|
114
|
+
var UserListSchema = z5.array(UserSchema);
|
|
115
|
+
|
|
116
|
+
// src/schema/audio.ts
|
|
117
|
+
import { z as z6 } from "zod";
|
|
118
|
+
var AudioIdSchema = z6.uuid().transform((id) => id);
|
|
119
|
+
var AudioIdListSchema = z6.array(AudioIdSchema);
|
|
120
|
+
var AudioSchema = z6.object({
|
|
121
|
+
id: AudioIdSchema,
|
|
122
|
+
createdAt: z6.union([
|
|
123
|
+
z6.date(),
|
|
124
|
+
z6.iso.datetime().transform((s) => new Date(s))
|
|
125
|
+
]),
|
|
126
|
+
updatedAt: z6.union([
|
|
127
|
+
z6.date(),
|
|
128
|
+
z6.iso.datetime().transform((s) => new Date(s))
|
|
129
|
+
])
|
|
130
|
+
}).strip();
|
|
131
|
+
var AudioListSchema = z6.array(AudioSchema);
|
|
132
|
+
|
|
133
|
+
// src/schema/picture.ts
|
|
134
|
+
import { z as z7 } from "zod";
|
|
135
|
+
var PictureIdSchema = z7.uuid().transform((id) => id);
|
|
136
|
+
var PictureIdListSchema = z7.array(PictureIdSchema);
|
|
137
|
+
var PictureSchema = z7.object({
|
|
138
|
+
id: PictureIdSchema,
|
|
139
|
+
createdAt: z7.union([
|
|
140
|
+
z7.date(),
|
|
141
|
+
z7.iso.datetime().transform((s) => new Date(s))
|
|
142
|
+
]),
|
|
143
|
+
updatedAt: z7.union([
|
|
144
|
+
z7.date(),
|
|
145
|
+
z7.iso.datetime().transform((s) => new Date(s))
|
|
146
|
+
])
|
|
147
|
+
}).strip();
|
|
148
|
+
var PictureListSchema = z7.array(PictureSchema);
|
|
149
|
+
|
|
150
|
+
// src/schema/guide.ts
|
|
151
|
+
import { z as z8 } from "zod";
|
|
152
|
+
var GuideIdSchema = z8.uuid().transform((id) => id);
|
|
153
|
+
var GuideIdListSchema = z8.array(GuideIdSchema);
|
|
154
|
+
var GuideSchema = z8.object({
|
|
155
|
+
id: GuideIdSchema,
|
|
156
|
+
name: z8.string().min(1).max(255),
|
|
157
|
+
createdAt: z8.union([
|
|
158
|
+
z8.date(),
|
|
159
|
+
z8.iso.datetime().transform((s) => new Date(s))
|
|
160
|
+
]),
|
|
161
|
+
updatedAt: z8.union([
|
|
162
|
+
z8.date(),
|
|
163
|
+
z8.iso.datetime().transform((s) => new Date(s))
|
|
164
|
+
]),
|
|
165
|
+
pictureId: z8.lazy(() => PictureIdSchema).nullable()
|
|
166
|
+
}).strip();
|
|
167
|
+
var CreateGuideSchema = GuideSchema.pick({
|
|
168
|
+
name: true
|
|
169
|
+
}).strip();
|
|
170
|
+
var UpdateGuideSchema = CreateGuideSchema;
|
|
171
|
+
var GuideListSchema = z8.array(GuideSchema);
|
|
172
|
+
|
|
173
|
+
// src/schema/event.ts
|
|
174
|
+
import { z as z9 } from "zod";
|
|
175
|
+
var EventIdSchema = z9.uuid().transform((id) => id);
|
|
176
|
+
var EventIdListSchema = z9.array(EventIdSchema);
|
|
177
|
+
var EventSchema = z9.object({
|
|
178
|
+
id: EventIdSchema,
|
|
179
|
+
name: z9.string().min(1).max(255),
|
|
180
|
+
about: z9.string().min(0).max(1024),
|
|
181
|
+
createdAt: z9.union([
|
|
182
|
+
z9.date(),
|
|
183
|
+
z9.iso.datetime().transform((s) => new Date(s))
|
|
184
|
+
]),
|
|
185
|
+
updatedAt: z9.union([
|
|
186
|
+
z9.date(),
|
|
187
|
+
z9.iso.datetime().transform((s) => new Date(s))
|
|
188
|
+
]),
|
|
189
|
+
startTime: z9.iso.datetime().transform((s) => new Date(s)),
|
|
190
|
+
endTime: z9.iso.datetime().transform((s) => new Date(s)),
|
|
191
|
+
pictureId: z9.lazy(() => PictureIdSchema.nullable())
|
|
192
|
+
}).strip();
|
|
193
|
+
var CreateEventSchema = EventSchema.pick({
|
|
194
|
+
name: true,
|
|
195
|
+
about: true,
|
|
196
|
+
startTime: true,
|
|
197
|
+
endTime: true
|
|
198
|
+
}).strip();
|
|
199
|
+
var UpdateEventSchema = CreateEventSchema;
|
|
200
|
+
var EventListSchema = z9.array(EventSchema);
|
|
201
|
+
|
|
202
|
+
// src/schema/auth.ts
|
|
203
|
+
import { z as z10 } from "zod";
|
|
204
|
+
var CredentialsSchema = z10.object({
|
|
205
|
+
email: z10.email().transform((e) => e.toLowerCase()),
|
|
206
|
+
password: z10.string().min(8).max(32)
|
|
207
|
+
}).strip();
|
|
208
|
+
|
|
209
|
+
// src/schema/museum.ts
|
|
210
|
+
import { z as z11 } from "zod";
|
|
211
|
+
var MuseumIdSchema = z11.uuid().transform((id) => id);
|
|
212
|
+
var MuseumIdListSchema = z11.array(MuseumIdSchema);
|
|
213
|
+
var MuseumSchema = z11.object({
|
|
214
|
+
id: MuseumIdSchema,
|
|
215
|
+
name: z11.string().min(1).max(255),
|
|
216
|
+
createdAt: z11.union([
|
|
217
|
+
z11.date(),
|
|
218
|
+
z11.iso.datetime().transform((s) => new Date(s))
|
|
219
|
+
]),
|
|
220
|
+
updatedAt: z11.union([
|
|
221
|
+
z11.date(),
|
|
222
|
+
z11.iso.datetime().transform((s) => new Date(s))
|
|
223
|
+
]),
|
|
224
|
+
startTime: z11.iso.datetime().transform((s) => new Date(s)),
|
|
225
|
+
endTime: z11.iso.datetime().transform((s) => new Date(s))
|
|
226
|
+
}).strip();
|
|
227
|
+
var CreateMuseumSchema = MuseumSchema.pick({
|
|
228
|
+
name: true,
|
|
229
|
+
startTime: true,
|
|
230
|
+
endTime: true
|
|
231
|
+
}).strip();
|
|
232
|
+
var UpdateMuseumSchema = CreateMuseumSchema;
|
|
233
|
+
var MuseumListSchema = z11.array(MuseumSchema);
|
|
234
|
+
|
|
235
|
+
// src/repository/museum/article.ts
|
|
236
|
+
var ArticleRepository = class {
|
|
237
|
+
baseURL;
|
|
238
|
+
constructor(baseURL, museumId) {
|
|
239
|
+
this.baseURL = `${baseURL}/museums/${museumId}/articles`;
|
|
240
|
+
}
|
|
241
|
+
async collect() {
|
|
242
|
+
const url = `${this.baseURL}`;
|
|
243
|
+
const response = await fetch(url, {
|
|
244
|
+
method: "GET",
|
|
245
|
+
credentials: "include"
|
|
246
|
+
});
|
|
247
|
+
if (!response.ok) {
|
|
248
|
+
throw new Error(response.statusText);
|
|
249
|
+
}
|
|
250
|
+
return ArticleListSchema.parse(await response.json());
|
|
251
|
+
}
|
|
252
|
+
async get(id) {
|
|
253
|
+
const url = `${this.baseURL}/${id}`;
|
|
254
|
+
const response = await fetch(url, {
|
|
255
|
+
method: "GET",
|
|
256
|
+
credentials: "include"
|
|
257
|
+
});
|
|
258
|
+
if (!response.ok) {
|
|
259
|
+
throw new Error(response.statusText);
|
|
260
|
+
}
|
|
261
|
+
return ArticleSchema.parse(await response.json());
|
|
262
|
+
}
|
|
263
|
+
async create(article) {
|
|
264
|
+
const url = `${this.baseURL}`;
|
|
265
|
+
const response = await fetch(url, {
|
|
266
|
+
method: "POST",
|
|
267
|
+
headers: { "Content-Type": "application/json" },
|
|
268
|
+
credentials: "include",
|
|
269
|
+
body: JSON.stringify(article)
|
|
270
|
+
});
|
|
271
|
+
if (!response.ok) {
|
|
272
|
+
throw new Error(response.statusText);
|
|
273
|
+
}
|
|
274
|
+
return ArticleSchema.parse(await response.json());
|
|
275
|
+
}
|
|
276
|
+
async update(id, article) {
|
|
277
|
+
const url = `${this.baseURL}/${id}`;
|
|
278
|
+
const response = await fetch(url, {
|
|
279
|
+
method: "PATCH",
|
|
280
|
+
headers: { "Content-Type": "application/json" },
|
|
281
|
+
credentials: "include",
|
|
282
|
+
body: JSON.stringify(article)
|
|
283
|
+
});
|
|
284
|
+
if (!response.ok) {
|
|
285
|
+
throw new Error(response.statusText);
|
|
286
|
+
}
|
|
287
|
+
return ArticleSchema.parse(await response.json());
|
|
288
|
+
}
|
|
289
|
+
async delete(id) {
|
|
290
|
+
const url = `${this.baseURL}/${id}`;
|
|
291
|
+
const response = await fetch(url, {
|
|
292
|
+
method: "DELETE",
|
|
293
|
+
headers: { "Content-Type": "application/json" },
|
|
294
|
+
credentials: "include",
|
|
295
|
+
body: JSON.stringify({})
|
|
296
|
+
});
|
|
297
|
+
if (!response.ok) {
|
|
298
|
+
throw new Error(response.statusText);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
async setPublished(id, published) {
|
|
302
|
+
const url = `${this.baseURL}/${id}/published`;
|
|
303
|
+
const response = await fetch(url, {
|
|
304
|
+
method: "PATCH",
|
|
305
|
+
headers: { "Content-Type": "application/json" },
|
|
306
|
+
credentials: "include",
|
|
307
|
+
body: JSON.stringify({ published })
|
|
308
|
+
});
|
|
309
|
+
if (!response.ok) {
|
|
310
|
+
throw new Error(response.statusText);
|
|
311
|
+
}
|
|
312
|
+
return ArticleSchema.parse(await response.json());
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
// src/repository/museum/area.ts
|
|
317
|
+
var AreaRepository = class {
|
|
318
|
+
baseURL;
|
|
319
|
+
constructor(baseURL, museumId) {
|
|
320
|
+
this.baseURL = `${baseURL}/museums/${museumId}/areas`;
|
|
321
|
+
}
|
|
322
|
+
async collect() {
|
|
323
|
+
const url = `${this.baseURL}`;
|
|
324
|
+
const response = await fetch(url, {
|
|
325
|
+
method: "GET",
|
|
326
|
+
credentials: "include"
|
|
327
|
+
});
|
|
328
|
+
if (!response.ok) {
|
|
329
|
+
throw new Error(response.statusText);
|
|
330
|
+
}
|
|
331
|
+
return AreaListSchema.parse(await response.json());
|
|
332
|
+
}
|
|
333
|
+
async get(id) {
|
|
334
|
+
const url = `${this.baseURL}/${id}`;
|
|
335
|
+
const response = await fetch(url, {
|
|
336
|
+
method: "GET",
|
|
337
|
+
headers: { "Content-Type": "application/json" },
|
|
338
|
+
credentials: "include"
|
|
339
|
+
});
|
|
340
|
+
if (!response.ok) {
|
|
341
|
+
throw new Error(response.statusText);
|
|
342
|
+
}
|
|
343
|
+
return AreaSchema.parse(await response.json());
|
|
344
|
+
}
|
|
345
|
+
async create(area) {
|
|
346
|
+
const url = `${this.baseURL}`;
|
|
347
|
+
const response = await fetch(url, {
|
|
348
|
+
method: "POST",
|
|
349
|
+
headers: { "Content-Type": "application/json" },
|
|
350
|
+
credentials: "include",
|
|
351
|
+
body: JSON.stringify(area)
|
|
352
|
+
});
|
|
353
|
+
if (!response.ok) {
|
|
354
|
+
throw new Error(response.statusText);
|
|
355
|
+
}
|
|
356
|
+
return AreaSchema.parse(await response.json());
|
|
357
|
+
}
|
|
358
|
+
async update(id, area) {
|
|
359
|
+
const url = `${this.baseURL}/${id}`;
|
|
360
|
+
const response = await fetch(url, {
|
|
361
|
+
method: "PATCH",
|
|
362
|
+
headers: { "Content-Type": "application/json" },
|
|
363
|
+
credentials: "include",
|
|
364
|
+
body: JSON.stringify(area)
|
|
365
|
+
});
|
|
366
|
+
if (!response.ok) {
|
|
367
|
+
throw new Error(response.statusText);
|
|
368
|
+
}
|
|
369
|
+
return AreaSchema.parse(await response.json());
|
|
370
|
+
}
|
|
371
|
+
async delete(id) {
|
|
372
|
+
const url = `${this.baseURL}/${id}`;
|
|
373
|
+
const response = await fetch(url, {
|
|
374
|
+
method: "DELETE",
|
|
375
|
+
headers: { "Content-Type": "application/json" },
|
|
376
|
+
credentials: "include",
|
|
377
|
+
body: JSON.stringify({})
|
|
378
|
+
});
|
|
379
|
+
if (!response.ok) {
|
|
380
|
+
throw new Error(response.statusText);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
// src/repository/museum/spot.ts
|
|
386
|
+
var SpotRepository = class {
|
|
387
|
+
baseURL;
|
|
388
|
+
constructor(baseURL, museumId) {
|
|
389
|
+
this.baseURL = `${baseURL}/museums/${museumId}/spots`;
|
|
390
|
+
}
|
|
391
|
+
async collect() {
|
|
392
|
+
const url = `${this.baseURL}`;
|
|
393
|
+
const response = await fetch(url, {
|
|
394
|
+
method: "GET",
|
|
395
|
+
credentials: "include"
|
|
396
|
+
});
|
|
397
|
+
if (!response.ok) {
|
|
398
|
+
throw new Error(response.statusText);
|
|
399
|
+
}
|
|
400
|
+
return SpotListSchema.parse(await response.json());
|
|
401
|
+
}
|
|
402
|
+
async get(id) {
|
|
403
|
+
const url = `${this.baseURL}/${id}`;
|
|
404
|
+
const response = await fetch(url, {
|
|
405
|
+
method: "GET",
|
|
406
|
+
credentials: "include"
|
|
407
|
+
});
|
|
408
|
+
if (!response.ok) {
|
|
409
|
+
throw new Error(response.statusText);
|
|
410
|
+
}
|
|
411
|
+
return SpotSchema.parse(await response.json());
|
|
412
|
+
}
|
|
413
|
+
async create(spot) {
|
|
414
|
+
const url = `${this.baseURL}`;
|
|
415
|
+
const response = await fetch(url, {
|
|
416
|
+
method: "POST",
|
|
417
|
+
headers: { "Content-Type": "application/json" },
|
|
418
|
+
credentials: "include",
|
|
419
|
+
body: JSON.stringify(spot)
|
|
420
|
+
});
|
|
421
|
+
if (!response.ok) {
|
|
422
|
+
throw new Error(response.statusText);
|
|
423
|
+
}
|
|
424
|
+
return SpotSchema.parse(await response.json());
|
|
425
|
+
}
|
|
426
|
+
async update(id, spot) {
|
|
427
|
+
const url = `${this.baseURL}/${id}`;
|
|
428
|
+
const response = await fetch(url, {
|
|
429
|
+
method: "PATCH",
|
|
430
|
+
headers: { "Content-Type": "application/json" },
|
|
431
|
+
credentials: "include",
|
|
432
|
+
body: JSON.stringify(spot)
|
|
433
|
+
});
|
|
434
|
+
if (!response.ok) {
|
|
435
|
+
throw new Error(response.statusText);
|
|
436
|
+
}
|
|
437
|
+
return SpotSchema.parse(await response.json());
|
|
438
|
+
}
|
|
439
|
+
async delete(id) {
|
|
440
|
+
const url = `${this.baseURL}/${id}`;
|
|
441
|
+
const response = await fetch(url, {
|
|
442
|
+
method: "DELETE",
|
|
443
|
+
headers: { "Content-Type": "application/json" },
|
|
444
|
+
credentials: "include",
|
|
445
|
+
body: JSON.stringify({})
|
|
446
|
+
});
|
|
447
|
+
if (!response.ok) {
|
|
448
|
+
throw new Error(response.statusText);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
// src/repository/museum/tag.ts
|
|
454
|
+
var TagRepository = class {
|
|
455
|
+
baseURL;
|
|
456
|
+
constructor(baseURL, museumId) {
|
|
457
|
+
this.baseURL = `${baseURL}/museums/${museumId}/tags`;
|
|
458
|
+
}
|
|
459
|
+
async collect() {
|
|
460
|
+
const url = `${this.baseURL}`;
|
|
461
|
+
const response = await fetch(url, {
|
|
462
|
+
method: "GET",
|
|
463
|
+
credentials: "include"
|
|
464
|
+
});
|
|
465
|
+
if (!response.ok) {
|
|
466
|
+
throw new Error(response.statusText);
|
|
467
|
+
}
|
|
468
|
+
return TagListSchema.parse(await response.json());
|
|
469
|
+
}
|
|
470
|
+
async get(id) {
|
|
471
|
+
const url = `${this.baseURL}/${id}`;
|
|
472
|
+
const response = await fetch(url, {
|
|
473
|
+
method: "GET",
|
|
474
|
+
credentials: "include"
|
|
475
|
+
});
|
|
476
|
+
if (!response.ok) {
|
|
477
|
+
throw new Error(response.statusText);
|
|
478
|
+
}
|
|
479
|
+
return TagSchema.parse(await response.json());
|
|
480
|
+
}
|
|
481
|
+
async create(tag) {
|
|
482
|
+
const url = `${this.baseURL}`;
|
|
483
|
+
const response = await fetch(url, {
|
|
484
|
+
method: "POST",
|
|
485
|
+
headers: { "Content-Type": "application/json" },
|
|
486
|
+
credentials: "include",
|
|
487
|
+
body: JSON.stringify(tag)
|
|
488
|
+
});
|
|
489
|
+
if (!response.ok) {
|
|
490
|
+
throw new Error(response.statusText);
|
|
491
|
+
}
|
|
492
|
+
return TagSchema.parse(await response.json());
|
|
493
|
+
}
|
|
494
|
+
async update(id, tag) {
|
|
495
|
+
const url = `${this.baseURL}/${id}`;
|
|
496
|
+
const response = await fetch(url, {
|
|
497
|
+
method: "PATCH",
|
|
498
|
+
headers: { "Content-Type": "application/json" },
|
|
499
|
+
credentials: "include",
|
|
500
|
+
body: JSON.stringify(tag)
|
|
501
|
+
});
|
|
502
|
+
if (!response.ok) {
|
|
503
|
+
throw new Error(response.statusText);
|
|
504
|
+
}
|
|
505
|
+
return TagSchema.parse(await response.json());
|
|
506
|
+
}
|
|
507
|
+
async delete(id) {
|
|
508
|
+
const url = `${this.baseURL}/${id}`;
|
|
509
|
+
const response = await fetch(url, {
|
|
510
|
+
method: "DELETE",
|
|
511
|
+
headers: { "Content-Type": "application/json" },
|
|
512
|
+
credentials: "include",
|
|
513
|
+
body: JSON.stringify({})
|
|
514
|
+
});
|
|
515
|
+
if (!response.ok) {
|
|
516
|
+
throw new Error(response.statusText);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
// src/repository/museum/audio.ts
|
|
522
|
+
var AudioRepository = class {
|
|
523
|
+
baseURL;
|
|
524
|
+
constructor(baseURL, museumId) {
|
|
525
|
+
this.baseURL = `${baseURL}/museums/${museumId}/audios`;
|
|
526
|
+
}
|
|
527
|
+
async collect() {
|
|
528
|
+
const url = `${this.baseURL}`;
|
|
529
|
+
const response = await fetch(url, {
|
|
530
|
+
method: "GET",
|
|
531
|
+
credentials: "include"
|
|
532
|
+
});
|
|
533
|
+
if (!response.ok) {
|
|
534
|
+
throw new Error(response.statusText);
|
|
535
|
+
}
|
|
536
|
+
return AudioListSchema.parse(await response.json());
|
|
537
|
+
}
|
|
538
|
+
async get(id) {
|
|
539
|
+
const url = `${this.baseURL}/${id}`;
|
|
540
|
+
const response = await fetch(url, {
|
|
541
|
+
method: "GET",
|
|
542
|
+
credentials: "include"
|
|
543
|
+
});
|
|
544
|
+
if (!response.ok) {
|
|
545
|
+
throw new Error(response.statusText);
|
|
546
|
+
}
|
|
547
|
+
return AudioSchema.parse(await response.json());
|
|
548
|
+
}
|
|
549
|
+
async create(file) {
|
|
550
|
+
const formData = new FormData();
|
|
551
|
+
formData.append("file", file);
|
|
552
|
+
const url = `${this.baseURL}`;
|
|
553
|
+
const response = await fetch(url, {
|
|
554
|
+
method: "POST",
|
|
555
|
+
credentials: "include",
|
|
556
|
+
body: formData
|
|
557
|
+
});
|
|
558
|
+
if (!response.ok) {
|
|
559
|
+
throw new Error(response.statusText);
|
|
560
|
+
}
|
|
561
|
+
return AudioSchema.parse(await response.json());
|
|
562
|
+
}
|
|
563
|
+
async delete(id) {
|
|
564
|
+
const url = `${this.baseURL}/${id}`;
|
|
565
|
+
const response = await fetch(url, {
|
|
566
|
+
method: "DELETE",
|
|
567
|
+
headers: { "Content-Type": "application/json" },
|
|
568
|
+
credentials: "include",
|
|
569
|
+
body: JSON.stringify({})
|
|
570
|
+
});
|
|
571
|
+
if (!response.ok) {
|
|
572
|
+
throw new Error(response.statusText);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
embed(id) {
|
|
576
|
+
return `${this.baseURL}/${id}/embed`;
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
// src/repository/museum/picture.ts
|
|
581
|
+
var PictureRepository = class {
|
|
582
|
+
baseURL;
|
|
583
|
+
constructor(baseURL, museumId) {
|
|
584
|
+
this.baseURL = `${baseURL}/museums/${museumId}/pictures`;
|
|
585
|
+
}
|
|
586
|
+
async collect() {
|
|
587
|
+
const url = `${this.baseURL}`;
|
|
588
|
+
const response = await fetch(url, {
|
|
589
|
+
method: "GET",
|
|
590
|
+
credentials: "include"
|
|
591
|
+
});
|
|
592
|
+
if (!response.ok) {
|
|
593
|
+
throw new Error(response.statusText);
|
|
594
|
+
}
|
|
595
|
+
return PictureListSchema.parse(await response.json());
|
|
596
|
+
}
|
|
597
|
+
async get(id) {
|
|
598
|
+
const url = `${this.baseURL}/${id}`;
|
|
599
|
+
const response = await fetch(url, {
|
|
600
|
+
method: "GET",
|
|
601
|
+
credentials: "include"
|
|
602
|
+
});
|
|
603
|
+
if (!response.ok) {
|
|
604
|
+
throw new Error(response.statusText);
|
|
605
|
+
}
|
|
606
|
+
return PictureSchema.parse(await response.json());
|
|
607
|
+
}
|
|
608
|
+
async create(file) {
|
|
609
|
+
const formData = new FormData();
|
|
610
|
+
formData.append("file", file);
|
|
611
|
+
const url = `${this.baseURL}`;
|
|
612
|
+
const response = await fetch(url, {
|
|
613
|
+
method: "POST",
|
|
614
|
+
credentials: "include",
|
|
615
|
+
body: formData
|
|
616
|
+
});
|
|
617
|
+
if (!response.ok) {
|
|
618
|
+
throw new Error(response.statusText);
|
|
619
|
+
}
|
|
620
|
+
return PictureSchema.parse(await response.json());
|
|
621
|
+
}
|
|
622
|
+
async delete(id) {
|
|
623
|
+
const url = `${this.baseURL}/${id}`;
|
|
624
|
+
const response = await fetch(url, {
|
|
625
|
+
method: "DELETE",
|
|
626
|
+
headers: { "Content-Type": "application/json" },
|
|
627
|
+
credentials: "include",
|
|
628
|
+
body: JSON.stringify({})
|
|
629
|
+
});
|
|
630
|
+
if (!response.ok) {
|
|
631
|
+
throw new Error(response.statusText);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
embed(id) {
|
|
635
|
+
return `${this.baseURL}/${id}/embed`;
|
|
636
|
+
}
|
|
637
|
+
};
|
|
638
|
+
|
|
639
|
+
// src/repository/museum/guide.ts
|
|
640
|
+
var GuideRepository = class {
|
|
641
|
+
baseURL;
|
|
642
|
+
constructor(baseURL, museumId) {
|
|
643
|
+
this.baseURL = `${baseURL}/museums/${museumId}/guides`;
|
|
644
|
+
}
|
|
645
|
+
async collect() {
|
|
646
|
+
const url = `${this.baseURL}`;
|
|
647
|
+
const response = await fetch(url, {
|
|
648
|
+
method: "GET",
|
|
649
|
+
credentials: "include"
|
|
650
|
+
});
|
|
651
|
+
if (!response.ok) {
|
|
652
|
+
throw new Error(response.statusText);
|
|
653
|
+
}
|
|
654
|
+
return GuideListSchema.parse(await response.json());
|
|
655
|
+
}
|
|
656
|
+
async get(id) {
|
|
657
|
+
const url = `${this.baseURL}/${id}`;
|
|
658
|
+
const response = await fetch(url, {
|
|
659
|
+
method: "GET",
|
|
660
|
+
credentials: "include"
|
|
661
|
+
});
|
|
662
|
+
if (!response.ok) {
|
|
663
|
+
throw new Error(response.statusText);
|
|
664
|
+
}
|
|
665
|
+
return GuideSchema.parse(await response.json());
|
|
666
|
+
}
|
|
667
|
+
async create(guide) {
|
|
668
|
+
const url = `${this.baseURL}`;
|
|
669
|
+
const response = await fetch(url, {
|
|
670
|
+
method: "POST",
|
|
671
|
+
headers: { "Content-Type": "application/json" },
|
|
672
|
+
credentials: "include",
|
|
673
|
+
body: JSON.stringify(guide)
|
|
674
|
+
});
|
|
675
|
+
if (!response.ok) {
|
|
676
|
+
throw new Error(response.statusText);
|
|
677
|
+
}
|
|
678
|
+
return GuideSchema.parse(await response.json());
|
|
679
|
+
}
|
|
680
|
+
async update(id, guide) {
|
|
681
|
+
const url = `${this.baseURL}/${id}`;
|
|
682
|
+
const response = await fetch(url, {
|
|
683
|
+
method: "PATCH",
|
|
684
|
+
headers: { "Content-Type": "application/json" },
|
|
685
|
+
credentials: "include",
|
|
686
|
+
body: JSON.stringify(guide)
|
|
687
|
+
});
|
|
688
|
+
if (!response.ok) {
|
|
689
|
+
throw new Error(response.statusText);
|
|
690
|
+
}
|
|
691
|
+
return GuideSchema.parse(await response.json());
|
|
692
|
+
}
|
|
693
|
+
async delete(id) {
|
|
694
|
+
const url = `${this.baseURL}/${id}`;
|
|
695
|
+
const response = await fetch(url, {
|
|
696
|
+
method: "DELETE",
|
|
697
|
+
headers: { "Content-Type": "application/json" },
|
|
698
|
+
credentials: "include",
|
|
699
|
+
body: JSON.stringify({})
|
|
700
|
+
});
|
|
701
|
+
if (!response.ok) {
|
|
702
|
+
throw new Error(response.statusText);
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
};
|
|
706
|
+
|
|
707
|
+
// src/repository/museum/event.ts
|
|
708
|
+
var EventRepository = class {
|
|
709
|
+
baseURL;
|
|
710
|
+
constructor(baseURL, museumId) {
|
|
711
|
+
this.baseURL = `${baseURL}/museums/${museumId}/events`;
|
|
712
|
+
}
|
|
713
|
+
async collect() {
|
|
714
|
+
const url = `${this.baseURL}`;
|
|
715
|
+
const response = await fetch(url, {
|
|
716
|
+
method: "GET",
|
|
717
|
+
credentials: "include"
|
|
718
|
+
});
|
|
719
|
+
return EventListSchema.parse(await response.json());
|
|
720
|
+
}
|
|
721
|
+
async get(id) {
|
|
722
|
+
const url = `${this.baseURL}/${id}`;
|
|
723
|
+
const response = await fetch(url, {
|
|
724
|
+
method: "GET",
|
|
725
|
+
credentials: "include"
|
|
726
|
+
});
|
|
727
|
+
if (!response.ok) {
|
|
728
|
+
throw new Error(response.statusText);
|
|
729
|
+
}
|
|
730
|
+
return EventSchema.parse(await response.json());
|
|
731
|
+
}
|
|
732
|
+
async create(event) {
|
|
733
|
+
const url = `${this.baseURL}`;
|
|
734
|
+
const response = await fetch(url, {
|
|
735
|
+
method: "POST",
|
|
736
|
+
headers: { "Content-Type": "application/json" },
|
|
737
|
+
credentials: "include",
|
|
738
|
+
body: JSON.stringify(event)
|
|
739
|
+
});
|
|
740
|
+
if (!response.ok) {
|
|
741
|
+
throw new Error(response.statusText);
|
|
742
|
+
}
|
|
743
|
+
return EventSchema.parse(await response.json());
|
|
744
|
+
}
|
|
745
|
+
async update(id, event) {
|
|
746
|
+
const url = `${this.baseURL}/${id}`;
|
|
747
|
+
const response = await fetch(url, {
|
|
748
|
+
method: "PATCH",
|
|
749
|
+
headers: { "Content-Type": "application/json" },
|
|
750
|
+
credentials: "include",
|
|
751
|
+
body: JSON.stringify(event)
|
|
752
|
+
});
|
|
753
|
+
if (!response.ok) {
|
|
754
|
+
throw new Error(response.statusText);
|
|
755
|
+
}
|
|
756
|
+
return EventSchema.parse(await response.json());
|
|
757
|
+
}
|
|
758
|
+
async delete(id) {
|
|
759
|
+
const url = `${this.baseURL}/${id}`;
|
|
760
|
+
const response = await fetch(url, {
|
|
761
|
+
method: "DELETE",
|
|
762
|
+
headers: { "Content-Type": "application/json" },
|
|
763
|
+
credentials: "include",
|
|
764
|
+
body: JSON.stringify({})
|
|
765
|
+
});
|
|
766
|
+
if (!response.ok) {
|
|
767
|
+
throw new Error(response.statusText);
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
};
|
|
771
|
+
|
|
772
|
+
// src/repository/museum.ts
|
|
773
|
+
import z12 from "zod";
|
|
774
|
+
var RoleEnum = z12.enum(["admin", "owner", "staff", "guest"]);
|
|
775
|
+
var MuseumRepository = class {
|
|
776
|
+
constructor(baseURL) {
|
|
777
|
+
this.baseURL = baseURL;
|
|
778
|
+
this.baseURL = `${baseURL}/museums`;
|
|
779
|
+
}
|
|
780
|
+
async collect() {
|
|
781
|
+
const url = `${this.baseURL}`;
|
|
782
|
+
const response = await fetch(url, {
|
|
783
|
+
method: "GET",
|
|
784
|
+
credentials: "include"
|
|
785
|
+
});
|
|
786
|
+
if (!response.ok) {
|
|
787
|
+
throw new Error(response.statusText);
|
|
788
|
+
}
|
|
789
|
+
return MuseumListSchema.parse(await response.json());
|
|
790
|
+
}
|
|
791
|
+
async get(id) {
|
|
792
|
+
const url = `${this.baseURL}/${id}`;
|
|
793
|
+
const response = await fetch(url, {
|
|
794
|
+
method: "GET",
|
|
795
|
+
credentials: "include"
|
|
796
|
+
});
|
|
797
|
+
if (!response.ok) {
|
|
798
|
+
throw new Error(response.statusText);
|
|
799
|
+
}
|
|
800
|
+
return MuseumSchema.parse(await response.json());
|
|
801
|
+
}
|
|
802
|
+
async create(museum) {
|
|
803
|
+
const url = `${this.baseURL}`;
|
|
804
|
+
const response = await fetch(url, {
|
|
805
|
+
method: "POST",
|
|
806
|
+
headers: { "Content-Type": "application/json" },
|
|
807
|
+
credentials: "include",
|
|
808
|
+
body: JSON.stringify(museum)
|
|
809
|
+
});
|
|
810
|
+
if (!response.ok) {
|
|
811
|
+
throw new Error(response.statusText);
|
|
812
|
+
}
|
|
813
|
+
return MuseumSchema.parse(await response.json());
|
|
814
|
+
}
|
|
815
|
+
async update(id, museum) {
|
|
816
|
+
const url = `${this.baseURL}/${id}`;
|
|
817
|
+
const response = await fetch(url, {
|
|
818
|
+
method: "PATCH",
|
|
819
|
+
headers: { "Content-Type": "application/json" },
|
|
820
|
+
credentials: "include",
|
|
821
|
+
body: JSON.stringify(museum)
|
|
822
|
+
});
|
|
823
|
+
if (!response.ok) {
|
|
824
|
+
throw new Error(response.statusText);
|
|
825
|
+
}
|
|
826
|
+
return MuseumSchema.parse(await response.json());
|
|
827
|
+
}
|
|
828
|
+
async delete(id) {
|
|
829
|
+
const url = `${this.baseURL}/${id}`;
|
|
830
|
+
const response = await fetch(url, {
|
|
831
|
+
method: "DELETE",
|
|
832
|
+
credentials: "include"
|
|
833
|
+
});
|
|
834
|
+
if (!response.ok) {
|
|
835
|
+
throw new Error(response.statusText);
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
async invite(museumId, email) {
|
|
839
|
+
const url = `${this.baseURL}/${museumId}/users`;
|
|
840
|
+
const response = await fetch(url, {
|
|
841
|
+
method: "POST",
|
|
842
|
+
headers: { "Content-Type": "application/json" },
|
|
843
|
+
credentials: "include",
|
|
844
|
+
body: JSON.stringify(email)
|
|
845
|
+
});
|
|
846
|
+
if (!response.ok) {
|
|
847
|
+
throw new Error(response.statusText);
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
async reject(museumId, userId) {
|
|
851
|
+
const url = `${this.baseURL}/${museumId}/users/${userId}`;
|
|
852
|
+
const response = await fetch(url, {
|
|
853
|
+
method: "DELETE",
|
|
854
|
+
credentials: "include"
|
|
855
|
+
});
|
|
856
|
+
if (!response.ok) {
|
|
857
|
+
throw new Error(response.statusText);
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
async everyone(museumId) {
|
|
861
|
+
const url = `${this.baseURL}/${museumId}/users`;
|
|
862
|
+
const response = await fetch(url, {
|
|
863
|
+
method: "GET",
|
|
864
|
+
credentials: "include"
|
|
865
|
+
});
|
|
866
|
+
if (!response.ok) {
|
|
867
|
+
throw new Error(response.statusText);
|
|
868
|
+
}
|
|
869
|
+
return UserListSchema.parse(await response.json());
|
|
870
|
+
}
|
|
871
|
+
async getThumbnail(museumId) {
|
|
872
|
+
const url = `${this.baseURL}/${museumId}/thumbnail-picture`;
|
|
873
|
+
const response = await fetch(url, {
|
|
874
|
+
method: "GET",
|
|
875
|
+
credentials: "include"
|
|
876
|
+
});
|
|
877
|
+
if (!response.ok) {
|
|
878
|
+
throw new Error(response.statusText);
|
|
879
|
+
}
|
|
880
|
+
return PictureSchema.parse(await response.json());
|
|
881
|
+
}
|
|
882
|
+
async setThumbnail(museumId, pictureId) {
|
|
883
|
+
const url = `${this.baseURL}/${museumId}/thumbnail-picture`;
|
|
884
|
+
const response = await fetch(url, {
|
|
885
|
+
method: "PUT",
|
|
886
|
+
headers: {
|
|
887
|
+
"Content-Type": "application/json"
|
|
888
|
+
},
|
|
889
|
+
credentials: "include",
|
|
890
|
+
body: JSON.stringify(pictureId)
|
|
891
|
+
});
|
|
892
|
+
if (!response.ok) {
|
|
893
|
+
throw new Error(response.statusText);
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
async deleteThumbnail(museumId) {
|
|
897
|
+
const url = `${this.baseURL}/${museumId}/thumbnail-picture`;
|
|
898
|
+
const response = await fetch(url, {
|
|
899
|
+
method: "DELETE",
|
|
900
|
+
headers: { "Content-Type": "application/json" },
|
|
901
|
+
credentials: "include",
|
|
902
|
+
body: JSON.stringify({})
|
|
903
|
+
});
|
|
904
|
+
if (!response.ok) {
|
|
905
|
+
throw new Error(response.statusText);
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
async getOwnerships(museumId) {
|
|
909
|
+
const url = `${this.baseURL}/${museumId}/users/ownership`;
|
|
910
|
+
const response = await fetch(url, {
|
|
911
|
+
method: "GET",
|
|
912
|
+
credentials: "include"
|
|
913
|
+
});
|
|
914
|
+
if (!response.ok) {
|
|
915
|
+
throw new Error(response.statusText);
|
|
916
|
+
}
|
|
917
|
+
return UserListSchema.parse(await response.json());
|
|
918
|
+
}
|
|
919
|
+
async grant(museumId, userId) {
|
|
920
|
+
const url = `${this.baseURL}/${museumId}/users/${userId}/ownership`;
|
|
921
|
+
const response = await fetch(url, {
|
|
922
|
+
method: "POST",
|
|
923
|
+
credentials: "include"
|
|
924
|
+
});
|
|
925
|
+
if (!response.ok) {
|
|
926
|
+
throw new Error(response.statusText);
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
async revoke(museumId, userId) {
|
|
930
|
+
const url = `${this.baseURL}/${museumId}/users/${userId}/ownership`;
|
|
931
|
+
const response = await fetch(url, {
|
|
932
|
+
method: "DELETE",
|
|
933
|
+
credentials: "include"
|
|
934
|
+
});
|
|
935
|
+
if (!response.ok) {
|
|
936
|
+
throw new Error(response.statusText);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
async getRole(museumId, userId) {
|
|
940
|
+
const url = `${this.baseURL}/${museumId}/users/${userId}/role`;
|
|
941
|
+
const response = await fetch(url, {
|
|
942
|
+
method: "GET",
|
|
943
|
+
credentials: "include"
|
|
944
|
+
});
|
|
945
|
+
if (!response.ok) {
|
|
946
|
+
throw new Error(response.statusText);
|
|
947
|
+
}
|
|
948
|
+
return RoleEnum.parse(await response.json());
|
|
949
|
+
}
|
|
950
|
+
};
|
|
951
|
+
|
|
952
|
+
// src/repository/user.ts
|
|
953
|
+
var UserRepository = class {
|
|
954
|
+
constructor(baseURL) {
|
|
955
|
+
this.baseURL = baseURL;
|
|
956
|
+
}
|
|
957
|
+
async get(userId) {
|
|
958
|
+
const url = `${this.baseURL}/users/${userId}`;
|
|
959
|
+
const response = await fetch(url, {
|
|
960
|
+
method: "GET",
|
|
961
|
+
headers: { "Content-Type": "application/json" },
|
|
962
|
+
credentials: "include"
|
|
963
|
+
});
|
|
964
|
+
if (!response.ok) {
|
|
965
|
+
throw new Error(response.statusText);
|
|
966
|
+
}
|
|
967
|
+
return UserSchema.parse(await response.json());
|
|
968
|
+
}
|
|
969
|
+
async getMe() {
|
|
970
|
+
const url = `${this.baseURL}/users/me`;
|
|
971
|
+
const response = await fetch(url, {
|
|
972
|
+
method: "GET",
|
|
973
|
+
headers: { "Content-Type": "application/json" },
|
|
974
|
+
credentials: "include"
|
|
975
|
+
});
|
|
976
|
+
if (!response.ok) {
|
|
977
|
+
throw new Error(response.statusText);
|
|
978
|
+
}
|
|
979
|
+
return UserSchema.parse(await response.json());
|
|
980
|
+
}
|
|
981
|
+
async getMuseums() {
|
|
982
|
+
const url = `${this.baseURL}/users/me/museums`;
|
|
983
|
+
const response = await fetch(url, {
|
|
984
|
+
method: "GET",
|
|
985
|
+
headers: { "Content-Type": "application/json" },
|
|
986
|
+
credentials: "include"
|
|
987
|
+
});
|
|
988
|
+
if (!response.ok) {
|
|
989
|
+
throw new Error(response.statusText);
|
|
990
|
+
}
|
|
991
|
+
return MuseumListSchema.parse(await response.json());
|
|
992
|
+
}
|
|
993
|
+
async delete(userId) {
|
|
994
|
+
const url = `${this.baseURL}/users/${userId}`;
|
|
995
|
+
const response = await fetch(url, {
|
|
996
|
+
method: "DELETE",
|
|
997
|
+
headers: { "Content-Type": "application/json" },
|
|
998
|
+
credentials: "include",
|
|
999
|
+
body: JSON.stringify({})
|
|
1000
|
+
});
|
|
1001
|
+
if (!response.ok) {
|
|
1002
|
+
throw new Error(response.statusText);
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
// isAdminの変更が必要なら変更
|
|
1006
|
+
async getRole(userId) {
|
|
1007
|
+
const url = `${this.baseURL}/users/${userId}/role`;
|
|
1008
|
+
const response = await fetch(url, {
|
|
1009
|
+
method: "GET",
|
|
1010
|
+
headers: { "Content-Type": "application/json" },
|
|
1011
|
+
credentials: "include"
|
|
1012
|
+
});
|
|
1013
|
+
if (!response.ok) {
|
|
1014
|
+
throw new Error(response.statusText);
|
|
1015
|
+
}
|
|
1016
|
+
const data = await response.json();
|
|
1017
|
+
return { isAdmin: data === "admin" };
|
|
1018
|
+
}
|
|
1019
|
+
};
|
|
1020
|
+
|
|
1021
|
+
// src/repository/auth.ts
|
|
1022
|
+
var AuthRepository = class {
|
|
1023
|
+
constructor(baseURL) {
|
|
1024
|
+
this.baseURL = baseURL;
|
|
1025
|
+
}
|
|
1026
|
+
async signup(creds) {
|
|
1027
|
+
const url = `${this.baseURL}/auth/signup`;
|
|
1028
|
+
const response = await fetch(url, {
|
|
1029
|
+
method: "POST",
|
|
1030
|
+
headers: { "Content-Type": "application/json" },
|
|
1031
|
+
credentials: "include",
|
|
1032
|
+
body: JSON.stringify(creds)
|
|
1033
|
+
});
|
|
1034
|
+
if (!response.ok) {
|
|
1035
|
+
throw new Error(response.statusText);
|
|
1036
|
+
}
|
|
1037
|
+
return UserSchema.parse(await response.json());
|
|
1038
|
+
}
|
|
1039
|
+
async signin(creds) {
|
|
1040
|
+
const url = `${this.baseURL}/auth/signin`;
|
|
1041
|
+
const response = await fetch(url, {
|
|
1042
|
+
method: "POST",
|
|
1043
|
+
headers: { "Content-Type": "application/json" },
|
|
1044
|
+
credentials: "include",
|
|
1045
|
+
body: JSON.stringify(creds)
|
|
1046
|
+
});
|
|
1047
|
+
if (!response.ok) {
|
|
1048
|
+
throw new Error(response.statusText);
|
|
1049
|
+
}
|
|
1050
|
+
return UserSchema.parse(await response.json());
|
|
1051
|
+
}
|
|
1052
|
+
async signout() {
|
|
1053
|
+
const url = `${this.baseURL}/auth/signout`;
|
|
1054
|
+
const response = await fetch(url, {
|
|
1055
|
+
method: "POST",
|
|
1056
|
+
credentials: "include"
|
|
1057
|
+
});
|
|
1058
|
+
if (!response.ok) {
|
|
1059
|
+
throw new Error(response.statusText);
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
async refresh() {
|
|
1063
|
+
const url = `${this.baseURL}/auth/refresh`;
|
|
1064
|
+
const response = await fetch(url, {
|
|
1065
|
+
method: "POST",
|
|
1066
|
+
credentials: "include"
|
|
1067
|
+
});
|
|
1068
|
+
if (!response.ok) {
|
|
1069
|
+
throw new Error(response.statusText);
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
async erasure() {
|
|
1073
|
+
const url = `${this.baseURL}/auth/erasure`;
|
|
1074
|
+
const response = await fetch(url, {
|
|
1075
|
+
method: "POST",
|
|
1076
|
+
credentials: "include"
|
|
1077
|
+
});
|
|
1078
|
+
if (!response.ok) {
|
|
1079
|
+
throw new Error(response.statusText);
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
};
|
|
1083
|
+
|
|
1084
|
+
// src/repository/museum/article-audio.ts
|
|
1085
|
+
var ArticleAudioRepository = class {
|
|
1086
|
+
baseURL;
|
|
1087
|
+
constructor(baseURL, museumId, articleId) {
|
|
1088
|
+
this.baseURL = `${baseURL}/museums/${museumId}/articles/${articleId}/audio`;
|
|
1089
|
+
}
|
|
1090
|
+
async get() {
|
|
1091
|
+
const response = await fetch(this.baseURL, {
|
|
1092
|
+
method: "GET",
|
|
1093
|
+
credentials: "include"
|
|
1094
|
+
});
|
|
1095
|
+
if (response.status === 404) {
|
|
1096
|
+
throw new Error("Audio_not_related");
|
|
1097
|
+
}
|
|
1098
|
+
if (!response.ok) {
|
|
1099
|
+
throw new Error(response.statusText);
|
|
1100
|
+
}
|
|
1101
|
+
return AudioSchema.parse(await response.json());
|
|
1102
|
+
}
|
|
1103
|
+
async put(audioId) {
|
|
1104
|
+
const response = await fetch(this.baseURL, {
|
|
1105
|
+
method: "PUT",
|
|
1106
|
+
headers: { "Content-Type": "application/json" },
|
|
1107
|
+
credentials: "include",
|
|
1108
|
+
body: JSON.stringify(audioId)
|
|
1109
|
+
});
|
|
1110
|
+
if (!response.ok) {
|
|
1111
|
+
throw new Error(response.statusText);
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
async delete() {
|
|
1115
|
+
const response = await fetch(this.baseURL, {
|
|
1116
|
+
method: "DELETE",
|
|
1117
|
+
headers: { "Content-Type": "application/json" },
|
|
1118
|
+
credentials: "include",
|
|
1119
|
+
body: JSON.stringify({})
|
|
1120
|
+
});
|
|
1121
|
+
if (!response.ok) {
|
|
1122
|
+
throw new Error(response.statusText);
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
};
|
|
1126
|
+
|
|
1127
|
+
// src/repository/museum/article-spot.ts
|
|
1128
|
+
var ArticleSpotRepository = class {
|
|
1129
|
+
baseURL;
|
|
1130
|
+
constructor(baseURL, museumId, articleId) {
|
|
1131
|
+
this.baseURL = `${baseURL}/museums/${museumId}/articles/${articleId}/spot`;
|
|
1132
|
+
}
|
|
1133
|
+
async get() {
|
|
1134
|
+
const url = `${this.baseURL}`;
|
|
1135
|
+
const response = await fetch(url, {
|
|
1136
|
+
method: "GET",
|
|
1137
|
+
credentials: "include"
|
|
1138
|
+
});
|
|
1139
|
+
if (response.status === 404) {
|
|
1140
|
+
throw new Error("Spot_not_related");
|
|
1141
|
+
}
|
|
1142
|
+
if (!response.ok) {
|
|
1143
|
+
throw new Error(response.statusText);
|
|
1144
|
+
}
|
|
1145
|
+
return SpotSchema.parse(await response.json());
|
|
1146
|
+
}
|
|
1147
|
+
};
|
|
1148
|
+
|
|
1149
|
+
// src/repository/museum/spot-article.ts
|
|
1150
|
+
var SpotArticleRepository = class {
|
|
1151
|
+
baseURL;
|
|
1152
|
+
constructor(baseURL, museumId, spotId) {
|
|
1153
|
+
this.baseURL = `${baseURL}/museums/${museumId}/spots/${spotId}/article`;
|
|
1154
|
+
}
|
|
1155
|
+
async get() {
|
|
1156
|
+
const response = await fetch(this.baseURL, {
|
|
1157
|
+
method: "GET",
|
|
1158
|
+
credentials: "include"
|
|
1159
|
+
});
|
|
1160
|
+
if (!response.ok) {
|
|
1161
|
+
throw new Error(response.statusText);
|
|
1162
|
+
}
|
|
1163
|
+
return ArticleSchema.parse(await response.json());
|
|
1164
|
+
}
|
|
1165
|
+
async put(articleId) {
|
|
1166
|
+
const response = await fetch(this.baseURL, {
|
|
1167
|
+
method: "PUT",
|
|
1168
|
+
headers: { "Content-Type": "application/json" },
|
|
1169
|
+
credentials: "include",
|
|
1170
|
+
body: JSON.stringify(articleId)
|
|
1171
|
+
});
|
|
1172
|
+
if (!response.ok) {
|
|
1173
|
+
throw new Error(response.statusText);
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
async delete() {
|
|
1177
|
+
const response = await fetch(this.baseURL, {
|
|
1178
|
+
method: "DELETE",
|
|
1179
|
+
headers: { "Content-Type": "application/json" },
|
|
1180
|
+
credentials: "include",
|
|
1181
|
+
body: JSON.stringify({})
|
|
1182
|
+
});
|
|
1183
|
+
if (!response.ok) {
|
|
1184
|
+
throw new Error(response.statusText);
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
};
|
|
1188
|
+
|
|
1189
|
+
// src/repository/museum/area-spot.ts
|
|
1190
|
+
var AreaSpotRepository = class {
|
|
1191
|
+
baseURL;
|
|
1192
|
+
constructor(baseURL, museumId, areaId) {
|
|
1193
|
+
this.baseURL = `${baseURL}/museums/${museumId}/areas/${areaId}/spots`;
|
|
1194
|
+
}
|
|
1195
|
+
async get() {
|
|
1196
|
+
const url = `${this.baseURL}`;
|
|
1197
|
+
const response = await fetch(url, {
|
|
1198
|
+
method: "GET",
|
|
1199
|
+
credentials: "include"
|
|
1200
|
+
});
|
|
1201
|
+
if (!response.ok) {
|
|
1202
|
+
throw new Error(response.statusText);
|
|
1203
|
+
}
|
|
1204
|
+
return SpotListSchema.parse(await response.json());
|
|
1205
|
+
}
|
|
1206
|
+
};
|
|
1207
|
+
|
|
1208
|
+
// src/repository/museum/article-tag.ts
|
|
1209
|
+
var ArticleTagRepository = class {
|
|
1210
|
+
baseURL;
|
|
1211
|
+
constructor(baseURL, museumId, articleId) {
|
|
1212
|
+
this.baseURL = `${baseURL}/museums/${museumId}/articles/${articleId}/tags`;
|
|
1213
|
+
}
|
|
1214
|
+
async get() {
|
|
1215
|
+
const url = `${this.baseURL}`;
|
|
1216
|
+
const response = await fetch(url, {
|
|
1217
|
+
method: "GET",
|
|
1218
|
+
credentials: "include"
|
|
1219
|
+
});
|
|
1220
|
+
if (!response.ok) {
|
|
1221
|
+
throw new Error(response.statusText);
|
|
1222
|
+
}
|
|
1223
|
+
return TagListSchema.parse(await response.json());
|
|
1224
|
+
}
|
|
1225
|
+
async put(tagIds) {
|
|
1226
|
+
const url = `${this.baseURL}`;
|
|
1227
|
+
const response = await fetch(url, {
|
|
1228
|
+
method: "PUT",
|
|
1229
|
+
headers: { "Content-Type": "application/json" },
|
|
1230
|
+
credentials: "include",
|
|
1231
|
+
body: JSON.stringify(tagIds)
|
|
1232
|
+
});
|
|
1233
|
+
if (!response.ok) {
|
|
1234
|
+
throw new Error(response.statusText);
|
|
1235
|
+
}
|
|
1236
|
+
return TagListSchema.parse(await response.json());
|
|
1237
|
+
}
|
|
1238
|
+
};
|
|
1239
|
+
|
|
1240
|
+
// src/repository/museum/article-picture.ts
|
|
1241
|
+
var ArticlePictureRepository = class {
|
|
1242
|
+
baseURL;
|
|
1243
|
+
constructor(baseURL, museumId, articleId) {
|
|
1244
|
+
this.baseURL = `${baseURL}/museums/${museumId}/articles/${articleId}/pictures`;
|
|
1245
|
+
}
|
|
1246
|
+
async get() {
|
|
1247
|
+
const url = `${this.baseURL}`;
|
|
1248
|
+
const response = await fetch(url, {
|
|
1249
|
+
method: "GET",
|
|
1250
|
+
credentials: "include"
|
|
1251
|
+
});
|
|
1252
|
+
if (!response.ok) {
|
|
1253
|
+
throw new Error(response.statusText);
|
|
1254
|
+
}
|
|
1255
|
+
return PictureListSchema.parse(await response.json());
|
|
1256
|
+
}
|
|
1257
|
+
async put(pictureIds) {
|
|
1258
|
+
const url = `${this.baseURL}`;
|
|
1259
|
+
const response = await fetch(url, {
|
|
1260
|
+
method: "PUT",
|
|
1261
|
+
headers: { "Content-Type": "application/json" },
|
|
1262
|
+
credentials: "include",
|
|
1263
|
+
body: JSON.stringify(pictureIds)
|
|
1264
|
+
});
|
|
1265
|
+
if (!response.ok) {
|
|
1266
|
+
throw new Error(response.statusText);
|
|
1267
|
+
}
|
|
1268
|
+
return PictureListSchema.parse(await response.json());
|
|
1269
|
+
}
|
|
1270
|
+
};
|
|
1271
|
+
|
|
1272
|
+
// src/repository/museum/article-event.ts
|
|
1273
|
+
var ArticleEventRepository = class {
|
|
1274
|
+
baseURL;
|
|
1275
|
+
constructor(baseURL, museumId, articleId) {
|
|
1276
|
+
this.baseURL = `${baseURL}/museums/${museumId}/articles/${articleId}/events`;
|
|
1277
|
+
}
|
|
1278
|
+
async get() {
|
|
1279
|
+
const url = `${this.baseURL}`;
|
|
1280
|
+
const response = await fetch(url, {
|
|
1281
|
+
method: "GET",
|
|
1282
|
+
credentials: "include"
|
|
1283
|
+
});
|
|
1284
|
+
if (!response.ok) {
|
|
1285
|
+
throw new Error(response.statusText);
|
|
1286
|
+
}
|
|
1287
|
+
return EventListSchema.parse(await response.json());
|
|
1288
|
+
}
|
|
1289
|
+
async update(eventIds) {
|
|
1290
|
+
const url = `${this.baseURL}`;
|
|
1291
|
+
const response = await fetch(url, {
|
|
1292
|
+
method: "PUT",
|
|
1293
|
+
headers: { "Content-Type": "application/json" },
|
|
1294
|
+
credentials: "include",
|
|
1295
|
+
body: JSON.stringify(eventIds)
|
|
1296
|
+
});
|
|
1297
|
+
if (!response.ok) {
|
|
1298
|
+
throw new Error(response.statusText);
|
|
1299
|
+
}
|
|
1300
|
+
return EventListSchema.parse(await response.json());
|
|
1301
|
+
}
|
|
1302
|
+
};
|
|
1303
|
+
|
|
1304
|
+
// src/repository/museum/event-article.ts
|
|
1305
|
+
var EventArticleRepository = class {
|
|
1306
|
+
baseURL;
|
|
1307
|
+
constructor(baseURL, museumId, eventId) {
|
|
1308
|
+
this.baseURL = `${baseURL}/museums/${museumId}/events/${eventId}/articles`;
|
|
1309
|
+
}
|
|
1310
|
+
async get() {
|
|
1311
|
+
const url = `${this.baseURL}`;
|
|
1312
|
+
const response = await fetch(url, {
|
|
1313
|
+
method: "GET",
|
|
1314
|
+
headers: { "Content-Type": "application/json" },
|
|
1315
|
+
credentials: "include"
|
|
1316
|
+
});
|
|
1317
|
+
if (!response.ok) {
|
|
1318
|
+
throw new Error(response.statusText);
|
|
1319
|
+
}
|
|
1320
|
+
return ArticleListSchema.parse(await response.json());
|
|
1321
|
+
}
|
|
1322
|
+
async put(articleIds) {
|
|
1323
|
+
const url = `${this.baseURL}`;
|
|
1324
|
+
const response = await fetch(url, {
|
|
1325
|
+
method: "PUT",
|
|
1326
|
+
headers: { "Content-Type": "application/json" },
|
|
1327
|
+
credentials: "include",
|
|
1328
|
+
body: JSON.stringify(articleIds)
|
|
1329
|
+
});
|
|
1330
|
+
if (!response.ok) {
|
|
1331
|
+
throw new Error(response.statusText);
|
|
1332
|
+
}
|
|
1333
|
+
return ArticleListSchema.parse(await response.json());
|
|
1334
|
+
}
|
|
1335
|
+
};
|
|
1336
|
+
|
|
1337
|
+
// src/repository/museum/event-picture.ts
|
|
1338
|
+
var EventPictureRepository = class {
|
|
1339
|
+
baseURL;
|
|
1340
|
+
constructor(baseURL, museumId, eventId) {
|
|
1341
|
+
this.baseURL = `${baseURL}/museums/${museumId}/events/${eventId}/picture`;
|
|
1342
|
+
}
|
|
1343
|
+
async get() {
|
|
1344
|
+
const url = `${this.baseURL}`;
|
|
1345
|
+
const response = await fetch(url, {
|
|
1346
|
+
method: "GET",
|
|
1347
|
+
headers: { "Content-Type": "application/json" },
|
|
1348
|
+
credentials: "include"
|
|
1349
|
+
});
|
|
1350
|
+
if (!response.ok) {
|
|
1351
|
+
throw new Error(response.statusText);
|
|
1352
|
+
}
|
|
1353
|
+
return PictureSchema.parse(await response.json());
|
|
1354
|
+
}
|
|
1355
|
+
async put(pictureId) {
|
|
1356
|
+
const url = `${this.baseURL}`;
|
|
1357
|
+
const response = await fetch(url, {
|
|
1358
|
+
method: "PUT",
|
|
1359
|
+
headers: { "Content-Type": "application/json" },
|
|
1360
|
+
credentials: "include",
|
|
1361
|
+
body: JSON.stringify(pictureId)
|
|
1362
|
+
});
|
|
1363
|
+
if (!response.ok) {
|
|
1364
|
+
throw new Error(response.statusText);
|
|
1365
|
+
}
|
|
1366
|
+
return PictureSchema.parse(await response.json());
|
|
1367
|
+
}
|
|
1368
|
+
};
|
|
1369
|
+
|
|
1370
|
+
// src/repository/museum/guide-picture.ts
|
|
1371
|
+
var GuidePictureRepository = class {
|
|
1372
|
+
baseURL;
|
|
1373
|
+
constructor(baseURL, museumId, guideId) {
|
|
1374
|
+
this.baseURL = `${baseURL}/museums/${museumId}/guides/${guideId}/picture`;
|
|
1375
|
+
}
|
|
1376
|
+
async get() {
|
|
1377
|
+
const url = `${this.baseURL}`;
|
|
1378
|
+
const response = await fetch(url, {
|
|
1379
|
+
method: "GET",
|
|
1380
|
+
headers: { "Content-Type": "application/json" },
|
|
1381
|
+
credentials: "include"
|
|
1382
|
+
});
|
|
1383
|
+
if (!response.ok) {
|
|
1384
|
+
throw new Error(response.statusText);
|
|
1385
|
+
}
|
|
1386
|
+
return PictureSchema.parse(await response.json());
|
|
1387
|
+
}
|
|
1388
|
+
async put(pictureId) {
|
|
1389
|
+
const url = `${this.baseURL}`;
|
|
1390
|
+
const response = await fetch(url, {
|
|
1391
|
+
method: "PUT",
|
|
1392
|
+
headers: { "Content-Type": "application/json" },
|
|
1393
|
+
credentials: "include",
|
|
1394
|
+
body: JSON.stringify(pictureId)
|
|
1395
|
+
});
|
|
1396
|
+
if (!response.ok) {
|
|
1397
|
+
throw new Error(response.statusText);
|
|
1398
|
+
}
|
|
1399
|
+
return PictureSchema.parse(await response.json());
|
|
1400
|
+
}
|
|
1401
|
+
};
|
|
1402
|
+
|
|
1403
|
+
// src/repository/museum/tag-article.ts
|
|
1404
|
+
var TagArticleRepository = class {
|
|
1405
|
+
baseURL;
|
|
1406
|
+
constructor(baseURL, museumId, tagId) {
|
|
1407
|
+
this.baseURL = `${baseURL}/museums/${museumId}/tags/${tagId}/articles`;
|
|
1408
|
+
}
|
|
1409
|
+
async get() {
|
|
1410
|
+
const url = `${this.baseURL}`;
|
|
1411
|
+
const response = await fetch(url, {
|
|
1412
|
+
method: "GET",
|
|
1413
|
+
headers: { "Content-Type": "application/json" },
|
|
1414
|
+
credentials: "include"
|
|
1415
|
+
});
|
|
1416
|
+
if (!response.ok) {
|
|
1417
|
+
throw new Error(response.statusText);
|
|
1418
|
+
}
|
|
1419
|
+
return ArticleListSchema.parse(await response.json());
|
|
1420
|
+
}
|
|
1421
|
+
};
|
|
1422
|
+
export {
|
|
1423
|
+
AreaIdListSchema,
|
|
1424
|
+
AreaIdSchema,
|
|
1425
|
+
AreaListSchema,
|
|
1426
|
+
AreaRepository,
|
|
1427
|
+
AreaSchema,
|
|
1428
|
+
AreaSpotRepository,
|
|
1429
|
+
ArticleAudioRepository,
|
|
1430
|
+
ArticleEventRepository,
|
|
1431
|
+
ArticleIdListSchema,
|
|
1432
|
+
ArticleIdSchema,
|
|
1433
|
+
ArticleListSchema,
|
|
1434
|
+
ArticlePictureRepository,
|
|
1435
|
+
ArticleRepository,
|
|
1436
|
+
ArticleSchema,
|
|
1437
|
+
ArticleSpotRepository,
|
|
1438
|
+
ArticleTagRepository,
|
|
1439
|
+
AudioIdListSchema,
|
|
1440
|
+
AudioIdSchema,
|
|
1441
|
+
AudioListSchema,
|
|
1442
|
+
AudioRepository,
|
|
1443
|
+
AudioSchema,
|
|
1444
|
+
AuthRepository,
|
|
1445
|
+
CreateAreaSchema,
|
|
1446
|
+
CreateArticleSchema,
|
|
1447
|
+
CreateEventSchema,
|
|
1448
|
+
CreateGuideSchema,
|
|
1449
|
+
CreateMuseumSchema,
|
|
1450
|
+
CreateSpotSchema,
|
|
1451
|
+
CreateTagSchema,
|
|
1452
|
+
CredentialsSchema,
|
|
1453
|
+
EventArticleRepository,
|
|
1454
|
+
EventIdListSchema,
|
|
1455
|
+
EventIdSchema,
|
|
1456
|
+
EventListSchema,
|
|
1457
|
+
EventPictureRepository,
|
|
1458
|
+
EventRepository,
|
|
1459
|
+
EventSchema,
|
|
1460
|
+
GuideIdListSchema,
|
|
1461
|
+
GuideIdSchema,
|
|
1462
|
+
GuideListSchema,
|
|
1463
|
+
GuidePictureRepository,
|
|
1464
|
+
GuideRepository,
|
|
1465
|
+
GuideSchema,
|
|
1466
|
+
MuseumIdListSchema,
|
|
1467
|
+
MuseumIdSchema,
|
|
1468
|
+
MuseumListSchema,
|
|
1469
|
+
MuseumRepository,
|
|
1470
|
+
MuseumSchema,
|
|
1471
|
+
PictureIdListSchema,
|
|
1472
|
+
PictureIdSchema,
|
|
1473
|
+
PictureListSchema,
|
|
1474
|
+
PictureRepository,
|
|
1475
|
+
PictureSchema,
|
|
1476
|
+
SpotArticleRepository,
|
|
1477
|
+
SpotIdListSchema,
|
|
1478
|
+
SpotIdSchema,
|
|
1479
|
+
SpotListSchema,
|
|
1480
|
+
SpotRepository,
|
|
1481
|
+
SpotSchema,
|
|
1482
|
+
TagArticleRepository,
|
|
1483
|
+
TagIdListSchema,
|
|
1484
|
+
TagIdSchema,
|
|
1485
|
+
TagListSchema,
|
|
1486
|
+
TagRepository,
|
|
1487
|
+
TagSchema,
|
|
1488
|
+
UpdateAreaSchema,
|
|
1489
|
+
UpdateArticleSchema,
|
|
1490
|
+
UpdateEventSchema,
|
|
1491
|
+
UpdateGuideSchema,
|
|
1492
|
+
UpdateMuseumSchema,
|
|
1493
|
+
UpdateSpotSchema,
|
|
1494
|
+
UpdateTagSchema,
|
|
1495
|
+
UserIdListSchema,
|
|
1496
|
+
UserIdSchema,
|
|
1497
|
+
UserListSchema,
|
|
1498
|
+
UserRepository,
|
|
1499
|
+
UserSchema
|
|
1500
|
+
};
|