@atscript/moost-mongo 0.0.19 → 0.0.20

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +3 -3
  2. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -162,19 +162,19 @@ declare class AsMongoController<T extends TAtscriptAnnotatedTypeConstructor> {
162
162
  *
163
163
  * @param payload - Raw request body to be inserted.
164
164
  */
165
- insert(payload: any): Promise<HttpError | InsertOneResult | InsertManyResult>;
165
+ insert(payload: Parameters<AsCollection<T>['prepareInsert']>[0]): Promise<HttpError | InsertOneResult | InsertManyResult>;
166
166
  /**
167
167
  * **PUT /** – fully replaces a document matched by `_id`.
168
168
  *
169
169
  * @param payload - Object containing `_id` plus full replacement document.
170
170
  */
171
- replace(payload: any): Promise<HttpError | UpdateResult<InstanceType<T>>>;
171
+ replace(payload: Parameters<AsCollection<T>['prepareReplace']>[0]): Promise<HttpError | UpdateResult<InstanceType<T>>>;
172
172
  /**
173
173
  * **PATCH /** – updates one document using MongoDB update operators.
174
174
  *
175
175
  * @param payload - Update payload produced by `asCollection.prepareUpdate`.
176
176
  */
177
- update(payload: any): Promise<HttpError | UpdateResult>;
177
+ update(payload: Parameters<AsCollection<T>['prepareUpdate']>[0]): Promise<HttpError | UpdateResult>;
178
178
  /**
179
179
  * **DELETE /:id** – removes a single document by `_id`.
180
180
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/moost-mongo",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "description": "Atscript Mongo for Moost.",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
@@ -44,8 +44,8 @@
44
44
  "@moostjs/event-http": "^0.5.31",
45
45
  "mongodb": "^6.17.0",
46
46
  "moost": "^0.5.31",
47
- "@atscript/mongo": "^0.0.19",
48
- "@atscript/typescript": "^0.0.19"
47
+ "@atscript/mongo": "^0.0.20",
48
+ "@atscript/typescript": "^0.0.20"
49
49
  },
50
50
  "scripts": {
51
51
  "pub": "pnpm publish --access public",