@smartsoft001/nestjs 2.184.0 → 2.185.0

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": "@smartsoft001/nestjs",
3
- "version": "2.184.0",
3
+ "version": "2.185.0",
4
4
  "description": "Shared NestJS building blocks: SharedModule with its JWT and permission configuration, PermissionService, the JWT strategy, the @User decorator and the application exception filter.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,8 +9,8 @@
9
9
  "main": "./src/index.js",
10
10
  "types": "./src/index.d.ts",
11
11
  "dependencies": {
12
- "@smartsoft001/domain-core": "2.184.0",
13
- "@smartsoft001/users": "2.184.0",
12
+ "@smartsoft001/domain-core": "2.185.0",
13
+ "@smartsoft001/users": "2.185.0",
14
14
  "passport-jwt": "^4.0.1",
15
15
  "tslib": "^2.3.0"
16
16
  },
@@ -13,6 +13,16 @@ export declare class SharedConfig {
13
13
  };
14
14
  permissions?: ISharedPermissions;
15
15
  type?: any;
16
+ /** HTTP attachments are denied unless an application supplies a resource policy. */
17
+ attachmentPolicy?: (context: {
18
+ operation: 'create' | 'read' | 'delete';
19
+ id: string;
20
+ user: IUser | undefined;
21
+ }) => boolean | Promise<boolean>;
22
+ /** Largest file the HTTP attachment upload accepts, in bytes. Defaults to 10 MiB. */
23
+ attachmentMaxBytes?: number;
24
+ /** How many non-file form fields an attachment upload may carry. Defaults to 0. */
25
+ attachmentMaxFields?: number;
16
26
  /**
17
27
  * Decides change subscriptions; no policy means no subscription. Called once when a client
18
28
  * subscribes, without `type`, and again before each event with the change `type`. On a
@@ -7,6 +7,12 @@ let SharedConfig = class SharedConfig {
7
7
  tokenConfig;
8
8
  permissions;
9
9
  type;
10
+ /** HTTP attachments are denied unless an application supplies a resource policy. */
11
+ attachmentPolicy;
12
+ /** Largest file the HTTP attachment upload accepts, in bytes. Defaults to 10 MiB. */
13
+ attachmentMaxBytes;
14
+ /** How many non-file form fields an attachment upload may carry. Defaults to 0. */
15
+ attachmentMaxFields;
10
16
  /**
11
17
  * Decides change subscriptions; no policy means no subscription. Called once when a client
12
18
  * subscribes, without `type`, and again before each event with the change `type`. On a
@@ -1 +1 @@
1
- {"version":3,"file":"shared.config.js","sourceRoot":"","sources":["../../../../../../packages/shared/nestjs/src/lib/shared.config.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAarC,IAAM,YAAY,GAAlB,MAAM,YAAY;IACvB,WAAW,CAGT;IACF,WAAW,CAAsB;IACjC,IAAI,CAAO;IACX;;;;OAIG;IACH,YAAY,CAIqB;CAClC,CAAA;AAjBY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;GACA,YAAY,CAiBxB"}
1
+ {"version":3,"file":"shared.config.js","sourceRoot":"","sources":["../../../../../../packages/shared/nestjs/src/lib/shared.config.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAarC,IAAM,YAAY,GAAlB,MAAM,YAAY;IACvB,WAAW,CAGT;IACF,WAAW,CAAsB;IACjC,IAAI,CAAO;IACX,oFAAoF;IACpF,gBAAgB,CAIiB;IACjC,qFAAqF;IACrF,kBAAkB,CAAU;IAC5B,mFAAmF;IACnF,mBAAmB,CAAU;IAC7B;;;;OAIG;IACH,YAAY,CAIqB;CAClC,CAAA;AA3BY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;GACA,YAAY,CA2BxB"}