@dvelop-sdk/business-objects 1.0.0-beta.4 → 1.0.1
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/README.md +24 -1
- package/lib/entities/create-entity/create-entity.d.ts +24 -25
- package/lib/entities/create-entity/create-entity.d.ts.map +1 -1
- package/lib/entities/create-entity/create-entity.js +24 -25
- package/lib/entities/create-entity/create-entity.js.map +1 -1
- package/lib/entities/delete-entity/delete-entity.d.ts +20 -14
- package/lib/entities/delete-entity/delete-entity.d.ts.map +1 -1
- package/lib/entities/delete-entity/delete-entity.js +19 -15
- package/lib/entities/delete-entity/delete-entity.js.map +1 -1
- package/lib/entities/get-entities/get-entities.d.ts +10 -10
- package/lib/entities/get-entities/get-entities.js +10 -10
- package/lib/entities/get-entity/get-entity.d.ts +18 -10
- package/lib/entities/get-entity/get-entity.d.ts.map +1 -1
- package/lib/entities/get-entity/get-entity.js +20 -11
- package/lib/entities/get-entity/get-entity.js.map +1 -1
- package/lib/entities/update-entity/update-entity.d.ts +26 -21
- package/lib/entities/update-entity/update-entity.d.ts.map +1 -1
- package/lib/entities/update-entity/update-entity.js +26 -23
- package/lib/entities/update-entity/update-entity.js.map +1 -1
- package/lib/utils/http.d.ts +9 -0
- package/lib/utils/http.d.ts.map +1 -1
- package/lib/utils/http.js +21 -1
- package/lib/utils/http.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,4 +27,27 @@
|
|
|
27
27
|
|
|
28
28
|
<a href="https://github.com/d-velop/dvelop-sdk-node"><strong>Check us out on GitHub »</strong></a>
|
|
29
29
|
|
|
30
|
-
</div>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
## A note on datatypes in OData and Javascript
|
|
33
|
+
D.velop BusinessObjects uses OData as data model. When working with BusinessObject Models you can refer to the [propertyType-section](https://dv-businessobjects-assets.s3.eu-central-1.amazonaws.com/documentation/latest/business_objects_api.html#propertytype).
|
|
34
|
+
|
|
35
|
+
BO property type | Javascript type | Example
|
|
36
|
+
--- | --- | ---
|
|
37
|
+
boolean | boolean | true
|
|
38
|
+
string | string | "Hi it's me string"
|
|
39
|
+
`list<string>` | Array | ["Hi", "it's", "me", "list"]
|
|
40
|
+
guid | string | "ED7BA470-8E54-465E-825C-99712043E01C"
|
|
41
|
+
date | string | "2011-04-17"
|
|
42
|
+
dateTimeOffset | string | "2011-04-17T20:00:00.000Z"
|
|
43
|
+
single | number* | 3.14159
|
|
44
|
+
double | number* | 3.14159
|
|
45
|
+
decimal | number* | 3.14159
|
|
46
|
+
int16 | number* | 42
|
|
47
|
+
int32 | number* | 42
|
|
48
|
+
int64 | number* | 42
|
|
49
|
+
byte | number | 255
|
|
50
|
+
sByte | number | -8
|
|
51
|
+
binary | string | "23ABFF"
|
|
52
|
+
|
|
53
|
+
_* When working with numbers please mind [Javascript Numbers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)_
|
|
@@ -33,43 +33,42 @@ export declare function _createBoEntityFactory<E, R>(httpRequestFunction: (conte
|
|
|
33
33
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
34
34
|
* authSessionId: "3f3c428d452"
|
|
35
35
|
* },{
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
36
|
+
* modelName: "HOSPITALBASEDATA",
|
|
37
|
+
* pluralEntityName: "employees",
|
|
38
|
+
* entity: {
|
|
39
|
+
* employeeId: "1",
|
|
40
|
+
* firstName: "John Micheal",
|
|
41
|
+
* lastName: "Dorian",
|
|
42
|
+
* jobTitel: "senior physician"
|
|
43
|
+
* }
|
|
44
44
|
* });
|
|
45
45
|
* ```
|
|
46
46
|
* ---
|
|
47
|
-
*
|
|
48
|
-
* You can also write your own function, for example to get a notification, if the entity was successfully created.
|
|
47
|
+
* You can also use generics:
|
|
49
48
|
* @example
|
|
50
49
|
* ```typescript
|
|
51
50
|
* import { createBoEntity } from "@dvelop-sdk/business-objects";
|
|
52
51
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
52
|
+
* interface Employee {
|
|
53
|
+
* employeeId: string;
|
|
54
|
+
* firstName: string;
|
|
55
|
+
* lastName: string;
|
|
56
|
+
* jobTitel: string;
|
|
57
|
+
* }
|
|
58
58
|
*
|
|
59
|
-
*
|
|
59
|
+
* await create<Employee>({
|
|
60
60
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
61
61
|
* authSessionId: "3f3c428d452"
|
|
62
62
|
* },{
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
63
|
+
* modelName: "HOSPITALBASEDATA",
|
|
64
|
+
* pluralEntityName: "employees",
|
|
65
|
+
* entity: {
|
|
66
|
+
* employeeId: "1",
|
|
67
|
+
* firstName: "John Micheal",
|
|
68
|
+
* lastName: "Dorian",
|
|
69
|
+
* jobTitel: "senior physician"
|
|
70
|
+
* }
|
|
71
71
|
* });
|
|
72
|
-
* console.log(responseMessage); // Entity created successfully.
|
|
73
72
|
* ```
|
|
74
73
|
*/
|
|
75
74
|
export declare function createBoEntity<E = any>(context: DvelopContext, params: CreateBoEntityParams<E>): Promise<void>;
|
|
@@ -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;;;;GAIG;AACH,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,GAAG;IAC3C,w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AAC,CAAC,CAAC,KAAK,CAAC,GACxG,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAWzE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,wBAAsB,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpH"}
|
|
@@ -76,43 +76,42 @@ exports._createBoEntityFactory = _createBoEntityFactory;
|
|
|
76
76
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
77
77
|
* authSessionId: "3f3c428d452"
|
|
78
78
|
* },{
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
79
|
+
* modelName: "HOSPITALBASEDATA",
|
|
80
|
+
* pluralEntityName: "employees",
|
|
81
|
+
* entity: {
|
|
82
|
+
* employeeId: "1",
|
|
83
|
+
* firstName: "John Micheal",
|
|
84
|
+
* lastName: "Dorian",
|
|
85
|
+
* jobTitel: "senior physician"
|
|
86
|
+
* }
|
|
87
87
|
* });
|
|
88
88
|
* ```
|
|
89
89
|
* ---
|
|
90
|
-
*
|
|
91
|
-
* You can also write your own function, for example to get a notification, if the entity was successfully created.
|
|
90
|
+
* You can also use generics:
|
|
92
91
|
* @example
|
|
93
92
|
* ```typescript
|
|
94
93
|
* import { createBoEntity } from "@dvelop-sdk/business-objects";
|
|
95
94
|
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
95
|
+
* interface Employee {
|
|
96
|
+
* employeeId: string;
|
|
97
|
+
* firstName: string;
|
|
98
|
+
* lastName: string;
|
|
99
|
+
* jobTitel: string;
|
|
100
|
+
* }
|
|
101
101
|
*
|
|
102
|
-
*
|
|
102
|
+
* await create<Employee>({
|
|
103
103
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
104
104
|
* authSessionId: "3f3c428d452"
|
|
105
105
|
* },{
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
106
|
+
* modelName: "HOSPITALBASEDATA",
|
|
107
|
+
* pluralEntityName: "employees",
|
|
108
|
+
* entity: {
|
|
109
|
+
* employeeId: "1",
|
|
110
|
+
* firstName: "John Micheal",
|
|
111
|
+
* lastName: "Dorian",
|
|
112
|
+
* jobTitel: "senior physician"
|
|
113
|
+
* }
|
|
114
114
|
* });
|
|
115
|
-
* console.log(responseMessage); // Entity created successfully.
|
|
116
115
|
* ```
|
|
117
116
|
*/
|
|
118
117
|
/* istanbul ignore next */
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;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"}
|
|
@@ -9,8 +9,10 @@ export interface DeleteBoEntityParams {
|
|
|
9
9
|
modelName: string;
|
|
10
10
|
/** EntityName in plural (**Singular name won't work**) */
|
|
11
11
|
pluralEntityName: string;
|
|
12
|
-
/**
|
|
13
|
-
|
|
12
|
+
/** Type of the key property */
|
|
13
|
+
keyPropertyType: "string" | "number" | "guid";
|
|
14
|
+
/** Key-property of the entity to be deleted */
|
|
15
|
+
keyPropertyValue: string | number;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
18
|
* Factory for {@link deleteBoEntity}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
@@ -30,33 +32,37 @@ export declare function _deleteBoEntityFactory<T>(httpRequestFunction: (context:
|
|
|
30
32
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
31
33
|
* authSessionId: "3f3c428d452"
|
|
32
34
|
* },{
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
35
|
+
* modelName: "HOSPITALBASEDATA",
|
|
36
|
+
* pluralEntityName: "employees",
|
|
37
|
+
* keyPropertyType: "number", //"string", "number" or "guid"
|
|
38
|
+
* entityKeyValue: 1
|
|
36
39
|
* });
|
|
37
40
|
* ```
|
|
38
41
|
* ---
|
|
39
42
|
* You can also write your own function, for example to get a notification, if the entity requested for deletion doesn't exist.
|
|
40
|
-
*
|
|
41
43
|
* @example
|
|
42
44
|
* ```typescript
|
|
43
45
|
* import { deleteBoEntity } from "@dvelop-sdk/business-objects";
|
|
44
46
|
*
|
|
45
|
-
* const myDeleteFunction = _deleteBoEntityFactory(_defaultHttpRequestFunction, (response:HttpResponse)=> {
|
|
47
|
+
* const myDeleteFunction = _deleteBoEntityFactory(_defaultHttpRequestFunction, (response: HttpResponse) => {
|
|
46
48
|
* if(response.status === 204) {
|
|
47
|
-
* return "Entity
|
|
49
|
+
* return "Entity does not exist.";
|
|
50
|
+
* } else {
|
|
51
|
+
* return "Entity was deleted.";
|
|
48
52
|
* }
|
|
49
|
-
* })
|
|
53
|
+
* });
|
|
50
54
|
*
|
|
51
|
-
* const responseMessage = await myDeleteFunction({
|
|
55
|
+
* const responseMessage: string = await myDeleteFunction({
|
|
52
56
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
53
57
|
* authSessionId: "3f3c428d452"
|
|
54
58
|
* },{
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
59
|
+
* modelName: "HOSPITALBASEDATA",
|
|
60
|
+
* pluralEntityName: "employees",
|
|
61
|
+
* keyPropertyType: "number", //"string", "number" or "guid"
|
|
62
|
+
* entityKeyValue: 3
|
|
58
63
|
* });
|
|
59
|
-
*
|
|
64
|
+
*
|
|
65
|
+
* console.log(responseMessage); // Entity does not exist.
|
|
60
66
|
* ```
|
|
61
67
|
*/
|
|
62
68
|
export declare function deleteBoEntity(context: DvelopContext, params: DeleteBoEntityParams): Promise<void>;
|
|
@@ -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;IACnC,wBAAwB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,gBAAgB,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,
|
|
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,+BAA+B;IAC/B,eAAe,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC9C,+CAA+C;IAC/C,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAAC;CACnC;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,CAkBtE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,wBAAsB,cAAc,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAExG"}
|
|
@@ -51,11 +51,11 @@ function _deleteBoEntityFactory(httpRequestFunction, transformFunction) {
|
|
|
51
51
|
return __generator(this, function (_a) {
|
|
52
52
|
switch (_a.label) {
|
|
53
53
|
case 0:
|
|
54
|
-
if (
|
|
55
|
-
urlEntityKeyValue = params.
|
|
54
|
+
if (params.keyPropertyType === "number" || params.keyPropertyType === "guid") {
|
|
55
|
+
urlEntityKeyValue = params.keyPropertyValue;
|
|
56
56
|
}
|
|
57
57
|
else {
|
|
58
|
-
urlEntityKeyValue = "'" + params.
|
|
58
|
+
urlEntityKeyValue = "'" + params.keyPropertyValue + "'";
|
|
59
59
|
}
|
|
60
60
|
return [4 /*yield*/, httpRequestFunction(context, {
|
|
61
61
|
method: "DELETE",
|
|
@@ -80,33 +80,37 @@ exports._deleteBoEntityFactory = _deleteBoEntityFactory;
|
|
|
80
80
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
81
81
|
* authSessionId: "3f3c428d452"
|
|
82
82
|
* },{
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
83
|
+
* modelName: "HOSPITALBASEDATA",
|
|
84
|
+
* pluralEntityName: "employees",
|
|
85
|
+
* keyPropertyType: "number", //"string", "number" or "guid"
|
|
86
|
+
* entityKeyValue: 1
|
|
86
87
|
* });
|
|
87
88
|
* ```
|
|
88
89
|
* ---
|
|
89
90
|
* You can also write your own function, for example to get a notification, if the entity requested for deletion doesn't exist.
|
|
90
|
-
*
|
|
91
91
|
* @example
|
|
92
92
|
* ```typescript
|
|
93
93
|
* import { deleteBoEntity } from "@dvelop-sdk/business-objects";
|
|
94
94
|
*
|
|
95
|
-
* const myDeleteFunction = _deleteBoEntityFactory(_defaultHttpRequestFunction, (response:HttpResponse)=> {
|
|
95
|
+
* const myDeleteFunction = _deleteBoEntityFactory(_defaultHttpRequestFunction, (response: HttpResponse) => {
|
|
96
96
|
* if(response.status === 204) {
|
|
97
|
-
* return "Entity
|
|
97
|
+
* return "Entity does not exist.";
|
|
98
|
+
* } else {
|
|
99
|
+
* return "Entity was deleted.";
|
|
98
100
|
* }
|
|
99
|
-
* })
|
|
101
|
+
* });
|
|
100
102
|
*
|
|
101
|
-
* const responseMessage = await myDeleteFunction({
|
|
103
|
+
* const responseMessage: string = await myDeleteFunction({
|
|
102
104
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
103
105
|
* authSessionId: "3f3c428d452"
|
|
104
106
|
* },{
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
107
|
+
* modelName: "HOSPITALBASEDATA",
|
|
108
|
+
* pluralEntityName: "employees",
|
|
109
|
+
* keyPropertyType: "number", //"string", "number" or "guid"
|
|
110
|
+
* entityKeyValue: 3
|
|
108
111
|
* });
|
|
109
|
-
*
|
|
112
|
+
*
|
|
113
|
+
* console.log(responseMessage); // Entity does not exist.
|
|
110
114
|
* ```
|
|
111
115
|
*/
|
|
112
116
|
/* istanbul ignore next */
|
|
@@ -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;AAiB3E;;;;;GAKG;AACH,SAAgB,sBAAsB,CACpC,mBAA0F,EAC1F,iBAAsG;IAFxG,iBAqBC;IAjBC,OAAO,UAAO,OAAsB,EAAE,MAA4B;;;;;oBAGhE,IAAI,MAAM,CAAC,eAAe,KAAK,QAAQ,IAAI,MAAM,CAAC,eAAe,KAAK,MAAM,EAAE;wBAC5E,iBAAiB,GAAG,MAAM,CAAC,gBAAgB,CAAC;qBAC7C;yBAAM;wBACL,iBAAiB,GAAG,MAAI,MAAM,CAAC,gBAAgB,MAAG,CAAC;qBACpD;oBAGgB,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;AArBD,wDAqBC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;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"}
|
|
@@ -32,37 +32,37 @@ export declare function _getBoEntitiesFactory<E>(httpRequestFunction: (context:
|
|
|
32
32
|
* ```typescript
|
|
33
33
|
* import { getBoEntities } from "@dvelop-sdk/business-objects";
|
|
34
34
|
*
|
|
35
|
-
* const
|
|
35
|
+
* const employees = await getBoEntities({
|
|
36
36
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
37
37
|
* authSessionId: "3f3c428d452"
|
|
38
38
|
* },{
|
|
39
39
|
* modelName: "HOSPITALBASEDATA",
|
|
40
40
|
* pluralEntityName: "employees",
|
|
41
41
|
* });
|
|
42
|
-
* console.log(
|
|
42
|
+
* console.log(employees); // [{ employeeId: '1', firstName: 'John Micheal', lastName: 'Dorian', jobTitel: 'senior physician' }, { employeeId: '2', firstName: 'Christopher', lastName: 'Turk', jobTitel: 'chief surgeon' }]
|
|
43
43
|
* ```
|
|
44
44
|
* ---
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
45
|
* You can also use generics:
|
|
46
|
+
* @example
|
|
48
47
|
* ```typescript
|
|
49
48
|
* import { getBoEntities } from "@dvelop-sdk/business-objects";
|
|
50
49
|
*
|
|
51
|
-
* interface
|
|
50
|
+
* interface Employee {
|
|
51
|
+
* employeeId: string;
|
|
52
|
+
* firstName: string;
|
|
52
53
|
* lastName: string;
|
|
54
|
+
* jobTitel: string;
|
|
53
55
|
* }
|
|
54
56
|
*
|
|
55
|
-
* const
|
|
57
|
+
* const employees: Employee[] = await getBoEntities<Employee>({
|
|
56
58
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
57
59
|
* authSessionId: "3f3c428d452"
|
|
58
60
|
* },{
|
|
59
61
|
* modelName: "HOSPITALBASEDATA",
|
|
60
|
-
* pluralEntityName: "employees"
|
|
62
|
+
* pluralEntityName: "employees"
|
|
61
63
|
* });
|
|
62
64
|
*
|
|
63
|
-
*
|
|
64
|
-
* console.log(entity.lastName);
|
|
65
|
-
* });
|
|
65
|
+
* employees.forEach(e => console.log(e.lastName));
|
|
66
66
|
* // Dorian
|
|
67
67
|
* // Turk
|
|
68
68
|
* ```
|
|
@@ -80,37 +80,37 @@ exports._getBoEntitiesFactory = _getBoEntitiesFactory;
|
|
|
80
80
|
* ```typescript
|
|
81
81
|
* import { getBoEntities } from "@dvelop-sdk/business-objects";
|
|
82
82
|
*
|
|
83
|
-
* const
|
|
83
|
+
* const employees = await getBoEntities({
|
|
84
84
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
85
85
|
* authSessionId: "3f3c428d452"
|
|
86
86
|
* },{
|
|
87
87
|
* modelName: "HOSPITALBASEDATA",
|
|
88
88
|
* pluralEntityName: "employees",
|
|
89
89
|
* });
|
|
90
|
-
* console.log(
|
|
90
|
+
* console.log(employees); // [{ employeeId: '1', firstName: 'John Micheal', lastName: 'Dorian', jobTitel: 'senior physician' }, { employeeId: '2', firstName: 'Christopher', lastName: 'Turk', jobTitel: 'chief surgeon' }]
|
|
91
91
|
* ```
|
|
92
92
|
* ---
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
93
|
* You can also use generics:
|
|
94
|
+
* @example
|
|
96
95
|
* ```typescript
|
|
97
96
|
* import { getBoEntities } from "@dvelop-sdk/business-objects";
|
|
98
97
|
*
|
|
99
|
-
* interface
|
|
98
|
+
* interface Employee {
|
|
99
|
+
* employeeId: string;
|
|
100
|
+
* firstName: string;
|
|
100
101
|
* lastName: string;
|
|
102
|
+
* jobTitel: string;
|
|
101
103
|
* }
|
|
102
104
|
*
|
|
103
|
-
* const
|
|
105
|
+
* const employees: Employee[] = await getBoEntities<Employee>({
|
|
104
106
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
105
107
|
* authSessionId: "3f3c428d452"
|
|
106
108
|
* },{
|
|
107
109
|
* modelName: "HOSPITALBASEDATA",
|
|
108
|
-
* pluralEntityName: "employees"
|
|
110
|
+
* pluralEntityName: "employees"
|
|
109
111
|
* });
|
|
110
112
|
*
|
|
111
|
-
*
|
|
112
|
-
* console.log(entity.lastName);
|
|
113
|
-
* });
|
|
113
|
+
* employees.forEach(e => console.log(e.lastName));
|
|
114
114
|
* // Dorian
|
|
115
115
|
* // Turk
|
|
116
116
|
* ```
|
|
@@ -9,15 +9,18 @@ export interface GetBoEntityParams {
|
|
|
9
9
|
modelName: string;
|
|
10
10
|
/** EntityName in plural (**Singular name won't work**) */
|
|
11
11
|
pluralEntityName: string;
|
|
12
|
-
/**
|
|
13
|
-
|
|
12
|
+
/** Type of the key property */
|
|
13
|
+
keyPropertyType: "string" | "number" | "guid";
|
|
14
|
+
/** Key-property of the entity to be retrieved */
|
|
15
|
+
keyPropertyValue: string | number;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
18
|
* Default transform-function provided to the {@link getBoEntity}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
19
|
+
* @template E Return type
|
|
17
20
|
* @internal
|
|
18
21
|
* @category Entity
|
|
19
22
|
*/
|
|
20
|
-
export declare function _getBoEntityDefaultTransformFunction<
|
|
23
|
+
export declare function _getBoEntityDefaultTransformFunction<E = any>(response: HttpResponse, _: DvelopContext, __: GetBoEntityParams): E;
|
|
21
24
|
/**
|
|
22
25
|
* Factory for {@link getBoEntity}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
23
26
|
* @template E Return type of the {@link getBoEntity}-function. A corresponding transformFunction has to be supplied.
|
|
@@ -33,15 +36,16 @@ export declare function _getBoEntityFactory<E>(httpRequestFunction: (context: Dv
|
|
|
33
36
|
* ```typescript
|
|
34
37
|
* import { getBoEntity } from "@dvelop-sdk/business-objects";
|
|
35
38
|
*
|
|
36
|
-
* const
|
|
39
|
+
* const jd = await getBoEntity({
|
|
37
40
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
38
41
|
* authSessionId: "3f3c428d452"
|
|
39
42
|
* },{
|
|
40
43
|
* modelName: "HOSPITALBASEDATA",
|
|
41
44
|
* pluralEntityName: "employees",
|
|
42
|
-
*
|
|
45
|
+
* keyPropertyType: "string", //"string", "number" or "guid"
|
|
46
|
+
* keyPropertyValue: "1"
|
|
43
47
|
* });
|
|
44
|
-
* console.log(
|
|
48
|
+
* console.log(jd); // { employeeId: '1', firstName: 'John Micheal', lastName: 'Dorian', jobTitel: 'senior physician' }
|
|
45
49
|
* ```
|
|
46
50
|
* ---
|
|
47
51
|
* You can also use generics:
|
|
@@ -49,20 +53,24 @@ export declare function _getBoEntityFactory<E>(httpRequestFunction: (context: Dv
|
|
|
49
53
|
* ```typescript
|
|
50
54
|
* import { getBoEntity } from "@dvelop-sdk/business-objects";
|
|
51
55
|
*
|
|
52
|
-
* interface
|
|
56
|
+
* interface Employee {
|
|
57
|
+
* employeeId: string;
|
|
58
|
+
* firstName: string;
|
|
53
59
|
* lastName: string;
|
|
60
|
+
* jobTitel: string;
|
|
54
61
|
* }
|
|
55
62
|
*
|
|
56
|
-
* const
|
|
63
|
+
* const jd: Employee = await getBoEntity<Employee>({
|
|
57
64
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
58
65
|
* authSessionId: "3f3c428d452"
|
|
59
66
|
* },{
|
|
60
67
|
* modelName: "HOSPITALBASEDATA",
|
|
61
68
|
* pluralEntityName: "employees",
|
|
62
|
-
*
|
|
69
|
+
* keyPropertyType: "string", //"string", "number" or "guid"
|
|
70
|
+
* keyPropertyValue: "1"
|
|
63
71
|
* });
|
|
64
72
|
*
|
|
65
|
-
* console.log(
|
|
73
|
+
* console.log(jd.lastName); // Dorian
|
|
66
74
|
* ```
|
|
67
75
|
*/
|
|
68
76
|
export declare function getBoEntity<E = any>(context: DvelopContext, params: GetBoEntityParams): Promise<E>;
|
|
@@ -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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AE,aAAa,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,CAAC,CAExG"}
|
|
@@ -40,11 +40,15 @@ exports.getBoEntity = exports._getBoEntityFactory = exports._getBoEntityDefaultT
|
|
|
40
40
|
var http_1 = require("../../utils/http");
|
|
41
41
|
/**
|
|
42
42
|
* Default transform-function provided to the {@link getBoEntity}-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 Entity
|
|
45
46
|
*/
|
|
46
47
|
function _getBoEntityDefaultTransformFunction(response, _, __) {
|
|
47
|
-
|
|
48
|
+
var entity = response.data;
|
|
49
|
+
if (typeof entity === "object" && entity["@odata.context"]) {
|
|
50
|
+
delete entity["@odata.context"];
|
|
51
|
+
}
|
|
48
52
|
return response.data;
|
|
49
53
|
}
|
|
50
54
|
exports._getBoEntityDefaultTransformFunction = _getBoEntityDefaultTransformFunction;
|
|
@@ -61,11 +65,11 @@ function _getBoEntityFactory(httpRequestFunction, transformFunction) {
|
|
|
61
65
|
return __generator(this, function (_a) {
|
|
62
66
|
switch (_a.label) {
|
|
63
67
|
case 0:
|
|
64
|
-
if (
|
|
65
|
-
urlEntityKeyValue = params.
|
|
68
|
+
if (params.keyPropertyType === "number" || params.keyPropertyType === "guid") {
|
|
69
|
+
urlEntityKeyValue = params.keyPropertyValue;
|
|
66
70
|
}
|
|
67
71
|
else {
|
|
68
|
-
urlEntityKeyValue = "'" + params.
|
|
72
|
+
urlEntityKeyValue = "'" + params.keyPropertyValue + "'";
|
|
69
73
|
}
|
|
70
74
|
return [4 /*yield*/, httpRequestFunction(context, {
|
|
71
75
|
method: "GET",
|
|
@@ -87,15 +91,16 @@ exports._getBoEntityFactory = _getBoEntityFactory;
|
|
|
87
91
|
* ```typescript
|
|
88
92
|
* import { getBoEntity } from "@dvelop-sdk/business-objects";
|
|
89
93
|
*
|
|
90
|
-
* const
|
|
94
|
+
* const jd = await getBoEntity({
|
|
91
95
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
92
96
|
* authSessionId: "3f3c428d452"
|
|
93
97
|
* },{
|
|
94
98
|
* modelName: "HOSPITALBASEDATA",
|
|
95
99
|
* pluralEntityName: "employees",
|
|
96
|
-
*
|
|
100
|
+
* keyPropertyType: "string", //"string", "number" or "guid"
|
|
101
|
+
* keyPropertyValue: "1"
|
|
97
102
|
* });
|
|
98
|
-
* console.log(
|
|
103
|
+
* console.log(jd); // { employeeId: '1', firstName: 'John Micheal', lastName: 'Dorian', jobTitel: 'senior physician' }
|
|
99
104
|
* ```
|
|
100
105
|
* ---
|
|
101
106
|
* You can also use generics:
|
|
@@ -103,20 +108,24 @@ exports._getBoEntityFactory = _getBoEntityFactory;
|
|
|
103
108
|
* ```typescript
|
|
104
109
|
* import { getBoEntity } from "@dvelop-sdk/business-objects";
|
|
105
110
|
*
|
|
106
|
-
* interface
|
|
111
|
+
* interface Employee {
|
|
112
|
+
* employeeId: string;
|
|
113
|
+
* firstName: string;
|
|
107
114
|
* lastName: string;
|
|
115
|
+
* jobTitel: string;
|
|
108
116
|
* }
|
|
109
117
|
*
|
|
110
|
-
* const
|
|
118
|
+
* const jd: Employee = await getBoEntity<Employee>({
|
|
111
119
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
112
120
|
* authSessionId: "3f3c428d452"
|
|
113
121
|
* },{
|
|
114
122
|
* modelName: "HOSPITALBASEDATA",
|
|
115
123
|
* pluralEntityName: "employees",
|
|
116
|
-
*
|
|
124
|
+
* keyPropertyType: "string", //"string", "number" or "guid"
|
|
125
|
+
* keyPropertyValue: "1"
|
|
117
126
|
* });
|
|
118
127
|
*
|
|
119
|
-
* console.log(
|
|
128
|
+
* console.log(jd.lastName); // Dorian
|
|
120
129
|
* ```
|
|
121
130
|
*/
|
|
122
131
|
/* istanbul ignore next */
|
|
@@ -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;AAiBzF;;;;;GAKG;AACH,SAAgB,oCAAoC,CAAU,QAAsB,EAAE,CAAgB,EAAE,EAAqB;IAC3H,IAAM,MAAM,GAAQ,QAAQ,CAAC,IAAI,CAAC;IAClC,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,gBAAgB,CAAC,EAAE;QAC1D,OAAO,MAAM,CAAC,gBAAgB,CAAC,CAAC;KACjC;IACD,OAAO,QAAQ,CAAC,IAAS,CAAC;AAC5B,CAAC;AAND,oFAMC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CACjC,mBAA0F,EAC1F,iBAAmG;IAFrG,iBAoBC;IAhBC,OAAO,UAAO,OAAsB,EAAE,MAAyB;;;;;oBAG7D,IAAI,MAAM,CAAC,eAAe,KAAK,QAAQ,IAAI,MAAM,CAAC,eAAe,KAAK,MAAM,EAAE;wBAC5E,iBAAiB,GAAG,MAAM,CAAC,gBAAgB,CAAC;qBAC7C;yBAAM;wBACL,iBAAiB,GAAG,MAAI,MAAM,CAAC,gBAAgB,MAAG,CAAC;qBACpD;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;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"}
|
|
@@ -10,8 +10,10 @@ export interface UpdateBoEntityParams<E = any> {
|
|
|
10
10
|
modelName: string;
|
|
11
11
|
/** EntityName in plural (**Singular name won't work**) */
|
|
12
12
|
pluralEntityName: string;
|
|
13
|
-
/**
|
|
14
|
-
|
|
13
|
+
/** Type of the key property */
|
|
14
|
+
keyPropertyType: "string" | "number" | "guid";
|
|
15
|
+
/** Key-property of the entity to be updated */
|
|
16
|
+
keyPropertyValue: string | number;
|
|
15
17
|
/** [Partial](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype) of `E`. Given properties will be updated. */
|
|
16
18
|
entityChange: Partial<E>;
|
|
17
19
|
}
|
|
@@ -34,37 +36,40 @@ export declare function _updateBoEntityFactory<E, R>(httpRequestFunction: (conte
|
|
|
34
36
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
35
37
|
* authSessionId: "3f3c428d452"
|
|
36
38
|
* },{
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
39
|
+
* modelName: "HOSPITALBASEDATA",
|
|
40
|
+
* pluralEntityName: "employees",
|
|
41
|
+
* keyPropertyType: "number", //"string", "number" or "guid"
|
|
42
|
+
* keyPropertyValue: 1,
|
|
43
|
+
* entityChange: {
|
|
44
|
+
* "firstName": "J.D."
|
|
45
|
+
* }
|
|
43
46
|
* });
|
|
44
47
|
* ```
|
|
45
48
|
* ---
|
|
46
|
-
* You can also
|
|
47
|
-
*
|
|
49
|
+
* You can also use generics:
|
|
48
50
|
* @example
|
|
49
51
|
* ```typescript
|
|
50
52
|
* import { updateBoEntity } from "@dvelop-sdk/business-objects";
|
|
51
53
|
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
54
|
+
* interface Employee {
|
|
55
|
+
* employeeId: string;
|
|
56
|
+
* firstName: string;
|
|
57
|
+
* lastName: string;
|
|
58
|
+
* jobTitel: string;
|
|
59
|
+
* }
|
|
55
60
|
*
|
|
56
|
-
*
|
|
61
|
+
* await updateBoEntity<Employee>({
|
|
57
62
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
58
63
|
* authSessionId: "3f3c428d452"
|
|
59
64
|
* },{
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
65
|
+
* modelName: "HOSPITALBASEDATA",
|
|
66
|
+
* pluralEntityName: "employees",
|
|
67
|
+
* keyPropertyType: "number", //"string", "number" or "guid"
|
|
68
|
+
* keyPropertyValue: 1,
|
|
69
|
+
* entityChange: {
|
|
70
|
+
* "firstName": "John Micheal (J.D.)"
|
|
71
|
+
* }
|
|
66
72
|
* });
|
|
67
|
-
* console.log(responseMessage); // My own transform function message
|
|
68
73
|
* ```
|
|
69
74
|
*/
|
|
70
75
|
export declare function updateBoEntity<E = any>(context: DvelopContext, params: UpdateBoEntityParams<E>): Promise<void>;
|
|
@@ -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;;;;GAIG;AACH,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,GAAG;IAC3C,wBAAwB;IACx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AG,OAAO,CAAC,IAAI,CAAC,CAEpH"}
|
|
@@ -51,14 +51,14 @@ function _updateBoEntityFactory(httpRequestFunction, transformFunction) {
|
|
|
51
51
|
return __generator(this, function (_a) {
|
|
52
52
|
switch (_a.label) {
|
|
53
53
|
case 0:
|
|
54
|
-
if (
|
|
55
|
-
urlEntityKeyValue = params.
|
|
54
|
+
if (params.keyPropertyType === "number" || params.keyPropertyType === "guid") {
|
|
55
|
+
urlEntityKeyValue = params.keyPropertyValue;
|
|
56
56
|
}
|
|
57
57
|
else {
|
|
58
|
-
urlEntityKeyValue = "'" + params.
|
|
58
|
+
urlEntityKeyValue = "'" + params.keyPropertyValue + "'";
|
|
59
59
|
}
|
|
60
60
|
return [4 /*yield*/, httpRequestFunction(context, {
|
|
61
|
-
method: "
|
|
61
|
+
method: "PATCH",
|
|
62
62
|
url: "/businessobjects/custom/" + params.modelName + "/" + params.pluralEntityName + "(" + urlEntityKeyValue + ")",
|
|
63
63
|
data: params.entityChange
|
|
64
64
|
})];
|
|
@@ -82,37 +82,40 @@ exports._updateBoEntityFactory = _updateBoEntityFactory;
|
|
|
82
82
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
83
83
|
* authSessionId: "3f3c428d452"
|
|
84
84
|
* },{
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
85
|
+
* modelName: "HOSPITALBASEDATA",
|
|
86
|
+
* pluralEntityName: "employees",
|
|
87
|
+
* keyPropertyType: "number", //"string", "number" or "guid"
|
|
88
|
+
* keyPropertyValue: 1,
|
|
89
|
+
* entityChange: {
|
|
90
|
+
* "firstName": "J.D."
|
|
91
|
+
* }
|
|
91
92
|
* });
|
|
92
93
|
* ```
|
|
93
94
|
* ---
|
|
94
|
-
* You can also
|
|
95
|
-
*
|
|
95
|
+
* You can also use generics:
|
|
96
96
|
* @example
|
|
97
97
|
* ```typescript
|
|
98
98
|
* import { updateBoEntity } from "@dvelop-sdk/business-objects";
|
|
99
99
|
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
100
|
+
* interface Employee {
|
|
101
|
+
* employeeId: string;
|
|
102
|
+
* firstName: string;
|
|
103
|
+
* lastName: string;
|
|
104
|
+
* jobTitel: string;
|
|
105
|
+
* }
|
|
103
106
|
*
|
|
104
|
-
*
|
|
107
|
+
* await updateBoEntity<Employee>({
|
|
105
108
|
* systemBaseUri: "https://sacred-heart-hospital.d-velop.cloud",
|
|
106
109
|
* authSessionId: "3f3c428d452"
|
|
107
110
|
* },{
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
111
|
+
* modelName: "HOSPITALBASEDATA",
|
|
112
|
+
* pluralEntityName: "employees",
|
|
113
|
+
* keyPropertyType: "number", //"string", "number" or "guid"
|
|
114
|
+
* keyPropertyValue: 1,
|
|
115
|
+
* entityChange: {
|
|
116
|
+
* "firstName": "John Micheal (J.D.)"
|
|
117
|
+
* }
|
|
114
118
|
* });
|
|
115
|
-
* console.log(responseMessage); // My own transform function message
|
|
116
119
|
* ```
|
|
117
120
|
*/
|
|
118
121
|
/* istanbul ignore next */
|
|
@@ -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;AAoBzF;;;;;GAKG;AACH,SAAgB,sBAAsB,CACpC,mBAA0F,EAC1F,iBAAyG;IAF3G,iBAqBC;IAjBC,OAAO,UAAO,OAAsB,EAAE,MAA+B;;;;;oBAGnE,IAAI,MAAM,CAAC,eAAe,KAAK,QAAQ,IAAI,MAAM,CAAC,eAAe,KAAK,MAAM,EAAE;wBAC5E,iBAAiB,GAAG,MAAM,CAAC,gBAAgB,CAAC;qBAC7C;yBAAM;wBACL,iBAAiB,GAAG,MAAI,MAAM,CAAC,gBAAgB,MAAG,CAAC;qBACpD;oBAEgB,qBAAM,mBAAmB,CAAC,OAAO,EAAE;4BAClD,MAAM,EAAE,OAAO;4BACf,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;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/utils/http.d.ts
CHANGED
|
@@ -27,6 +27,15 @@ export declare class BusinessObjectsError extends DvelopSdkError {
|
|
|
27
27
|
originalError?: Error | undefined;
|
|
28
28
|
constructor(message: string, originalError?: Error | undefined);
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* TODO: Generic Error for business-objects package.
|
|
32
|
+
* @category Error
|
|
33
|
+
*/
|
|
34
|
+
export declare class NotImplementedError extends DvelopSdkError {
|
|
35
|
+
message: string;
|
|
36
|
+
originalError?: Error | undefined;
|
|
37
|
+
constructor(message: string, originalError?: Error | undefined);
|
|
38
|
+
}
|
|
30
39
|
/**
|
|
31
40
|
* Factory used to create the default httpRequestFunction. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
32
41
|
* @internal
|
package/lib/utils/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,gBAAgB,EAAmG,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjO,OAAO,EAAE,uBAAuB,IAAI,UAAU,EAAE,kBAAkB,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE7G;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE;QAEL,IAAI,EAAE,MAAM,CAAC;QAEb,OAAO,EAAE,MAAM,CAAC;QAEhB,OAAO,EAAE;YAEP,IAAI,EAAE,MAAM,CAAC;YAEb,OAAO,EAAE,MAAM,CAAC;SACjB,EAAE,CAAC;QAEJ,UAAU,EAAE;YAEV,SAAS,EAAE,MAAM,CAAC;YAElB,SAAS,EAAE,MAAM,CAAC;SACnB,CAAA;KACF,CAAA;CACF;AAoBD;;;EAGE;AAEF,qBAAa,oBAAqB,SAAQ,cAAc;IAEnC,OAAO,EAAE,MAAM;IAAS,aAAa,CAAC;gBAAtC,OAAO,EAAE,MAAM,EAAS,aAAa,CAAC,mBAAO;CAIjE;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,UAAU,EAAE,gBAAgB,GAAG,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,uBAAuB,KAAK,OAAO,CAAC,kBAAkB,CAAC,
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,gBAAgB,EAAmG,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjO,OAAO,EAAE,uBAAuB,IAAI,UAAU,EAAE,kBAAkB,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE7G;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE;QAEL,IAAI,EAAE,MAAM,CAAC;QAEb,OAAO,EAAE,MAAM,CAAC;QAEhB,OAAO,EAAE;YAEP,IAAI,EAAE,MAAM,CAAC;YAEb,OAAO,EAAE,MAAM,CAAC;SACjB,EAAE,CAAC;QAEJ,UAAU,EAAE;YAEV,SAAS,EAAE,MAAM,CAAC;YAElB,SAAS,EAAE,MAAM,CAAC;SACnB,CAAA;KACF,CAAA;CACF;AAoBD;;;EAGE;AAEF,qBAAa,oBAAqB,SAAQ,cAAc;IAEnC,OAAO,EAAE,MAAM;IAAS,aAAa,CAAC;gBAAtC,OAAO,EAAE,MAAM,EAAS,aAAa,CAAC,mBAAO;CAIjE;AAED;;;EAGE;AAEF,qBAAa,mBAAoB,SAAQ,cAAc;IAElC,OAAO,EAAE,MAAM;IAAS,aAAa,CAAC;gBAAtC,OAAO,EAAE,MAAM,EAAS,aAAa,CAAC,mBAAO;CAIjE;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,UAAU,EAAE,gBAAgB,GAAG,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,uBAAuB,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAsCzK;AAGD;;;;GAIG;AAEH,wBAAsB,2BAA2B,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAEtI"}
|
package/lib/utils/http.js
CHANGED
|
@@ -51,7 +51,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
-
exports._defaultHttpRequestFunction = exports._defaultHttpRequestFunctionFactory = exports.BusinessObjectsError = void 0;
|
|
54
|
+
exports._defaultHttpRequestFunction = exports._defaultHttpRequestFunctionFactory = exports.NotImplementedError = exports.BusinessObjectsError = void 0;
|
|
55
55
|
var core_1 = require("@dvelop-sdk/core");
|
|
56
56
|
function getErrorString(error) {
|
|
57
57
|
if (error === null || error === void 0 ? void 0 : error.error) {
|
|
@@ -84,6 +84,24 @@ var BusinessObjectsError = /** @class */ (function (_super) {
|
|
|
84
84
|
return BusinessObjectsError;
|
|
85
85
|
}(core_1.DvelopSdkError));
|
|
86
86
|
exports.BusinessObjectsError = BusinessObjectsError;
|
|
87
|
+
/**
|
|
88
|
+
* TODO: Generic Error for business-objects package.
|
|
89
|
+
* @category Error
|
|
90
|
+
*/
|
|
91
|
+
/* istanbul ignore next */
|
|
92
|
+
var NotImplementedError = /** @class */ (function (_super) {
|
|
93
|
+
__extends(NotImplementedError, _super);
|
|
94
|
+
// eslint-disable-next-line no-unused-vars
|
|
95
|
+
function NotImplementedError(message, originalError) {
|
|
96
|
+
var _this = _super.call(this, message) || this;
|
|
97
|
+
_this.message = message;
|
|
98
|
+
_this.originalError = originalError;
|
|
99
|
+
Object.setPrototypeOf(_this, NotImplementedError.prototype);
|
|
100
|
+
return _this;
|
|
101
|
+
}
|
|
102
|
+
return NotImplementedError;
|
|
103
|
+
}(core_1.DvelopSdkError));
|
|
104
|
+
exports.NotImplementedError = NotImplementedError;
|
|
87
105
|
/**
|
|
88
106
|
* Factory used to create the default httpRequestFunction. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
89
107
|
* @internal
|
|
@@ -116,6 +134,8 @@ function _defaultHttpRequestFunctionFactory(httpClient) {
|
|
|
116
134
|
throw new core_1.ForbiddenError(getErrorString(error_1.response.data) || "BusinessObjects-App responded with Status 403 indicating a forbidden action. See 'originalError'-property for details.", error_1);
|
|
117
135
|
case 404:
|
|
118
136
|
throw new core_1.NotFoundError(getErrorString(error_1.response.data) || "BusinessObjects-App responded with Status 404 indicating a requested resource does not exist. See 'originalError'-property for details.", error_1);
|
|
137
|
+
case 501:
|
|
138
|
+
throw new NotImplementedError(getErrorString(error_1.response.data) || "BusinessObjects-App responded with Status 501 indicating a requested feature is not implemented. See 'originalError'-property for details.", error_1);
|
|
119
139
|
default:
|
|
120
140
|
throw new BusinessObjectsError(getErrorString(error_1.response.data) || "BusinessObjects-App responded with status " + error_1.response.status + ". See 'originalError'-property for details.", error_1);
|
|
121
141
|
}
|
package/lib/utils/http.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAiO;AA8BjO,SAAS,cAAc,CAAC,KAA8B;IAGpD,IAAI,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,EAAE;QAEhB,IAAI,YAAY,GAAW,EAAE,CAAC;QAE9B,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;YACzD,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO;iBAC/B,MAAM,CAAC,UAAC,YAAY,EAAE,MAAM,IAAK,OAAA,YAAY,IAAI,UAAQ,MAAM,CAAC,OAAO,UAAK,MAAM,CAAC,IAAI,QAAK,EAA3D,CAA2D,EAAE,IAAI,CAAC,CAAC;SACxG;QAED,OAAU,KAAK,CAAC,KAAK,CAAC,OAAO,UAAK,KAAK,CAAC,KAAK,CAAC,IAAI,UAAK,YAAY,sDAAmD,CAAC;KACxH;SAAM;QACL,OAAO,IAAI,CAAC;KACb;AACH,CAAC;AAED;;;EAGE;AACF,0BAA0B;AAC1B;IAA0C,wCAAc;IACtD,0CAA0C;IAC1C,8BAAmB,OAAe,EAAS,aAAqB;QAAhE,YACE,kBAA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cAAc,CAAC,OAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAK,CAAC,QAAQ,CAAC,IAAI,IAAI,6EAA6E,EAAE,OAAK,CAAC,CAAC;4BAElL,KAAK,GAAG;gCACN,MAAM,IAAI,qBAAc,CAAC,cAAc,CAAC,OAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,wHAAwH,EAAE,OAAK,CAAC,CAAC;4BAEnM,KAAK,GAAG;gCACN,MAAM,IAAI,oBAAa,CAAC,cAAc,CAAC,OAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,yIAAyI,EAAE,OAAK,CAAC,CAAC;4BAEnN,KAAK,GAAG;gCACN,MAAM,IAAI,mBAAmB,CAAC,cAAc,CAAC,OAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,4IAA4I,EAAE,OAAK,CAAC,CAAC;4BAE5N;gCACE,MAAM,IAAI,oBAAoB,CAAC,cAAc,CAAC,OAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,+CAA6C,OAAK,CAAC,QAAQ,CAAC,MAAM,gDAA6C,EAAE,OAAK,CAAC,CAAC;yBAC/L;qBACF;yBAAM;wBACL,MAAM,IAAI,oBAAoB,CAAC,4CAA0C,OAAK,CAAC,OAAO,gDAA6C,EAAE,OAAK,CAAC,CAAC;qBAC7I;;;;;SAEJ,CAAC;AACJ,CAAC;AAtCD,gFAsCC;AAGD;;;;GAIG;AACH,0BAA0B;AAC1B,SAAsB,2BAA2B,CAAC,OAAsB,EAAE,MAA+B;;;YACvG,sBAAO,kCAAkC,CAAC,qCAA8B,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,EAAC;;;CAC9F;AAFD,kEAEC"}
|
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.
|
|
4
|
+
"version": "1.0.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|