@plaidev/karte-action-sdk 1.1.131-27959459.4bcace4e → 1.1.131-27959587.da575ff6

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.
@@ -1219,7 +1219,7 @@ type ActionHookLog = {
1219
1219
  *
1220
1220
  * @public
1221
1221
  */
1222
- type ActionHook<Props extends _Props$0, Variables> = (props: ActionProps<Props, Variables & CustomVariables>) => void | Promise<void>;
1222
+ type ActionHook<Props extends _Props$0, Variables> = (props: ActionProps<Props, Variables & ActionVariables>) => void | Promise<void>;
1223
1223
  /**
1224
1224
  * アクションが作成 (create) される前にフックする関数
1225
1225
  *
@@ -1227,7 +1227,7 @@ type ActionHook<Props extends _Props$0, Variables> = (props: ActionProps<Props,
1227
1227
  *
1228
1228
  * @public
1229
1229
  */
1230
- declare function onCreate<Props extends _Props$0, Variables>(fn: ActionHook<Props, Variables & CustomVariables>): void;
1230
+ declare function onCreate<Props extends _Props$0, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
1231
1231
  /**
1232
1232
  * アクションが表示 (show) された後にフックする関数
1233
1233
  *
@@ -1235,7 +1235,7 @@ declare function onCreate<Props extends _Props$0, Variables>(fn: ActionHook<Prop
1235
1235
  *
1236
1236
  * @public
1237
1237
  */
1238
- declare function onShow<Props extends _Props$0, Variables>(fn: ActionHook<Props, Variables & CustomVariables>): void;
1238
+ declare function onShow<Props extends _Props$0, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
1239
1239
  /**
1240
1240
  * アクションのライフサイクル close で呼び出されるフックする関数
1241
1241
  *
@@ -1244,7 +1244,7 @@ declare function onShow<Props extends _Props$0, Variables>(fn: ActionHook<Props,
1244
1244
  *
1245
1245
  * @public
1246
1246
  */
1247
- type ActionCloseHook<Props extends _Props$0, Variables> = (props: Parameters<ActionHook<Props, Variables & CustomVariables>>[0], trigger: CloseTrigger) => void | Promise<void>;
1247
+ type ActionCloseHook<Props extends _Props$0, Variables> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], trigger: CloseTrigger) => void | Promise<void>;
1248
1248
  /**
1249
1249
  * アクションがクローズ (close) される前にフックする関数
1250
1250
  *
@@ -1252,7 +1252,7 @@ type ActionCloseHook<Props extends _Props$0, Variables> = (props: Parameters<Act
1252
1252
  *
1253
1253
  * @public
1254
1254
  */
1255
- declare function onClose<Props extends _Props$0, Variables>(fn: ActionCloseHook<Props, Variables & CustomVariables>): void;
1255
+ declare function onClose<Props extends _Props$0, Variables>(fn: ActionCloseHook<Props, Variables & ActionVariables>): void;
1256
1256
  /**
1257
1257
  * アクションが破棄 (destroy) される前にフックする関数
1258
1258
  *
@@ -1260,7 +1260,7 @@ declare function onClose<Props extends _Props$0, Variables>(fn: ActionCloseHook<
1260
1260
  *
1261
1261
  * @public
1262
1262
  */
1263
- declare function onDestroy<Props extends _Props$0, Variables>(fn: ActionHook<Props, Variables & CustomVariables>): void;
1263
+ declare function onDestroy<Props extends _Props$0, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
1264
1264
  /**
1265
1265
  * アクションのライフサイクル changeState で呼び出されるフック関数
1266
1266
  *
@@ -1269,7 +1269,7 @@ declare function onDestroy<Props extends _Props$0, Variables>(fn: ActionHook<Pro
1269
1269
  *
1270
1270
  * @public
1271
1271
  */
