@plaidev/karte-action-sdk 1.1.206-28211870.7ae67847 → 1.1.206-28212859.21a77059
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/dist/hydrate/index.es.js +12 -3
- package/dist/index.es.js +12 -3
- package/package.json +1 -1
package/dist/hydrate/index.es.js
CHANGED
@@ -1324,11 +1324,18 @@ function request(url, data, cb) {
|
|
1324
1324
|
'Content-Type': 'text/plain;charset=UTF-8',
|
1325
1325
|
},
|
1326
1326
|
body: JSON.stringify({ ...data }),
|
1327
|
-
})
|
1327
|
+
})
|
1328
|
+
.then(response => {
|
1328
1329
|
if (!response.ok) {
|
1329
|
-
|
1330
|
+
throw new Error(`fail to request collection api. reason: ${response.status}`);
|
1330
1331
|
}
|
1331
|
-
return
|
1332
|
+
return response.json();
|
1333
|
+
})
|
1334
|
+
.then(data => {
|
1335
|
+
return cb(null, data);
|
1336
|
+
})
|
1337
|
+
.catch(err => {
|
1338
|
+
return cb(err, null);
|
1332
1339
|
});
|
1333
1340
|
}
|
1334
1341
|
/** @internal */
|
@@ -1386,6 +1393,7 @@ const loadActionTableRows = async (config, data, api_key, endpoint) => new Promi
|
|
1386
1393
|
return reject('key is not found.');
|
1387
1394
|
}
|
1388
1395
|
return collection$1({ endpoint, api_key, table: config.query.table_name }).get(keys, (err, data) => {
|
1396
|
+
console.log('loadActionTableRows', err, data);
|
1389
1397
|
if (err) {
|
1390
1398
|
if (defaultValue != null) {
|
1391
1399
|
return resolve(defaultValue);
|
@@ -1428,6 +1436,7 @@ const loadActionTableQuery = async (config, data, api_key, endpoint) => new Prom
|
|
1428
1436
|
return reject('key is not found.');
|
1429
1437
|
}
|
1430
1438
|
return collection$1({ endpoint, api_key, table: config.query.table_name }).getByQuery(config.query.query_name, params, null, (err, data) => {
|
1439
|
+
console.log('loadActionTableQuery', err, data);
|
1431
1440
|
if (err) {
|
1432
1441
|
if (defaultValue != null) {
|
1433
1442
|
return resolve(defaultValue);
|
package/dist/index.es.js
CHANGED
@@ -1347,11 +1347,18 @@ function request(url, data, cb) {
|
|
1347
1347
|
'Content-Type': 'text/plain;charset=UTF-8',
|
1348
1348
|
},
|
1349
1349
|
body: JSON.stringify({ ...data }),
|
1350
|
-
})
|
1350
|
+
})
|
1351
|
+
.then(response => {
|
1351
1352
|
if (!response.ok) {
|
1352
|
-
|
1353
|
+
throw new Error(`fail to request collection api. reason: ${response.status}`);
|
1353
1354
|
}
|
1354
|
-
return
|
1355
|
+
return response.json();
|
1356
|
+
})
|
1357
|
+
.then(data => {
|
1358
|
+
return cb(null, data);
|
1359
|
+
})
|
1360
|
+
.catch(err => {
|
1361
|
+
return cb(err, null);
|
1355
1362
|
});
|
1356
1363
|
}
|
1357
1364
|
/** @internal */
|
@@ -1409,6 +1416,7 @@ const loadActionTableRows = async (config, data, api_key, endpoint) => new Promi
|
|
1409
1416
|
return reject('key is not found.');
|
1410
1417
|
}
|
1411
1418
|
return collection$1({ endpoint, api_key, table: config.query.table_name }).get(keys, (err, data) => {
|
1419
|
+
console.log('loadActionTableRows', err, data);
|
1412
1420
|
if (err) {
|
1413
1421
|
if (defaultValue != null) {
|
1414
1422
|
return resolve(defaultValue);
|
@@ -1451,6 +1459,7 @@ const loadActionTableQuery = async (config, data, api_key, endpoint) => new Prom
|
|
1451
1459
|
return reject('key is not found.');
|
1452
1460
|
}
|
1453
1461
|
return collection$1({ endpoint, api_key, table: config.query.table_name }).getByQuery(config.query.query_name, params, null, (err, data) => {
|
1462
|
+
console.log('loadActionTableQuery', err, data);
|
1454
1463
|
if (err) {
|
1455
1464
|
if (defaultValue != null) {
|
1456
1465
|
return resolve(defaultValue);
|