@futdevpro/fsm-dynamo 1.10.9 → 1.10.11
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/build/_models/control-models/service-endpoint-settings-base.control-model.d.ts +20 -0
- package/build/_models/control-models/service-endpoint-settings-base.control-model.d.ts.map +1 -0
- package/build/_models/control-models/service-endpoint-settings-base.control-model.js +80 -0
- package/build/_models/control-models/service-endpoint-settings-base.control-model.js.map +1 -0
- package/build/_models/types/db-/304/221filter.type.d.ts +18 -15
- package/build/_models/types/db-/304/221filter.type.d.ts.map +1 -1
- package/build/_models/types/db-/304/221filter.type.js +2 -2
- package/build/_models/types/db-/304/221filter.type.js.map +1 -1
- package/build/_models/types/db-/304/221sort.type.d.ts +5 -1
- package/build/_models/types/db-/304/221sort.type.d.ts.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/futdevpro-fsm-dynamo-01.10.11.tgz +0 -0
- package/package.json +1 -1
- package/src/_models/control-models/service-endpoint-settings-base.control-model.ts +113 -0
- package/src/_models/types/db-/304/221filter.type.ts +24 -11
- package/src/_models/types/db-/304/221sort.type.ts +5 -1
- package/src/index.ts +1 -0
- package/futdevpro-fsm-dynamo-01.10.09.tgz +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DyFM_HttpCallType } from '../../_enums/http-call-type.enum';
|
|
2
|
+
export interface DyFM_EndpointTypesContainer<T_Result, T_Inputs extends Array<any>, T_Body> {
|
|
3
|
+
resultType: T_Result;
|
|
4
|
+
inputTypes: T_Inputs;
|
|
5
|
+
bodyType: T_Body;
|
|
6
|
+
}
|
|
7
|
+
export type DyFM_ServiceEndpointTypesSetting = {
|
|
8
|
+
[key: string]: DyFM_EndpointTypesContainer<unknown, any, unknown>;
|
|
9
|
+
};
|
|
10
|
+
export declare class DyFM_Endpoint_SettingsBase<T_Result, I_Inputs, T_Body> {
|
|
11
|
+
name?: string;
|
|
12
|
+
type?: DyFM_HttpCallType;
|
|
13
|
+
endPoint?: string;
|
|
14
|
+
pathParamKeys?: string[];
|
|
15
|
+
constructor(set: DyFM_Endpoint_SettingsBase<T_Result, I_Inputs, T_Body>);
|
|
16
|
+
}
|
|
17
|
+
export type DyFM_ServiceEndpoint_SettingsBase<T extends DyFM_ServiceEndpointTypesSetting> = {
|
|
18
|
+
[K in keyof T]: DyFM_Endpoint_SettingsBase<T[K]['resultType'], T[K]['inputTypes'], T[K]['bodyType']>;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=service-endpoint-settings-base.control-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-endpoint-settings-base.control-model.d.ts","sourceRoot":"","sources":["../../../src/_models/control-models/service-endpoint-settings-base.control-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAgBrE,MAAM,WAAW,2BAA2B,CAAC,QAAQ,EAAC,QAAQ,SAAS,KAAK,CAAC,GAAG,CAAC,EAAC,MAAM;IACtF,UAAU,EAAE,QAAQ,CAAC;IACrB,UAAU,EAAE,QAAQ,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,MAAM,gCAAgC,GAAG;IAC7C,CAAC,GAAG,EAAE,MAAM,GAAG,2BAA2B,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;CACnE,CAAA;AAED,qBAAa,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM;IAChE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAM;gBAG5B,GAAG,EAAE,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC;CAI9D;AACD,MAAM,MAAM,iCAAiC,CAAC,CAAC,SAAS,gCAAgC,IAAI;KACzF,CAAC,IAAI,MAAM,CAAC,GAAG,0BAA0B,CACxC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CACzD;CACF,CAAA"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DyFM_Endpoint_SettingsBase = void 0;
|
|
4
|
+
class DyFM_Endpoint_SettingsBase {
|
|
5
|
+
name;
|
|
6
|
+
type;
|
|
7
|
+
endPoint;
|
|
8
|
+
pathParamKeys = [];
|
|
9
|
+
constructor(set) {
|
|
10
|
+
Object.assign(this, set);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.DyFM_Endpoint_SettingsBase = DyFM_Endpoint_SettingsBase;
|
|
14
|
+
/* asdasd
|
|
15
|
+
export class DyNX_ApiCall_Settings<
|
|
16
|
+
T_Result,
|
|
17
|
+
T_Inputs extends Array<any>,
|
|
18
|
+
T_Body
|
|
19
|
+
> extends DyFM_Endpoint_SettingsBase<T_Result, T_Inputs, T_Body> {
|
|
20
|
+
baseUrl?: string;
|
|
21
|
+
|
|
22
|
+
httpOptions?: any;
|
|
23
|
+
|
|
24
|
+
call?: (...inputs: T_Inputs) => Promise<T_Result>;
|
|
25
|
+
|
|
26
|
+
constructor(
|
|
27
|
+
set: DyNX_ApiCall_Settings<T_Result, T_Inputs, T_Body>
|
|
28
|
+
) {
|
|
29
|
+
super(set);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export type DyNX_ApiService_Base<T extends DyFM_ServiceEndpointTypesSetting> = {
|
|
33
|
+
[K in keyof T]: DyNX_ApiCall_Settings<
|
|
34
|
+
T[K]['resultType'], T[K]['inputTypes'], T[K]['bodyType']
|
|
35
|
+
>
|
|
36
|
+
} */
|
|
37
|
+
/*
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
export interface Flow_EPResult_Settings333 extends DyFM_ServiceEndpointTypesSetting {
|
|
41
|
+
getFlow: DyFM_EndpointTypesContainer<Flow, [string], undefined>;
|
|
42
|
+
modifyFlow: DyFM_EndpointTypesContainer<Flow, [string, Flow], Flow>;
|
|
43
|
+
getFlowsByUserId: DyFM_EndpointTypesContainer<Flow[], [string], undefined>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export class Flow_EP333 implements DyFM_ServiceEndpoint_SettingsBase<Flow_EPResult_Settings333> {
|
|
47
|
+
[key: string]: DyFM_Endpoint_SettingsBase<any, any, any>;
|
|
48
|
+
|
|
49
|
+
getFlow = new DyFM_Endpoint_SettingsBase({
|
|
50
|
+
type: DyFM_HttpCallType.get,
|
|
51
|
+
endPoint: '/get/:userId/:flowId',
|
|
52
|
+
});
|
|
53
|
+
modifyFlow = new DyFM_Endpoint_SettingsBase({
|
|
54
|
+
type: DyFM_HttpCallType.post,
|
|
55
|
+
endPoint: '/modify/:userId',
|
|
56
|
+
});
|
|
57
|
+
getFlowsByUserId = new DyFM_Endpoint_SettingsBase({
|
|
58
|
+
type: DyFM_HttpCallType.get,
|
|
59
|
+
endPoint: '/get-all-my/:userId',
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
const flow_EP333 = new Flow_EP333();
|
|
63
|
+
|
|
64
|
+
export class Flow_API333 implements DyNX_ApiService_Base<Flow_EPResult_Settings333> {
|
|
65
|
+
[key: string]: DyNX_ApiCall_Settings<any, any, any>;
|
|
66
|
+
|
|
67
|
+
getFlow = new DyNX_ApiCall_Settings<Flow, [string], undefined>({
|
|
68
|
+
...flow_EP333.getFlow,
|
|
69
|
+
call: async (id: string) => new Flow(),
|
|
70
|
+
});
|
|
71
|
+
modifyFlow = new DyNX_ApiCall_Settings<Flow, [string, Flow], Flow>({
|
|
72
|
+
...flow_EP333.modifyFlow,
|
|
73
|
+
call: async (userId: string, flow: Flow) => new Flow(),
|
|
74
|
+
});
|
|
75
|
+
getFlowsByUserId = new DyNX_ApiCall_Settings<Flow[], [string], undefined>({
|
|
76
|
+
...flow_EP333.getFlowsByUserId,
|
|
77
|
+
call: async (userId: string) => [new Flow()],
|
|
78
|
+
});
|
|
79
|
+
} */
|
|
80
|
+
//# sourceMappingURL=service-endpoint-settings-base.control-model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-endpoint-settings-base.control-model.js","sourceRoot":"","sources":["../../../src/_models/control-models/service-endpoint-settings-base.control-model.ts"],"names":[],"mappings":";;;AAyBA,MAAa,0BAA0B;IACrC,IAAI,CAAU;IACd,IAAI,CAAqB;IACzB,QAAQ,CAAU;IAElB,aAAa,GAAc,EAAE,CAAC;IAE9B,YACE,GAA2D;QAE3D,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC3B,CAAC;CACF;AAZD,gEAYC;AAOD;;;;;;;;;;;;;;;;;;;;;;IAsBI;AAIJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0CI"}
|
|
@@ -5,17 +5,26 @@ import { DyFM_RangeValue } from '../control-models/range-value.control-model';
|
|
|
5
5
|
*
|
|
6
6
|
* it should be the value, a range or an array of the searching values
|
|
7
7
|
*/
|
|
8
|
-
export type DyFM_DBĐFilter<T_RootProperty
|
|
9
|
-
[K in keyof T_RootProperty]?: T_RootProperty[K] | T_RootProperty[K][] | DyFM_RangeValue<T_RootProperty[K]> | DyFM_SpecialSearch<
|
|
8
|
+
export type DyFM_DBĐFilter<T_RootProperty> = {
|
|
9
|
+
[K in keyof T_RootProperty]?: T_RootProperty[K] | T_RootProperty[K][] | DyFM_RangeValue<T_RootProperty[K]> | DyFM_SpecialSearch<T_RootProperty> | DyFM_SpecialNestSearch<any>;
|
|
10
10
|
};
|
|
11
11
|
export interface DyFM_SpecialSearch<T> {
|
|
12
|
-
|
|
13
|
-
searchValue: T;
|
|
12
|
+
isSpecialSearch: true;
|
|
13
|
+
searchValue: T | T[];
|
|
14
14
|
type: DyFM_SpecialSearch_Type;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* searches for a nested property in the object
|
|
18
|
+
* can search for nested properties in arrays as well with the following syntax used in key:
|
|
19
|
+
* nestKeys: [ 'arrayProperty', '*', 'nestedPropertySearch' ]
|
|
20
|
+
*/
|
|
21
|
+
export interface DyFM_SpecialNestSearch<T_NestedProperty> {
|
|
22
|
+
isSpecialNestSearch: true;
|
|
23
|
+
nestedPropertySearches: {
|
|
24
|
+
nestKeys: string[];
|
|
25
|
+
propertyType: DyFM_BasicProperty_Type;
|
|
26
|
+
search: T_NestedProperty | T_NestedProperty[] | DyFM_RangeValue<T_NestedProperty> | DyFM_SpecialSearch<T_NestedProperty>;
|
|
27
|
+
}[];
|
|
19
28
|
}
|
|
20
29
|
export declare enum DyFM_SpecialSearch_Type {
|
|
21
30
|
/**
|
|
@@ -29,12 +38,6 @@ export declare enum DyFM_SpecialSearch_Type {
|
|
|
29
38
|
/**
|
|
30
39
|
* searches each word in the string, returns true if ALL words are found in the SAME order
|
|
31
40
|
* */
|
|
32
|
-
stringListSearchOrdered = "stringListSearchOrdered"
|
|
33
|
-
/**
|
|
34
|
-
* searches for a nested property in the object
|
|
35
|
-
* can search for nested properties in arrays as well with the following syntax used in key:
|
|
36
|
-
* 'arrayProperty[*].nestedPropertySearch'
|
|
37
|
-
*/
|
|
38
|
-
nestedPropertySearch = "nestedPropertySearch"
|
|
41
|
+
stringListSearchOrdered = "stringListSearchOrdered"
|
|
39
42
|
}
|
|
40
43
|
//# sourceMappingURL=db-%C4%91filter.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db-đfilter.type.d.ts","sourceRoot":"","sources":["../../../src/_models/types/db-đfilter.type.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,cAAc,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"db-đfilter.type.d.ts","sourceRoot":"","sources":["../../../src/_models/types/db-đfilter.type.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,cAAc,CAAC,cAAc,IAAI;KAC1C,CAAC,IAAI,MAAM,cAAc,CAAC,CAAC,EAC1B,cAAc,CAAC,CAAC,CAAC,GACjB,cAAc,CAAC,CAAC,CAAC,EAAE,GACnB,eAAe,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,GAClC,kBAAkB,CAAC,cAAc,CAAC,GAClC,sBAAsB,CAAC,GAAG,CAAC;CAC9B,CAAC;AAEF,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,eAAe,EAAE,IAAI,CAAC;IACtB,WAAW,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;IACrB,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB,CAAC,gBAAgB;IACtD,mBAAmB,EAAE,IAAI,CAAC;IAC1B,sBAAsB,EAAE;QACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,YAAY,EAAE,uBAAuB,CAAC;QACtC,MAAM,EAAE,gBAAgB,GACtB,gBAAgB,EAAE,GAClB,eAAe,CAAC,gBAAgB,CAAC,GACjC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;KACxC,EAAE,CAAC;CACL;AAED,oBAAY,uBAAuB;IACjC;;SAEK;IACL,mBAAmB,wBAAwB;IAC3C;;SAEK;IACL,gBAAgB,qBAAqB;IACrC;;SAEK;IACL,uBAAuB,4BAA4B;CAOpD"}
|
|
@@ -18,8 +18,8 @@ var DyFM_SpecialSearch_Type;
|
|
|
18
18
|
/**
|
|
19
19
|
* searches for a nested property in the object
|
|
20
20
|
* can search for nested properties in arrays as well with the following syntax used in key:
|
|
21
|
-
* 'arrayProperty
|
|
21
|
+
* nestKeys: [ 'arrayProperty', '*', 'nestedPropertySearch' ]
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
/* nestedPropertySearch = 'nestedPropertySearch', */
|
|
24
24
|
})(DyFM_SpecialSearch_Type || (exports.DyFM_SpecialSearch_Type = DyFM_SpecialSearch_Type = {}));
|
|
25
25
|
//# sourceMappingURL=db-%C4%91filter.type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db-đfilter.type.js","sourceRoot":"","sources":["../../../src/_models/types/db-đfilter.type.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"db-đfilter.type.js","sourceRoot":"","sources":["../../../src/_models/types/db-đfilter.type.ts"],"names":[],"mappings":";;;AA0CA,IAAY,uBAmBX;AAnBD,WAAY,uBAAuB;IACjC;;SAEK;IACL,sEAA2C,CAAA;IAC3C;;SAEK;IACL,gEAAqC,CAAA;IACrC;;SAEK;IACL,8EAAmD,CAAA;IACnD;;;;OAIG;IACH,oDAAoD;AACtD,CAAC,EAnBW,uBAAuB,uCAAvB,uBAAuB,QAmBlC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export type DyFM_DBĐSort = {
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* the key to sort by
|
|
4
|
+
* (can be an array that is used for sorting by nested properties)
|
|
5
|
+
*/
|
|
6
|
+
key: string | string[];
|
|
3
7
|
order: 1 | -1 | 'asc' | 'desc' | 'ascending' | 'descending';
|
|
4
8
|
};
|
|
5
9
|
//# sourceMappingURL=db-%C4%91sort.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db-đsort.type.d.ts","sourceRoot":"","sources":["../../../src/_models/types/db-đsort.type.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"db-đsort.type.d.ts","sourceRoot":"","sources":["../../../src/_models/types/db-đsort.type.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IACzB;;;OAGG;IACH,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACvB,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,YAAY,CAAC;CAC7D,CAAA"}
|
package/build/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export * from './_models/control-models/data-property-params.control-model';
|
|
|
33
33
|
export * from './_models/control-models/error.control-model';
|
|
34
34
|
export * from './_models/control-models/poll.control-model';
|
|
35
35
|
export * from './_models/control-models/range-value.control-model';
|
|
36
|
+
export * from './_models/control-models/service-endpoint-settings-base.control-model';
|
|
36
37
|
export * from './_models/data-models/metadata.data-model';
|
|
37
38
|
export * from './_models/interfaces/error-defaults.interface';
|
|
38
39
|
export * from './_models/interfaces/paged.interface';
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AAGrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iDAAiD,CAAC;AAChE,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAG/C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,wCAAwC,CAAC;AAGvD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,uCAAuC,CAAC;AACtD,cAAc,gDAAgD,CAAC;AAI/D,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,yBAAyB,CAAC;AAGxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AAKjD,cAAc,0DAA0D,CAAC;AACzE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,8CAA8C,CAAC;AAC7D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,oDAAoD,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AAGrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iDAAiD,CAAC;AAChE,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAG/C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,wCAAwC,CAAC;AAGvD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,uCAAuC,CAAC;AACtD,cAAc,gDAAgD,CAAC;AAI/D,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,yBAAyB,CAAC;AAGxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AAKjD,cAAc,0DAA0D,CAAC;AACzE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,8CAA8C,CAAC;AAC7D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,oDAAoD,CAAC;AACnE,cAAc,uEAAuE,CAAC;AAGtF,cAAc,2CAA2C,CAAC;AAG1D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,sCAAsC,CAAC;AACrD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,wCAAwC,CAAC;AAGvD,cAAc,gEAAgE,CAAC;AAC/E,cAAc,4DAA4D,CAAC;AAG3E,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC"}
|
package/build/index.js
CHANGED
|
@@ -45,6 +45,7 @@ tslib_1.__exportStar(require("./_models/control-models/data-property-params.cont
|
|
|
45
45
|
tslib_1.__exportStar(require("./_models/control-models/error.control-model"), exports);
|
|
46
46
|
tslib_1.__exportStar(require("./_models/control-models/poll.control-model"), exports);
|
|
47
47
|
tslib_1.__exportStar(require("./_models/control-models/range-value.control-model"), exports);
|
|
48
|
+
tslib_1.__exportStar(require("./_models/control-models/service-endpoint-settings-base.control-model"), exports);
|
|
48
49
|
// models/DATA MODELS
|
|
49
50
|
tslib_1.__exportStar(require("./_models/data-models/metadata.data-model"), exports);
|
|
50
51
|
// models/INTERFACES
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,cAAc;AACd,wBAAwB;AACxB,wFAA8D;AAC9D,yFAA+D;AAC/D,iFAAuD;AACvD,+EAAqD;AAErD,oBAAoB;AACpB,0EAAgD;AAChD,wEAA8C;AAC9C,+EAAqD;AACrD,2EAAiD;AACjD,yEAA+C;AAC/C,0FAAgE;AAChE,8EAAoD;AACpD,yEAA+C;AAE/C,yBAAyB;AACzB,oFAA0D;AAC1D,8EAAoD;AACpD,gFAAsD;AACtD,sFAA4D;AAC5D,iFAAuD;AAEvD,2BAA2B;AAC3B,yFAA+D;AAC/D,gFAAsD;AACtD,yFAA+D;AAG/D,QAAQ;AACR,4EAAkD;AAClD,wEAA8C;AAC9C,yEAA+C;AAC/C,oEAA0C;AAC1C,uEAA6C;AAC7C,2EAAiD;AACjD,kEAAwC;AAExC,aAAa;AACb,yEAA+C;AAC/C,mEAAyC;AACzC,2EAAiD;AAGjD,SAAS;AACT,wBAAwB;AACxB,mGAAyE;AACzE,sGAA4E;AAC5E,uFAA6D;AAC7D,sFAA4D;AAC5D,6FAAmE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,cAAc;AACd,wBAAwB;AACxB,wFAA8D;AAC9D,yFAA+D;AAC/D,iFAAuD;AACvD,+EAAqD;AAErD,oBAAoB;AACpB,0EAAgD;AAChD,wEAA8C;AAC9C,+EAAqD;AACrD,2EAAiD;AACjD,yEAA+C;AAC/C,0FAAgE;AAChE,8EAAoD;AACpD,yEAA+C;AAE/C,yBAAyB;AACzB,oFAA0D;AAC1D,8EAAoD;AACpD,gFAAsD;AACtD,sFAA4D;AAC5D,iFAAuD;AAEvD,2BAA2B;AAC3B,yFAA+D;AAC/D,gFAAsD;AACtD,yFAA+D;AAG/D,QAAQ;AACR,4EAAkD;AAClD,wEAA8C;AAC9C,yEAA+C;AAC/C,oEAA0C;AAC1C,uEAA6C;AAC7C,2EAAiD;AACjD,kEAAwC;AAExC,aAAa;AACb,yEAA+C;AAC/C,mEAAyC;AACzC,2EAAiD;AAGjD,SAAS;AACT,wBAAwB;AACxB,mGAAyE;AACzE,sGAA4E;AAC5E,uFAA6D;AAC7D,sFAA4D;AAC5D,6FAAmE;AACnE,gHAAsF;AAEtF,qBAAqB;AACrB,oFAA0D;AAE1D,oBAAoB;AACpB,wFAA8D;AAC9D,+EAAqD;AACrD,uFAA6D;AAC7D,wFAA8D;AAC9D,sFAA4D;AAC5D,uFAA6D;AAC7D,iFAAuD;AAEvD,gCAAgC;AAChC,yGAA+E;AAC/E,qGAA2E;AAE3E,eAAe;AACf,yEAA+C;AAC/C,uEAA6C;AAC7C,+EAAgD;AAChD,6EAA8C"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@futdevpro/fsm-dynamo",
|
|
3
|
-
"version": "01.10.
|
|
3
|
+
"version": "01.10.11",
|
|
4
4
|
"description": "Full Stack Model Collection for Dynamic (NodeJS-Typescript) Framework called Dynamo, by Future Development Ltd.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prep": "npm i pnpm -g && npm i rimraf nodemon -g",
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { DyFM_HttpCallType } from '../../_enums/http-call-type.enum';
|
|
2
|
+
|
|
3
|
+
/* class Flow {
|
|
4
|
+
id: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
class SomethingElse {
|
|
10
|
+
idddd: string;
|
|
11
|
+
userIdddd: string;
|
|
12
|
+
nameeee: string;
|
|
13
|
+
}
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export interface DyFM_EndpointTypesContainer<T_Result,T_Inputs extends Array<any>,T_Body> {
|
|
18
|
+
resultType: T_Result;
|
|
19
|
+
inputTypes: T_Inputs;
|
|
20
|
+
bodyType: T_Body;
|
|
21
|
+
}
|
|
22
|
+
export type DyFM_ServiceEndpointTypesSetting = {
|
|
23
|
+
[key: string]: DyFM_EndpointTypesContainer<unknown, any, unknown>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export class DyFM_Endpoint_SettingsBase<T_Result, I_Inputs, T_Body> {
|
|
27
|
+
name?: string;
|
|
28
|
+
type?: DyFM_HttpCallType;
|
|
29
|
+
endPoint?: string;
|
|
30
|
+
|
|
31
|
+
pathParamKeys?: string[] = [];
|
|
32
|
+
|
|
33
|
+
constructor(
|
|
34
|
+
set: DyFM_Endpoint_SettingsBase<T_Result, I_Inputs, T_Body>
|
|
35
|
+
) {
|
|
36
|
+
Object.assign(this, set);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export type DyFM_ServiceEndpoint_SettingsBase<T extends DyFM_ServiceEndpointTypesSetting> = {
|
|
40
|
+
[K in keyof T]: DyFM_Endpoint_SettingsBase<
|
|
41
|
+
T[K]['resultType'], T[K]['inputTypes'], T[K]['bodyType']
|
|
42
|
+
>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* asdasd
|
|
46
|
+
export class DyNX_ApiCall_Settings<
|
|
47
|
+
T_Result,
|
|
48
|
+
T_Inputs extends Array<any>,
|
|
49
|
+
T_Body
|
|
50
|
+
> extends DyFM_Endpoint_SettingsBase<T_Result, T_Inputs, T_Body> {
|
|
51
|
+
baseUrl?: string;
|
|
52
|
+
|
|
53
|
+
httpOptions?: any;
|
|
54
|
+
|
|
55
|
+
call?: (...inputs: T_Inputs) => Promise<T_Result>;
|
|
56
|
+
|
|
57
|
+
constructor(
|
|
58
|
+
set: DyNX_ApiCall_Settings<T_Result, T_Inputs, T_Body>
|
|
59
|
+
) {
|
|
60
|
+
super(set);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export type DyNX_ApiService_Base<T extends DyFM_ServiceEndpointTypesSetting> = {
|
|
64
|
+
[K in keyof T]: DyNX_ApiCall_Settings<
|
|
65
|
+
T[K]['resultType'], T[K]['inputTypes'], T[K]['bodyType']
|
|
66
|
+
>
|
|
67
|
+
} */
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
/*
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
export interface Flow_EPResult_Settings333 extends DyFM_ServiceEndpointTypesSetting {
|
|
75
|
+
getFlow: DyFM_EndpointTypesContainer<Flow, [string], undefined>;
|
|
76
|
+
modifyFlow: DyFM_EndpointTypesContainer<Flow, [string, Flow], Flow>;
|
|
77
|
+
getFlowsByUserId: DyFM_EndpointTypesContainer<Flow[], [string], undefined>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export class Flow_EP333 implements DyFM_ServiceEndpoint_SettingsBase<Flow_EPResult_Settings333> {
|
|
81
|
+
[key: string]: DyFM_Endpoint_SettingsBase<any, any, any>;
|
|
82
|
+
|
|
83
|
+
getFlow = new DyFM_Endpoint_SettingsBase({
|
|
84
|
+
type: DyFM_HttpCallType.get,
|
|
85
|
+
endPoint: '/get/:userId/:flowId',
|
|
86
|
+
});
|
|
87
|
+
modifyFlow = new DyFM_Endpoint_SettingsBase({
|
|
88
|
+
type: DyFM_HttpCallType.post,
|
|
89
|
+
endPoint: '/modify/:userId',
|
|
90
|
+
});
|
|
91
|
+
getFlowsByUserId = new DyFM_Endpoint_SettingsBase({
|
|
92
|
+
type: DyFM_HttpCallType.get,
|
|
93
|
+
endPoint: '/get-all-my/:userId',
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
const flow_EP333 = new Flow_EP333();
|
|
97
|
+
|
|
98
|
+
export class Flow_API333 implements DyNX_ApiService_Base<Flow_EPResult_Settings333> {
|
|
99
|
+
[key: string]: DyNX_ApiCall_Settings<any, any, any>;
|
|
100
|
+
|
|
101
|
+
getFlow = new DyNX_ApiCall_Settings<Flow, [string], undefined>({
|
|
102
|
+
...flow_EP333.getFlow,
|
|
103
|
+
call: async (id: string) => new Flow(),
|
|
104
|
+
});
|
|
105
|
+
modifyFlow = new DyNX_ApiCall_Settings<Flow, [string, Flow], Flow>({
|
|
106
|
+
...flow_EP333.modifyFlow,
|
|
107
|
+
call: async (userId: string, flow: Flow) => new Flow(),
|
|
108
|
+
});
|
|
109
|
+
getFlowsByUserId = new DyNX_ApiCall_Settings<Flow[], [string], undefined>({
|
|
110
|
+
...flow_EP333.getFlowsByUserId,
|
|
111
|
+
call: async (userId: string) => [new Flow()],
|
|
112
|
+
});
|
|
113
|
+
} */
|
|
@@ -8,23 +8,36 @@ import { DyFM_RangeValue } from '../control-models/range-value.control-model';
|
|
|
8
8
|
*
|
|
9
9
|
* it should be the value, a range or an array of the searching values
|
|
10
10
|
*/
|
|
11
|
-
export type DyFM_DBĐFilter<T_RootProperty
|
|
11
|
+
export type DyFM_DBĐFilter<T_RootProperty> = {
|
|
12
12
|
[K in keyof T_RootProperty]?:
|
|
13
13
|
T_RootProperty[K] |
|
|
14
14
|
T_RootProperty[K][] |
|
|
15
15
|
DyFM_RangeValue<T_RootProperty[K]> |
|
|
16
|
-
DyFM_SpecialSearch<
|
|
17
|
-
|
|
16
|
+
DyFM_SpecialSearch<T_RootProperty> |
|
|
17
|
+
DyFM_SpecialNestSearch<any>;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export interface DyFM_SpecialSearch<T> {
|
|
21
|
-
|
|
22
|
-
searchValue: T;
|
|
21
|
+
isSpecialSearch: true;
|
|
22
|
+
searchValue: T | T[];
|
|
23
23
|
type: DyFM_SpecialSearch_Type;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* searches for a nested property in the object
|
|
28
|
+
* can search for nested properties in arrays as well with the following syntax used in key:
|
|
29
|
+
* nestKeys: [ 'arrayProperty', '*', 'nestedPropertySearch' ]
|
|
30
|
+
*/
|
|
31
|
+
export interface DyFM_SpecialNestSearch<T_NestedProperty> {
|
|
32
|
+
isSpecialNestSearch: true;
|
|
33
|
+
nestedPropertySearches: {
|
|
34
|
+
nestKeys: string[];
|
|
35
|
+
propertyType: DyFM_BasicProperty_Type;
|
|
36
|
+
search: T_NestedProperty |
|
|
37
|
+
T_NestedProperty[] |
|
|
38
|
+
DyFM_RangeValue<T_NestedProperty> |
|
|
39
|
+
DyFM_SpecialSearch<T_NestedProperty>;
|
|
40
|
+
}[];
|
|
28
41
|
}
|
|
29
42
|
|
|
30
43
|
export enum DyFM_SpecialSearch_Type {
|
|
@@ -43,9 +56,9 @@ export enum DyFM_SpecialSearch_Type {
|
|
|
43
56
|
/**
|
|
44
57
|
* searches for a nested property in the object
|
|
45
58
|
* can search for nested properties in arrays as well with the following syntax used in key:
|
|
46
|
-
* 'arrayProperty
|
|
59
|
+
* nestKeys: [ 'arrayProperty', '*', 'nestedPropertySearch' ]
|
|
47
60
|
*/
|
|
48
|
-
nestedPropertySearch = 'nestedPropertySearch',
|
|
61
|
+
/* nestedPropertySearch = 'nestedPropertySearch', */
|
|
49
62
|
}
|
|
50
63
|
|
|
51
64
|
|
package/src/index.ts
CHANGED
|
@@ -51,6 +51,7 @@ export * from './_models/control-models/data-property-params.control-model';
|
|
|
51
51
|
export * from './_models/control-models/error.control-model';
|
|
52
52
|
export * from './_models/control-models/poll.control-model';
|
|
53
53
|
export * from './_models/control-models/range-value.control-model';
|
|
54
|
+
export * from './_models/control-models/service-endpoint-settings-base.control-model';
|
|
54
55
|
|
|
55
56
|
// models/DATA MODELS
|
|
56
57
|
export * from './_models/data-models/metadata.data-model';
|
|
Binary file
|