1272
- type ActionChangeStateHook<Props extends _Props$0, Variables> = (props: Parameters<ActionHook<Props, Variables & CustomVariables>>[0], newState: string) => void | Promise<void>;
1272
+ type ActionChangeStateHook<Props extends _Props$0, Variables> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], newState: string) => void | Promise<void>;
1273
1273
  /**
1274
1274
  * アクションのステートが変更された (changeState) 後にフックする関数
1275
1275
  *
@@ -1277,7 +1277,7 @@ type ActionChangeStateHook<Props extends _Props$0, Variables> = (props: Paramete
1277
1277
  *
1278
1278
  * @public
1279
1279
  */
1280
- declare function onChangeState<Props extends _Props$0, Variables>(fn: ActionChangeStateHook<Props, Variables & CustomVariables>): void;
1280
+ declare function onChangeState<Props extends _Props$0, Variables>(fn: ActionChangeStateHook<Props, Variables & ActionVariables>): void;
1281
1281
  /**
1282
1282
  * アクションの send 関数
1283
1283
  *
@@ -1297,15 +1297,15 @@ interface ActionProps<Props, Variables> {
1297
1297
  /**
1298
1298
  * アクションで使用されるデータ
1299
1299
  */
1300
- data: Props & Variables & CustomVariables;
1300
+ data: Props & Variables & ActionVariables;
1301
1301
  /**
1302
1302
  * アクションが表示されたときにフックされる {@link onShow}
1303
1303
  */
1304
- onShow?: ActionHook<Props, Variables & CustomVariables>;
1304
+ onShow?: ActionHook<Props, Variables & ActionVariables>;
1305
1305
  /**
1306
1306
  * アクションのステートが変更されたときにフックされる {@link onChangeState}
1307
1307
  */
1308
- onChangeState?: ActionChangeStateHook<Props, Variables & CustomVariables>;
1308
+ onChangeState?: ActionChangeStateHook<Props, Variables & ActionVariables>;
1309
1309
  }
1310
1310
  /**
1311
1311
  * {@link create} 向けのオプション
@@ -1342,7 +1342,7 @@ interface ActionOptions<Props, Variables, VariablesQuery> {
1342
1342
  *
1343
1343
  * @defaultValue `() => {}`
1344
1344
  */
1345
- onCreate?: ActionHook<Props, Variables & CustomVariables>;
1345
+ onCreate?: ActionHook<Props, Variables & ActionVariables>;
1346
1346
  }
1347
1347
  /**
1348
1348
  * アクションを作成する
@@ -1354,7 +1354,7 @@ interface ActionOptions<Props, Variables, VariablesQuery> {
1354
1354
  *
1355
1355
  * @public
1356
1356
  */
1357
- declare function create<Props extends _Props$0, Variables, VariablesQuery extends ActionTableRequestConfig[]>(App: typeof SvelteComponentDev, options?: ActionOptions<Props, Variables & CustomVariables, VariablesQuery>): () => void;
1357
+ declare function create<Props extends _Props$0, Variables, VariablesQuery extends ActionTableRequestConfig[]>(App: typeof SvelteComponentDev, options?: ActionOptions<Props, Variables & ActionVariables, VariablesQuery>): () => void;
1358
1358
  /**
1359
1359
  * アクションの破棄する
1360
1360
  *
@@ -2795,7 +2795,7 @@ declare namespace widget {
2795
2795
  *
2796
2796
  * @public
2797
2797
  */
2798
- type ActionHook<Props extends _Props, Variables> = (props: ActionProps<Props, Variables & CustomVariables>) => void | Promise<void>;
2798
+ type ActionHook<Props extends _Props, Variables> = (props: ActionProps<Props, Variables & ActionVariables>) => void | Promise<void>;
2799
2799
  /**
2800
2800
  * アクションが作成 (create) される前にフックする関数
2801
2801
  *
@@ -2803,7 +2803,7 @@ declare namespace widget {
2803
2803
  *
2804
2804
  * @public
2805
2805
  */
2806
- function onCreate<Props extends _Props, Variables>(fn: ActionHook<Props, Variables & CustomVariables>): void;
2806
+ function onCreate<Props extends _Props, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
2807
2807
  /**
2808
2808
  * アクションが表示 (show) された後にフックする関数
2809
2809
  *
@@ -2811,7 +2811,7 @@ declare namespace widget {
2811
2811
  *
2812
2812
  * @public
2813
2813
  */
