hh-contracts 0.0.10 → 0.0.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.
@@ -17,5 +17,9 @@ var CreatePermissionContract;
17
17
  CreatePermissionContract.endpoint = permissions_api_1.PERMISSIONS_CONTROLLER.endpoints.create;
18
18
  CreatePermissionContract.httpMethod = common_1.HTTP_METHOD.post;
19
19
  CreatePermissionContract.RequestSchema = CreatePermissionContractRequestSchema;
20
- CreatePermissionContract.ResponseSchema = permission_model_1.PermissionSchema;
20
+ CreatePermissionContract.ResponseSchema = permission_model_1.PermissionSchema.transform(data => {
21
+ return {
22
+ privet: 'Hello',
23
+ };
24
+ });
21
25
  })(CreatePermissionContract || (exports.CreatePermissionContract = CreatePermissionContract = {}));
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "hh-contracts",
3
- "version": "0.0.10",
3
+ "version": "0.0.13",
4
4
  "description": "",
5
- "main": "index.js",
5
+ "main": "./build/index.js",
6
6
  "scripts": {
7
7
  "prepublish": "rm -rf build && tsc",
8
8
  "build": "tsc"
@@ -19,6 +19,10 @@ export namespace CreatePermissionContract {
19
19
  export const RequestSchema = CreatePermissionContractRequestSchema;
20
20
  export type TRequest = z.infer<typeof RequestSchema>;
21
21
 
22
- export const ResponseSchema = PermissionSchema;
22
+ export const ResponseSchema = PermissionSchema.transform(data => {
23
+ return {
24
+ privet: 'Hello',
25
+ };
26
+ });
23
27
  export type Response = z.infer<typeof ResponseSchema>;
24
28
  }
@@ -10,4 +10,4 @@ export const PermissionSchema = z
10
10
  conditions: z.unknown().optional().nullable(),
11
11
  })
12
12
  .merge(TimestampSchema);
13
- export type TPermission = z.infer<typeof PermissionSchema>;
13
+ export type TPersistedPermission = z.infer<typeof PermissionSchema>;
package/tsconfig.json CHANGED
@@ -11,7 +11,7 @@
11
11
  // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
12
 
13
13
  /* Language and Environment */
14
- "target": "ES2023" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
14
+ "target": "ES2022" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
15
15
  // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16
16
  // "jsx": "preserve", /* Specify what JSX code is generated. */
17
17
  // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */