@finteqhub/sdk-js 0.4.0 → 0.4.1

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.
@@ -66,6 +66,11 @@ export class FinteqHubProcessing {
66
66
  if (result.type === "redirect") {
67
67
  resolve(result);
68
68
  }
69
+ else if (result.type === "wait") {
70
+ setTimeout(() => {
71
+ this.processOperation(url, resolve, reject);
72
+ }, result.waitInterval * 1000 || 10000);
73
+ }
69
74
  else if (result.type === "submitForm") {
70
75
  let iframe = document.createElement("iframe");
71
76
  iframe.src = result.formUrl;
@@ -102,4 +102,7 @@ export declare type ProcessOperationResponse = {
102
102
  type: "submitForm";
103
103
  formUrl: string;
104
104
  metadata: unknown;
105
+ } | {
106
+ type: "wait";
107
+ waitInterval: number;
105
108
  } | ProcessOperationRedirectResponse;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finteqhub/sdk-js",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "SDK for interacting with FinteqHub processing API",
5
5
  "main": "./dist/index.js",
6
6
  "typings": "./dist/index.d.ts",