2814
- function onShow<Props extends _Props, Variables>(fn: ActionHook<Props, Variables & CustomVariables>): void;
2814
+ function onShow<Props extends _Props, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
2815
2815
  /**
2816
2816
  * アクションのライフサイクル close で呼び出されるフックする関数
2817
2817
  *
@@ -2820,7 +2820,7 @@ declare namespace widget {
2820
2820
  *
2821
2821
  * @public
2822
2822
  */
2823
- type ActionCloseHook<Props extends _Props, Variables> = (props: Parameters<ActionHook<Props, Variables & CustomVariables>>[0], trigger: CloseTrigger) => void | Promise<void>;
2823
+ type ActionCloseHook<Props extends _Props, Variables> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], trigger: CloseTrigger) => void | Promise<void>;
2824
2824
  /**
2825
2825
  * アクションがクローズ (close) される前にフックする関数
2826
2826
  *
@@ -2828,7 +2828,7 @@ declare namespace widget {
2828
2828
  *
2829
2829
  * @public
2830
2830
  */
2831
- function onClose<Props extends _Props, Variables>(fn: ActionCloseHook<Props, Variables & CustomVariables>): void;
2831
+ function onClose<Props extends _Props, Variables>(fn: ActionCloseHook<Props, Variables & ActionVariables>): void;
2832
2832
  /**
2833
2833
  * アクションが破棄 (destroy) される前にフックする関数
2834
2834
  *
@@ -2836,7 +2836,7 @@ declare namespace widget {
2836
2836
  *
2837
2837
  * @public
2838
2838
  */
2839
- function onDestroy<Props extends _Props, Variables>(fn: ActionHook<Props, Variables & CustomVariables>): void;
2839
+ function onDestroy<Props extends _Props, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
2840
2840
  /**
2841
2841
  * アクションのライフサイクル changeState で呼び出されるフック関数
2842
2842
  *
@@ -2845,7 +2845,7 @@ declare namespace widget {
2845
2845
  *
2846
2846
  * @public
2847
2847
  */
2848
- type ActionChangeStateHook<Props extends _Props, Variables> = (props: Parameters<ActionHook<Props, Variables & CustomVariables>>[0], newState: string) => void | Promise<void>;
2848
+ type ActionChangeStateHook<Props extends _Props, Variables> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], newState: string) => void | Promise<void>;
2849
2849
  /**
2850
2850
  * アクションのステートが変更された (changeState) 後にフックする関数
2851
2851
  *
@@ -2853,7 +2853,7 @@ declare namespace widget {
2853
2853
  *
2854
2854
  * @public
2855
2855
  */
2856
- function onChangeState<Props extends _Props, Variables>(fn: ActionChangeStateHook<Props, Variables & CustomVariables>): void;
2856
+ function onChangeState<Props extends _Props, Variables>(fn: ActionChangeStateHook<Props, Variables & ActionVariables>): void;
2857
2857
  /**
2858
2858
  * アクションの send 関数
2859
2859
  *
@@ -2873,15 +2873,15 @@ declare namespace widget {
2873
2873
  /**
2874
2874
  * アクションで使用されるデータ
2875
2875
  */
2876
- data: Props & Variables & CustomVariables;
2876
+ data: Props & Variables & ActionVariables;
2877
2877
  /**
2878
2878
  * アクションが表示されたときにフックされる {@link onShow}
2879
2879
  */
2880
- onShow?: ActionHook<Props, Variables & CustomVariables>;
2880
+ onShow?: ActionHook<Props, Variables & ActionVariables>;
2881
2881
  /**
2882
2882
  * アクションのステートが変更されたときにフックされる {@link onChangeState}
2883
2883
  */
2884
- onChangeState?: ActionChangeStateHook<Props, Variables & CustomVariables>;
2884
+ onChangeState?: ActionChangeStateHook<Props, Variables & ActionVariables>;
2885
2885
  }
