@qrvey/data-persistence 0.5.21-1012 → 0.5.22-1139-beta.2
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/cjs/events/base.event.js +3 -0
- package/dist/cjs/events/base.event.js.map +1 -0
- package/dist/cjs/events/createdEntity.event.js +3 -0
- package/dist/cjs/events/createdEntity.event.js.map +1 -0
- package/dist/cjs/events/index.js +20 -0
- package/dist/cjs/events/index.js.map +1 -0
- package/dist/cjs/events/removeEntity.event.js +3 -0
- package/dist/cjs/events/removeEntity.event.js.map +1 -0
- package/dist/cjs/events/updatedEntity.event.js +3 -0
- package/dist/cjs/events/updatedEntity.event.js.map +1 -0
- package/dist/cjs/helpers/eventHelper.js +46 -0
- package/dist/cjs/helpers/eventHelper.js.map +1 -0
- package/dist/cjs/interfaces/entityDefinition.interface.js +3 -0
- package/dist/cjs/interfaces/entityDefinition.interface.js.map +1 -0
- package/dist/cjs/interfaces/index.js +1 -0
- package/dist/cjs/interfaces/index.js.map +1 -1
- package/dist/cjs/schemas/crudSchema.js.map +1 -1
- package/dist/cjs/services/crud.service.js +51 -3
- package/dist/cjs/services/crud.service.js.map +1 -1
- package/dist/cjs/services/eventEmitter.service.js +26 -0
- package/dist/cjs/services/eventEmitter.service.js.map +1 -0
- package/dist/cjs/utils/constants.js +2 -1
- package/dist/cjs/utils/constants.js.map +1 -1
- package/dist/esm/index.d.mts +22 -0
- package/dist/esm/index.mjs +113 -3
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/index.d.ts +22 -0
- package/package.json +3 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -129,6 +129,24 @@ interface ITableColumns {
|
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
+
interface IEntityDependency {
|
|
133
|
+
type: string;
|
|
134
|
+
property: string;
|
|
135
|
+
}
|
|
136
|
+
interface IEntityDefinition {
|
|
137
|
+
idColumn: string;
|
|
138
|
+
type: string;
|
|
139
|
+
dependencies: IEntityDependency[];
|
|
140
|
+
payload: {
|
|
141
|
+
entity_id: string;
|
|
142
|
+
name: string;
|
|
143
|
+
app_id: string;
|
|
144
|
+
org_id: string;
|
|
145
|
+
owner_id: string;
|
|
146
|
+
metadata?: string;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
|
|
132
150
|
declare class CrudSchema {
|
|
133
151
|
static table: string | ITableName;
|
|
134
152
|
static columns: ITableColumns;
|
|
@@ -136,6 +154,7 @@ declare class CrudSchema {
|
|
|
136
154
|
static schema: string | null;
|
|
137
155
|
static poolClient?: PoolClient;
|
|
138
156
|
static isTemporalTable: boolean;
|
|
157
|
+
static entityDefinition?: IEntityDefinition;
|
|
139
158
|
}
|
|
140
159
|
|
|
141
160
|
declare class CrudService<T> {
|
|
@@ -166,6 +185,9 @@ declare class CrudService<T> {
|
|
|
166
185
|
buildSort(column: string, direction: string): ISorting;
|
|
167
186
|
updateExpression(filters: IFilter[] | ICompositeFilter, actions: IUpdateExpressions, options?: IUpdateExpressionsOptions): Promise<T | null>;
|
|
168
187
|
runRawQuery(query: string, params: any[]): Promise<any>;
|
|
188
|
+
private afterCreateHook;
|
|
189
|
+
private afterUpdateHook;
|
|
190
|
+
private afterRemoveHook;
|
|
169
191
|
}
|
|
170
192
|
|
|
171
193
|
declare function buildFilter(attribute: string, value: any, operator?: string, relativePath?: undefined): {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@qrvey/data-persistence",
|
|
3
3
|
"types": "dist/types/index.d.ts",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
|
-
"version": "0.5.
|
|
5
|
+
"version": "0.5.22-1139-beta.2",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
@@ -27,11 +27,12 @@
|
|
|
27
27
|
"login-code-artifact": "aws codeartifact --profile manualqa login --tool npm --domain qrvey-npm --repository qrvey-npm",
|
|
28
28
|
"publish-codeartifact": "npm publish --prefix dist --registry=https://qrvey-npm-459649773688.d.codeartifact.us-east-1.amazonaws.com/npm/qrvey-npm/",
|
|
29
29
|
"publish-package-dev": "yarn prepare-publish && yarn publish-codeartifact",
|
|
30
|
-
"publish-package": "yarn prepare-publish && npm publish --tag
|
|
30
|
+
"publish-package": "yarn prepare-publish && npm publish --tag beta"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@aws-sdk/client-dynamodb": "3.986.0",
|
|
34
34
|
"@aws-sdk/lib-dynamodb": "3.986.0",
|
|
35
|
+
"@qrvey/event-broker": "1.1.5-1139-beta",
|
|
35
36
|
"@scaleleap/pg-format": "1.0.0",
|
|
36
37
|
"pg": "8.11.4"
|
|
37
38
|
},
|