@or-sdk/cards 0.26.0-beta.647.0 → 0.26.0
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/CHANGELOG.md +13 -0
- package/README.md +1 -1
- package/dist/cjs/Cards.js +79 -121
- package/dist/cjs/Cards.js.map +1 -1
- package/dist/cjs/constants.js +3 -13
- package/dist/cjs/constants.js.map +1 -1
- package/dist/esm/Cards.js +105 -141
- package/dist/esm/Cards.js.map +1 -1
- package/dist/esm/constants.js +1 -367
- package/dist/esm/constants.js.map +1 -1
- package/dist/types/Cards.d.ts +6 -6
- package/dist/types/Cards.d.ts.map +1 -1
- package/dist/types/constants.d.ts +1 -11
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/types.d.ts +13 -1
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +6 -5
- package/src/Cards.ts +83 -131
- package/src/constants.ts +1 -376
- package/src/types.ts +16 -2
- package/tsconfig.esm.json +1 -1
package/dist/esm/Cards.js
CHANGED
|
@@ -1,170 +1,134 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { makeList } from '@or-sdk/base';
|
|
11
|
+
import { DataHubSvc, setDiff } from '@or-sdk/data-hub-svc';
|
|
3
12
|
import { Tags, filterTagIds, addTagsIds, removeTagIds } from '@or-sdk/tags';
|
|
4
13
|
export class Cards {
|
|
5
|
-
dataHub;
|
|
6
|
-
tags;
|
|
7
14
|
constructor(params) {
|
|
8
|
-
const { token, discoveryUrl, accountId,
|
|
9
|
-
this.
|
|
15
|
+
const { token, discoveryUrl, accountId, dataHubSvcUrl } = params;
|
|
16
|
+
this.dataHubSvc = new DataHubSvc({
|
|
10
17
|
token,
|
|
11
18
|
discoveryUrl,
|
|
12
19
|
accountId,
|
|
13
|
-
|
|
20
|
+
dataHubSvcUrl,
|
|
14
21
|
});
|
|
15
22
|
this.tags = new Tags({
|
|
16
23
|
token,
|
|
17
24
|
discoveryUrl,
|
|
18
25
|
accountId,
|
|
19
|
-
|
|
26
|
+
dataHubSvcUrl,
|
|
20
27
|
});
|
|
21
28
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
this.
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
listCards(params = {}, paginationOptions = {}) {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const result = yield this.dataHubSvc.makeRequest({
|
|
32
|
+
method: 'POST',
|
|
33
|
+
route: 'get-cards',
|
|
34
|
+
params: Object.assign(Object.assign(Object.assign({}, params), paginationOptions), this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
35
|
+
});
|
|
36
|
+
return makeList(result);
|
|
37
|
+
});
|
|
27
38
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
...this.dataHub.isCrossAccount ? { accountId: this.dataHub.currentAccountId } : { sandbox: false },
|
|
38
|
-
};
|
|
39
|
-
const operationName = this.dataHub.getOperationName(OperationNames.LIST);
|
|
40
|
-
const data = {
|
|
41
|
-
operationName,
|
|
42
|
-
query: this.dataHub.isCrossAccount ? QUERY_LIST_CROSSACCOUNT : QUERY_LIST,
|
|
43
|
-
variables,
|
|
44
|
-
};
|
|
45
|
-
return this.dataHub.getFullList('POST', '/graphql', data);
|
|
39
|
+
getCard(id) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
return this.dataHubSvc.makeRequest({
|
|
42
|
+
method: 'GET',
|
|
43
|
+
route: `cards/${id}`,
|
|
44
|
+
params: Object.assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
45
|
+
});
|
|
46
|
+
});
|
|
46
47
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
params: {
|
|
51
|
-
id,
|
|
52
|
-
includeDeleted: false,
|
|
53
|
-
includeExisting: true,
|
|
54
|
-
},
|
|
55
|
-
...this.dataHub.isCrossAccount ? { accountId: this.dataHub.currentAccountId } : {},
|
|
56
|
-
};
|
|
57
|
-
const operationName = this.dataHub.getOperationName(OperationNames.GET);
|
|
58
|
-
const data = {
|
|
59
|
-
operationName,
|
|
60
|
-
query: this.dataHub.isCrossAccount ? QUERY_GET_CROSSACCOUNT : QUERY_GET,
|
|
61
|
-
variables,
|
|
62
|
-
};
|
|
63
|
-
const result = await this.dataHub.makeRequest({
|
|
64
|
-
method: 'POST',
|
|
65
|
-
route: '/graphql',
|
|
66
|
-
data,
|
|
48
|
+
saveCard(source) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
return (source.id && source.id !== 'new') ? this.updateCard(source) : this.createCard(source);
|
|
67
51
|
});
|
|
68
|
-
return result.data[operationName];
|
|
69
52
|
}
|
|
70
|
-
|
|
71
|
-
return
|
|
53
|
+
createCard(source) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
const result = yield this.dataHubSvc.makeRequest({
|
|
56
|
+
method: 'POST',
|
|
57
|
+
route: 'cards/new',
|
|
58
|
+
data: {
|
|
59
|
+
card: Object.assign(Object.assign({}, source), { id: 'new' }),
|
|
60
|
+
},
|
|
61
|
+
params: Object.assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
62
|
+
});
|
|
63
|
+
return setDiff(source, result);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
updateCard(source) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
const result = yield this.dataHubSvc.makeRequest({
|
|
69
|
+
method: 'POST',
|
|
70
|
+
route: `cards/${source.id}`,
|
|
71
|
+
data: {
|
|
72
|
+
card: source,
|
|
73
|
+
},
|
|
74
|
+
params: Object.assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
75
|
+
});
|
|
76
|
+
return setDiff(source, result);
|
|
77
|
+
});
|
|
72
78
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
operationName,
|
|
84
|
-
query: this.dataHub.isCrossAccount ? QUERY_CREATE_CROSSACCOUNT : QUERY_CREATE,
|
|
85
|
-
variables,
|
|
86
|
-
};
|
|
87
|
-
const result = await this.dataHub.makeRequest({
|
|
88
|
-
method: 'POST',
|
|
89
|
-
route: '/graphql',
|
|
90
|
-
data,
|
|
79
|
+
deleteCard(cardId, temporarily = true) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
return this.dataHubSvc.makeRequest({
|
|
82
|
+
method: 'DELETE',
|
|
83
|
+
route: `cards/${cardId}`,
|
|
84
|
+
data: {
|
|
85
|
+
temporarily,
|
|
86
|
+
},
|
|
87
|
+
params: Object.assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
88
|
+
});
|
|
91
89
|
});
|
|
92
|
-
return result.data[operationName];
|
|
93
90
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
...this.dataHub.isCrossAccount ? { accountId: this.dataHub.currentAccountId } : {},
|
|
102
|
-
};
|
|
103
|
-
const operationName = this.dataHub.getOperationName(OperationNames.UPDATE);
|
|
104
|
-
const data = {
|
|
105
|
-
operationName,
|
|
106
|
-
query: this.dataHub.isCrossAccount ? QUERY_UPDATE_CROSSACCOUNT : QUERY_UPDATE,
|
|
107
|
-
variables,
|
|
108
|
-
};
|
|
109
|
-
const result = await this.dataHub.makeRequest({
|
|
110
|
-
method: 'POST',
|
|
111
|
-
route: '/graphql',
|
|
112
|
-
data,
|
|
91
|
+
recoverCard(cardId) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
return this.dataHubSvc.makeRequest({
|
|
94
|
+
method: 'PATCH',
|
|
95
|
+
route: `cards/${cardId}`,
|
|
96
|
+
params: Object.assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
97
|
+
});
|
|
113
98
|
});
|
|
114
|
-
return result.data[operationName];
|
|
115
99
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
const operationName = this.dataHub.getOperationName(OperationNames.DELETE_TEMPORARILY);
|
|
128
|
-
const data = {
|
|
129
|
-
operationName,
|
|
130
|
-
query: QUERY_DELETE,
|
|
131
|
-
variables,
|
|
132
|
-
};
|
|
133
|
-
const result = await this.dataHub.makeRequest({
|
|
134
|
-
method: 'POST',
|
|
135
|
-
route: '/graphql',
|
|
136
|
-
data,
|
|
100
|
+
cloneCard(cardId, keepTemplateDetails = true) {
|
|
101
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
return this.dataHubSvc.makeRequest({
|
|
103
|
+
method: 'PUT',
|
|
104
|
+
route: `cards/${cardId}`,
|
|
105
|
+
data: {
|
|
106
|
+
keepTemplateDetails,
|
|
107
|
+
},
|
|
108
|
+
params: Object.assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
109
|
+
});
|
|
137
110
|
});
|
|
138
|
-
return this.dataHub.subscribe(result.data[operationName].requestId);
|
|
139
111
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
data: {
|
|
150
|
-
...source.data,
|
|
151
|
-
tagIds: addTagsIds(source.data.tagIds, newIds),
|
|
152
|
-
},
|
|
112
|
+
addTags(source, tagNames) {
|
|
113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
+
const tags = yield this.tags.getMultipleTagsByName(tagNames, true);
|
|
115
|
+
const tagIds = tags.map(tag => tag.id);
|
|
116
|
+
const { newIds } = filterTagIds(source.data.tagIds, tagIds);
|
|
117
|
+
if (!newIds.length) {
|
|
118
|
+
throw Error('No tags to add.');
|
|
119
|
+
}
|
|
120
|
+
return this.saveCard(Object.assign(Object.assign({}, source), { data: Object.assign(Object.assign({}, source.data), { tagIds: addTagsIds(source.data.tagIds, newIds) }) }));
|
|
153
121
|
});
|
|
154
122
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
data: {
|
|
165
|
-
...source.data,
|
|
166
|
-
tagIds: removeTagIds(source.data.tagIds, existingIds),
|
|
167
|
-
},
|
|
123
|
+
removeTags(source, tagNames) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
const tags = yield this.tags.getMultipleTagsByName(tagNames);
|
|
126
|
+
const tagIds = tags.map(tag => tag.id);
|
|
127
|
+
const { existingIds } = filterTagIds(source.data.tagIds, tagIds);
|
|
128
|
+
if (!existingIds.length) {
|
|
129
|
+
throw Error('No tags to remove.');
|
|
130
|
+
}
|
|
131
|
+
return this.saveCard(Object.assign(Object.assign({}, source), { data: Object.assign(Object.assign({}, source.data), { tagIds: removeTagIds(source.data.tagIds, existingIds) }) }));
|
|
168
132
|
});
|
|
169
133
|
}
|
|
170
134
|
}
|
package/dist/esm/Cards.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cards.js","sourceRoot":"","sources":["../../src/Cards.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Cards.js","sourceRoot":"","sources":["../../src/Cards.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,IAAI,EAAY,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEtF,MAAM,OAAO,KAAK;IAIhB,YAAY,MAAmB;QAC7B,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC;QAEjE,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC;YAC/B,KAAK;YACL,YAAY;YACZ,SAAS;YACT,aAAa;SACd,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC;YACnB,KAAK;YACL,YAAY;YACZ,SAAS;YACT,aAAa;SACd,CAAC,CAAC;IACL,CAAC;IAQY,SAAS,CAAC,SAA0B,EAAE,EAAE,oBAAuC,EAAE;;YAC5F,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW,CAAS;gBACvD,MAAM,EAAE,MAAM;gBACd,KAAK,EAAE,WAAW;gBAClB,MAAM,gDACD,MAAM,GACN,iBAAiB,GAChB,IAAI,CAAC,UAAU,CAAC,cAAc,CAA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AAO,EAAE,MAAM,CAAC,CAAC;YAElE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE;gBACvB,MAAM,KAAK,CAAC,oBAAoB,CAAC,CAAC;aACnC;YAED,OAAO,IAAI,CAAC,QAAQ,iCACf,MAAM,KACT,IAAI,kCACC,MAAM,CAAC,IAAI,KACd,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,MAAO,EAAE,WAAW,CAAC,OAExD,CAAC;QACL,CAAC;KAAA;CAEF"}
|
package/dist/esm/constants.js
CHANGED
|
@@ -1,368 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export const QUERY_LIST = `query list($entity: EntityType!, $params: ListInput!, $sandbox: Boolean) {
|
|
3
|
-
list(entity: $entity, params: $params, sandbox: $sandbox) {
|
|
4
|
-
records {
|
|
5
|
-
... on Card {
|
|
6
|
-
id
|
|
7
|
-
schemaVersion
|
|
8
|
-
dateCreated
|
|
9
|
-
dateModified
|
|
10
|
-
data {
|
|
11
|
-
data
|
|
12
|
-
form {
|
|
13
|
-
code
|
|
14
|
-
data
|
|
15
|
-
style
|
|
16
|
-
template
|
|
17
|
-
}
|
|
18
|
-
presentation {
|
|
19
|
-
code
|
|
20
|
-
data
|
|
21
|
-
style
|
|
22
|
-
template
|
|
23
|
-
}
|
|
24
|
-
tagIds
|
|
25
|
-
}
|
|
26
|
-
reference {
|
|
27
|
-
id
|
|
28
|
-
type
|
|
29
|
-
}
|
|
30
|
-
template {
|
|
31
|
-
category
|
|
32
|
-
description
|
|
33
|
-
help
|
|
34
|
-
icon
|
|
35
|
-
iconUrl
|
|
36
|
-
implicitly
|
|
37
|
-
label
|
|
38
|
-
publishedBy
|
|
39
|
-
tags
|
|
40
|
-
type
|
|
41
|
-
version
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
last
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
`;
|
|
49
|
-
export const QUERY_LIST_CROSSACCOUNT = `query listCrossAccount($entity: EntityType!, $params: ListInput!, $accountId: String!) {
|
|
50
|
-
listCrossAccount(entity: $entity, params: $params, accountId: $accountId) {
|
|
51
|
-
records {
|
|
52
|
-
... on Card {
|
|
53
|
-
id
|
|
54
|
-
schemaVersion
|
|
55
|
-
dateCreated
|
|
56
|
-
dateModified
|
|
57
|
-
data {
|
|
58
|
-
data
|
|
59
|
-
form {
|
|
60
|
-
code
|
|
61
|
-
data
|
|
62
|
-
style
|
|
63
|
-
template
|
|
64
|
-
}
|
|
65
|
-
presentation {
|
|
66
|
-
code
|
|
67
|
-
data
|
|
68
|
-
style
|
|
69
|
-
template
|
|
70
|
-
}
|
|
71
|
-
tagIds
|
|
72
|
-
}
|
|
73
|
-
reference {
|
|
74
|
-
id
|
|
75
|
-
type
|
|
76
|
-
}
|
|
77
|
-
template {
|
|
78
|
-
category
|
|
79
|
-
description
|
|
80
|
-
help
|
|
81
|
-
icon
|
|
82
|
-
iconUrl
|
|
83
|
-
implicitly
|
|
84
|
-
label
|
|
85
|
-
publishedBy
|
|
86
|
-
tags
|
|
87
|
-
type
|
|
88
|
-
version
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
last
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
`;
|
|
96
|
-
export const QUERY_GET = `query get($entity: EntityType!, $params: GetInput!) {
|
|
97
|
-
get(entity: $entity, params: $params) {
|
|
98
|
-
... on Card {
|
|
99
|
-
id
|
|
100
|
-
schemaVersion
|
|
101
|
-
dateCreated
|
|
102
|
-
dateModified
|
|
103
|
-
data {
|
|
104
|
-
data
|
|
105
|
-
form {
|
|
106
|
-
code
|
|
107
|
-
data
|
|
108
|
-
style
|
|
109
|
-
template
|
|
110
|
-
}
|
|
111
|
-
presentation {
|
|
112
|
-
code
|
|
113
|
-
data
|
|
114
|
-
style
|
|
115
|
-
template
|
|
116
|
-
}
|
|
117
|
-
tagIds
|
|
118
|
-
}
|
|
119
|
-
reference {
|
|
120
|
-
id
|
|
121
|
-
type
|
|
122
|
-
}
|
|
123
|
-
template {
|
|
124
|
-
category
|
|
125
|
-
description
|
|
126
|
-
help
|
|
127
|
-
icon
|
|
128
|
-
iconUrl
|
|
129
|
-
implicitly
|
|
130
|
-
label
|
|
131
|
-
publishedBy
|
|
132
|
-
tags
|
|
133
|
-
type
|
|
134
|
-
version
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
`;
|
|
140
|
-
export const QUERY_GET_CROSSACCOUNT = `query getCrossAccount($entity: EntityType!, $params: GetInput!, $accountId: String!) {
|
|
141
|
-
getCrossAccount(entity: $entity, params: $params, accountId: $accountId) {
|
|
142
|
-
... on Card {
|
|
143
|
-
id
|
|
144
|
-
schemaVersion
|
|
145
|
-
dateCreated
|
|
146
|
-
dateModified
|
|
147
|
-
data {
|
|
148
|
-
data
|
|
149
|
-
form {
|
|
150
|
-
code
|
|
151
|
-
data
|
|
152
|
-
style
|
|
153
|
-
template
|
|
154
|
-
}
|
|
155
|
-
presentation {
|
|
156
|
-
code
|
|
157
|
-
data
|
|
158
|
-
style
|
|
159
|
-
template
|
|
160
|
-
}
|
|
161
|
-
tagIds
|
|
162
|
-
}
|
|
163
|
-
reference {
|
|
164
|
-
id
|
|
165
|
-
type
|
|
166
|
-
}
|
|
167
|
-
template {
|
|
168
|
-
category
|
|
169
|
-
description
|
|
170
|
-
help
|
|
171
|
-
icon
|
|
172
|
-
iconUrl
|
|
173
|
-
implicitly
|
|
174
|
-
label
|
|
175
|
-
publishedBy
|
|
176
|
-
tags
|
|
177
|
-
type
|
|
178
|
-
version
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
`;
|
|
184
|
-
export const QUERY_CREATE = `mutation create($entity: EntityType!, $data: CreateInput!) {
|
|
185
|
-
create(entity: $entity, data: $data) {
|
|
186
|
-
... on Card {
|
|
187
|
-
id
|
|
188
|
-
schemaVersion
|
|
189
|
-
dateCreated
|
|
190
|
-
dateModified
|
|
191
|
-
data {
|
|
192
|
-
data
|
|
193
|
-
form {
|
|
194
|
-
code
|
|
195
|
-
data
|
|
196
|
-
style
|
|
197
|
-
template
|
|
198
|
-
}
|
|
199
|
-
presentation {
|
|
200
|
-
code
|
|
201
|
-
data
|
|
202
|
-
style
|
|
203
|
-
template
|
|
204
|
-
}
|
|
205
|
-
tagIds
|
|
206
|
-
}
|
|
207
|
-
reference {
|
|
208
|
-
id
|
|
209
|
-
type
|
|
210
|
-
}
|
|
211
|
-
template {
|
|
212
|
-
category
|
|
213
|
-
description
|
|
214
|
-
help
|
|
215
|
-
icon
|
|
216
|
-
iconUrl
|
|
217
|
-
implicitly
|
|
218
|
-
label
|
|
219
|
-
publishedBy
|
|
220
|
-
tags
|
|
221
|
-
type
|
|
222
|
-
version
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
`;
|
|
228
|
-
export const QUERY_CREATE_CROSSACCOUNT = `mutation createCrossAccount($entity: EntityType!, $data: CreateInput!, $accountId: String!) {
|
|
229
|
-
createCrossAccount(entity: $entity, data: $data, accountId: $accountId) {
|
|
230
|
-
... on Card {
|
|
231
|
-
id
|
|
232
|
-
schemaVersion
|
|
233
|
-
dateCreated
|
|
234
|
-
dateModified
|
|
235
|
-
data {
|
|
236
|
-
data
|
|
237
|
-
form {
|
|
238
|
-
code
|
|
239
|
-
data
|
|
240
|
-
style
|
|
241
|
-
template
|
|
242
|
-
}
|
|
243
|
-
presentation {
|
|
244
|
-
code
|
|
245
|
-
data
|
|
246
|
-
style
|
|
247
|
-
template
|
|
248
|
-
}
|
|
249
|
-
tagIds
|
|
250
|
-
}
|
|
251
|
-
reference {
|
|
252
|
-
id
|
|
253
|
-
type
|
|
254
|
-
}
|
|
255
|
-
template {
|
|
256
|
-
category
|
|
257
|
-
description
|
|
258
|
-
help
|
|
259
|
-
icon
|
|
260
|
-
iconUrl
|
|
261
|
-
implicitly
|
|
262
|
-
label
|
|
263
|
-
publishedBy
|
|
264
|
-
tags
|
|
265
|
-
type
|
|
266
|
-
version
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
`;
|
|
272
|
-
export const QUERY_UPDATE = `mutation update($entity: EntityType!, $data: UpdateInput!) {
|
|
273
|
-
update(entity: $entity, data: $data) {
|
|
274
|
-
... on Card {
|
|
275
|
-
id
|
|
276
|
-
schemaVersion
|
|
277
|
-
dateCreated
|
|
278
|
-
dateModified
|
|
279
|
-
data {
|
|
280
|
-
data
|
|
281
|
-
form {
|
|
282
|
-
code
|
|
283
|
-
data
|
|
284
|
-
style
|
|
285
|
-
template
|
|
286
|
-
}
|
|
287
|
-
presentation {
|
|
288
|
-
code
|
|
289
|
-
data
|
|
290
|
-
style
|
|
291
|
-
template
|
|
292
|
-
}
|
|
293
|
-
tagIds
|
|
294
|
-
}
|
|
295
|
-
reference {
|
|
296
|
-
id
|
|
297
|
-
type
|
|
298
|
-
}
|
|
299
|
-
template {
|
|
300
|
-
category
|
|
301
|
-
description
|
|
302
|
-
help
|
|
303
|
-
icon
|
|
304
|
-
iconUrl
|
|
305
|
-
implicitly
|
|
306
|
-
label
|
|
307
|
-
publishedBy
|
|
308
|
-
tags
|
|
309
|
-
type
|
|
310
|
-
version
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
`;
|
|
316
|
-
export const QUERY_UPDATE_CROSSACCOUNT = `mutation updateCrossAccount($entity: EntityType!, $data: UpdateInput!, $accountId: String!) {
|
|
317
|
-
updateCrossAccount(entity: $entity, data: $data, accountId: $accountId) {
|
|
318
|
-
... on Card {
|
|
319
|
-
id
|
|
320
|
-
schemaVersion
|
|
321
|
-
dateCreated
|
|
322
|
-
dateModified
|
|
323
|
-
data {
|
|
324
|
-
data
|
|
325
|
-
form {
|
|
326
|
-
code
|
|
327
|
-
data
|
|
328
|
-
style
|
|
329
|
-
template
|
|
330
|
-
}
|
|
331
|
-
presentation {
|
|
332
|
-
code
|
|
333
|
-
data
|
|
334
|
-
style
|
|
335
|
-
template
|
|
336
|
-
}
|
|
337
|
-
tagIds
|
|
338
|
-
}
|
|
339
|
-
reference {
|
|
340
|
-
id
|
|
341
|
-
type
|
|
342
|
-
}
|
|
343
|
-
template {
|
|
344
|
-
category
|
|
345
|
-
description
|
|
346
|
-
help
|
|
347
|
-
icon
|
|
348
|
-
iconUrl
|
|
349
|
-
implicitly
|
|
350
|
-
label
|
|
351
|
-
publishedBy
|
|
352
|
-
tags
|
|
353
|
-
type
|
|
354
|
-
version
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
`;
|
|
360
|
-
export const QUERY_DELETE = `mutation deleteTemporarily($entity: EntityType!, $data: DeleteInput!) {
|
|
361
|
-
deleteTemporarily(entity: $entity, data: $data) {
|
|
362
|
-
... on AsyncRequest {
|
|
363
|
-
requestId
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}`;
|
|
367
|
-
export const ENTITY_NAME = 'CARD';
|
|
1
|
+
export { DATA_HUB_SVC_SERVICE_KEY } from '@or-sdk/data-hub-svc';
|
|
368
2
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC"}
|