2886
2886
  /**
2887
2887
  * {@link create} 向けのオプション
@@ -2918,7 +2918,7 @@ declare namespace widget {
2918
2918
  *
2919
2919
  * @defaultValue `() => {}`
2920
2920
  */
2921
- onCreate?: ActionHook<Props, Variables & CustomVariables>;
2921
+ onCreate?: ActionHook<Props, Variables & ActionVariables>;
2922
2922
  }
2923
2923
  /**
2924
2924
  * アクションを作成する
@@ -2930,7 +2930,7 @@ declare namespace widget {
2930
2930
  *
2931
2931
  * @public
2932
2932
  */
2933
- function create<Props extends _Props, Variables, VariablesQuery extends ActionTableRequestConfig[]>(App: typeof SvelteComponentDev, options?: ActionOptions<Props, Variables & CustomVariables, VariablesQuery>): () => void;
2933
+ function create<Props extends _Props, Variables, VariablesQuery extends ActionTableRequestConfig[]>(App: typeof SvelteComponentDev, options?: ActionOptions<Props, Variables & ActionVariables, VariablesQuery>): () => void;
2934
2934
  /**
2935
2935
  * Dispatch the event to destroy KARTE action
2936
2936
  *
@@ -1659,7 +1659,7 @@ function create(App, options = {
1659
1659
  const data = {
1660
1660
  ...options.props,
1661
1661
  ...options.variables,
1662
- ...getCustomVariables(),
1662
+ ...getVariables(),
1663
1663
  };
1664
1664
  const actionProps = { send: options.send, data };
1665
1665
  initialize({ send: options.send });
@@ -1687,7 +1687,7 @@ function create(App, options = {
1687
1687
  });
1688
1688
  // ActionTable APIへの非同期リクエスト
1689
1689
  if (options.localVariablesQuery && data.api_key) {
1690
- loadActionTable(options.localVariablesQuery, data.api_key).then(result => setCustomVariables(result));
1690
+ loadActionTable(options.localVariablesQuery, data.api_key).then(result => updateVariables(result));
1691
1691
  }
1692
1692
  const close = (trigger = 'none') => {
1693
1693
  if (!app) {
@@ -2197,7 +2197,7 @@ function setVal(name, value) {
2197
2197
  * @public
2198
2198
  */
2199
2199
  function getVal(name) {
2200
- const cv = getCustomVariables();
2200
+ const cv = getVariables();
2201
2201
  return cv[name];
2202
2202
  }
2203
2203
  /**
@@ -1219,7 +1219,7 @@ type ActionHookLog = {
1219
1219
  *
1220
1220
  * @public
1221
1221
  */
1222
- type ActionHook<Props extends _Props$0, Variables> = (props: ActionProps<Props, Variables & CustomVariables>) => void | Promise<void>;
1222
+ type ActionHook<Props extends _Props$0, Variables> = (props: ActionProps<Props, Variables & ActionVariables>) => void | Promise<void>;
1223
1223
  /**
1224
1224
  * アクションが作成 (create) される前にフックする関数
1225
1225
  *
@@ -1227,7 +1227,7 @@ type ActionHook<Props extends _Props$0, Variables> = (props: ActionProps<Props,
1227
1227
  *
1228
1228
  * @public
1229
1229
  */
1230
- declare function onCreate<Props extends _Props$0, Variables>(fn: ActionHook<Props, Variables & CustomVariables>): void;
1230
+ declare function onCreate<Props extends _Props$0, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
1231
1231
  /**
1232
1232
  * アクションが表示 (show) された後にフックする関数
1233
1233
  *
@@ -1235,7 +1235,7 @@ declare function onCreate<Props extends _Props$0, Variables>(fn: ActionHook<Prop
1235
1235
  *
1236
1236
  * @public
1237
1237
  */
1238
- declare function onShow<Props extends _Props$0, Variables>(fn: ActionHook<Props, Variables & CustomVariables>): void;
1238
+ declare function onShow<Props extends _Props$0, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
1239
1239
  /**
1240
1240
  * アクションのライフサイクル close で呼び出されるフックする関数
1241
1241
  *
@@ -1244,7 +1244,7 @@ declare function onShow<Props extends _Props$0, Variables>(fn: ActionHook<Props,
1244
1244
  *
1245
1245
  * @public
1246
1246
  */
