@rpcbase/db 0.37.0 → 0.38.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.
@@ -1,4 +1,4 @@
1
- import { default as mongoose } from '../../../vite/node_modules/mongoose';
1
+ import { default as mongoose } from 'mongoose';
2
2
  import { AclAction, AppAbility } from './types';
3
3
  type StoredAcl = {
4
4
  ability: AppAbility;
@@ -6,7 +6,7 @@ type StoredAcl = {
6
6
  };
7
7
  type PipelineStageLike = Record<string, unknown>;
8
8
  declare const mongooseAclPluginBrand: unique symbol;
9
- declare module '../../../vite/node_modules/mongoose' {
9
+ declare module "mongoose" {
10
10
  interface QueryOptions<DocType = unknown> {
11
11
  rbAcl?: StoredAcl;
12
12
  [mongooseAclPluginBrand]?: DocType;
@@ -1,3 +1,3 @@
1
- import { default as mongoose } from '../../vite/node_modules/mongoose';
1
+ import { default as mongoose } from 'mongoose';
2
2
  export declare const ensureMongooseConnection: (dbName: string) => Promise<mongoose.Connection>;
3
3
  //# sourceMappingURL=ensureMongooseConnection.d.ts.map
@@ -1,5 +1,5 @@
1
- import { Schema } from '../../../vite/node_modules/mongoose';
2
- import { z } from '../../../vite/node_modules/zod';
1
+ import { Schema } from 'mongoose';
2
+ import { z } from 'zod';
3
3
  import { AclPolicy } from '../acl';
4
4
  export declare const ZRBNotification: z.ZodObject<{
5
5
  userId: z.ZodString;
@@ -1,5 +1,5 @@
1
- import { Schema } from '../../../vite/node_modules/mongoose';
2
- import { z } from '../../../vite/node_modules/zod';
1
+ import { Schema } from 'mongoose';
2
+ import { z } from 'zod';
3
3
  import { AclPolicy } from '../acl';
4
4
  export declare const ZRBNotificationDigestFrequency: z.ZodEnum<{
5
5
  off: "off";
@@ -1,5 +1,5 @@
1
- import { Schema } from '../../../vite/node_modules/mongoose';
2
- import { z } from '../../../vite/node_modules/zod';
1
+ import { Schema } from 'mongoose';
2
+ import { z } from 'zod';
3
3
  export declare const ZRBRtsChangeOp: z.ZodEnum<{
4
4
  delete: "delete";
5
5
  reset_model: "reset_model";
@@ -1,5 +1,5 @@
1
- import { Schema } from '../../../vite/node_modules/mongoose';
2
- import { z } from '../../../vite/node_modules/zod';
1
+ import { Schema } from 'mongoose';
2
+ import { z } from 'zod';
3
3
  export declare const ZRBRtsCounter: z.ZodObject<{
4
4
  _id: z.ZodString;
5
5
  seq: z.ZodNumber;
@@ -1,5 +1,5 @@
1
- import { Schema } from '../../../vite/node_modules/mongoose';
2
- import { z } from '../../../vite/node_modules/zod';
1
+ import { Schema } from 'mongoose';
2
+ import { z } from 'zod';
3
3
  export declare const ZRBTenant: z.ZodObject<{
4
4
  tenantId: z.ZodString;
5
5
  parentTenantId: z.ZodOptional<z.ZodString>;
@@ -1,5 +1,5 @@
1
- import { Schema } from '../../../vite/node_modules/mongoose';
2
- import { z } from '../../../vite/node_modules/zod';
1
+ import { Schema } from 'mongoose';
2
+ import { z } from 'zod';
3
3
  export declare const ZRBTenantSubscriptionStatus: z.ZodEnum<{
4
4
  trialing: "trialing";
5
5
  active: "active";
@@ -1,5 +1,5 @@
1
- import { Schema } from '../../../vite/node_modules/mongoose';
2
- import { z } from '../../../vite/node_modules/zod';
1
+ import { Schema } from 'mongoose';
2
+ import { z } from 'zod';
3
3
  export declare const ZRBTenantSubscriptionEventSource: z.ZodEnum<{
4
4
  admin: "admin";
5
5
  system: "system";
@@ -1,5 +1,5 @@
1
- import { Schema } from '../../../vite/node_modules/mongoose';
2
- import { z } from '../../../vite/node_modules/zod';
1
+ import { Schema } from 'mongoose';
2
+ import { z } from 'zod';
3
3
  export declare const ZRBUploadChunk: z.ZodObject<{
4
4
  uploadId: z.ZodString;
5
5
  index: z.ZodNumber;
@@ -1,5 +1,5 @@
1
- import { Schema } from '../../../vite/node_modules/mongoose';
2
- import { z } from '../../../vite/node_modules/zod';
1
+ import { Schema } from 'mongoose';
2
+ import { z } from 'zod';
3
3
  import { AclPolicy } from '../acl';
4
4
  export declare const ZRBUploadSessionStatus: z.ZodEnum<{
5
5
  error: "error";
@@ -1,5 +1,5 @@
1
- import { Schema } from '../../../vite/node_modules/mongoose';
2
- import { z } from '../../../vite/node_modules/zod';
1
+ import { Schema } from 'mongoose';
2
+ import { z } from 'zod';
3
3
  export declare const ZRBUser: z.ZodObject<{
4
4
  email: z.ZodOptional<z.ZodString>;
5
5
  password: z.ZodString;
@@ -1,4 +1,4 @@
1
- import { default as mongoose } from '../../vite/node_modules/mongoose';
1
+ import { default as mongoose } from 'mongoose';
2
2
  export type LoadModelCtx = {
3
3
  req: {
4
4
  session?: {
@@ -1,4 +1,4 @@
1
- import { Schema } from '../../../vite/node_modules/mongoose';
1
+ import { Schema } from 'mongoose';
2
2
  type MongooseSchemaExtension = Parameters<Schema["add"]>[0];
3
3
  export declare function extendMongooseSchema<TSchema extends Schema>(baseSchema: TSchema, ...extensions: MongooseSchemaExtension[]): TSchema;
4
4
  export declare function omitMongooseSchemaPaths<TSchema extends Schema>(schema: TSchema, paths: string[]): TSchema;
@@ -1,4 +1,4 @@
1
- import { default as mongoose, InferSchemaType } from '../../../vite/node_modules/mongoose';
1
+ import { default as mongoose, InferSchemaType } from 'mongoose';
2
2
  declare const Schema: typeof mongoose.Schema, model: typeof mongoose.model;
3
3
  export { Schema, model, mongoose, type InferSchemaType };
4
4
  export * from './extendMongooseSchema';
@@ -1,4 +1,4 @@
1
- import { SchemaTypeOptions } from '../../../vite/node_modules/mongoose';
1
+ import { SchemaTypeOptions } from 'mongoose';
2
2
  import { LocalizedString } from '../zod/localizedString';
3
3
  export declare function localizedStringField(options?: Omit<SchemaTypeOptions<LocalizedString>, "type" | "get">): SchemaTypeOptions<LocalizedString>;
4
4
  //# sourceMappingURL=localizedStringField.d.ts.map
@@ -1,4 +1,4 @@
1
- import { PaginationSpec } from '../../../api/src';
1
+ import { PaginationSpec } from '@rpcbase/api';
2
2
  import { PaginationCursorCodecOptions } from './cursor';
3
3
  import { NormalizedPaginationSpec } from './normalizeSpec';
4
4
  export type CompiledMongoPagination = {
@@ -1,4 +1,4 @@
1
- import { PaginationSpec } from '../../../api/src';
1
+ import { PaginationSpec } from '@rpcbase/api';
2
2
  export type PaginationCursorCodecOptions = {
3
3
  signingSecret: string | Buffer;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { PaginationSpec } from '../../../api/src';
1
+ import { PaginationSpec } from '@rpcbase/api';
2
2
  export type MongoIndexHint = Record<string, 1 | -1>;
3
3
  export declare const getMongoPaginationIndexHint: (spec: PaginationSpec, baseFilter: Record<string, unknown>) => MongoIndexHint;
4
4
  //# sourceMappingURL=indexHint.d.ts.map
@@ -1,4 +1,4 @@
1
- import { PaginationResponse } from '../../../api/src';
1
+ import { PaginationResponse } from '@rpcbase/api';
2
2
  import { PaginationCursorCodecOptions } from './cursor';
3
3
  import { CompiledMongoPagination } from './compileMongoPagination';
4
4
  export type MaterializePaginationOptions = {
@@ -1,12 +1,12 @@
1
- import { default as mongoose } from '../../../vite/node_modules/mongoose';
2
- import { PaginationResponse, PaginationSpec } from '../../../api/src';
1
+ import { default as mongoose } from 'mongoose';
2
+ import { PaginationResponse, PaginationSpec } from '@rpcbase/api';
3
3
  import { PaginationCursorCodecOptions } from './cursor';
4
4
  declare const mongoPaginationPluginBrand: unique symbol;
5
5
  export type MongoPaginationPluginOptions = {
6
6
  cursor: PaginationCursorCodecOptions;
7
7
  };
8
8
  type QueryResultNode<TResult> = TResult extends Array<infer TNode> ? TNode : unknown;
9
- declare module '../../../vite/node_modules/mongoose' {
9
+ declare module "mongoose" {
10
10
  interface Query<ResultType, DocType, THelpers = {}, RawDocType = unknown, QueryOp = "find", TDocOverrides = Record<string, never>> {
11
11
  [mongoPaginationPluginBrand]?: [DocType, THelpers, RawDocType, QueryOp, TDocOverrides];
12
12
  paginate: (pagination?: PaginationSpec, options?: MongoPaginationPluginOptions) => Promise<PaginationResponse<QueryResultNode<ResultType>>>;
@@ -1,4 +1,4 @@
1
- import { PaginationDirection, PaginationOrder, PaginationSpec } from '../../../api/src';
1
+ import { PaginationDirection, PaginationOrder, PaginationSpec } from '@rpcbase/api';
2
2
  export type NormalizedPaginationSpec = Omit<PaginationSpec, "direction" | "sort" | "limit"> & {
3
3
  direction: PaginationDirection;
4
4
  limit: number;
@@ -1,4 +1,4 @@
1
- import { PaginationResponse, PaginationSpec } from '../../../api/src';
1
+ import { PaginationResponse, PaginationSpec } from '@rpcbase/api';
2
2
  import { PaginationCursorCodecOptions } from './cursor';
3
3
  type MongoPaginateQueryLike<TNode> = {
4
4
  where: (delta: Record<string, unknown>) => unknown;
@@ -1,4 +1,4 @@
1
- import { default as mongoose } from '../../vite/node_modules/mongoose';
1
+ import { default as mongoose } from 'mongoose';
2
2
  type ModelModules = Record<string, unknown>;
3
3
  type ModelsScope = "tenant" | "global";
4
4
  type RegisteredSchemas = Record<string, mongoose.Schema>;
@@ -1,3 +1,3 @@
1
- import { default as mongoose } from '../../vite/node_modules/mongoose';
1
+ import { default as mongoose } from 'mongoose';
2
2
  export declare const rtsChangeLogPlugin: (schema: mongoose.Schema) => void;
3
3
  //# sourceMappingURL=rtsChangeLogPlugin.d.ts.map
@@ -1,4 +1,4 @@
1
- import { default as mongoose } from '../../vite/node_modules/mongoose';
1
+ import { default as mongoose } from 'mongoose';
2
2
  import { LoadModelCtx } from './modelsApi';
3
3
  export declare const getTenantFilesystemDbName: (tenantId: string) => string;
4
4
  export declare const getTenantFilesystemDb: (tenantId: string) => Promise<mongoose.Connection>;
@@ -1,5 +1,5 @@
1
- import { z } from '../../../vite/node_modules/zod';
2
- declare module '../../../vite/node_modules/zod' {
1
+ import { z } from 'zod';
2
+ declare module "zod" {
3
3
  interface ZodString {
4
4
  unique(arg?: boolean): this;
5
5
  sparse(arg?: boolean): this;
@@ -1,4 +1,4 @@
1
- import { z, ZodError } from '../../../vite/node_modules/zod';
1
+ import { z, ZodError } from 'zod';
2
2
  import { extendZod } from './extension';
3
3
  export * from './localizedString';
4
4
  export { extendZod, z, ZodError };
@@ -1,4 +1,4 @@
1
- import { z } from '../../../vite/node_modules/zod';
1
+ import { z } from 'zod';
2
2
  export type LanguageCode = string;
3
3
  export type LocalizedString = Record<LanguageCode, string>;
4
4
  export type I18nStringRecord = LocalizedString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/db",
3
- "version": "0.37.0",
3
+ "version": "0.38.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"