@dvelop-sdk/business-objects 1.0.0-beta.0 → 1.0.0-beta.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/lib/entities/create-entity/create-entity.d.ts +16 -6
- package/lib/entities/create-entity/create-entity.d.ts.map +1 -1
- package/lib/entities/create-entity/create-entity.js +8 -2
- package/lib/entities/create-entity/create-entity.js.map +1 -1
- package/lib/entities/delete-entity/delete-entity.d.ts +9 -2
- package/lib/entities/delete-entity/delete-entity.d.ts.map +1 -1
- package/lib/entities/delete-entity/delete-entity.js +5 -1
- package/lib/entities/delete-entity/delete-entity.js.map +1 -1
- package/lib/entities/get-entities/get-entities.d.ts +12 -7
- package/lib/entities/get-entities/get-entities.d.ts.map +1 -1
- package/lib/entities/get-entities/get-entities.js +8 -3
- package/lib/entities/get-entities/get-entities.js.map +1 -1
- package/lib/entities/get-entity/get-entity.d.ts +13 -7
- package/lib/entities/get-entity/get-entity.d.ts.map +1 -1
- package/lib/entities/get-entity/get-entity.js +8 -5
- package/lib/entities/get-entity/get-entity.js.map +1 -1
- package/lib/entities/update-entity/update-entity.d.ts +16 -6
- package/lib/entities/update-entity/update-entity.d.ts.map +1 -1
- package/lib/entities/update-entity/update-entity.js +7 -2
- package/lib/entities/update-entity/update-entity.js.map +1 -1
- package/lib/index.d.ts +5 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +9 -1
- package/lib/index.js.map +1 -1
- package/lib/internal.d.ts +5 -1
- package/lib/internal.d.ts.map +1 -1
- package/lib/internal.js +11 -2
- package/lib/internal.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,23 +2,30 @@ import { DvelopContext, DvelopHttpResponse as HttpResponse } from "@dvelop-sdk/c
|
|
|
2
2
|
import { HttpConfig } from "../../utils/http";
|
|
3
3
|
/**
|
|
4
4
|
* Parameters for the {@link createBoEntity}-function.
|
|
5
|
+
* @template E Type for Entity. Defaults to `any`.
|
|
5
6
|
* @category Entity
|
|
6
7
|
*/
|
|
7
|
-
export interface CreateBoEntityParams {
|
|
8
|
+
export interface CreateBoEntityParams<E = any> {
|
|
9
|
+
/** Name of the model */
|
|
8
10
|
modelName: string;
|
|
11
|
+
/** EntityName in plural (**Singular name won't work**) */
|
|
9
12
|
pluralEntityName: string;
|
|
10
|
-
|
|
13
|
+
/** Entity to be created*/
|
|
14
|
+
entity: E;
|
|
11
15
|
}
|
|
12
16
|
/**
|
|
13
17
|
* Factory for {@link createBoEntity}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
14
|
-
* @
|
|
18
|
+
* @template E Type for Entity to be created.
|
|
19
|
+
* @template R Return type of the {@link createBoEntity}-function. A corresponding transformFunction has to be supplied.
|
|
15
20
|
* @internal
|
|
16
21
|
* @category Entity
|
|
17
22
|
*/
|
|
18
|
-
export declare function _createBoEntityFactory(httpRequestFunction: (context: DvelopContext, config: HttpConfig) => Promise<HttpResponse>, transformFunction: (response: HttpResponse, context: DvelopContext, params: CreateBoEntityParams) =>
|
|
23
|
+
export declare function _createBoEntityFactory<E, R>(httpRequestFunction: (context: DvelopContext, config: HttpConfig) => Promise<HttpResponse>, transformFunction: (response: HttpResponse, context: DvelopContext, params: CreateBoEntityParams<E>) => R): (context: DvelopContext, params: CreateBoEntityParams<E>) => Promise<R>;
|
|
19
24
|
/**
|
|
20
25
|
* Create a business object entity.
|
|
26
|
+
* @template E Type for Entity. Defaults to `any`.
|
|
21
27
|
*
|
|
28
|
+
* @example
|
|
22
29
|
* ```typescript
|
|
23
30
|
* import { createBoEntity } from "@dvelop-sdk/business-objects";
|
|
24
31
|
*
|
|
@@ -36,8 +43,11 @@ export declare function _createBoEntityFactory(httpRequestFunction: (context: Dv
|
|
|
36
43
|
* }
|
|
37
44
|
* });
|
|
38
45
|
* ```
|
|
39
|
-
* ---
|
|
46
|
+
* ---
|
|
47
|
+
*
|
|
40
48
|
* You can also write your own function, for example to get a notification, if the entity was successfully created.
|
|
49
|
+
* @example
|
|
50
|
+
* ```typescript
|
|
41
51
|
* import { createBoEntity } from "@dvelop-sdk/business-objects";
|
|
42
52
|
*
|
|
43
53
|
* const myCreateFunction = _createBoEntityFactory(_defaultHttpRequestFunction, (response:HttpResponse)=> {
|
|
@@ -62,5 +72,5 @@ export declare function _createBoEntityFactory(httpRequestFunction: (context: Dv
|
|
|
62
72
|
* console.log(responseMessage); // Entity created successfully.
|
|
63
73
|
* ```
|
|
64
74
|
*/
|
|
65
|
-
export declare function createBoEntity(context: DvelopContext, params: CreateBoEntityParams): Promise<void>;
|
|
75
|
+
export declare function createBoEntity<E = any>(context: DvelopContext, params: CreateBoEntityParams<E>): Promise<void>;
|
|
66
76
|
//# sourceMappingURL=create-entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-entity.d.ts","sourceRoot":"","sources":["../../../src/entities/create-entity/create-entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,UAAU,EAA+B,MAAM,kBAAkB,CAAC;AAE3E
|
|
1
|
+
{"version":3,"file":"create-entity.d.ts","sourceRoot":"","sources":["../../../src/entities/create-entity/create-entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,UAAU,EAA+B,MAAM,kBAAkB,CAAC;AAE3E;;;;GAIG;AACH,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,GAAG;IAC3C,wBAAwB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,gBAAgB,EAAE,MAAM,CAAC;IACzB,0BAA0B;IAC1B,MAAM,EAAE,CAAC,CAAC;CACX;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,CAAC,EACzC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,YAAY,CAAC,EAC1F,iBAAiB,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC,GACxG,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAWzE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,wBAAsB,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpH"}
|
|
@@ -40,7 +40,8 @@ exports.createBoEntity = exports._createBoEntityFactory = void 0;
|
|
|
40
40
|
var http_1 = require("../../utils/http");
|
|
41
41
|
/**
|
|
42
42
|
* Factory for {@link createBoEntity}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
43
|
-
* @
|
|
43
|
+
* @template E Type for Entity to be created.
|
|
44
|
+
* @template R Return type of the {@link createBoEntity}-function. A corresponding transformFunction has to be supplied.
|
|
44
45
|
* @internal
|
|
45
46
|
* @category Entity
|
|
46
47
|
*/
|
|
@@ -65,7 +66,9 @@ function _createBoEntityFactory(httpRequestFunction, transformFunction) {
|
|
|
65
66
|
exports._createBoEntityFactory = _createBoEntityFactory;
|
|
66
67
|
/**
|
|
67
68
|
* Create a business object entity.
|
|
69
|
+
* @template E Type for Entity. Defaults to `any`.
|
|
68
70
|
*
|
|
71
|
+
* @example
|
|
69
72
|
* ```typescript
|
|
70
73
|
* import { createBoEntity } from "@dvelop-sdk/business-objects";
|
|
71
74
|
*
|
|
@@ -83,8 +86,11 @@ exports._createBoEntityFactory = _createBoEntityFactory;
|
|
|
83
86
|
* }
|
|
84
87
|
* });
|
|
85
88
|
* ```
|
|
86
|
-
* ---
|
|
89
|
+
* ---
|
|
90
|
+
*
|
|
87
91
|
* You can also write your own function, for example to get a notification, if the entity was successfully created.
|
|
92
|
+
* @example
|
|
93
|
+
* ```typescript
|
|
88
94
|
* import { createBoEntity } from "@dvelop-sdk/business-objects";
|
|
89
95
|
*
|
|
90
96
|
* const myCreateFunction = _createBoEntityFactory(_defaultHttpRequestFunction, (response:HttpResponse)=> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-entity.js","sourceRoot":"","sources":["../../../src/entities/create-entity/create-entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAA2E;
|
|
1
|
+
{"version":3,"file":"create-entity.js","sourceRoot":"","sources":["../../../src/entities/create-entity/create-entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAA2E;AAgB3E;;;;;;GAMG;AACH,SAAgB,sBAAsB,CACpC,mBAA0F,EAC1F,iBAAyG;IAF3G,iBAcC;IAVC,OAAO,UAAO,OAAsB,EAAE,MAA+B;;;;wBAElD,qBAAM,mBAAmB,CAAC,OAAO,EAAE;wBAClD,MAAM,EAAE,MAAM;wBACd,GAAG,EAAE,6BAA2B,MAAM,CAAC,SAAS,SAAI,MAAM,CAAC,gBAAkB;wBAC7E,IAAI,EAAE,MAAM,CAAC,MAAM;qBACpB,CAAC,EAAA;;oBAJI,QAAQ,GAAG,SAIf;oBAEF,sBAAO,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAC;;;SACrD,CAAC;AACJ,CAAC;AAdD,wDAcC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,0BAA0B;AAC1B,SAAsB,cAAc,CAAU,OAAsB,EAAE,MAA+B;;;;wBAC5F,qBAAM,sBAAsB,CAAU,kCAA2B,EAAE,cAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,EAAA;wBAArG,sBAAO,SAA8F,EAAC;;;;CACvG;AAFD,wCAEC"}
|
|
@@ -5,20 +5,24 @@ import { HttpConfig } from "../../utils/http";
|
|
|
5
5
|
* @category Entity
|
|
6
6
|
*/
|
|
7
7
|
export interface DeleteBoEntityParams {
|
|
8
|
+
/** Name of the model */
|
|
8
9
|
modelName: string;
|
|
10
|
+
/** EntityName in plural (**Singular name won't work**) */
|
|
9
11
|
pluralEntityName: string;
|
|
12
|
+
/** Value for the key-property of the entity */
|
|
10
13
|
entityKeyValue: string | number;
|
|
11
14
|
}
|
|
12
15
|
/**
|
|
13
16
|
* Factory for {@link deleteBoEntity}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
14
|
-
* @
|
|
17
|
+
* @template E Return type of the {@link deleteBoEntity}-function. A corresponding transformFunction has to be supplied.
|
|
15
18
|
* @internal
|
|
16
19
|
* @category Entity
|
|
17
20
|
*/
|
|
18
|
-
export declare function _deleteBoEntityFactory(httpRequestFunction: (context: DvelopContext, config: HttpConfig) => Promise<HttpResponse>, transformFunction: (response: HttpResponse, context: DvelopContext, params: DeleteBoEntityParams) =>
|
|
21
|
+
export declare function _deleteBoEntityFactory<T>(httpRequestFunction: (context: DvelopContext, config: HttpConfig) => Promise<HttpResponse>, transformFunction: (response: HttpResponse, context: DvelopContext, params: DeleteBoEntityParams) => T): (context: DvelopContext, params: DeleteBoEntityParams) => Promise<T>;
|
|
19
22
|
/**
|
|
20
23
|
* Delete a business object entity.
|
|
21
24
|
*
|
|
25
|
+
* @example
|
|
22
26
|
* ```typescript
|
|
23
27
|
* import { deleteBoEntity } from "@dvelop-sdk/business-objects";
|
|
24
28
|
*
|
|
@@ -33,6 +37,9 @@ export declare function _deleteBoEntityFactory(httpRequestFunction: (context: Dv
|
|
|
33
37
|
* ```
|
|
34
38
|
* ---
|
|
35
39
|
* You can also write your own function, for example to get a notification, if the entity requested for deletion doesn't exist.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
36
43
|
* import { deleteBoEntity } from "@dvelop-sdk/business-objects";
|
|
37
44
|
*
|
|
38
45
|
* const myDeleteFunction = _deleteBoEntityFactory(_defaultHttpRequestFunction, (response:HttpResponse)=> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-entity.d.ts","sourceRoot":"","sources":["../../../src/entities/delete-entity/delete-entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,UAAU,EAA+B,MAAM,kBAAkB,CAAC;AAE3E;;;GAGG;AACH,MAAM,WAAW,oBAAoB;
|
|
1
|
+
{"version":3,"file":"delete-entity.d.ts","sourceRoot":"","sources":["../../../src/entities/delete-entity/delete-entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,UAAU,EAA+B,MAAM,kBAAkB,CAAC;AAE3E;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,wBAAwB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,gBAAgB,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC;CACjC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACtC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,YAAY,CAAC,EAC1F,iBAAiB,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,oBAAoB,KAAK,CAAC,GACrG,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,oBAAoB,KAAK,OAAO,CAAC,CAAC,CAAC,CAiBtE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,wBAAsB,cAAc,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAExG"}
|
|
@@ -40,7 +40,7 @@ exports.deleteBoEntity = exports._deleteBoEntityFactory = void 0;
|
|
|
40
40
|
var http_1 = require("../../utils/http");
|
|
41
41
|
/**
|
|
42
42
|
* Factory for {@link deleteBoEntity}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
43
|
-
* @
|
|
43
|
+
* @template E Return type of the {@link deleteBoEntity}-function. A corresponding transformFunction has to be supplied.
|
|
44
44
|
* @internal
|
|
45
45
|
* @category Entity
|
|
46
46
|
*/
|
|
@@ -72,6 +72,7 @@ exports._deleteBoEntityFactory = _deleteBoEntityFactory;
|
|
|
72
72
|
/**
|
|
73
73
|
* Delete a business object entity.
|
|
74
74
|
*
|
|
75
|
+
* @example
|
|
75
76
|
* ```typescript
|
|
76
77
|
* import { deleteBoEntity } from "@dvelop-sdk/business-objects";
|
|
77
78
|
*
|
|
@@ -86,6 +87,9 @@ exports._deleteBoEntityFactory = _deleteBoEntityFactory;
|
|
|
86
87
|
* ```
|
|
87
88
|
* ---
|
|
88
89
|
* You can also write your own function, for example to get a notification, if the entity requested for deletion doesn't exist.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```typescript
|
|
89
93
|
* import { deleteBoEntity } from "@dvelop-sdk/business-objects";
|
|
90
94
|
*
|
|
91
95
|
* const myDeleteFunction = _deleteBoEntityFactory(_defaultHttpRequestFunction, (response:HttpResponse)=> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-entity.js","sourceRoot":"","sources":["../../../src/entities/delete-entity/delete-entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAA2E;
|
|
1
|
+
{"version":3,"file":"delete-entity.js","sourceRoot":"","sources":["../../../src/entities/delete-entity/delete-entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAA2E;AAe3E;;;;;GAKG;AACH,SAAgB,sBAAsB,CACpC,mBAA0F,EAC1F,iBAAsG;IAFxG,iBAoBC;IAhBC,OAAO,UAAO,OAAsB,EAAE,MAA4B;;;;;oBAGhE,IAAI,OAAO,MAAM,CAAC,cAAc,KAAK,QAAQ,EAAE;wBAC7C,iBAAiB,GAAG,MAAM,CAAC,cAAc,CAAC;qBAC3C;yBAAM;wBACL,iBAAiB,GAAG,MAAI,MAAM,CAAC,cAAc,MAAG,CAAC;qBAClD;oBAEgB,qBAAM,mBAAmB,CAAC,OAAO,EAAE;4BAClD,MAAM,EAAE,QAAQ;4BAChB,GAAG,EAAE,6BAA2B,MAAM,CAAC,SAAS,SAAI,MAAM,CAAC,gBAAgB,SAAI,iBAAiB,MAAG;yBACpG,CAAC,EAAA;;oBAHI,QAAQ,GAAG,SAGf;oBAEF,sBAAO,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAC;;;SACrD,CAAC;AACJ,CAAC;AApBD,wDAoBC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,0BAA0B;AAC1B,SAAsB,cAAc,CAAC,OAAsB,EAAE,MAA4B;;;;wBAChF,qBAAM,sBAAsB,CAAC,kCAA2B,EAAE,cAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,EAAA;wBAA5F,sBAAO,SAAqF,EAAC;;;;CAC9F;AAFD,wCAEC"}
|
|
@@ -7,25 +7,28 @@ import { HttpConfig, HttpResponse } from "../../utils/http";
|
|
|
7
7
|
export interface GetBoEntitiesParams {
|
|
8
8
|
/** Name of the model */
|
|
9
9
|
modelName: string;
|
|
10
|
-
/** EntityName in plural (**
|
|
10
|
+
/** EntityName in plural (**Singular name won't work**) */
|
|
11
11
|
pluralEntityName: string;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Default transform-function provided to the {@link getBoEntities}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
15
|
+
* @template E Return type
|
|
15
16
|
* @internal
|
|
16
17
|
* @category Entities
|
|
17
18
|
*/
|
|
18
|
-
export declare function _getBoEntitiesDefaultTransformFunction<
|
|
19
|
+
export declare function _getBoEntitiesDefaultTransformFunction<E>(response: HttpResponse, _: DvelopContext, __: GetBoEntitiesParams): E[];
|
|
19
20
|
/**
|
|
20
21
|
* Factory for {@link getBoEntities}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
21
|
-
* @
|
|
22
|
+
* @template E Return type of the {@link getBoEntities}-function. A corresponding transformFunction has to be supplied.
|
|
22
23
|
* @internal
|
|
23
24
|
* @category Entities
|
|
24
25
|
*/
|
|
25
|
-
export declare function _getBoEntitiesFactory<
|
|
26
|
+
export declare function _getBoEntitiesFactory<E>(httpRequestFunction: (context: DvelopContext, config: HttpConfig) => Promise<HttpResponse>, transformFunction: (response: HttpResponse, context: DvelopContext, params: GetBoEntitiesParams) => E[]): (context: DvelopContext, params: GetBoEntitiesParams) => Promise<E[]>;
|
|
26
27
|
/**
|
|
27
28
|
* Returns all specified entities from a model.
|
|
29
|
+
* @template E Type for Entity. Defaults to `any`.
|
|
28
30
|
*
|
|
31
|
+
* @example
|
|
29
32
|
* ```typescript
|
|
30
33
|
* import { getBoEntities } from "@dvelop-sdk/business-objects";
|
|
31
34
|
*
|
|
@@ -33,12 +36,14 @@ export declare function _getBoEntitiesFactory<T>(httpRequestFunction: (context:
|
|
|
33
36
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
34
37
|
* authSessionId: "3f3c428d452"
|
|
35
38
|
* },{
|
|
36
|
-
*
|
|
37
|
-
*
|
|
39
|
+
* modelName: "HOSPITALBASEDATA",
|
|
40
|
+
* pluralEntityName: "employees",
|
|
38
41
|
* });
|
|
39
42
|
* console.log(result); // [{employeeid: '1', firstName: 'John', lastName: 'Dorian', jobTitel: 'senior physician'}, {employeeid: '2', firstName: 'Christopher', lastName: 'Turk', jobTitel: 'chief surgeon'}]
|
|
40
43
|
* ```
|
|
41
44
|
* ---
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
42
47
|
* You can also use generics:
|
|
43
48
|
* ```typescript
|
|
44
49
|
* import { getBoEntities } from "@dvelop-sdk/business-objects";
|
|
@@ -62,5 +67,5 @@ export declare function _getBoEntitiesFactory<T>(httpRequestFunction: (context:
|
|
|
62
67
|
* // Turk
|
|
63
68
|
* ```
|
|
64
69
|
*/
|
|
65
|
-
export declare function getBoEntities<
|
|
70
|
+
export declare function getBoEntities<E = any>(context: DvelopContext, params: GetBoEntitiesParams): Promise<E[]>;
|
|
66
71
|
//# sourceMappingURL=get-entities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-entities.d.ts","sourceRoot":"","sources":["../../../src/entities/get-entities/get-entities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,YAAY,EAA+B,MAAM,kBAAkB,CAAC;AAEzF;;;GAGG;AACH,MAAM,WAAW,mBAAmB;
|
|
1
|
+
{"version":3,"file":"get-entities.d.ts","sourceRoot":"","sources":["../../../src/entities/get-entities/get-entities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,YAAY,EAA+B,MAAM,kBAAkB,CAAC;AAEzF;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,wBAAwB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,sCAAsC,CAAC,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,mBAAmB,GAAG,CAAC,EAAE,CAEhI;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EACrC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,YAAY,CAAC,EAC1F,iBAAiB,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,mBAAmB,KAAK,CAAC,EAAE,GACtG,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,mBAAmB,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,CAUvE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,wBAAsB,aAAa,CAAC,CAAC,GAAG,GAAG,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAE9G"}
|
|
@@ -40,6 +40,7 @@ exports.getBoEntities = exports._getBoEntitiesFactory = exports._getBoEntitiesDe
|
|
|
40
40
|
var http_1 = require("../../utils/http");
|
|
41
41
|
/**
|
|
42
42
|
* Default transform-function provided to the {@link getBoEntities}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
43
|
+
* @template E Return type
|
|
43
44
|
* @internal
|
|
44
45
|
* @category Entities
|
|
45
46
|
*/
|
|
@@ -49,7 +50,7 @@ function _getBoEntitiesDefaultTransformFunction(response, _, __) {
|
|
|
49
50
|
exports._getBoEntitiesDefaultTransformFunction = _getBoEntitiesDefaultTransformFunction;
|
|
50
51
|
/**
|
|
51
52
|
* Factory for {@link getBoEntities}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
52
|
-
* @
|
|
53
|
+
* @template E Return type of the {@link getBoEntities}-function. A corresponding transformFunction has to be supplied.
|
|
53
54
|
* @internal
|
|
54
55
|
* @category Entities
|
|
55
56
|
*/
|
|
@@ -73,7 +74,9 @@ function _getBoEntitiesFactory(httpRequestFunction, transformFunction) {
|
|
|
73
74
|
exports._getBoEntitiesFactory = _getBoEntitiesFactory;
|
|
74
75
|
/**
|
|
75
76
|
* Returns all specified entities from a model.
|
|
77
|
+
* @template E Type for Entity. Defaults to `any`.
|
|
76
78
|
*
|
|
79
|
+
* @example
|
|
77
80
|
* ```typescript
|
|
78
81
|
* import { getBoEntities } from "@dvelop-sdk/business-objects";
|
|
79
82
|
*
|
|
@@ -81,12 +84,14 @@ exports._getBoEntitiesFactory = _getBoEntitiesFactory;
|
|
|
81
84
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
82
85
|
* authSessionId: "3f3c428d452"
|
|
83
86
|
* },{
|
|
84
|
-
*
|
|
85
|
-
*
|
|
87
|
+
* modelName: "HOSPITALBASEDATA",
|
|
88
|
+
* pluralEntityName: "employees",
|
|
86
89
|
* });
|
|
87
90
|
* console.log(result); // [{employeeid: '1', firstName: 'John', lastName: 'Dorian', jobTitel: 'senior physician'}, {employeeid: '2', firstName: 'Christopher', lastName: 'Turk', jobTitel: 'chief surgeon'}]
|
|
88
91
|
* ```
|
|
89
92
|
* ---
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
90
95
|
* You can also use generics:
|
|
91
96
|
* ```typescript
|
|
92
97
|
* import { getBoEntities } from "@dvelop-sdk/business-objects";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-entities.js","sourceRoot":"","sources":["../../../src/entities/get-entities/get-entities.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;AAazF
|
|
1
|
+
{"version":3,"file":"get-entities.js","sourceRoot":"","sources":["../../../src/entities/get-entities/get-entities.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;AAazF;;;;;GAKG;AACH,SAAgB,sCAAsC,CAAI,QAAsB,EAAE,CAAgB,EAAE,EAAuB;IACzH,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;AAC7B,CAAC;AAFD,wFAEC;AAED;;;;;GAKG;AACH,SAAgB,qBAAqB,CACnC,mBAA0F,EAC1F,iBAAuG;IAFzG,iBAaC;IATC,OAAO,UAAO,OAAsB,EAAE,MAA2B;;;;wBAE9C,qBAAM,mBAAmB,CAAC,OAAO,EAAE;wBAClD,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,6BAA2B,MAAM,CAAC,SAAS,SAAI,MAAM,CAAC,gBAAkB;qBAC9E,CAAC,EAAA;;oBAHI,QAAQ,GAAG,SAGf;oBAEF,sBAAO,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAC;;;SACrD,CAAC;AACJ,CAAC;AAbD,sDAaC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,0BAA0B;AAC1B,SAAsB,aAAa,CAAU,OAAsB,EAAE,MAA2B;;;;wBACvF,qBAAM,qBAAqB,CAAI,kCAA2B,EAAE,sCAAsC,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,EAAA;wBAA3H,sBAAO,SAAoH,EAAC;;;;CAC7H;AAFD,sCAEC"}
|
|
@@ -5,8 +5,11 @@ import { HttpConfig, HttpResponse } from "../../utils/http";
|
|
|
5
5
|
* @category Entity
|
|
6
6
|
*/
|
|
7
7
|
export interface GetBoEntityParams {
|
|
8
|
+
/** Name of the model */
|
|
8
9
|
modelName: string;
|
|
10
|
+
/** EntityName in plural (**Singular name won't work**) */
|
|
9
11
|
pluralEntityName: string;
|
|
12
|
+
/** Value for the key-property of the entity */
|
|
10
13
|
entityKeyValue: string | number;
|
|
11
14
|
}
|
|
12
15
|
/**
|
|
@@ -17,14 +20,16 @@ export interface GetBoEntityParams {
|
|
|
17
20
|
export declare function _getBoEntityDefaultTransformFunction<T extends Object>(response: HttpResponse, _: DvelopContext, __: GetBoEntityParams): T;
|
|
18
21
|
/**
|
|
19
22
|
* Factory for {@link getBoEntity}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
20
|
-
* @
|
|
23
|
+
* @template E Return type of the {@link getBoEntity}-function. A corresponding transformFunction has to be supplied.
|
|
21
24
|
* @internal
|
|
22
25
|
* @category Entity
|
|
23
26
|
*/
|
|
24
|
-
export declare function _getBoEntityFactory<
|
|
27
|
+
export declare function _getBoEntityFactory<E>(httpRequestFunction: (context: DvelopContext, config: HttpConfig) => Promise<HttpResponse>, transformFunction: (response: HttpResponse, context: DvelopContext, params: GetBoEntityParams) => E): (context: DvelopContext, params: GetBoEntityParams) => Promise<E>;
|
|
25
28
|
/**
|
|
26
29
|
* Returns one specified entity from a model.
|
|
30
|
+
* @template E Type for Entity. Defaults to `any`.
|
|
27
31
|
*
|
|
32
|
+
* @example
|
|
28
33
|
* ```typescript
|
|
29
34
|
* import { getBoEntity } from "@dvelop-sdk/business-objects";
|
|
30
35
|
*
|
|
@@ -32,14 +37,15 @@ export declare function _getBoEntityFactory<T>(httpRequestFunction: (context: Dv
|
|
|
32
37
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
33
38
|
* authSessionId: "3f3c428d452"
|
|
34
39
|
* },{
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
* modelName: "HOSPITALBASEDATA",
|
|
41
|
+
* pluralEntityName: "employees",
|
|
42
|
+
* entityKeyValue: "1"
|
|
38
43
|
* });
|
|
39
|
-
* console.log(result); // {employeeid: '1', firstName: 'John', lastName: 'Dorian', jobTitel: 'senior physician'}
|
|
44
|
+
* console.log(result); // { employeeid: '1', firstName: 'John', lastName: 'Dorian', jobTitel: 'senior physician' }
|
|
40
45
|
* ```
|
|
41
46
|
* ---
|
|
42
47
|
* You can also use generics:
|
|
48
|
+
* @example
|
|
43
49
|
* ```typescript
|
|
44
50
|
* import { getBoEntity } from "@dvelop-sdk/business-objects";
|
|
45
51
|
*
|
|
@@ -59,5 +65,5 @@ export declare function _getBoEntityFactory<T>(httpRequestFunction: (context: Dv
|
|
|
59
65
|
* console.log(entity.lastName); // Dorian
|
|
60
66
|
* ```
|
|
61
67
|
*/
|
|
62
|
-
export declare function getBoEntity<
|
|
68
|
+
export declare function getBoEntity<E = any>(context: DvelopContext, params: GetBoEntityParams): Promise<E>;
|
|
63
69
|
//# sourceMappingURL=get-entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-entity.d.ts","sourceRoot":"","sources":["../../../src/entities/get-entity/get-entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,YAAY,EAA+B,MAAM,kBAAkB,CAAC;AAEzF;;;GAGG;AACH,MAAM,WAAW,iBAAiB;
|
|
1
|
+
{"version":3,"file":"get-entity.d.ts","sourceRoot":"","sources":["../../../src/entities/get-entity/get-entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,YAAY,EAA+B,MAAM,kBAAkB,CAAC;AAEzF;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,wBAAwB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,gBAAgB,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC;CACjC;AAED;;;;GAIG;AACH,wBAAgB,oCAAoC,CAAC,CAAC,SAAS,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,iBAAiB,GAAG,CAAC,CAGzI;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,YAAY,CAAC,EAC1F,iBAAiB,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,iBAAiB,KAAK,CAAC,GAClG,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,iBAAiB,KAAK,OAAO,CAAC,CAAC,CAAC,CAiBnE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,wBAAsB,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,CAAC,CAExG"}
|
|
@@ -50,7 +50,7 @@ function _getBoEntityDefaultTransformFunction(response, _, __) {
|
|
|
50
50
|
exports._getBoEntityDefaultTransformFunction = _getBoEntityDefaultTransformFunction;
|
|
51
51
|
/**
|
|
52
52
|
* Factory for {@link getBoEntity}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
53
|
-
* @
|
|
53
|
+
* @template E Return type of the {@link getBoEntity}-function. A corresponding transformFunction has to be supplied.
|
|
54
54
|
* @internal
|
|
55
55
|
* @category Entity
|
|
56
56
|
*/
|
|
@@ -81,7 +81,9 @@ function _getBoEntityFactory(httpRequestFunction, transformFunction) {
|
|
|
81
81
|
exports._getBoEntityFactory = _getBoEntityFactory;
|
|
82
82
|
/**
|
|
83
83
|
* Returns one specified entity from a model.
|
|
84
|
+
* @template E Type for Entity. Defaults to `any`.
|
|
84
85
|
*
|
|
86
|
+
* @example
|
|
85
87
|
* ```typescript
|
|
86
88
|
* import { getBoEntity } from "@dvelop-sdk/business-objects";
|
|
87
89
|
*
|
|
@@ -89,14 +91,15 @@ exports._getBoEntityFactory = _getBoEntityFactory;
|
|
|
89
91
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
90
92
|
* authSessionId: "3f3c428d452"
|
|
91
93
|
* },{
|
|
92
|
-
*
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
* modelName: "HOSPITALBASEDATA",
|
|
95
|
+
* pluralEntityName: "employees",
|
|
96
|
+
* entityKeyValue: "1"
|
|
95
97
|
* });
|
|
96
|
-
* console.log(result); // {employeeid: '1', firstName: 'John', lastName: 'Dorian', jobTitel: 'senior physician'}
|
|
98
|
+
* console.log(result); // { employeeid: '1', firstName: 'John', lastName: 'Dorian', jobTitel: 'senior physician' }
|
|
97
99
|
* ```
|
|
98
100
|
* ---
|
|
99
101
|
* You can also use generics:
|
|
102
|
+
* @example
|
|
100
103
|
* ```typescript
|
|
101
104
|
* import { getBoEntity } from "@dvelop-sdk/business-objects";
|
|
102
105
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-entity.js","sourceRoot":"","sources":["../../../src/entities/get-entity/get-entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;
|
|
1
|
+
{"version":3,"file":"get-entity.js","sourceRoot":"","sources":["../../../src/entities/get-entity/get-entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;AAezF;;;;GAIG;AACH,SAAgB,oCAAoC,CAAmB,QAAsB,EAAE,CAAgB,EAAE,EAAqB;IACpI,8BAA8B;IAC9B,OAAO,QAAQ,CAAC,IAAI,CAAC;AACvB,CAAC;AAHD,oFAGC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CACjC,mBAA0F,EAC1F,iBAAmG;IAFrG,iBAoBC;IAhBC,OAAO,UAAO,OAAsB,EAAE,MAAyB;;;;;oBAG7D,IAAI,OAAO,MAAM,CAAC,cAAc,KAAK,QAAQ,EAAE;wBAC7C,iBAAiB,GAAG,MAAM,CAAC,cAAc,CAAC;qBAC3C;yBAAM;wBACL,iBAAiB,GAAG,MAAI,MAAM,CAAC,cAAc,MAAG,CAAC;qBAClD;oBAEgB,qBAAM,mBAAmB,CAAC,OAAO,EAAE;4BAClD,MAAM,EAAE,KAAK;4BACb,GAAG,EAAE,6BAA2B,MAAM,CAAC,SAAS,SAAI,MAAM,CAAC,gBAAgB,SAAI,iBAAiB,MAAG;yBACpG,CAAC,EAAA;;oBAHI,QAAQ,GAAG,SAGf;oBAEF,sBAAO,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAC;;;SACrD,CAAC;AACJ,CAAC;AApBD,kDAoBC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,0BAA0B;AAC1B,SAAsB,WAAW,CAAU,OAAsB,EAAE,MAAyB;;;;wBACnF,qBAAM,mBAAmB,CAAI,kCAA2B,EAAE,oCAAoC,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,EAAA;wBAAvH,sBAAO,SAAgH,EAAC;;;;CACzH;AAFD,kCAEC"}
|
|
@@ -2,24 +2,31 @@ import { DvelopContext } from "@dvelop-sdk/core";
|
|
|
2
2
|
import { HttpConfig, HttpResponse } from "../../utils/http";
|
|
3
3
|
/**
|
|
4
4
|
* Parameters for the {@link updateBoEntity}-function.
|
|
5
|
+
* @template E Type for Entity. Defaults to `any`.
|
|
5
6
|
* @category Entity
|
|
6
7
|
*/
|
|
7
|
-
export interface UpdateBoEntityParams {
|
|
8
|
+
export interface UpdateBoEntityParams<E = any> {
|
|
9
|
+
/** Name of the model */
|
|
8
10
|
modelName: string;
|
|
11
|
+
/** EntityName in plural (**Singular name won't work**) */
|
|
9
12
|
pluralEntityName: string;
|
|
13
|
+
/** Value for the key-property of the entity */
|
|
10
14
|
entityKeyValue: string | number;
|
|
11
|
-
|
|
15
|
+
/** [Partial](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype) of `E`. Given properties will be updated. */
|
|
16
|
+
entityChange: Partial<E>;
|
|
12
17
|
}
|
|
13
18
|
/**
|
|
14
19
|
* Factory for {@link updateBoEntity}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
15
|
-
* @
|
|
20
|
+
* @template E Return type of the {@link updateBoEntity}-function. A corresponding transformFunction has to be supplied.
|
|
16
21
|
* @internal
|
|
17
22
|
* @category Entity
|
|
18
23
|
*/
|
|
19
|
-
export declare function _updateBoEntityFactory(httpRequestFunction: (context: DvelopContext, config: HttpConfig) => Promise<HttpResponse>, transformFunction: (response: HttpResponse, context: DvelopContext, params: UpdateBoEntityParams) =>
|
|
24
|
+
export declare function _updateBoEntityFactory<E, R>(httpRequestFunction: (context: DvelopContext, config: HttpConfig) => Promise<HttpResponse>, transformFunction: (response: HttpResponse, context: DvelopContext, params: UpdateBoEntityParams<E>) => R): (context: DvelopContext, params: UpdateBoEntityParams) => Promise<R>;
|
|
20
25
|
/**
|
|
21
26
|
* Update a business object entity.
|
|
27
|
+
* @template E Type for Entity. Defaults to `any`.
|
|
22
28
|
*
|
|
29
|
+
* @example
|
|
23
30
|
* ```typescript
|
|
24
31
|
* import { updateBoEntity } from "@dvelop-sdk/business-objects";
|
|
25
32
|
*
|
|
@@ -35,8 +42,11 @@ export declare function _updateBoEntityFactory(httpRequestFunction: (context: Dv
|
|
|
35
42
|
* }
|
|
36
43
|
* });
|
|
37
44
|
* ```
|
|
38
|
-
|
|
45
|
+
* ---
|
|
39
46
|
* You can also write your own function.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```typescript
|
|
40
50
|
* import { updateBoEntity } from "@dvelop-sdk/business-objects";
|
|
41
51
|
*
|
|
42
52
|
* const myUpdateFunction = _updateBoEntityFactory(_defaultHttpRequestFunction, (response:HttpResponse)=> {
|
|
@@ -57,5 +67,5 @@ export declare function _updateBoEntityFactory(httpRequestFunction: (context: Dv
|
|
|
57
67
|
* console.log(responseMessage); // My own transform function message
|
|
58
68
|
* ```
|
|
59
69
|
*/
|
|
60
|
-
export declare function updateBoEntity(context: DvelopContext, params: UpdateBoEntityParams): Promise<void>;
|
|
70
|
+
export declare function updateBoEntity<E = any>(context: DvelopContext, params: UpdateBoEntityParams<E>): Promise<void>;
|
|
61
71
|
//# sourceMappingURL=update-entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-entity.d.ts","sourceRoot":"","sources":["../../../src/entities/update-entity/update-entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,YAAY,EAA+B,MAAM,kBAAkB,CAAC;AAEzF
|
|
1
|
+
{"version":3,"file":"update-entity.d.ts","sourceRoot":"","sources":["../../../src/entities/update-entity/update-entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,YAAY,EAA+B,MAAM,kBAAkB,CAAC;AAEzF;;;;GAIG;AACH,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,GAAG;IAC3C,wBAAwB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,gBAAgB,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,uIAAuI;IACvI,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,CAAC,EACzC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,YAAY,CAAC,EAC1F,iBAAiB,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC,GACxG,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,oBAAoB,KAAK,OAAO,CAAC,CAAC,CAAC,CAkBtE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,wBAAsB,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpH"}
|
|
@@ -40,7 +40,7 @@ exports.updateBoEntity = exports._updateBoEntityFactory = void 0;
|
|
|
40
40
|
var http_1 = require("../../utils/http");
|
|
41
41
|
/**
|
|
42
42
|
* Factory for {@link updateBoEntity}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
43
|
-
* @
|
|
43
|
+
* @template E Return type of the {@link updateBoEntity}-function. A corresponding transformFunction has to be supplied.
|
|
44
44
|
* @internal
|
|
45
45
|
* @category Entity
|
|
46
46
|
*/
|
|
@@ -72,7 +72,9 @@ function _updateBoEntityFactory(httpRequestFunction, transformFunction) {
|
|
|
72
72
|
exports._updateBoEntityFactory = _updateBoEntityFactory;
|
|
73
73
|
/**
|
|
74
74
|
* Update a business object entity.
|
|
75
|
+
* @template E Type for Entity. Defaults to `any`.
|
|
75
76
|
*
|
|
77
|
+
* @example
|
|
76
78
|
* ```typescript
|
|
77
79
|
* import { updateBoEntity } from "@dvelop-sdk/business-objects";
|
|
78
80
|
*
|
|
@@ -88,8 +90,11 @@ exports._updateBoEntityFactory = _updateBoEntityFactory;
|
|
|
88
90
|
* }
|
|
89
91
|
* });
|
|
90
92
|
* ```
|
|
91
|
-
|
|
93
|
+
* ---
|
|
92
94
|
* You can also write your own function.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```typescript
|
|
93
98
|
* import { updateBoEntity } from "@dvelop-sdk/business-objects";
|
|
94
99
|
*
|
|
95
100
|
* const myUpdateFunction = _updateBoEntityFactory(_defaultHttpRequestFunction, (response:HttpResponse)=> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-entity.js","sourceRoot":"","sources":["../../../src/entities/update-entity/update-entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;
|
|
1
|
+
{"version":3,"file":"update-entity.js","sourceRoot":"","sources":["../../../src/entities/update-entity/update-entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;AAkBzF;;;;;GAKG;AACH,SAAgB,sBAAsB,CACpC,mBAA0F,EAC1F,iBAAyG;IAF3G,iBAqBC;IAjBC,OAAO,UAAO,OAAsB,EAAE,MAA+B;;;;;oBAGnE,IAAI,OAAO,MAAM,CAAC,cAAc,KAAK,QAAQ,EAAE;wBAC7C,iBAAiB,GAAG,MAAM,CAAC,cAAc,CAAC;qBAC3C;yBAAM;wBACL,iBAAiB,GAAG,MAAI,MAAM,CAAC,cAAc,MAAG,CAAC;qBAClD;oBAEgB,qBAAM,mBAAmB,CAAC,OAAO,EAAE;4BAClD,MAAM,EAAE,KAAK;4BACb,GAAG,EAAE,6BAA2B,MAAM,CAAC,SAAS,SAAI,MAAM,CAAC,gBAAgB,SAAI,iBAAiB,MAAG;4BACnG,IAAI,EAAE,MAAM,CAAC,YAAY;yBAC1B,CAAC,EAAA;;oBAJI,QAAQ,GAAG,SAIf;oBAEF,sBAAO,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAC;;;SACrD,CAAC;AACJ,CAAC;AArBD,wDAqBC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,0BAA0B;AAC1B,SAAsB,cAAc,CAAU,OAAsB,EAAE,MAA+B;;;;wBAC5F,qBAAM,sBAAsB,CAAU,kCAA2B,EAAE,cAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,EAAA;wBAArG,sBAAO,SAA8F,EAAC;;;;CACvG;AAFD,wCAEC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -26,5 +26,9 @@
|
|
|
26
26
|
export { DvelopContext, BadInputError, UnauthorizedError, ForbiddenError, NotFoundError } from "@dvelop-sdk/core";
|
|
27
27
|
export { BusinessObjectsError } from "./utils/http";
|
|
28
28
|
export * as internals from "./internal";
|
|
29
|
-
export {
|
|
29
|
+
export { GetBoEntitiesParams, getBoEntities } from "./entities/get-entities/get-entities";
|
|
30
|
+
export { GetBoEntityParams, getBoEntity } from "./entities/get-entity/get-entity";
|
|
31
|
+
export { CreateBoEntityParams, createBoEntity } from "./entities/create-entity/create-entity";
|
|
32
|
+
export { UpdateBoEntityParams, updateBoEntity } from "./entities/update-entity/update-entity";
|
|
33
|
+
export { DeleteBoEntityParams, deleteBoEntity } from "./entities/delete-entity/delete-entity";
|
|
30
34
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAClH,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAExC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAClH,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAExC,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -44,7 +44,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
44
44
|
return result;
|
|
45
45
|
};
|
|
46
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
-
exports.getBoEntities = exports.internals = exports.BusinessObjectsError = exports.NotFoundError = exports.ForbiddenError = exports.UnauthorizedError = exports.BadInputError = void 0;
|
|
47
|
+
exports.deleteBoEntity = exports.updateBoEntity = exports.createBoEntity = exports.getBoEntity = exports.getBoEntities = exports.internals = exports.BusinessObjectsError = exports.NotFoundError = exports.ForbiddenError = exports.UnauthorizedError = exports.BadInputError = void 0;
|
|
48
48
|
//Utils
|
|
49
49
|
var core_1 = require("@dvelop-sdk/core");
|
|
50
50
|
Object.defineProperty(exports, "BadInputError", { enumerable: true, get: function () { return core_1.BadInputError; } });
|
|
@@ -56,4 +56,12 @@ Object.defineProperty(exports, "BusinessObjectsError", { enumerable: true, get:
|
|
|
56
56
|
exports.internals = __importStar(require("./internal"));
|
|
57
57
|
var get_entities_1 = require("./entities/get-entities/get-entities");
|
|
58
58
|
Object.defineProperty(exports, "getBoEntities", { enumerable: true, get: function () { return get_entities_1.getBoEntities; } });
|
|
59
|
+
var get_entity_1 = require("./entities/get-entity/get-entity");
|
|
60
|
+
Object.defineProperty(exports, "getBoEntity", { enumerable: true, get: function () { return get_entity_1.getBoEntity; } });
|
|
61
|
+
var create_entity_1 = require("./entities/create-entity/create-entity");
|
|
62
|
+
Object.defineProperty(exports, "createBoEntity", { enumerable: true, get: function () { return create_entity_1.createBoEntity; } });
|
|
63
|
+
var update_entity_1 = require("./entities/update-entity/update-entity");
|
|
64
|
+
Object.defineProperty(exports, "updateBoEntity", { enumerable: true, get: function () { return update_entity_1.updateBoEntity; } });
|
|
65
|
+
var delete_entity_1 = require("./entities/delete-entity/delete-entity");
|
|
66
|
+
Object.defineProperty(exports, "deleteBoEntity", { enumerable: true, get: function () { return delete_entity_1.deleteBoEntity; } });
|
|
59
67
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO;AACP,yCAAkH;AAA1F,qGAAA,aAAa,OAAA;AAAE,yGAAA,iBAAiB,OAAA;AAAE,sGAAA,cAAc,OAAA;AAAE,qGAAA,aAAa,OAAA;AACvF,qCAAoD;AAA3C,4GAAA,oBAAoB,OAAA;AAC7B,wDAAwC;AAExC,qEAA0F;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO;AACP,yCAAkH;AAA1F,qGAAA,aAAa,OAAA;AAAE,yGAAA,iBAAiB,OAAA;AAAE,sGAAA,cAAc,OAAA;AAAE,qGAAA,aAAa,OAAA;AACvF,qCAAoD;AAA3C,4GAAA,oBAAoB,OAAA;AAC7B,wDAAwC;AAExC,qEAA0F;AAA5D,6GAAA,aAAa,OAAA;AAC3C,+DAAkF;AAAtD,yGAAA,WAAW,OAAA;AACvC,wEAA8F;AAA/D,+GAAA,cAAc,OAAA;AAC7C,wEAA8F;AAA/D,+GAAA,cAAc,OAAA;AAC7C,wEAA8F;AAA/D,+GAAA,cAAc,OAAA"}
|
package/lib/internal.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export { _defaultHttpRequestFunctionFactory, _defaultHttpRequestFunction, BusinessObjectsErrorDto } from "./utils/http";
|
|
2
|
-
export {
|
|
2
|
+
export { _getBoEntitiesFactory, _getBoEntitiesDefaultTransformFunction } from "./entities/get-entities/get-entities";
|
|
3
|
+
export { _getBoEntityFactory, _getBoEntityDefaultTransformFunction } from "./entities/get-entity/get-entity";
|
|
4
|
+
export { _createBoEntityFactory } from "./entities/create-entity/create-entity";
|
|
5
|
+
export { _updateBoEntityFactory } from "./entities/update-entity/update-entity";
|
|
6
|
+
export { _deleteBoEntityFactory } from "./entities/delete-entity/delete-entity";
|
|
3
7
|
//# sourceMappingURL=internal.d.ts.map
|
package/lib/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAExH,OAAO,EAAE,qBAAqB,EAAE,sCAAsC,EAAE,MAAM,sCAAsC,CAAC;AACrH,OAAO,EAAE,mBAAmB,EAAE,oCAAoC,EAAE,MAAM,kCAAkC,CAAC;AAC7G,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC"}
|
package/lib/internal.js
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports._deleteBoEntityFactory = exports._updateBoEntityFactory = exports._createBoEntityFactory = exports._getBoEntityDefaultTransformFunction = exports._getBoEntityFactory = exports._getBoEntitiesDefaultTransformFunction = exports._getBoEntitiesFactory = exports._defaultHttpRequestFunction = exports._defaultHttpRequestFunctionFactory = void 0;
|
|
4
4
|
var http_1 = require("./utils/http");
|
|
5
5
|
Object.defineProperty(exports, "_defaultHttpRequestFunctionFactory", { enumerable: true, get: function () { return http_1._defaultHttpRequestFunctionFactory; } });
|
|
6
6
|
Object.defineProperty(exports, "_defaultHttpRequestFunction", { enumerable: true, get: function () { return http_1._defaultHttpRequestFunction; } });
|
|
7
7
|
var get_entities_1 = require("./entities/get-entities/get-entities");
|
|
8
|
-
Object.defineProperty(exports, "_getBoEntitiesDefaultTransformFunction", { enumerable: true, get: function () { return get_entities_1._getBoEntitiesDefaultTransformFunction; } });
|
|
9
8
|
Object.defineProperty(exports, "_getBoEntitiesFactory", { enumerable: true, get: function () { return get_entities_1._getBoEntitiesFactory; } });
|
|
9
|
+
Object.defineProperty(exports, "_getBoEntitiesDefaultTransformFunction", { enumerable: true, get: function () { return get_entities_1._getBoEntitiesDefaultTransformFunction; } });
|
|
10
|
+
var get_entity_1 = require("./entities/get-entity/get-entity");
|
|
11
|
+
Object.defineProperty(exports, "_getBoEntityFactory", { enumerable: true, get: function () { return get_entity_1._getBoEntityFactory; } });
|
|
12
|
+
Object.defineProperty(exports, "_getBoEntityDefaultTransformFunction", { enumerable: true, get: function () { return get_entity_1._getBoEntityDefaultTransformFunction; } });
|
|
13
|
+
var create_entity_1 = require("./entities/create-entity/create-entity");
|
|
14
|
+
Object.defineProperty(exports, "_createBoEntityFactory", { enumerable: true, get: function () { return create_entity_1._createBoEntityFactory; } });
|
|
15
|
+
var update_entity_1 = require("./entities/update-entity/update-entity");
|
|
16
|
+
Object.defineProperty(exports, "_updateBoEntityFactory", { enumerable: true, get: function () { return update_entity_1._updateBoEntityFactory; } });
|
|
17
|
+
var delete_entity_1 = require("./entities/delete-entity/delete-entity");
|
|
18
|
+
Object.defineProperty(exports, "_deleteBoEntityFactory", { enumerable: true, get: function () { return delete_entity_1._deleteBoEntityFactory; } });
|
|
10
19
|
//# sourceMappingURL=internal.js.map
|
package/lib/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":";;;AAAA,qCAAwH;AAA/G,0HAAA,kCAAkC,OAAA;AAAE,mHAAA,2BAA2B,OAAA;
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":";;;AAAA,qCAAwH;AAA/G,0HAAA,kCAAkC,OAAA;AAAE,mHAAA,2BAA2B,OAAA;AAExE,qEAAqH;AAA5G,qHAAA,qBAAqB,OAAA;AAAE,sIAAA,sCAAsC,OAAA;AACtE,+DAA6G;AAApG,iHAAA,mBAAmB,OAAA;AAAE,kIAAA,oCAAoC,OAAA;AAClE,wEAAgF;AAAvE,uHAAA,sBAAsB,OAAA;AAC/B,wEAAgF;AAAvE,uHAAA,sBAAsB,OAAA;AAC/B,wEAAgF;AAAvE,uHAAA,sBAAsB,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dvelop-sdk/business-objects",
|
|
3
3
|
"description": "This package contains functionality for the BusinessObjects-App in the d.velop cloud.",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.3",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -25,4 +25,4 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@dvelop-sdk/core": "^2.0.0"
|
|
27
27
|
}
|
|
28
|
-
}
|
|
28
|
+
}
|