@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assemblis/contracts",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -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({ cover_image_id: true }),
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.never(),
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.never(),
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
  >;