@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 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
- dataHubUrl: 'http://example.cards/endpoint'
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 data_hub_1 = require("@or-sdk/data-hub");
52
- var constants_1 = require("./constants");
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, dataHubUrl = params.dataHubUrl;
57
- this.dataHub = new data_hub_1.DataHub({
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
- dataHubUrl: dataHubUrl,
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
- dataHubUrl: dataHubUrl,
67
+ dataHubSvcUrl: dataHubSvcUrl,
68
68
  });
69
69
  }
70
- Cards.prototype.init = function () {
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, Promise.all([
75
- this.dataHub.init(),
76
- this.tags.init(),
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
- switch (_a.label) {
110
- case 0:
111
- variables = __assign({ entity: constants_1.ENTITY_NAME, params: {
112
- id: id,
113
- includeDeleted: false,
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 variables, operationName, data, result;
109
+ var result;
144
110
  return __generator(this, function (_a) {
145
111
  switch (_a.label) {
146
- case 0:
147
- variables = __assign({ entity: constants_1.ENTITY_NAME, data: {
148
- body: source,
149
- } }, this.dataHub.isCrossAccount ? { accountId: this.dataHub.currentAccountId } : {});
150
- operationName = this.dataHub.getOperationName(data_hub_1.OperationNames.CREATE);
151
- data = {
152
- operationName: operationName,
153
- query: this.dataHub.isCrossAccount ? constants_1.QUERY_CREATE_CROSSACCOUNT : constants_1.QUERY_CREATE,
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.data[operationName]];
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 variables, operationName, data, result;
129
+ var result;
171
130
  return __generator(this, function (_a) {
172
131
  switch (_a.label) {
173
- case 0:
174
- variables = __assign({ entity: constants_1.ENTITY_NAME, data: {
175
- id: source.id,
176
- body: source,
177
- } }, this.dataHub.isCrossAccount ? { accountId: this.dataHub.currentAccountId } : {});
178
- operationName = this.dataHub.getOperationName(data_hub_1.OperationNames.UPDATE);
179
- data = {
180
- operationName: operationName,
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.data[operationName]];
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
- switch (_a.label) {
201
- case 0:
202
- if (this.dataHub.isCrossAccount) {
203
- throw Error('Cross-account deleting is not implemented.');
204
- }
205
- variables = {
206
- entity: constants_1.ENTITY_NAME,
207
- data: {
208
- id: cardId,
209
- subscribe: true,
210
- },
211
- };
212
- operationName = this.dataHub.getOperationName(data_hub_1.OperationNames.DELETE_TEMPORARILY);
213
- data = {
214
- operationName: operationName,
215
- query: constants_1.QUERY_DELETE,
216
- variables: variables,
217
- };
218
- return [4, this.dataHub.makeRequest({
219
- method: 'POST',
220
- route: '/graphql',
221
- data: data,
222
- })];
223
- case 1:
224
- result = _a.sent();
225
- return [2, this.dataHub.subscribe(result.data[operationName].requestId)];
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
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Cards.js","sourceRoot":"","sources":["../../src/Cards.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAAkI;AAElI,yCAWqB;AACrB,qCAAsF;AAEtF;IAIE,eAAY,MAAmB;QACrB,IAAA,KAAK,GAA0C,MAAM,MAAhD,EAAE,YAAY,GAA4B,MAAM,aAAlC,EAAE,SAAS,GAAiB,MAAM,UAAvB,EAAE,UAAU,GAAK,MAAM,WAAX,CAAY;QAE9D,IAAI,CAAC,OAAO,GAAG,IAAI,kBAAO,CAAC;YACzB,KAAK,OAAA;YACL,YAAY,cAAA;YACZ,SAAS,WAAA;YACT,UAAU,YAAA;SACX,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,IAAI,WAAI,CAAC;YACnB,KAAK,OAAA;YACL,YAAY,cAAA;YACZ,SAAS,WAAA;YACT,UAAU,YAAA;SACX,CAAC,CAAC;IAEL,CAAC;IAEK,oBAAI,GAAV;;;;4BACE,WAAM,OAAO,CAAC,GAAG,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BACC,MAAM,CAAC,IAAI,KACd,MAAM,EAAE,IAAA,iBAAU,EAAC,MAAM,CAAC,IAAI,CAAC,MAAO,EAAE,MAAM,CAAC,OAEjD,EAAC;;;;KACJ;IAQY,0BAAU,GAAvB,UAAwB,MAAY,EAAE,QAAkB;;;;;4BACzC,WAAM,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAA;;wBAAtD,IAAI,GAAG,SAA+C;wBACtD,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,EAAG,EAAP,CAAO,CAAC,CAAC;wBAEhC,WAAW,GAAK,IAAA,mBAAY,EAAC,MAAM,CAAC,IAAI,CAAC,MAAO,EAAE,MAAM,CAAC,YAA9C,CAA+C;wBAElE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE;4BACvB,MAAM,KAAK,CAAC,oBAAoB,CAAC,CAAC;yBACnC;wBAED,WAAO,IAAI,CAAC,QAAQ,uBACf,MAAM,KACT,IAAI,wBACC,MAAM,CAAC,IAAI,KACd,MAAM,EAAE,IAAA,mBAAY,EAAC,MAAM,CAAC,IAAI,CAAC,MAAO,EAAE,WAAW,CAAC,OAExD,EAAC;;;;KACJ;IAEH,YAAC;AAAD,CAAC,AA1ND,IA0NC;AA1NY,sBAAK"}
@@ -1,16 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ENTITY_NAME = exports.QUERY_DELETE = exports.QUERY_UPDATE_CROSSACCOUNT = exports.QUERY_UPDATE = exports.QUERY_CREATE_CROSSACCOUNT = exports.QUERY_CREATE = exports.QUERY_GET_CROSSACCOUNT = exports.QUERY_GET = exports.QUERY_LIST_CROSSACCOUNT = exports.QUERY_LIST = exports.DATA_HUB_SERVICE_KEY = void 0;
4
- var data_hub_1 = require("@or-sdk/data-hub");
5
- Object.defineProperty(exports, "DATA_HUB_SERVICE_KEY", { enumerable: true, get: function () { return data_hub_1.DATA_HUB_SERVICE_KEY; } });
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,6CAAwD;AAA/C,gHAAA,oBAAoB,OAAA;AAEhB,QAAA,UAAU,GAAG,02BA8CzB,CAAC;AAEW,QAAA,uBAAuB,GAAG,w4BA8CtC,CAAC;AAEW,QAAA,SAAS,GAAG,mtBA2CxB,CAAC;AAEW,QAAA,sBAAsB,GAAG,uxBA2CrC,CAAC;AAEW,QAAA,YAAY,GAAG,ytBA2C3B,CAAC;AAEW,QAAA,yBAAyB,GAAG,6xBA2CxC,CAAC;AAEW,QAAA,YAAY,GAAG,ytBA2C3B,CAAC;AACW,QAAA,yBAAyB,GAAG,6xBA2CxC,CAAC;AAEW,QAAA,YAAY,GAAG,yLAM1B,CAAC;AAEU,QAAA,WAAW,GAAG,MAAM,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAA,qDAAgE;AAAvD,wHAAA,wBAAwB,OAAA"}