1247
- type ActionCloseHook<Props extends _Props$0, Variables> = (props: Parameters<ActionHook<Props, Variables & CustomVariables>>[0], trigger: CloseTrigger) => void | Promise<void>;
1247
+ type ActionCloseHook<Props extends _Props$0, Variables> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], trigger: CloseTrigger) => void | Promise<void>;
1248
1248
  /**
1249
1249
  * アクションがクローズ (close) される前にフックする関数
1250
1250
  *
@@ -1252,7 +1252,7 @@ type ActionCloseHook<Props extends _Props$0, Variables> = (props: Parameters<Act
1252
1252
  *
1253
1253
  * @public
1254
1254
  */
1255
- declare function onClose<Props extends _Props$0, Variables>(fn: ActionCloseHook<Props, Variables & CustomVariables>): void;
1255
+ declare function onClose<Props extends _Props$0, Variables>(fn: ActionCloseHook<Props, Variables & ActionVariables>): void;
1256
1256
  /**
1257
1257
  * アクションが破棄 (destroy) される前にフックする関数
1258
1258
  *
@@ -1260,7 +1260,7 @@ declare function onClose<Props extends _Props$0, Variables>(fn: ActionCloseHook<
1260
1260
  *
1261
1261
  * @public
1262
1262
  */
1263
- declare function onDestroy<Props extends _Props$0, Variables>(fn: ActionHook<Props, Variables & CustomVariables>): void;
1263
+ declare function onDestroy<Props extends _Props$0, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
1264
1264
  /**
1265
1265
  * アクションのライフサイクル changeState で呼び出されるフック関数
1266
1266
  *
@@ -1269,7 +1269,7 @@ declare function onDestroy<Props extends _Props$0, Variables>(fn: ActionHook<Pro
1269
1269
  *
1270
1270
  * @public
1271
1271
  */
1272
- type ActionChangeStateHook<Props extends _Props$0, Variables> = (props: Parameters<ActionHook<Props, Variables & CustomVariables>>[0], newState: string) => void | Promise<void>;
1272
+ type ActionChangeStateHook<Props extends _Props$0, Variables> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], newState: string) => void | Promise<void>;
1273
1273
  /**
1274
1274
  * アクションのステートが変更された (changeState) 後にフックする関数
1275
1275
  *
@@ -1277,7 +1277,7 @@ type ActionChangeStateHook<Props extends _Props$0, Variables> = (props: Paramete
1277
1277
  *
1278
1278
  * @public
1279
1279
  */
1280
- declare function onChangeState<Props extends _Props$0, Variables>(fn: ActionChangeStateHook<Props, Variables & CustomVariables>): void;
1280
+ declare function onChangeState<Props extends _Props$0, Variables>(fn: ActionChangeStateHook<Props, Variables & ActionVariables>): void;
1281
1281
  /**
1282
1282
  * アクションの send 関数
1283
1283
  *
@@ -1297,15 +1297,15 @@ interface ActionProps<Props, Variables> {
1297
1297
  /**
1298
1298
  * アクションで使用されるデータ
1299
1299
  */
1300
- data: Props & Variables & CustomVariables;
1300
+ data: Props & Variables & ActionVariables;
1301
1301
  /**
1302
1302
  * アクションが表示されたときにフックされる {@link onShow}
1303
1303
  */
1304
- onShow?: ActionHook<Props, Variables & CustomVariables>;
1304
+ onShow?: ActionHook<Props, Variables & ActionVariables>;
1305
1305
  /**
1306
1306
  * アクションのステートが変更されたときにフックされる {@link onChangeState}
1307
1307
  */
1308
- onChangeState?: ActionChangeStateHook<Props, Variables & CustomVariables>;
1308
+ onChangeState?: ActionChangeStateHook<Props, Variables & ActionVariables>;
1309
1309
  }
