@assemblis/contracts 0.1.7 → 0.1.8
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/package.json +1 -1
- package/src/schemas/api.ts +6 -3
- package/src/types/api.ts +4 -0
package/package.json
CHANGED
package/src/schemas/api.ts
CHANGED
|
@@ -33,7 +33,10 @@ export const PutAccountReportsIdContentSchema = {
|
|
|
33
33
|
endpoint: (reportId: string): AccountEndpoint =>
|
|
34
34
|
`${ApiEndpoint.ACCOUNT_REPORTS}/${reportId}/content`,
|
|
35
35
|
method: ApiRestMethod.PUT,
|
|
36
|
-
payload: ReportContentSchema.omit({
|
|
36
|
+
payload: ReportContentSchema.omit({
|
|
37
|
+
published_at: true,
|
|
38
|
+
cover_image_id: true
|
|
39
|
+
}),
|
|
37
40
|
response: ReportSchema
|
|
38
41
|
};
|
|
39
42
|
|
|
@@ -41,7 +44,7 @@ export const PatchAccountReportsIdDiscardSchema = {
|
|
|
41
44
|
endpoint: (reportId: string): AccountEndpoint =>
|
|
42
45
|
`${ApiEndpoint.ACCOUNT_REPORTS}/${reportId}/discard`,
|
|
43
46
|
method: ApiRestMethod.PATCH,
|
|
44
|
-
payload: z.
|
|
47
|
+
payload: z.nullish(z.object()),
|
|
45
48
|
response: maybe(ReportSchema)
|
|
46
49
|
};
|
|
47
50
|
|
|
@@ -57,7 +60,7 @@ export const PatchAccountReportsIdUnpublishSchema = {
|
|
|
57
60
|
endpoint: (reportId: string): AccountEndpoint =>
|
|
58
61
|
`${ApiEndpoint.ACCOUNT_REPORTS}/${reportId}/unpublish`,
|
|
59
62
|
method: ApiRestMethod.PATCH,
|
|
60
|
-
payload: z.
|
|
63
|
+
payload: z.nullish(z.object()),
|
|
61
64
|
response: ReportSchema
|
|
62
65
|
};
|
|
63
66
|
|
package/src/types/api.ts
CHANGED
|
@@ -9,11 +9,15 @@ import {
|
|
|
9
9
|
PinListSchema,
|
|
10
10
|
PinSchema,
|
|
11
11
|
PostAccountReportsIdCoverImageSchema,
|
|
12
|
+
PutAccountReportsIdContentSchema,
|
|
12
13
|
RegisterSchema,
|
|
13
14
|
SurveyResponseSchema,
|
|
14
15
|
SurveySchema
|
|
15
16
|
} from '../schemas';
|
|
16
17
|
|
|
18
|
+
export type PutAccountReportsIdContentPayload = z.infer<
|
|
19
|
+
(typeof PutAccountReportsIdContentSchema)['payload']
|
|
20
|
+
>;
|
|
17
21
|
export type PublishReportPayload = z.infer<
|
|
18
22
|
(typeof PatchAccountReportsIdPublishSchema)['payload']
|
|
19
23
|
>;
|