modelence 0.18.0 → 0.19.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/dist/bin/modelence.js.map +1 -1
- package/dist/{chunk-3SPXJEOR.js → chunk-7LPSX5A6.js} +2 -2
- package/dist/{chunk-3SPXJEOR.js.map → chunk-7LPSX5A6.js.map} +1 -1
- package/dist/{chunk-ANRYTF2N.js → chunk-JBPO3BNR.js} +3 -3
- package/dist/{chunk-ANRYTF2N.js.map → chunk-JBPO3BNR.js.map} +1 -1
- package/dist/client.d.ts +46 -2
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/{package-YHSF5RBN.js → package-DB7AXKLA.js} +2 -2
- package/dist/{package-YHSF5RBN.js.map → package-DB7AXKLA.js.map} +1 -1
- package/dist/server.d.ts +4 -4
- package/dist/server.js +8 -8
- package/dist/server.js.map +1 -1
- package/dist/telemetry.js +1 -1
- package/dist/{types-Ba-XOoJD.d.ts → types-CzGfkwti.d.ts} +1 -1
- package/dist/{types-BrUcinD0.d.ts → types-JMIT4IDG.d.ts} +22 -1
- package/dist/types.d.ts +2 -2
- package/package.json +1 -1
package/dist/telemetry.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{m as captureError,i as logDebug,k as logError,j as logInfo,l as startTransaction}from'./chunk-
|
|
1
|
+
export{m as captureError,i as logDebug,k as logError,j as logInfo,l as startTransaction}from'./chunk-7LPSX5A6.js';//# sourceMappingURL=telemetry.js.map
|
|
2
2
|
//# sourceMappingURL=telemetry.js.map
|
|
@@ -285,4 +285,4 @@ interface WebsocketClientProvider {
|
|
|
285
285
|
}): void;
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
export { type AnyMethodShape as A, type ConfigSchema as C, type DefaultRoles as D, type Handler as H, type MethodDefinition as M, type OAuthProvider as O, type Permission as P, type RoleDefinition as R, ServerChannel as S, type UpdateProfileProps as U, type ValueType as V, type WebsocketClientProvider as W, type WebsocketServerProvider as a, type
|
|
288
|
+
export { type AnyMethodShape as A, type ConfigSchema as C, type DefaultRoles as D, type Handler as H, type MethodDefinition as M, type OAuthProvider as O, type Permission as P, type RoleDefinition as R, ServerChannel as S, type UpdateProfileProps as U, type ValueType as V, type WebsocketClientProvider as W, type WebsocketServerProvider as a, type ClientInfo as b, type ConfigKey as c, type ConfigParams as d, type ConfigType as e, ClientChannel as f, type SignupProps as g, type AuthSuccessProps as h, type AuthErrorProps as i, type ConnectionInfo as j, type User as k, type OAuthErrorInfo as l, type AppConfig as m, type Session as n, type UserInfo as o, type Role as p, type Context as q, type Args as r, type AuthProvider as s, type Configs as t, type HttpContext as u, type Method as v, type MethodType as w, SUPPORTED_OAUTH_PROVIDERS as x, type UserEmail as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './index-CLpVWWuj.js';
|
|
2
|
-
import {
|
|
2
|
+
import { q as Context } from './types-CzGfkwti.js';
|
|
3
3
|
import * as mongodb from 'mongodb';
|
|
4
4
|
import { WithId, IndexDescription, SearchIndexDescription, MongoClient, Collection, FilterOperators, Document, FindOptions, ObjectId, SortDirection, OptionalUnlessRequiredId, ClientSession, InsertOneResult, InsertManyResult, UpdateFilter, UpdateResult, DeleteResult, FindOneAndUpdateOptions, FindOneAndDeleteOptions, WithoutId, FindOneAndReplaceOptions, ReplaceOptions, DistinctOptions, ChangeStreamOptions, ChangeStream, AggregateOptions, AggregationCursor, AnyBulkWriteOperation, BulkWriteResult } from 'mongodb';
|
|
5
5
|
import { z, ZodNumber, ZodArray } from 'zod';
|
|
@@ -452,6 +452,27 @@ declare class Store<TSchema extends ModelSchema, TMethods extends Record<string,
|
|
|
452
452
|
insertOne(document: OptionalUnlessRequiredId<InferDocumentType<TSchema>>, options?: {
|
|
453
453
|
session?: ClientSession;
|
|
454
454
|
}): Promise<InsertOneResult>;
|
|
455
|
+
/**
|
|
456
|
+
* Inserts a single document and returns the inserted document with its generated `_id`
|
|
457
|
+
* and any helper methods applied.
|
|
458
|
+
*
|
|
459
|
+
* Unlike {@link insertOne}, which only returns the insert result metadata, this method
|
|
460
|
+
* returns the full inserted document — useful when you need to immediately use the
|
|
461
|
+
* newly created record (e.g. returning it from an API handler).
|
|
462
|
+
*
|
|
463
|
+
* @param document - The document to insert
|
|
464
|
+
* @returns The inserted document with `_id` populated and methods applied
|
|
465
|
+
*
|
|
466
|
+
* @example
|
|
467
|
+
* ```ts
|
|
468
|
+
* const todo = await dbTodos.create({ title: 'Buy milk', completed: false });
|
|
469
|
+
* console.log(todo._id); // ObjectId
|
|
470
|
+
* console.log(todo.title); // 'Buy milk'
|
|
471
|
+
* ```
|
|
472
|
+
*/
|
|
473
|
+
create(document: OptionalUnlessRequiredId<InferDocumentType<TSchema>>, options?: {
|
|
474
|
+
session?: ClientSession;
|
|
475
|
+
}): Promise<this['_doc']>;
|
|
455
476
|
/**
|
|
456
477
|
* Inserts multiple documents
|
|
457
478
|
*
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { A as AppServer, a as AppServerInitOptions, E as ExpressMiddleware, M as ModelenceConfig } from './index-CLpVWWuj.js';
|
|
2
|
-
export { A as AnyMethodShape,
|
|
3
|
-
export { B as BodyConfig, g as CronJob, C as CronJobInputParams, h as CronJobMetadata, i as EmailAttachment, c as EmailPayload, E as EmailProvider, j as ExpressHandler, H as HttpMethod, I as InferDocumentType, M as ModelSchema, a as RateLimitRule, b as RateLimitType, R as RouteDefinition, d as RouteHandler, k as RouteHandlers, e as RouteParams, f as RouteResponse, s as schema } from './types-
|
|
2
|
+
export { A as AnyMethodShape, m as AppConfig, r as Args, i as AuthErrorProps, s as AuthProvider, h as AuthSuccessProps, b as ClientInfo, c as ConfigKey, d as ConfigParams, C as ConfigSchema, e as ConfigType, t as Configs, j as ConnectionInfo, q as Context, D as DefaultRoles, H as Handler, u as HttpContext, v as Method, M as MethodDefinition, w as MethodType, l as OAuthErrorInfo, O as OAuthProvider, P as Permission, p as Role, R as RoleDefinition, x as SUPPORTED_OAUTH_PROVIDERS, n as Session, g as SignupProps, U as UpdateProfileProps, k as User, y as UserEmail, o as UserInfo, V as ValueType, W as WebsocketClientProvider, a as WebsocketServerProvider } from './types-CzGfkwti.js';
|
|
3
|
+
export { B as BodyConfig, g as CronJob, C as CronJobInputParams, h as CronJobMetadata, i as EmailAttachment, c as EmailPayload, E as EmailProvider, j as ExpressHandler, H as HttpMethod, I as InferDocumentType, M as ModelSchema, a as RateLimitRule, b as RateLimitType, R as RouteDefinition, d as RouteHandler, k as RouteHandlers, e as RouteParams, f as RouteResponse, s as schema } from './types-JMIT4IDG.js';
|
|
4
4
|
import 'express';
|
|
5
5
|
import 'http';
|
|
6
6
|
import 'mongodb';
|