@monorise/base 1.0.1 → 1.0.3
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/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +7 -0
- package/dist/index.js.map +1 -1
- package/index.ts +0 -11
- package/package.json +1 -1
- package/dist/monorise.type.d.ts +0 -17
- package/dist/monorise.type.d.ts.map +0 -1
- package/dist/monorise.type.js +0 -7
- package/dist/monorise.type.js.map +0 -1
- package/dist/mutual.type.d.ts +0 -21
- package/dist/mutual.type.d.ts.map +0 -1
- package/dist/mutual.type.js +0 -4
- package/dist/mutual.type.js.map +0 -1
- package/types/mutual.type.ts +0 -32
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { CreatedEntity, DraftEntity, Entity, EntitySchemaMap, MonoriseEntityConfig } from './types/monorise.type';
|
|
2
|
-
|
|
3
|
-
export { Entity, EntitySchemaMap, DraftEntity, CreatedEntity, MonoriseEntityConfig, MutualDataWithIndex, MutualDataMapping, MutualData, Mutual, };
|
|
2
|
+
export { Entity, EntitySchemaMap, DraftEntity, CreatedEntity, MonoriseEntityConfig, };
|
|
4
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,WAAW,EACX,MAAM,EACN,eAAe,EACf,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,MAAM,EACN,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,WAAW,EACX,MAAM,EACN,eAAe,EACf,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,MAAM,EACN,eAAe,EACf,WAAW,EACX,aAAa,EACb,oBAAoB,GACrB,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,yDAM+B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,yDAM+B;AAG7B,uFANA,sBAAM,OAMA"}
|
package/index.ts
CHANGED
|
@@ -6,21 +6,10 @@ import {
|
|
|
6
6
|
MonoriseEntityConfig,
|
|
7
7
|
} from './types/monorise.type';
|
|
8
8
|
|
|
9
|
-
import {
|
|
10
|
-
Mutual,
|
|
11
|
-
MutualData,
|
|
12
|
-
MutualDataMapping,
|
|
13
|
-
MutualDataWithIndex,
|
|
14
|
-
} from './types/mutual.type';
|
|
15
|
-
|
|
16
9
|
export {
|
|
17
10
|
Entity,
|
|
18
11
|
EntitySchemaMap,
|
|
19
12
|
DraftEntity,
|
|
20
13
|
CreatedEntity,
|
|
21
14
|
MonoriseEntityConfig,
|
|
22
|
-
MutualDataWithIndex,
|
|
23
|
-
MutualDataMapping,
|
|
24
|
-
MutualData,
|
|
25
|
-
Mutual,
|
|
26
15
|
};
|
package/package.json
CHANGED
package/dist/monorise.type.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare enum Entity {
|
|
2
|
-
}
|
|
3
|
-
export interface EntitySchemaMap {
|
|
4
|
-
[key: string]: Record<string, any>;
|
|
5
|
-
}
|
|
6
|
-
export type DraftEntity<T extends Entity = Entity> = T extends keyof EntitySchemaMap ? EntitySchemaMap[T] : never;
|
|
7
|
-
export type CreatedEntity<T extends Entity = Entity> = {
|
|
8
|
-
entityId: string;
|
|
9
|
-
entityType: string;
|
|
10
|
-
data: T extends keyof EntitySchemaMap ? EntitySchemaMap[T] : never;
|
|
11
|
-
createdAt: string;
|
|
12
|
-
updatedAt: string;
|
|
13
|
-
};
|
|
14
|
-
export interface MonoriseConfig {
|
|
15
|
-
configPath: string;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=monorise.type.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"monorise.type.d.ts","sourceRoot":"","sources":["../types/monorise.type.ts"],"names":[],"mappings":"AAAA,oBAAY,MAAM;CAAG;AAErB,MAAM,WAAW,eAAe;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACpC;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAC/C,CAAC,SAAS,MAAM,eAAe,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;AAE/D,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,CAAC,SAAS,MAAM,eAAe,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IACnE,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
package/dist/monorise.type.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"monorise.type.js","sourceRoot":"","sources":["../types/monorise.type.ts"],"names":[],"mappings":";;;AAAA,IAAY,MAAS;AAArB,WAAY,MAAM;AAAE,CAAC,EAAT,MAAM,sBAAN,MAAM,QAAG"}
|
package/dist/mutual.type.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Entity, type EntitySchemaMap } from './monorise.type';
|
|
2
|
-
type MutualDataWithIndex = {
|
|
3
|
-
index: number;
|
|
4
|
-
};
|
|
5
|
-
interface MutualDataMapping {
|
|
6
|
-
}
|
|
7
|
-
type MutualData<B extends Entity, T extends Entity> = B extends keyof MutualDataMapping ? T extends keyof MutualDataMapping[B] ? MutualDataMapping[B][T] : Record<string, any> : Record<string, any>;
|
|
8
|
-
type Mutual<B extends Entity = Entity, T extends Entity = Entity> = {
|
|
9
|
-
entityId: string;
|
|
10
|
-
entityType: T;
|
|
11
|
-
byEntityId: string;
|
|
12
|
-
byEntityType: B;
|
|
13
|
-
mutualId: string;
|
|
14
|
-
data: T extends keyof EntitySchemaMap ? EntitySchemaMap[T] : never;
|
|
15
|
-
mutualData: MutualData<B, T> | Record<string, any>;
|
|
16
|
-
createdAt: string;
|
|
17
|
-
updatedAt: string;
|
|
18
|
-
mutualUpdatedAt: string;
|
|
19
|
-
};
|
|
20
|
-
export type { MutualDataWithIndex, MutualDataMapping, MutualData, Mutual };
|
|
21
|
-
//# sourceMappingURL=mutual.type.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mutual.type.d.ts","sourceRoot":"","sources":["../types/mutual.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE/D,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,UAAU,iBAAiB;CAC1B;AAED,KAAK,UAAU,CACb,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,IACd,CAAC,SAAS,MAAM,iBAAiB,GACjC,CAAC,SAAS,MAAM,iBAAiB,CAAC,CAAC,CAAC,GAClC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACvB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACrB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAExB,KAAK,MAAM,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,CAAC,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,CAAC,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,CAAC,SAAS,MAAM,eAAe,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IACnE,UAAU,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC"}
|
package/dist/mutual.type.js
DELETED
package/dist/mutual.type.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mutual.type.js","sourceRoot":"","sources":["../types/mutual.type.ts"],"names":[],"mappings":";;AAOC,CAAC"}
|
package/types/mutual.type.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Entity, EntitySchemaMap } from './monorise.type';
|
|
2
|
-
|
|
3
|
-
type MutualDataWithIndex = {
|
|
4
|
-
index: number;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
// biome-ignore lint/suspicious/noEmptyInterface: To be extended via declare module
|
|
8
|
-
interface MutualDataMapping {}
|
|
9
|
-
|
|
10
|
-
type MutualData<
|
|
11
|
-
B extends Entity,
|
|
12
|
-
T extends Entity,
|
|
13
|
-
> = B extends keyof MutualDataMapping
|
|
14
|
-
? T extends keyof MutualDataMapping[B]
|
|
15
|
-
? MutualDataMapping[B][T]
|
|
16
|
-
: Record<string, any> // Fallback for unmatched T
|
|
17
|
-
: Record<string, any>;
|
|
18
|
-
|
|
19
|
-
type Mutual<B extends Entity = Entity, T extends Entity = Entity> = {
|
|
20
|
-
entityId: string;
|
|
21
|
-
entityType: T;
|
|
22
|
-
byEntityId: string;
|
|
23
|
-
byEntityType: B;
|
|
24
|
-
mutualId: string;
|
|
25
|
-
data: T extends keyof EntitySchemaMap ? EntitySchemaMap[T] : never;
|
|
26
|
-
mutualData: MutualData<B, T> | Record<string, any>;
|
|
27
|
-
createdAt: string;
|
|
28
|
-
updatedAt: string;
|
|
29
|
-
mutualUpdatedAt: string;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export type { MutualDataWithIndex, MutualDataMapping, MutualData, Mutual };
|