1310
1310
  /**
1311
1311
  * {@link create} 向けのオプション
@@ -1342,7 +1342,7 @@ interface ActionOptions<Props, Variables, VariablesQuery> {
1342
1342
  *
1343
1343
  * @defaultValue `() => {}`
1344
1344
  */
1345
- onCreate?: ActionHook<Props, Variables & CustomVariables>;
1345
+ onCreate?: ActionHook<Props, Variables & ActionVariables>;
1346
1346
  }
1347
1347
  /**
1348
1348
  * アクションを作成する
@@ -1354,7 +1354,7 @@ interface ActionOptions<Props, Variables, VariablesQuery> {
1354
1354
  *
1355
1355
  * @public
1356
1356
  */
1357
- declare function create<Props extends _Props$0, Variables, VariablesQuery extends ActionTableRequestConfig[]>(App: typeof SvelteComponentDev, options?: ActionOptions<Props, Variables & CustomVariables, VariablesQuery>): () => void;
1357
+ declare function create<Props extends _Props$0, Variables, VariablesQuery extends ActionTableRequestConfig[]>(App: typeof SvelteComponentDev, options?: ActionOptions<Props, Variables & ActionVariables, VariablesQuery>): () => void;
1358
1358
  /**
1359
1359
  * アクションの破棄する
1360
1360
  *
@@ -2795,7 +2795,7 @@ declare namespace widget {
2795
2795
  *
2796
2796
  * @public
2797
2797
  */
2798
- type ActionHook<Props extends _Props, Variables> = (props: ActionProps<Props, Variables & CustomVariables>) => void | Promise<void>;
2798
+ type ActionHook<Props extends _Props, Variables> = (props: ActionProps<Props, Variables & ActionVariables>) => void | Promise<void>;
2799
2799
  /**
2800
2800
  * アクションが作成 (create) される前にフックする関数
2801
2801
  *
@@ -2803,7 +2803,7 @@ declare namespace widget {
2803
2803
  *
2804
2804
  * @public
2805
2805
  */
2806
- function onCreate<Props extends _Props, Variables>(fn: ActionHook<Props, Variables & CustomVariables>): void;
2806
+ function onCreate<Props extends _Props, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
2807
2807
  /**
2808
2808
  * アクションが表示 (show) された後にフックする関数
2809
2809
  *
@@ -2811,7 +2811,7 @@ declare namespace widget {
2811
2811
  *
2812
2812
  * @public
2813
2813
  */
2814
- function onShow<Props extends _Props, Variables>(fn: ActionHook<Props, Variables & CustomVariables>): void;
2814
+ function onShow<Props extends _Props, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
2815
2815
  /**
2816
2816
  * アクションのライフサイクル close で呼び出されるフックする関数
2817
2817
  *
@@ -2820,7 +2820,7 @@ declare namespace widget {
2820
2820
  *
2821
2821
  * @public
2822
2822
  */
2823
- type ActionCloseHook<Props extends _Props, Variables> = (props: Parameters<ActionHook<Props, Variables & CustomVariables>>[0], trigger: CloseTrigger) => void | Promise<void>;
2823
+ type ActionCloseHook<Props extends _Props, Variables> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], trigger: CloseTrigger) => void | Promise<void>;
2824
2824
  /**
2825
2825
  * アクションがクローズ (close) される前にフックする関数
2826
2826
  *
@@ -2828,7 +2828,7 @@ declare namespace widget {
2828
2828
  *
2829
2829
  * @public
2830
2830
  */
2831
- function onClose<Props extends _Props, Variables>(fn: ActionCloseHook<Props, Variables & CustomVariables>): void;
2831
+ function onClose<Props extends _Props, Variables>(fn: ActionCloseHook<Props, Variables & ActionVariables>): void;
2832
2832
  /**
2833
2833
  * アクションが破棄 (destroy) される前にフックする関数
2834
2834
  *
@@ -2836,7 +2836,7 @@ declare namespace widget {
2836
2836
  *
2837
2837
  * @public
2838
2838
  */
