@loomcore/common 0.0.41 → 0.0.43

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,11 +1,11 @@
1
- import { AppId } from '../types/app.types.js';
1
+ import { AppIdType } from '../types/app.types.js';
2
2
  export interface IAuditable {
3
3
  _created: Date;
4
- _createdBy: AppId;
4
+ _createdBy: AppIdType;
5
5
  _updated: Date;
6
- _updatedBy: AppId;
6
+ _updatedBy: AppIdType;
7
7
  _deleted?: Date;
8
- _deletedBy?: AppId;
8
+ _deletedBy?: AppIdType;
9
9
  }
10
10
  export declare const AuditableSchema: import("@sinclair/typebox").TObject<{
11
11
  _created: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TString, Date>;
@@ -1,7 +1,7 @@
1
- import { AppId } from '../types/app.types.js';
1
+ import { AppIdType } from '../types/app.types.js';
2
2
  export interface IEntity {
3
- _id: AppId;
4
- _orgId?: AppId;
3
+ _id: AppIdType;
4
+ _orgId?: AppIdType;
5
5
  }
6
6
  export declare const EntitySchema: import("@sinclair/typebox").TObject<{
7
7
  _id: import("@sinclair/typebox").TSchema;
@@ -1,7 +1,7 @@
1
1
  import { IAuditable } from './auditable.model.js';
2
- import { AppId } from '../types/app.types.js';
2
+ import { AppIdType } from '../types/app.types.js';
3
3
  export interface IOrganization extends IAuditable {
4
- _id: AppId;
4
+ _id: AppIdType;
5
5
  name: string;
6
6
  code: string;
7
7
  description?: string;
@@ -1,4 +1,4 @@
1
- export interface AppIdType {
1
+ export interface IAppIdType {
2
2
  id: string | number;
3
3
  }
4
- export type AppId = AppIdType['id'];
4
+ export type AppIdType = IAppIdType['id'];
@@ -1,8 +1,8 @@
1
1
  import { Kind, TSchema, NumberOptions } from '@sinclair/typebox';
2
- import { AppId } from '../types/app.types.js';
2
+ import { AppIdType } from '../types/app.types.js';
3
3
  export declare const setIdSchema: (schema: TSchema) => void;
4
4
  export declare const getIdSchema: () => TSchema;
5
- export declare const getSystemUserId: () => AppId;
5
+ export declare const getSystemUserId: () => AppIdType;
6
6
  export declare function TypeboxIsoDate(options?: object): import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TString, Date>;
7
7
  export declare function TypeboxDate(options?: object): import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TString, Date>;
8
8
  export declare function TypeboxObjectId(options?: object): import("@sinclair/typebox").TString;
@@ -29,7 +29,7 @@ export const getIdSchema = () => {
29
29
  return idSchemaInstance;
30
30
  };
31
31
  export const getSystemUserId = () => {
32
- if (!systemUserId) {
32
+ if (systemUserId === undefined) {
33
33
  throw new Error('SystemUser ID has not been initialized. Please call setIdSchema() at application startup.');
34
34
  }
35
35
  return systemUserId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loomcore/common",
3
- "version": "0.0.41",
3
+ "version": "0.0.43",
4
4
  "private": false,
5
5
  "description": "Loom Core Models- common models, interfaces, types, and utils for Loom Core. All things common to both api and client apps.",
6
6
  "scripts": {