@plaidev/karte-action-sdk 1.1.137-27963515.80456e9a → 1.1.137-27963891.873b2532
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/hydrate/index.es.d.ts +42 -16
- package/dist/hydrate/index.es.js +8 -1
- package/dist/index.es.d.ts +42 -16
- package/dist/index.es.js +8 -1
- package/package.json +1 -1
@@ -1136,9 +1136,16 @@ declare function collection(config: CollectionConfig): {
|
|
1136
1136
|
} | null | undefined, cb: (err: Error | null, items?: Array<ActionTableResult>) => void): void;
|
1137
1137
|
set(key: string, value: string, cb: (err: Error | null) => void): void;
|
1138
1138
|
};
|
1139
|
-
|
1140
|
-
|
1139
|
+
/** @internal */
|
1140
|
+
type VariableQuery = {
|
1141
|
+
resolver: string;
|
1141
1142
|
name: string;
|
1143
|
+
query: any;
|
1144
|
+
preview_value?: any;
|
1145
|
+
};
|
1146
|
+
/** @internal */
|
1147
|
+
type ActionTableRowRequestConfig = VariableQuery & {
|
1148
|
+
resolver: "action-table-row";
|
1142
1149
|
query: {
|
1143
1150
|
table_name: string;
|
1144
1151
|
key: string;
|
@@ -1146,9 +1153,9 @@ type ActionTableRowRequestConfig = {
|
|
1146
1153
|
};
|
1147
1154
|
preview_value?: ActionTableResult;
|
1148
1155
|
};
|
1149
|
-
|
1156
|
+
/** @internal */
|
1157
|
+
type ActionTableRowsRequestConfig = VariableQuery & {
|
1150
1158
|
resolver: "action-table-rows";
|
1151
|
-
name: string;
|
1152
1159
|
query: {
|
1153
1160
|
table_name: string;
|
1154
1161
|
key: Array<string>;
|
@@ -1156,9 +1163,9 @@ type ActionTableRowsRequestConfig = {
|
|
1156
1163
|
};
|
1157
1164
|
preview_value?: Array<ActionTableResult>;
|
1158
1165
|
};
|
1159
|
-
|
1166
|
+
/** @internal */
|
1167
|
+
type ActionTableQueryRequestConfig = VariableQuery & {
|
1160
1168
|
resolver: "action-table-query";
|
1161
|
-
name: string;
|
1162
1169
|
query: {
|
1163
1170
|
table_name: string;
|
1164
1171
|
query_name: string;
|
@@ -1167,11 +1174,17 @@ type ActionTableQueryRequestConfig = {
|
|
1167
1174
|
};
|
1168
1175
|
preview_value?: Array<ActionTableResult>;
|
1169
1176
|
};
|
1177
|
+
/** @internal */
|
1170
1178
|
type ActionTableRequestConfig = ActionTableRowRequestConfig | ActionTableRowsRequestConfig | ActionTableQueryRequestConfig;
|
1179
|
+
/** @internal */
|
1171
1180
|
declare const loadActionTableRow: (config: ActionTableRowRequestConfig, api_key: string, endpoint?: string) => Promise<unknown>;
|
1181
|
+
/** @internal */
|
1172
1182
|
declare const loadActionTableRows: (config: ActionTableRowsRequestConfig, api_key: string, endpoint?: string) => Promise<unknown>;
|
1183
|
+
/** @internal */
|
1173
1184
|
declare const loadActionTableQuery: (config: ActionTableQueryRequestConfig, api_key: string, endpoint?: string) => Promise<unknown>;
|
1174
|
-
declare const loadActionTable: (config: Array<
|
1185
|
+
declare const loadActionTable: (config: Array<VariableQuery>, api_key: string, endpoint?: string) => Promise<{
|
1186
|
+
[key: string]: any;
|
1187
|
+
}>;
|
1175
1188
|
type _Props$0 = Props;
|
1176
1189
|
/** @internal */
|
1177
1190
|
declare const ACTION_HOOK_LABEL = "__ACTION_HOOK__";
|
@@ -1322,7 +1335,7 @@ interface ActionOptions<Props, Variables, VariablesQuery> {
|
|
1322
1335
|
*
|
1323
1336
|
* @public
|
1324
1337
|
*/
|
1325
|
-
declare function create<Props extends _Props$0, Variables, VariablesQuery extends
|
1338
|
+
declare function create<Props extends _Props$0, Variables, VariablesQuery extends Array<VariableQuery>>(App: typeof SvelteComponentDev, options?: ActionOptions<Props, Variables & ActionVariables, VariablesQuery>): () => void;
|
1326
1339
|
/**
|
1327
1340
|
* アクションの破棄する
|
1328
1341
|
*
|
@@ -2615,9 +2628,16 @@ declare namespace widget {
|
|
2615
2628
|
} | null | undefined, cb: (err: Error | null, items?: Array<ActionTableResult>) => void): void;
|
2616
2629
|
set(key: string, value: string, cb: (err: Error | null) => void): void;
|
2617
2630
|
};
|
2618
|
-
|
2619
|
-
|
2631
|
+
/** @internal */
|
2632
|
+
type VariableQuery = {
|
2633
|
+
resolver: string;
|
2620
2634
|
name: string;
|
2635
|
+
query: any;
|
2636
|
+
preview_value?: any;
|
2637
|
+
};
|
2638
|
+
/** @internal */
|
2639
|
+
type ActionTableRowRequestConfig = VariableQuery & {
|
2640
|
+
resolver: "action-table-row";
|
2621
2641
|
query: {
|
2622
2642
|
table_name: string;
|
2623
2643
|
key: string;
|
@@ -2625,9 +2645,9 @@ declare namespace widget {
|
|
2625
2645
|
};
|
2626
2646
|
preview_value?: ActionTableResult;
|
2627
2647
|
};
|
2628
|
-
|
2648
|
+
/** @internal */
|
2649
|
+
type ActionTableRowsRequestConfig = VariableQuery & {
|
2629
2650
|
resolver: "action-table-rows";
|
2630
|
-
name: string;
|
2631
2651
|
query: {
|
2632
2652
|
table_name: string;
|
2633
2653
|
key: Array<string>;
|
@@ -2635,9 +2655,9 @@ declare namespace widget {
|
|
2635
2655
|
};
|
2636
2656
|
preview_value?: Array<ActionTableResult>;
|
2637
2657
|
};
|
2638
|
-
|
2658
|
+
/** @internal */
|
2659
|
+
type ActionTableQueryRequestConfig = VariableQuery & {
|
2639
2660
|
resolver: "action-table-query";
|
2640
|
-
name: string;
|
2641
2661
|
query: {
|
2642
2662
|
table_name: string;
|
2643
2663
|
query_name: string;
|
@@ -2646,11 +2666,17 @@ declare namespace widget {
|
|
2646
2666
|
};
|
2647
2667
|
preview_value?: Array<ActionTableResult>;
|
2648
2668
|
};
|
2669
|
+
/** @internal */
|
2649
2670
|
type ActionTableRequestConfig = ActionTableRowRequestConfig | ActionTableRowsRequestConfig | ActionTableQueryRequestConfig;
|
2671
|
+
/** @internal */
|
2650
2672
|
const loadActionTableRow: (config: ActionTableRowRequestConfig, api_key: string, endpoint?: string) => Promise<unknown>;
|
2673
|
+
/** @internal */
|
2651
2674
|
const loadActionTableRows: (config: ActionTableRowsRequestConfig, api_key: string, endpoint?: string) => Promise<unknown>;
|
2675
|
+
/** @internal */
|
2652
2676
|
const loadActionTableQuery: (config: ActionTableQueryRequestConfig, api_key: string, endpoint?: string) => Promise<unknown>;
|
2653
|
-
const loadActionTable: (config: Array<
|
2677
|
+
const loadActionTable: (config: Array<VariableQuery>, api_key: string, endpoint?: string) => Promise<{
|
2678
|
+
[key: string]: any;
|
2679
|
+
}>;
|
2654
2680
|
/**
|
2655
2681
|
* プロパティ
|
2656
2682
|
*
|
@@ -2856,7 +2882,7 @@ declare namespace widget {
|
|
2856
2882
|
*
|
2857
2883
|
* @public
|
2858
2884
|
*/
|
2859
|
-
function create<Props extends _Props, Variables, VariablesQuery extends
|
2885
|
+
function create<Props extends _Props, Variables, VariablesQuery extends Array<VariableQuery>>(App: typeof SvelteComponentDev, options?: ActionOptions<Props, Variables & ActionVariables, VariablesQuery>): () => void;
|
2860
2886
|
/**
|
2861
2887
|
* Dispatch the event to destroy KARTE action
|
2862
2888
|
*
|
package/dist/hydrate/index.es.js
CHANGED
@@ -1541,12 +1541,15 @@ function request(url, data, cb) {
|
|
1541
1541
|
return cb(null, response.json());
|
1542
1542
|
});
|
1543
1543
|
}
|
1544
|
+
/** @internal */
|
1544
1545
|
const loadActionTableRow = async (config, api_key, endpoint) => {
|
1545
1546
|
return new Promise((resolve, reject) => collection$1({ endpoint, api_key, table: config.query.table_name }).get(config.query.key, (err, data) => (err ? reject(err) : resolve(data))));
|
1546
1547
|
};
|
1548
|
+
/** @internal */
|
1547
1549
|
const loadActionTableRows = async (config, api_key, endpoint) => {
|
1548
1550
|
return new Promise((resolve, reject) => collection$1({ endpoint, api_key, table: config.query.table_name }).get(config.query.key, (err, data) => (err ? reject(err) : resolve(data))));
|
1549
1551
|
};
|
1552
|
+
/** @internal */
|
1550
1553
|
const loadActionTableQuery = async (config, api_key, endpoint) => {
|
1551
1554
|
return new Promise((resolve, reject) => collection$1({ endpoint, api_key, table: config.query.table_name }).getByQuery(config.query.query_name, config.query.params, null, (err, data) => (err ? reject(err) : resolve(data))));
|
1552
1555
|
};
|
@@ -1685,7 +1688,11 @@ function create(App, options = {
|
|
1685
1688
|
});
|
1686
1689
|
// ActionTable APIへの非同期リクエスト
|
1687
1690
|
if (options.localVariablesQuery && data.api_key) {
|
1688
|
-
loadActionTable(options.localVariablesQuery, data.api_key).then(result =>
|
1691
|
+
loadActionTable(options.localVariablesQuery, data.api_key).then(result => {
|
1692
|
+
if (Object.keys(result).length > 0) {
|
1693
|
+
setVariables(result);
|
1694
|
+
}
|
1695
|
+
});
|
1689
1696
|
}
|
1690
1697
|
const close = (trigger = 'none') => {
|
1691
1698
|
if (!app) {
|
package/dist/index.es.d.ts
CHANGED
@@ -1136,9 +1136,16 @@ declare function collection(config: CollectionConfig): {
|
|
1136
1136
|
} | null | undefined, cb: (err: Error | null, items?: Array<ActionTableResult>) => void): void;
|
1137
1137
|
set(key: string, value: string, cb: (err: Error | null) => void): void;
|
1138
1138
|
};
|
1139
|
-
|
1140
|
-
|
1139
|
+
/** @internal */
|
1140
|
+
type VariableQuery = {
|
1141
|
+
resolver: string;
|
1141
1142
|
name: string;
|
1143
|
+
query: any;
|
1144
|
+
preview_value?: any;
|
1145
|
+
};
|
1146
|
+
/** @internal */
|
1147
|
+
type ActionTableRowRequestConfig = VariableQuery & {
|
1148
|
+
resolver: "action-table-row";
|
1142
1149
|
query: {
|
1143
1150
|
table_name: string;
|
1144
1151
|
key: string;
|
@@ -1146,9 +1153,9 @@ type ActionTableRowRequestConfig = {
|
|
1146
1153
|
};
|
1147
1154
|
preview_value?: ActionTableResult;
|
1148
1155
|
};
|
1149
|
-
|
1156
|
+
/** @internal */
|
1157
|
+
type ActionTableRowsRequestConfig = VariableQuery & {
|
1150
1158
|
resolver: "action-table-rows";
|
1151
|
-
name: string;
|
1152
1159
|
query: {
|
1153
1160
|
table_name: string;
|
1154
1161
|
key: Array<string>;
|
@@ -1156,9 +1163,9 @@ type ActionTableRowsRequestConfig = {
|
|
1156
1163
|
};
|
1157
1164
|
preview_value?: Array<ActionTableResult>;
|
1158
1165
|
};
|
1159
|
-
|
1166
|
+
/** @internal */
|
1167
|
+
type ActionTableQueryRequestConfig = VariableQuery & {
|
1160
1168
|
resolver: "action-table-query";
|
1161
|
-
name: string;
|
1162
1169
|
query: {
|
1163
1170
|
table_name: string;
|
1164
1171
|
query_name: string;
|
@@ -1167,11 +1174,17 @@ type ActionTableQueryRequestConfig = {
|
|
1167
1174
|
};
|
1168
1175
|
preview_value?: Array<ActionTableResult>;
|
1169
1176
|
};
|
1177
|
+
/** @internal */
|
1170
1178
|
type ActionTableRequestConfig = ActionTableRowRequestConfig | ActionTableRowsRequestConfig | ActionTableQueryRequestConfig;
|
1179
|
+
/** @internal */
|
1171
1180
|
declare const loadActionTableRow: (config: ActionTableRowRequestConfig, api_key: string, endpoint?: string) => Promise<unknown>;
|
1181
|
+
/** @internal */
|
1172
1182
|
declare const loadActionTableRows: (config: ActionTableRowsRequestConfig, api_key: string, endpoint?: string) => Promise<unknown>;
|
1183
|
+
/** @internal */
|
1173
1184
|
declare const loadActionTableQuery: (config: ActionTableQueryRequestConfig, api_key: string, endpoint?: string) => Promise<unknown>;
|
1174
|
-
declare const loadActionTable: (config: Array<
|
1185
|
+
declare const loadActionTable: (config: Array<VariableQuery>, api_key: string, endpoint?: string) => Promise<{
|
1186
|
+
[key: string]: any;
|
1187
|
+
}>;
|
1175
1188
|
type _Props$0 = Props;
|
1176
1189
|
/** @internal */
|
1177
1190
|
declare const ACTION_HOOK_LABEL = "__ACTION_HOOK__";
|
@@ -1322,7 +1335,7 @@ interface ActionOptions<Props, Variables, VariablesQuery> {
|
|
1322
1335
|
*
|
1323
1336
|
* @public
|
1324
1337
|
*/
|
1325
|
-
declare function create<Props extends _Props$0, Variables, VariablesQuery extends
|
1338
|
+
declare function create<Props extends _Props$0, Variables, VariablesQuery extends Array<VariableQuery>>(App: typeof SvelteComponentDev, options?: ActionOptions<Props, Variables & ActionVariables, VariablesQuery>): () => void;
|
1326
1339
|
/**
|
1327
1340
|
* アクションの破棄する
|
1328
1341
|
*
|
@@ -2615,9 +2628,16 @@ declare namespace widget {
|
|
2615
2628
|
} | null | undefined, cb: (err: Error | null, items?: Array<ActionTableResult>) => void): void;
|
2616
2629
|
set(key: string, value: string, cb: (err: Error | null) => void): void;
|
2617
2630
|
};
|
2618
|
-
|
2619
|
-
|
2631
|
+
/** @internal */
|
2632
|
+
type VariableQuery = {
|
2633
|
+
resolver: string;
|
2620
2634
|
name: string;
|
2635
|
+
query: any;
|
2636
|
+
preview_value?: any;
|
2637
|
+
};
|
2638
|
+
/** @internal */
|
2639
|
+
type ActionTableRowRequestConfig = VariableQuery & {
|
2640
|
+
resolver: "action-table-row";
|
2621
2641
|
query: {
|
2622
2642
|
table_name: string;
|
2623
2643
|
key: string;
|
@@ -2625,9 +2645,9 @@ declare namespace widget {
|
|
2625
2645
|
};
|
2626
2646
|
preview_value?: ActionTableResult;
|
2627
2647
|
};
|
2628
|
-
|
2648
|
+
/** @internal */
|
2649
|
+
type ActionTableRowsRequestConfig = VariableQuery & {
|
2629
2650
|
resolver: "action-table-rows";
|
2630
|
-
name: string;
|
2631
2651
|
query: {
|
2632
2652
|
table_name: string;
|
2633
2653
|
key: Array<string>;
|
@@ -2635,9 +2655,9 @@ declare namespace widget {
|
|
2635
2655
|
};
|
2636
2656
|
preview_value?: Array<ActionTableResult>;
|
2637
2657
|
};
|
2638
|
-
|
2658
|
+
/** @internal */
|
2659
|
+
type ActionTableQueryRequestConfig = VariableQuery & {
|
2639
2660
|
resolver: "action-table-query";
|
2640
|
-
name: string;
|
2641
2661
|
query: {
|
2642
2662
|
table_name: string;
|
2643
2663
|
query_name: string;
|
@@ -2646,11 +2666,17 @@ declare namespace widget {
|
|
2646
2666
|
};
|
2647
2667
|
preview_value?: Array<ActionTableResult>;
|
2648
2668
|
};
|
2669
|
+
/** @internal */
|
2649
2670
|
type ActionTableRequestConfig = ActionTableRowRequestConfig | ActionTableRowsRequestConfig | ActionTableQueryRequestConfig;
|
2671
|
+
/** @internal */
|
2650
2672
|
const loadActionTableRow: (config: ActionTableRowRequestConfig, api_key: string, endpoint?: string) => Promise<unknown>;
|
2673
|
+
/** @internal */
|
2651
2674
|
const loadActionTableRows: (config: ActionTableRowsRequestConfig, api_key: string, endpoint?: string) => Promise<unknown>;
|
2675
|
+
/** @internal */
|
2652
2676
|
const loadActionTableQuery: (config: ActionTableQueryRequestConfig, api_key: string, endpoint?: string) => Promise<unknown>;
|
2653
|
-
const loadActionTable: (config: Array<
|
2677
|
+
const loadActionTable: (config: Array<VariableQuery>, api_key: string, endpoint?: string) => Promise<{
|
2678
|
+
[key: string]: any;
|
2679
|
+
}>;
|
2654
2680
|
/**
|
2655
2681
|
* プロパティ
|
2656
2682
|
*
|
@@ -2856,7 +2882,7 @@ declare namespace widget {
|
|
2856
2882
|
*
|
2857
2883
|
* @public
|
2858
2884
|
*/
|
2859
|
-
function create<Props extends _Props, Variables, VariablesQuery extends
|
2885
|
+
function create<Props extends _Props, Variables, VariablesQuery extends Array<VariableQuery>>(App: typeof SvelteComponentDev, options?: ActionOptions<Props, Variables & ActionVariables, VariablesQuery>): () => void;
|
2860
2886
|
/**
|
2861
2887
|
* Dispatch the event to destroy KARTE action
|
2862
2888
|
*
|
package/dist/index.es.js
CHANGED
@@ -1611,12 +1611,15 @@ function request(url, data, cb) {
|
|
1611
1611
|
return cb(null, response.json());
|
1612
1612
|
});
|
1613
1613
|
}
|
1614
|
+
/** @internal */
|
1614
1615
|
const loadActionTableRow = async (config, api_key, endpoint) => {
|
1615
1616
|
return new Promise((resolve, reject) => collection$1({ endpoint, api_key, table: config.query.table_name }).get(config.query.key, (err, data) => (err ? reject(err) : resolve(data))));
|
1616
1617
|
};
|
1618
|
+
/** @internal */
|
1617
1619
|
const loadActionTableRows = async (config, api_key, endpoint) => {
|
1618
1620
|
return new Promise((resolve, reject) => collection$1({ endpoint, api_key, table: config.query.table_name }).get(config.query.key, (err, data) => (err ? reject(err) : resolve(data))));
|
1619
1621
|
};
|
1622
|
+
/** @internal */
|
1620
1623
|
const loadActionTableQuery = async (config, api_key, endpoint) => {
|
1621
1624
|
return new Promise((resolve, reject) => collection$1({ endpoint, api_key, table: config.query.table_name }).getByQuery(config.query.query_name, config.query.params, null, (err, data) => (err ? reject(err) : resolve(data))));
|
1622
1625
|
};
|
@@ -1768,7 +1771,11 @@ function create(App, options = {
|
|
1768
1771
|
});
|
1769
1772
|
// ActionTable APIへの非同期リクエスト
|
1770
1773
|
if (options.localVariablesQuery && data.api_key) {
|
1771
|
-
loadActionTable(options.localVariablesQuery, data.api_key).then(result =>
|
1774
|
+
loadActionTable(options.localVariablesQuery, data.api_key).then(result => {
|
1775
|
+
if (Object.keys(result).length > 0) {
|
1776
|
+
setVariables(result);
|
1777
|
+
}
|
1778
|
+
});
|
1772
1779
|
}
|
1773
1780
|
const close = (trigger = 'none') => {
|
1774
1781
|
if (!app) {
|