@aeriajs/types 0.0.117 → 0.0.119

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.
@@ -8,6 +8,7 @@ export declare const ACError: {
8
8
  readonly FunctionNotExposed: "FUNCTION_NOT_EXPOSED";
9
9
  readonly TargetImmutable: "TARGET_IMMUTABLE";
10
10
  readonly InvalidLimit: "INVALID_LIMIT";
11
+ readonly InvalidToken: "INVALID_TOKEN";
11
12
  readonly OwnershipError: "OWNERSHIP_ERROR";
12
13
  readonly ResourceNotFound: "RESOURCE_NOT_FOUND";
13
14
  readonly InsecureOperator: "INSECURE_OPERATOR";
@@ -8,6 +8,7 @@ exports.ACError = {
8
8
  FunctionNotExposed: 'FUNCTION_NOT_EXPOSED',
9
9
  TargetImmutable: 'TARGET_IMMUTABLE',
10
10
  InvalidLimit: 'INVALID_LIMIT',
11
+ InvalidToken: 'INVALID_TOKEN',
11
12
  OwnershipError: 'OWNERSHIP_ERROR',
12
13
  ResourceNotFound: 'RESOURCE_NOT_FOUND',
13
14
  InsecureOperator: 'INSECURE_OPERATOR',
@@ -6,6 +6,7 @@ export const ACError = {
6
6
  FunctionNotExposed: "FUNCTION_NOT_EXPOSED",
7
7
  TargetImmutable: "TARGET_IMMUTABLE",
8
8
  InvalidLimit: "INVALID_LIMIT",
9
+ InvalidToken: "INVALID_TOKEN",
9
10
  OwnershipError: "OWNERSHIP_ERROR",
10
11
  ResourceNotFound: "RESOURCE_NOT_FOUND",
11
12
  InsecureOperator: "INSECURE_OPERATOR",
package/dist/config.d.ts CHANGED
@@ -45,6 +45,7 @@ export type ApiConfig = {
45
45
  paginationLimit?: number;
46
46
  exposeFunctionsByDefault?: boolean | 'unauthenticated';
47
47
  rolesHierarchy?: RolesHierarchy;
48
+ revalidateToken?: boolean;
48
49
  };
49
50
  tokenUserProperties?: (keyof CollectionItem<'user'>)[];
50
51
  errorHandler?: <TError>(context: RouteContext, error: TError) => unknown | Promise<unknown>;
@@ -65,7 +65,9 @@ export type InsertPayload<TDocument extends WithId<unknown>> = {
65
65
  export type RemovePayload<TDocument extends WithId<unknown>> = {
66
66
  filters: Filters<TDocument>;
67
67
  };
68
- export type RemoveAllPayload<TDocument extends WithId<unknown>> = GetPayload<TDocument>;
68
+ export type RemoveAllPayload = {
69
+ filters: (ObjectId | string)[];
70
+ };
69
71
  export type RemoveFilePayload = UploadAuxProps & {
70
72
  filters: {
71
73
  _id: ObjectId | string;
@@ -88,7 +90,7 @@ export type CollectionFunctions<TSchema extends JsonSchema = JsonSchema> = Schem
88
90
  keepTempIds: true;
89
91
  }>>) => Promise<InsertReturnType<InferredDocument>>;
90
92
  remove: (payload: RemovePayload<InferredDocument>) => Promise<RemoveReturnType<InferredDocument>>;
91
- removeAll: (payload: RemoveAllPayload<InferredDocument>) => Promise<unknown>;
93
+ removeAll: (payload: RemoveAllPayload) => Promise<unknown>;
92
94
  removeFile: (payload: RemoveFilePayload) => Promise<unknown>;
93
95
  } : never : never;
94
96
  export type CollectionFunctionsSDK<TSchema extends JsonSchema = JsonSchema> = SchemaWithId<TSchema> extends infer InferredDocument ? InferredDocument extends WithId<unknown> ? {
@@ -99,7 +101,7 @@ export type CollectionFunctionsSDK<TSchema extends JsonSchema = JsonSchema> = Sc
99
101
  keepTempIds: true;
100
102
  }>>) => Promise<WithACErrors<InsertReturnType<InferredDocument>>>;
101
103
  remove: (payload: RemovePayload<InferredDocument>) => Promise<WithACErrors<RemoveReturnType<InferredDocument>>>;
102
- removeAll: (payload: RemoveAllPayload<InferredDocument>) => Promise<unknown>;
104
+ removeAll: (payload: RemoveAllPayload) => Promise<unknown>;
103
105
  removeFile: (payload: RemoveFilePayload) => Promise<unknown>;
104
106
  } : never : never;
105
107
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/types",
3
- "version": "0.0.117",
3
+ "version": "0.0.119",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -10,9 +10,9 @@
10
10
  },
11
11
  "exports": {
12
12
  ".": {
13
+ "types": "./dist/index.d.ts",
13
14
  "import": "./dist/index.mjs",
14
- "require": "./dist/index.js",
15
- "types": "./dist/index.d.ts"
15
+ "require": "./dist/index.js"
16
16
  }
17
17
  },
18
18
  "keywords": [],