@or-sdk/cards 0.26.0-beta.631.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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.26.0](https://gitlab.com/onereach/platform/or-sdk-next/compare/@or-sdk/cards@0.25.6...@or-sdk/cards@0.26.0) (2022-10-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ⚠ BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* **data-hub-svc:** DataHub changed to DataHubSvc, now constructor needs `dataHubSvcUrl` instead of `dataHubUrl`
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **data-hub-svc:** DataHub changed to DataHubSvc, now constructor needs `dataHubSvcUrl` instead of `dataHubUrl` ([bf9c8ff](https://gitlab.com/onereach/platform/or-sdk-next/commit/bf9c8ff0c660e19f174ad04a135320c98152c4e7))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
6
19
|
### [0.25.6](https://gitlab.com/onereach/platform/or-sdk-next/compare/@or-sdk/cards@0.25.5...@or-sdk/cards@0.25.6) (2022-09-09)
|
|
7
20
|
|
|
8
21
|
**Note:** Version bump only for package @or-sdk/cards
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ import { Cards } from '@or-sdk/cards'
|
|
|
10
10
|
// with direct api url
|
|
11
11
|
const cards = new Cards({
|
|
12
12
|
token: 'my-account-token-string',
|
|
13
|
-
|
|
13
|
+
dataHubSvcUrl: 'http://example.data-hub-svc/endpoint'
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
// with service discovery(slower)
|
package/dist/cjs/Cards.js
CHANGED
|
@@ -48,182 +48,140 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
};
|
|
49
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
50
|
exports.Cards = void 0;
|
|
51
|
-
var
|
|
52
|
-
var
|
|
51
|
+
var base_1 = require("@or-sdk/base");
|
|
52
|
+
var data_hub_svc_1 = require("@or-sdk/data-hub-svc");
|
|
53
53
|
var tags_1 = require("@or-sdk/tags");
|
|
54
54
|
var Cards = (function () {
|
|
55
55
|
function Cards(params) {
|
|
56
|
-
var token = params.token, discoveryUrl = params.discoveryUrl, accountId = params.accountId,
|
|
57
|
-
this.
|
|
56
|
+
var token = params.token, discoveryUrl = params.discoveryUrl, accountId = params.accountId, dataHubSvcUrl = params.dataHubSvcUrl;
|
|
57
|
+
this.dataHubSvc = new data_hub_svc_1.DataHubSvc({
|
|
58
58
|
token: token,
|
|
59
59
|
discoveryUrl: discoveryUrl,
|
|
60
60
|
accountId: accountId,
|
|
61
|
-
|
|
61
|
+
dataHubSvcUrl: dataHubSvcUrl,
|
|
62
62
|
});
|
|
63
63
|
this.tags = new tags_1.Tags({
|
|
64
64
|
token: token,
|
|
65
65
|
discoveryUrl: discoveryUrl,
|
|
66
66
|
accountId: accountId,
|
|
67
|
-
|
|
67
|
+
dataHubSvcUrl: dataHubSvcUrl,
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
Cards.prototype.
|
|
70
|
+
Cards.prototype.listCards = function (params, paginationOptions) {
|
|
71
|
+
if (params === void 0) { params = {}; }
|
|
72
|
+
if (paginationOptions === void 0) { paginationOptions = {}; }
|
|
71
73
|
return __awaiter(this, void 0, void 0, function () {
|
|
74
|
+
var result;
|
|
72
75
|
return __generator(this, function (_a) {
|
|
73
76
|
switch (_a.label) {
|
|
74
|
-
case 0: return [4,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
case 0: return [4, this.dataHubSvc.makeRequest({
|
|
78
|
+
method: 'POST',
|
|
79
|
+
route: 'get-cards',
|
|
80
|
+
params: __assign(__assign(__assign({}, params), paginationOptions), this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
81
|
+
})];
|
|
78
82
|
case 1:
|
|
79
|
-
_a.sent();
|
|
80
|
-
return [2];
|
|
83
|
+
result = _a.sent();
|
|
84
|
+
return [2, (0, base_1.makeList)(result)];
|
|
81
85
|
}
|
|
82
86
|
});
|
|
83
87
|
});
|
|
84
88
|
};
|
|
85
|
-
Cards.prototype.listCards = function () {
|
|
86
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
87
|
-
var variables, operationName, data;
|
|
88
|
-
return __generator(this, function (_a) {
|
|
89
|
-
variables = __assign({ entity: constants_1.ENTITY_NAME, params: {
|
|
90
|
-
queryParams: {},
|
|
91
|
-
includeDeleted: false,
|
|
92
|
-
includeExisting: true,
|
|
93
|
-
limit: 30,
|
|
94
|
-
} }, this.dataHub.isCrossAccount ? { accountId: this.dataHub.currentAccountId } : { sandbox: false });
|
|
95
|
-
operationName = this.dataHub.getOperationName(data_hub_1.OperationNames.LIST);
|
|
96
|
-
data = {
|
|
97
|
-
operationName: operationName,
|
|
98
|
-
query: this.dataHub.isCrossAccount ? constants_1.QUERY_LIST_CROSSACCOUNT : constants_1.QUERY_LIST,
|
|
99
|
-
variables: variables,
|
|
100
|
-
};
|
|
101
|
-
return [2, this.dataHub.getFullList('POST', '/graphql', data)];
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
};
|
|
105
89
|
Cards.prototype.getCard = function (id) {
|
|
106
90
|
return __awaiter(this, void 0, void 0, function () {
|
|
107
|
-
var variables, operationName, data, result;
|
|
108
91
|
return __generator(this, function (_a) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
includeExisting: true,
|
|
115
|
-
} }, this.dataHub.isCrossAccount ? { accountId: this.dataHub.currentAccountId } : {});
|
|
116
|
-
operationName = this.dataHub.getOperationName(data_hub_1.OperationNames.GET);
|
|
117
|
-
data = {
|
|
118
|
-
operationName: operationName,
|
|
119
|
-
query: this.dataHub.isCrossAccount ? constants_1.QUERY_GET_CROSSACCOUNT : constants_1.QUERY_GET,
|
|
120
|
-
variables: variables,
|
|
121
|
-
};
|
|
122
|
-
return [4, this.dataHub.makeRequest({
|
|
123
|
-
method: 'POST',
|
|
124
|
-
route: '/graphql',
|
|
125
|
-
data: data,
|
|
126
|
-
})];
|
|
127
|
-
case 1:
|
|
128
|
-
result = _a.sent();
|
|
129
|
-
return [2, result.data[operationName]];
|
|
130
|
-
}
|
|
92
|
+
return [2, this.dataHubSvc.makeRequest({
|
|
93
|
+
method: 'GET',
|
|
94
|
+
route: "cards/".concat(id),
|
|
95
|
+
params: __assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
96
|
+
})];
|
|
131
97
|
});
|
|
132
98
|
});
|
|
133
99
|
};
|
|
134
100
|
Cards.prototype.saveCard = function (source) {
|
|
135
101
|
return __awaiter(this, void 0, void 0, function () {
|
|
136
102
|
return __generator(this, function (_a) {
|
|
137
|
-
return [2, source.id ? this.updateCard(source) : this.createCard(source)];
|
|
103
|
+
return [2, (source.id && source.id !== 'new') ? this.updateCard(source) : this.createCard(source)];
|
|
138
104
|
});
|
|
139
105
|
});
|
|
140
106
|
};
|
|
141
107
|
Cards.prototype.createCard = function (source) {
|
|
142
108
|
return __awaiter(this, void 0, void 0, function () {
|
|
143
|
-
var
|
|
109
|
+
var result;
|
|
144
110
|
return __generator(this, function (_a) {
|
|
145
111
|
switch (_a.label) {
|
|
146
|
-
case 0:
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
variables: variables,
|
|
155
|
-
};
|
|
156
|
-
return [4, this.dataHub.makeRequest({
|
|
157
|
-
method: 'POST',
|
|
158
|
-
route: '/graphql',
|
|
159
|
-
data: data,
|
|
160
|
-
})];
|
|
112
|
+
case 0: return [4, this.dataHubSvc.makeRequest({
|
|
113
|
+
method: 'POST',
|
|
114
|
+
route: 'cards/new',
|
|
115
|
+
data: {
|
|
116
|
+
card: __assign(__assign({}, source), { id: 'new' }),
|
|
117
|
+
},
|
|
118
|
+
params: __assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
119
|
+
})];
|
|
161
120
|
case 1:
|
|
162
121
|
result = _a.sent();
|
|
163
|
-
return [2, result
|
|
122
|
+
return [2, (0, data_hub_svc_1.setDiff)(source, result)];
|
|
164
123
|
}
|
|
165
124
|
});
|
|
166
125
|
});
|
|
167
126
|
};
|
|
168
127
|
Cards.prototype.updateCard = function (source) {
|
|
169
128
|
return __awaiter(this, void 0, void 0, function () {
|
|
170
|
-
var
|
|
129
|
+
var result;
|
|
171
130
|
return __generator(this, function (_a) {
|
|
172
131
|
switch (_a.label) {
|
|
173
|
-
case 0:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
query: this.dataHub.isCrossAccount ? constants_1.QUERY_UPDATE_CROSSACCOUNT : constants_1.QUERY_UPDATE,
|
|
182
|
-
variables: variables,
|
|
183
|
-
};
|
|
184
|
-
return [4, this.dataHub.makeRequest({
|
|
185
|
-
method: 'POST',
|
|
186
|
-
route: '/graphql',
|
|
187
|
-
data: data,
|
|
188
|
-
})];
|
|
132
|
+
case 0: return [4, this.dataHubSvc.makeRequest({
|
|
133
|
+
method: 'POST',
|
|
134
|
+
route: "cards/".concat(source.id),
|
|
135
|
+
data: {
|
|
136
|
+
card: source,
|
|
137
|
+
},
|
|
138
|
+
params: __assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
139
|
+
})];
|
|
189
140
|
case 1:
|
|
190
141
|
result = _a.sent();
|
|
191
|
-
return [2, result
|
|
142
|
+
return [2, (0, data_hub_svc_1.setDiff)(source, result)];
|
|
192
143
|
}
|
|
193
144
|
});
|
|
194
145
|
});
|
|
195
146
|
};
|
|
196
|
-
Cards.prototype.deleteCard = function (cardId) {
|
|
147
|
+
Cards.prototype.deleteCard = function (cardId, temporarily) {
|
|
148
|
+
if (temporarily === void 0) { temporarily = true; }
|
|
197
149
|
return __awaiter(this, void 0, void 0, function () {
|
|
198
|
-
var variables, operationName, data, result;
|
|
199
150
|
return __generator(this, function (_a) {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
151
|
+
return [2, this.dataHubSvc.makeRequest({
|
|
152
|
+
method: 'DELETE',
|
|
153
|
+
route: "cards/".concat(cardId),
|
|
154
|
+
data: {
|
|
155
|
+
temporarily: temporarily,
|
|
156
|
+
},
|
|
157
|
+
params: __assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
158
|
+
})];
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
Cards.prototype.recoverCard = function (cardId) {
|
|
163
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
164
|
+
return __generator(this, function (_a) {
|
|
165
|
+
return [2, this.dataHubSvc.makeRequest({
|
|
166
|
+
method: 'PATCH',
|
|
167
|
+
route: "cards/".concat(cardId),
|
|
168
|
+
params: __assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
169
|
+
})];
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
};
|
|
173
|
+
Cards.prototype.cloneCard = function (cardId, keepTemplateDetails) {
|
|
174
|
+
if (keepTemplateDetails === void 0) { keepTemplateDetails = true; }
|
|
175
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
176
|
+
return __generator(this, function (_a) {
|
|
177
|
+
return [2, this.dataHubSvc.makeRequest({
|
|
178
|
+
method: 'PUT',
|
|
179
|
+
route: "cards/".concat(cardId),
|
|
180
|
+
data: {
|
|
181
|
+
keepTemplateDetails: keepTemplateDetails,
|
|
182
|
+
},
|
|
183
|
+
params: __assign({}, this.dataHubSvc.isCrossAccount ? { accountId: this.dataHubSvc.currentAccountId } : {}),
|
|
184
|
+
})];
|
|
227
185
|
});
|
|
228
186
|
});
|
|
229
187
|
};
|
package/dist/cjs/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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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BAAY,EAAC,MAAM,CAAC,IAAI,CAAC,MAAO,EAAE,WAAW,CAAC,OAExD,EAAC;;;;KACJ;IAEH,YAAC;AAAD,CAAC,AA1ND,IA0NC;AA1NY,sBAAK"}
|
package/dist/cjs/constants.js
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
exports.QUERY_LIST = "query list($entity: EntityType!, $params: ListInput!, $sandbox: Boolean) {\n list(entity: $entity, params: $params, sandbox: $sandbox) {\n records {\n ... on Card {\n id\n schemaVersion\n dateCreated\n dateModified\n data {\n data\n form {\n code\n data\n style\n template\n }\n presentation {\n code\n data\n style\n template\n }\n tagIds\n }\n reference {\n id\n type\n }\n template {\n category\n description\n help\n icon\n iconUrl\n implicitly\n label\n publishedBy\n tags\n type\n version\n }\n }\n }\n last\n }\n}\n";
|
|
7
|
-
exports.QUERY_LIST_CROSSACCOUNT = "query listCrossAccount($entity: EntityType!, $params: ListInput!, $accountId: String!) {\n listCrossAccount(entity: $entity, params: $params, accountId: $accountId) {\n records {\n ... on Card {\n id\n schemaVersion\n dateCreated\n dateModified\n data {\n data\n form {\n code\n data\n style\n template\n }\n presentation {\n code\n data\n style\n template\n }\n tagIds\n }\n reference {\n id\n type\n }\n template {\n category\n description\n help\n icon\n iconUrl\n implicitly\n label\n publishedBy\n tags\n type\n version\n }\n }\n }\n last\n }\n}\n";
|
|
8
|
-
exports.QUERY_GET = "query get($entity: EntityType!, $params: GetInput!) {\n get(entity: $entity, params: $params) {\n ... on Card {\n id\n schemaVersion\n dateCreated\n dateModified\n data {\n data\n form {\n code\n data\n style\n template\n }\n presentation {\n code\n data\n style\n template\n }\n tagIds\n }\n reference {\n id\n type\n }\n template {\n category\n description\n help\n icon\n iconUrl\n implicitly\n label\n publishedBy\n tags\n type\n version\n }\n }\n }\n}\n";
|
|
9
|
-
exports.QUERY_GET_CROSSACCOUNT = "query getCrossAccount($entity: EntityType!, $params: GetInput!, $accountId: String!) {\n getCrossAccount(entity: $entity, params: $params, accountId: $accountId) {\n ... on Card {\n id\n schemaVersion\n dateCreated\n dateModified\n data {\n data\n form {\n code\n data\n style\n template\n }\n presentation {\n code\n data\n style\n template\n }\n tagIds\n }\n reference {\n id\n type\n }\n template {\n category\n description\n help\n icon\n iconUrl\n implicitly\n label\n publishedBy\n tags\n type\n version\n }\n }\n }\n}\n";
|
|
10
|
-
exports.QUERY_CREATE = "mutation create($entity: EntityType!, $data: CreateInput!) {\n create(entity: $entity, data: $data) {\n ... on Card {\n id\n schemaVersion\n dateCreated\n dateModified\n data {\n data\n form {\n code\n data\n style\n template\n }\n presentation {\n code\n data\n style\n template\n }\n tagIds\n }\n reference {\n id\n type\n }\n template {\n category\n description\n help\n icon\n iconUrl\n implicitly\n label\n publishedBy\n tags\n type\n version\n }\n }\n }\n}\n";
|
|
11
|
-
exports.QUERY_CREATE_CROSSACCOUNT = "mutation createCrossAccount($entity: EntityType!, $data: CreateInput!, $accountId: String!) {\n createCrossAccount(entity: $entity, data: $data, accountId: $accountId) {\n ... on Card {\n id\n schemaVersion\n dateCreated\n dateModified\n data {\n data\n form {\n code\n data\n style\n template\n }\n presentation {\n code\n data\n style\n template\n }\n tagIds\n }\n reference {\n id\n type\n }\n template {\n category\n description\n help\n icon\n iconUrl\n implicitly\n label\n publishedBy\n tags\n type\n version\n }\n }\n }\n}\n";
|
|
12
|
-
exports.QUERY_UPDATE = "mutation update($entity: EntityType!, $data: UpdateInput!) {\n update(entity: $entity, data: $data) {\n ... on Card {\n id\n schemaVersion\n dateCreated\n dateModified\n data {\n data\n form {\n code\n data\n style\n template\n }\n presentation {\n code\n data\n style\n template\n }\n tagIds\n }\n reference {\n id\n type\n }\n template {\n category\n description\n help\n icon\n iconUrl\n implicitly\n label\n publishedBy\n tags\n type\n version\n }\n }\n }\n}\n";
|
|
13
|
-
exports.QUERY_UPDATE_CROSSACCOUNT = "mutation updateCrossAccount($entity: EntityType!, $data: UpdateInput!, $accountId: String!) {\n updateCrossAccount(entity: $entity, data: $data, accountId: $accountId) {\n ... on Card {\n id\n schemaVersion\n dateCreated\n dateModified\n data {\n data\n form {\n code\n data\n style\n template\n }\n presentation {\n code\n data\n style\n template\n }\n tagIds\n }\n reference {\n id\n type\n }\n template {\n category\n description\n help\n icon\n iconUrl\n implicitly\n label\n publishedBy\n tags\n type\n version\n }\n }\n }\n}\n";
|
|
14
|
-
exports.QUERY_DELETE = "mutation deleteTemporarily($entity: EntityType!, $data: DeleteInput!) {\n deleteTemporarily(entity: $entity, data: $data) {\n ... on AsyncRequest {\n requestId\n }\n }\n}";
|
|
15
|
-
exports.ENTITY_NAME = 'CARD';
|
|
3
|
+
exports.DATA_HUB_SVC_SERVICE_KEY = void 0;
|
|
4
|
+
var data_hub_svc_1 = require("@or-sdk/data-hub-svc");
|
|
5
|
+
Object.defineProperty(exports, "DATA_HUB_SVC_SERVICE_KEY", { enumerable: true, get: function () { return data_hub_svc_1.DATA_HUB_SVC_SERVICE_KEY; } });
|
|
16
6
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAA,qDAAgE;AAAvD,wHAAA,wBAAwB,OAAA"}
|