mocody 0.6.6 → 0.6.8
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.cjs +5907 -0
- package/dist/index.d.cts +723 -0
- package/dist/index.d.ts +723 -10
- package/dist/index.js +5907 -9
- package/package.json +36 -8
- package/dist/core/base-schema.d.ts +0 -13
- package/dist/core/base-schema.js +0 -8
- package/dist/core/base-schema.js.map +0 -1
- package/dist/couch/couch-data-operation.d.ts +0 -91
- package/dist/couch/couch-data-operation.js +0 -528
- package/dist/couch/couch-data-operation.js.map +0 -1
- package/dist/couch/couch-filter-query-operation.d.ts +0 -45
- package/dist/couch/couch-filter-query-operation.js +0 -369
- package/dist/couch/couch-filter-query-operation.js.map +0 -1
- package/dist/couch/couch-initializer.d.ts +0 -126
- package/dist/couch/couch-initializer.js +0 -173
- package/dist/couch/couch-initializer.js.map +0 -1
- package/dist/couch/couch-manage-table.d.ts +0 -46
- package/dist/couch/couch-manage-table.js +0 -75
- package/dist/couch/couch-manage-table.js.map +0 -1
- package/dist/dynamo/dynamo-data-operation.d.ts +0 -101
- package/dist/dynamo/dynamo-data-operation.js +0 -860
- package/dist/dynamo/dynamo-data-operation.js.map +0 -1
- package/dist/dynamo/dynamo-filter-query-operation.d.ts +0 -30
- package/dist/dynamo/dynamo-filter-query-operation.js +0 -652
- package/dist/dynamo/dynamo-filter-query-operation.js.map +0 -1
- package/dist/dynamo/dynamo-filter-query-partiql-operation.d.ts +0 -23
- package/dist/dynamo/dynamo-filter-query-partiql-operation.js +0 -560
- package/dist/dynamo/dynamo-filter-query-partiql-operation.js.map +0 -1
- package/dist/dynamo/dynamo-helper.d.ts +0 -22
- package/dist/dynamo/dynamo-helper.js +0 -54
- package/dist/dynamo/dynamo-helper.js.map +0 -1
- package/dist/dynamo/dynamo-initializer.d.ts +0 -16
- package/dist/dynamo/dynamo-initializer.js +0 -52
- package/dist/dynamo/dynamo-initializer.js.map +0 -1
- package/dist/dynamo/dynamo-manage-table.d.ts +0 -33
- package/dist/dynamo/dynamo-manage-table.js +0 -387
- package/dist/dynamo/dynamo-manage-table.js.map +0 -1
- package/dist/dynamo/dynamo-query-partiql-processor.d.ts +0 -29
- package/dist/dynamo/dynamo-query-partiql-processor.js +0 -209
- package/dist/dynamo/dynamo-query-partiql-processor.js.map +0 -1
- package/dist/dynamo/dynamo-query-scan-processor.d.ts +0 -25
- package/dist/dynamo/dynamo-query-scan-processor.js +0 -265
- package/dist/dynamo/dynamo-query-scan-processor.js.map +0 -1
- package/dist/helpers/base-joi-helper.d.ts +0 -2
- package/dist/helpers/base-joi-helper.js +0 -9
- package/dist/helpers/base-joi-helper.js.map +0 -1
- package/dist/helpers/constants.d.ts +0 -3
- package/dist/helpers/constants.js +0 -4
- package/dist/helpers/constants.js.map +0 -1
- package/dist/helpers/errors.d.ts +0 -14
- package/dist/helpers/errors.js +0 -34
- package/dist/helpers/errors.js.map +0 -1
- package/dist/helpers/logging-service.d.ts +0 -9
- package/dist/helpers/logging-service.js +0 -46
- package/dist/helpers/logging-service.js.map +0 -1
- package/dist/helpers/mocody-utils.d.ts +0 -22
- package/dist/helpers/mocody-utils.js +0 -70
- package/dist/helpers/mocody-utils.js.map +0 -1
- package/dist/helpers/query-validator.d.ts +0 -21
- package/dist/helpers/query-validator.js +0 -102
- package/dist/helpers/query-validator.js.map +0 -1
- package/dist/helpers/util-service.d.ts +0 -38
- package/dist/helpers/util-service.js +0 -225
- package/dist/helpers/util-service.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/model/index.d.ts +0 -40
- package/dist/model/index.js +0 -3
- package/dist/model/index.js.map +0 -1
- package/dist/mongo/mongo-data-operation.d.ts +0 -89
- package/dist/mongo/mongo-data-operation.js +0 -557
- package/dist/mongo/mongo-data-operation.js.map +0 -1
- package/dist/mongo/mongo-filter-query-operation.d.ts +0 -45
- package/dist/mongo/mongo-filter-query-operation.js +0 -367
- package/dist/mongo/mongo-filter-query-operation.js.map +0 -1
- package/dist/mongo/mongo-initializer.d.ts +0 -16
- package/dist/mongo/mongo-initializer.js +0 -33
- package/dist/mongo/mongo-initializer.js.map +0 -1
- package/dist/mongo/mongo-table-manager.d.ts +0 -31
- package/dist/mongo/mongo-table-manager.js +0 -76
- package/dist/mongo/mongo-table-manager.js.map +0 -1
- package/dist/type/index.d.ts +0 -128
- package/dist/type/index.js +0 -2
- package/dist/type/index.js.map +0 -1
package/dist/type/index.d.ts
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
type RequireAtLeastOneBase<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
2
|
-
[K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
|
|
3
|
-
}[Keys];
|
|
4
|
-
type RequireAtLeastOne<T> = RequireAtLeastOneBase<T, keyof T>;
|
|
5
|
-
type TypeFallBackStringOnly<T> = T extends string ? Extract<T, string> : never;
|
|
6
|
-
type TypeFallBack<T> = undefined extends T ? Exclude<T, undefined> : T;
|
|
7
|
-
type TypeFallBackArray<T> = number extends T ? number[] : string extends T ? string[] : T;
|
|
8
|
-
type TypeFallBackArrayAdvanced<T> = number extends T ? number[] : string extends T ? string[] : Extract<T, string>[] | Extract<T, number>[];
|
|
9
|
-
export type IMocodyKeyConditionParams<T = string> = {
|
|
10
|
-
$eq?: TypeFallBack<T> | null;
|
|
11
|
-
$gt?: TypeFallBack<T>;
|
|
12
|
-
$gte?: TypeFallBack<T>;
|
|
13
|
-
$lt?: TypeFallBack<T>;
|
|
14
|
-
$lte?: TypeFallBack<T>;
|
|
15
|
-
$between?: [TypeFallBack<T>, TypeFallBack<T>];
|
|
16
|
-
$beginsWith?: TypeFallBackStringOnly<T>;
|
|
17
|
-
};
|
|
18
|
-
export type IMocodyQueryConditionParams<T = any> = IMocodyKeyConditionParams<T> & {
|
|
19
|
-
$ne?: TypeFallBack<T> | null;
|
|
20
|
-
$in?: TypeFallBackArrayAdvanced<T>;
|
|
21
|
-
$nin?: TypeFallBackArrayAdvanced<T>;
|
|
22
|
-
$exists?: boolean;
|
|
23
|
-
$elemMatch?: {
|
|
24
|
-
$in: TypeFallBackArray<T>;
|
|
25
|
-
};
|
|
26
|
-
$contains?: TypeFallBackStringOnly<T>;
|
|
27
|
-
$notContains?: TypeFallBackStringOnly<T>;
|
|
28
|
-
$nestedMatch?: IQueryNested<RequireAtLeastOne<T>>;
|
|
29
|
-
$nestedArrayMatch?: IQueryNestedArray<RequireAtLeastOne<T>>;
|
|
30
|
-
};
|
|
31
|
-
export type IMocodyQueryNestedParams<T = any> = IMocodyKeyConditionParams<T> & {
|
|
32
|
-
$contains?: TypeFallBackStringOnly<T>;
|
|
33
|
-
$ne?: TypeFallBack<T> | null;
|
|
34
|
-
$in?: TypeFallBackArrayAdvanced<T>;
|
|
35
|
-
$nin?: TypeFallBackArrayAdvanced<T>;
|
|
36
|
-
$exists?: boolean;
|
|
37
|
-
};
|
|
38
|
-
type IQueryAll<T> = {
|
|
39
|
-
[P in keyof T]: T[P] | IMocodyQueryConditionParams<T[P]>;
|
|
40
|
-
};
|
|
41
|
-
type IQueryNested<T> = {
|
|
42
|
-
[P in keyof T]: T[P] | IMocodyQueryNestedParams<T[P]>;
|
|
43
|
-
};
|
|
44
|
-
export type IQueryNestedArray<T = any> = {
|
|
45
|
-
query: IMocodyQueryNestedParams<any>;
|
|
46
|
-
index: number;
|
|
47
|
-
path: string[];
|
|
48
|
-
};
|
|
49
|
-
export interface IMocodyPagingResult<T> {
|
|
50
|
-
nextPageHash: string | undefined | null;
|
|
51
|
-
paginationResults: T;
|
|
52
|
-
}
|
|
53
|
-
export type IMocodyPagingParams = {
|
|
54
|
-
evaluationLimit?: number | undefined | null;
|
|
55
|
-
nextPageHash?: string | undefined | null;
|
|
56
|
-
};
|
|
57
|
-
type IQueryDefOr<T> = {
|
|
58
|
-
$or?: IQueryAll<RequireAtLeastOne<T>>[];
|
|
59
|
-
};
|
|
60
|
-
type IQueryDefAnd<T> = {
|
|
61
|
-
$and?: IQueryAll<RequireAtLeastOne<T>>[];
|
|
62
|
-
};
|
|
63
|
-
export type IMocodyQueryDefinition<T> = IQueryAll<RequireAtLeastOne<T & IQueryDefOr<T> & IQueryDefAnd<T>>>;
|
|
64
|
-
export interface IMocodyQueryIndexOptions<T, TSortKeyField = string> {
|
|
65
|
-
indexName: string;
|
|
66
|
-
partitionKeyValue: string | number;
|
|
67
|
-
sortKeyQuery?: IMocodyKeyConditionParams<TSortKeyField> | undefined | null;
|
|
68
|
-
query?: IMocodyQueryDefinition<T> | undefined | null;
|
|
69
|
-
fields?: (keyof T)[] | undefined | null;
|
|
70
|
-
excludeFields?: (keyof T)[] | undefined | null;
|
|
71
|
-
pagingParams?: IMocodyPagingParams | undefined | null;
|
|
72
|
-
limit?: number | undefined | null;
|
|
73
|
-
sort?: "asc" | "desc" | undefined | null;
|
|
74
|
-
}
|
|
75
|
-
export type IMocodyQueryIndexOptionsNoPaging<T, TSortKeyField = string> = Omit<IMocodyQueryIndexOptions<T, TSortKeyField>, "pagingParams">;
|
|
76
|
-
export interface IMocodyIndexDefinition<T> {
|
|
77
|
-
indexName: string;
|
|
78
|
-
partitionKeyFieldName: keyof T;
|
|
79
|
-
sortKeyFieldName: keyof T;
|
|
80
|
-
dataTypes: {
|
|
81
|
-
partitionKeyDataType: "N" | "S";
|
|
82
|
-
sortKeyDataType: "N" | "S";
|
|
83
|
-
};
|
|
84
|
-
projectionFieldsInclude?: (keyof T)[];
|
|
85
|
-
}
|
|
86
|
-
export type IMocodyFieldCondition<T> = {
|
|
87
|
-
field: keyof T;
|
|
88
|
-
equals: string | number;
|
|
89
|
-
}[];
|
|
90
|
-
interface IMocodyCreateTransactionPrepare<T> {
|
|
91
|
-
kind: "create";
|
|
92
|
-
data: T;
|
|
93
|
-
}
|
|
94
|
-
interface IMocodyUpdateTransactionPrepare<T> {
|
|
95
|
-
kind: "update";
|
|
96
|
-
data: T;
|
|
97
|
-
dataId: string;
|
|
98
|
-
}
|
|
99
|
-
interface IMocodyDeleteTransactionPrepare<T> {
|
|
100
|
-
kind: "delete";
|
|
101
|
-
dataId: string;
|
|
102
|
-
}
|
|
103
|
-
export type IMocodyTransactionPrepare<T> = IMocodyCreateTransactionPrepare<T> | IMocodyUpdateTransactionPrepare<T> | IMocodyDeleteTransactionPrepare<T>;
|
|
104
|
-
interface IMocodyPreparedCreateTransaction {
|
|
105
|
-
kind: "create";
|
|
106
|
-
tableName: string;
|
|
107
|
-
data: Record<string, any>;
|
|
108
|
-
partitionKeyFieldName: "id";
|
|
109
|
-
}
|
|
110
|
-
interface IMocodyPreparedUpdateTransaction {
|
|
111
|
-
kind: "update";
|
|
112
|
-
tableName: string;
|
|
113
|
-
data: Record<string, any>;
|
|
114
|
-
keyQuery: Record<string, any>;
|
|
115
|
-
partitionKeyFieldName: "id";
|
|
116
|
-
}
|
|
117
|
-
interface IMocodyPreparedDeleteTransaction {
|
|
118
|
-
kind: "delete";
|
|
119
|
-
tableName: string;
|
|
120
|
-
keyQuery: Record<string, any>;
|
|
121
|
-
partitionKeyFieldName: "id";
|
|
122
|
-
}
|
|
123
|
-
export type IMocodyPreparedTransaction = IMocodyPreparedCreateTransaction | IMocodyPreparedUpdateTransaction | IMocodyPreparedDeleteTransaction;
|
|
124
|
-
export type IFieldAliases<T> = {
|
|
125
|
-
source: keyof T;
|
|
126
|
-
dest: keyof T;
|
|
127
|
-
}[];
|
|
128
|
-
export {};
|
package/dist/type/index.js
DELETED
package/dist/type/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/type/index.ts"],"names":[],"mappings":""}
|