2839
- function onDestroy<Props extends _Props, Variables>(fn: ActionHook<Props, Variables & CustomVariables>): void;
2839
+ function onDestroy<Props extends _Props, Variables>(fn: ActionHook<Props, Variables & ActionVariables>): void;
2840
2840
  /**
2841
2841
  * アクションのライフサイクル changeState で呼び出されるフック関数
2842
2842
  *
@@ -2845,7 +2845,7 @@ declare namespace widget {
2845
2845
  *
2846
2846
  * @public
2847
2847
  */
2848
- type ActionChangeStateHook<Props extends _Props, Variables> = (props: Parameters<ActionHook<Props, Variables & CustomVariables>>[0], newState: string) => void | Promise<void>;
2848
+ type ActionChangeStateHook<Props extends _Props, Variables> = (props: Parameters<ActionHook<Props, Variables & ActionVariables>>[0], newState: string) => void | Promise<void>;
2849
2849
  /**
2850
2850
  * アクションのステートが変更された (changeState) 後にフックする関数
2851
2851
  *
@@ -2853,7 +2853,7 @@ declare namespace widget {
2853
2853
  *
2854
2854
  * @public
2855
2855
  */
2856
- function onChangeState<Props extends _Props, Variables>(fn: ActionChangeStateHook<Props, Variables & CustomVariables>): void;
2856
+ function onChangeState<Props extends _Props, Variables>(fn: ActionChangeStateHook<Props, Variables & ActionVariables>): void;
2857
2857
  /**
2858
2858
  * アクションの send 関数
2859
2859
  *
@@ -2873,15 +2873,15 @@ declare namespace widget {
2873
2873
  /**
2874
2874
  * アクションで使用されるデータ
2875
2875
  */
2876
- data: Props & Variables & CustomVariables;
2876
+ data: Props & Variables & ActionVariables;
2877
2877
  /**
2878
2878
  * アクションが表示されたときにフックされる {@link onShow}
2879
2879
  */
2880
- onShow?: ActionHook<Props, Variables & CustomVariables>;
2880
+ onShow?: ActionHook<Props, Variables & ActionVariables>;
2881
2881
  /**
2882
2882
  * アクションのステートが変更されたときにフックされる {@link onChangeState}
2883
2883
  */
2884
- onChangeState?: ActionChangeStateHook<Props, Variables & CustomVariables>;
2884
+ onChangeState?: ActionChangeStateHook<Props, Variables & ActionVariables>;
2885
2885
  }
2886
2886
  /**
2887
2887
  * {@link create} 向けのオプション
@@ -2918,7 +2918,7 @@ declare namespace widget {
2918
2918
  *
2919
2919
  * @defaultValue `() => {}`
2920
2920
  */
2921
- onCreate?: ActionHook<Props, Variables & CustomVariables>;
2921
+ onCreate?: ActionHook<Props, Variables & ActionVariables>;
2922
2922
  }
2923
2923
  /**
2924
2924
  * アクションを作成する
@@ -2930,7 +2930,7 @@ declare namespace widget {
2930
2930
  *
2931
2931
  * @public
2932
2932
  */
2933
- function create<Props extends _Props, Variables, VariablesQuery extends ActionTableRequestConfig[]>(App: typeof SvelteComponentDev, options?: ActionOptions<Props, Variables & CustomVariables, VariablesQuery>): () => void;
2933
+ function create<Props extends _Props, Variables, VariablesQuery extends ActionTableRequestConfig[]>(App: typeof SvelteComponentDev, options?: ActionOptions<Props, Variables & ActionVariables, VariablesQuery>): () => void;
2934
2934
  /**
2935
2935
  * Dispatch the event to destroy KARTE action
2936
2936
  *
package/dist/index.es.js CHANGED
@@ -1742,7 +1742,7 @@ function create(App, options = {
1742
1742
  const data = {
1743
1743
  ...options.props,
1744
1744
  ...options.variables,
1745
- ...getCustomVariables(),
1745
+ ...getVariables(),
1746
1746
  };
1747
1747
  const actionProps = { send: options.send, data };
1748
1748
  initialize({ send: options.send });
@@ -1770,7 +1770,7 @@ function create(App, options = {
1770
1770
  });
1771
1771
  // ActionTable APIへの非同期リクエスト
1772
1772
  if (options.localVariablesQuery && data.api_key) {
1773
- loadActionTable(options.localVariablesQuery, data.api_key).then(result => setCustomVariables(result));
1773
+ loadActionTable(options.localVariablesQuery, data.api_key).then(result => updateVariables(result));
1774
1774
  }
1775
1775
  const close = (trigger = 'none') => {
1776
1776
  if (!app) {
@@ -2288,7 +2288,7 @@ function setVal(name, value) {
2288
2288
  * @public
2289
2289
  */
2290
2290
  function getVal(name) {
2291
- const cv = getCustomVariables();
2291
+ const cv = getVariables();
2292
2292
  return cv[name];
2293
2293
  }
2294
2294
  /**
@@ -4,13 +4,13 @@ function createAppScript(script = '') {
4
4
  return `<script lang="ts">
5
5
  // SDK generated imports: DON'T TOUCH THIS
6
6
  // @ts-ignore
7
- import type { ActionProps, CustomVariables } from "@plaidev/karte-action-sdk";
7
+ import type { ActionProps, ActionVariables } from "@plaidev/karte-action-sdk";
8
8
  import type { Data, Props, Variables } from './gen';
9
9
  import { onMount } from 'svelte';
10
10
  import { writable } from 'svelte/store';
11
11
  import {
12
12
  state,
13
- customVariables,
13
+ variables as actionVariables,
14
14
  State,
15
15
  StateItem,
16
16
  Modal,
@@ -36,7 +36,7 @@ import {
36
36
  export let send: (event_name: string, values?: any) => void;
37
37
  let data_: Data;
38
38
  export { data_ as data };
39
- let data = writable<Data & CustomVariables>({ ...data_ });
39
+ let data = writable<Data & ActionVariables>({ ...data_ });
40
40
  export let onShow: (props: ActionProps<Props, Variables>) => void = _props => {};
41
41
  export let onChangeState: (props: ActionProps<Props, Variables>, stateId: string) => void = (_props, _state) => {};
42
42
  ${script}
@@ -53,7 +53,7 @@ $: {
53
53
 
54
54
  $: {
55
55
  data.update(current => {
56
- return { ...current, ...$customVariables };
56
+ return { ...current, ...$actionVariables };
57
57
  });
58
58
  }
59
59
  </script>`;
package/dist/templates.js CHANGED
@@ -2,13 +2,13 @@ function createAppScript(script = '') {
2
2
  return `<script lang="ts">
3
3
  // SDK generated imports: DON'T TOUCH THIS
4
4
  // @ts-ignore
5
- import type { ActionProps, CustomVariables } from "@plaidev/karte-action-sdk";
5
+ import type { ActionProps, ActionVariables } from "@plaidev/karte-action-sdk";
6
6
  import type { Data, Props, Variables } from './gen';
7
7
  import { onMount } from 'svelte';
8
8
  import { writable } from 'svelte/store';
9
9
  import {
10
10
  state,
11
- customVariables,
11
+ variables as actionVariables,
12
12
  State,
13
13
  StateItem,
14
14
  Modal,
@@ -34,7 +34,7 @@ import {
34
34
  export let send: (event_name: string, values?: any) => void;
35
35
  let data_: Data;
36
36
  export { data_ as data };
37
- let data = writable<Data & CustomVariables>({ ...data_ });
37
+ let data = writable<Data & ActionVariables>({ ...data_ });
38
38
  export let onShow: (props: ActionProps<Props, Variables>) => void = _props => {};
39
39
  export let onChangeState: (props: ActionProps<Props, Variables>, stateId: string) => void = (_props, _state) => {};
40
40
  ${script}
@@ -51,7 +51,7 @@ $: {
51
51
 
52
52
  $: {
53
53
  data.update(current => {
54
- return { ...current, ...$customVariables };
54
+ return { ...current, ...$actionVariables };
55
55
  });
56
56
  }
57
57
  </script>`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.1.131-27959459.4bcace4e",
3
+ "version": "1.1.131-27959587.da575ff6",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",