@pax2pay/client 0.10.10 → 0.10.11

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.
@@ -10,6 +10,9 @@ export class Batch extends List<model.Batch.Response> {
10
10
  static create(connection: Connection) {
11
11
  return new Batch(connection)
12
12
  }
13
+ async create(type: model.Batch.Type, request: Blob): Promise<model.Batch.Response | model.ErrorResponse> {
14
+ return await this.connection.post<model.Batch.Response>(`${this.folder}/${type}`, request)
15
+ }
13
16
  async get(batchId: string): Promise<model.Batch.Response | model.ErrorResponse> {
14
17
  return await this.connection.get<model.Batch.Response>(`${this.folder}/${batchId}`)
15
18
  }
@@ -27,91 +27,117 @@ export class Connection {
27
27
  set assumedOrg(value: string | undefined) {
28
28
  this.#assumedOrg = value
29
29
  }
30
-
31
- async fetch<Response, Codes = 400 | 403 | 404 | 500>(
30
+ async fetch<T, Codes = 400 | 403 | 404 | 500>(
32
31
  path: string,
33
32
  method: string,
34
33
  request?: any,
35
34
  parameters?: Record<string, any>,
36
- header?: any
37
- ): Promise<Response | (model.ErrorResponse & { status?: number; value?: string })> {
38
- const isMultipart = request && request instanceof FormData
39
- const cookie = window.localStorage.getItem("cookie")
40
- const publicKey = Session.publicKey.get()
41
- let requestHeaders: Record<string, string> = { "x-invoking-system": "portal_2" }
42
- if (!isMultipart)
43
- requestHeaders = {
44
- ...header,
45
- ...requestHeaders,
46
- "Content-Type": "application/json; charset=utf-8",
47
- }
35
+ overrides?: Record<string, string>
36
+ ): Promise<T | (model.ErrorResponse & { status?: number; value?: string })> {
37
+ const url = this.buildUrl(path, parameters)
38
+ const headers = this.prepareHeaders(request, overrides)
39
+ const body = this.prepareBody(request)
40
+
48
41
  try {
49
- const data = Session.authentication.get()
50
- this.#token = data?.token
51
- } catch (e) {
52
- if (this.token)
53
- console.error("Caught exception ", JSON.stringify(e))
42
+ const response = await fetch(url, { method, headers, body })
43
+
44
+ // Handle Side Effects (Cookies/2FA)
45
+ this.handleSessionSideEffects(response)
46
+
47
+ // Handle Auth Challenges
48
+ if (response.status === 401 && (await this.unauthorized(this))) {
49
+ return this.fetch<T, Codes>(path, method, request, parameters, overrides)
50
+ }
51
+
52
+ return await this.parseResponse(response)
53
+ } catch (error: any) {
54
+ console.error("Fetch Error:", error)
55
+ return { code: 500, errors: [{ message: error.message || "Internal Server Error" }] }
56
+ }
57
+ }
58
+ private buildUrl(path: string, parameters?: Record<string, any>): string {
59
+ const url = new URL(`${this.url}/${path}`)
60
+ if (parameters) {
61
+ Object.entries(parameters).forEach(([key, value]) => {
62
+ if (value === undefined)
63
+ return
64
+ // Handles arrays as comma-separated strings
65
+ url.searchParams.append(key, Array.isArray(value) ? value.join(",") : String(value))
66
+ })
67
+ }
68
+ return url.toString()
69
+ }
70
+ private prepareBody(request: any): BodyInit | undefined {
71
+ if (!request)
72
+ return undefined
73
+ if (request instanceof FormData || request instanceof Blob)
74
+ return request
75
+
76
+ // Clean strings by trimming before stringifying
77
+ return JSON.stringify(request, (_, v) => (typeof v === "string" ? v.trim() : v))
78
+ }
79
+ private prepareHeaders(request: any, overrides?: Record<string, string>): Record<string, string> {
80
+ const headers: Record<string, string> = {
81
+ "x-invoking-system": "portal_2",
82
+ ...overrides,
83
+ }
84
+
85
+ // Content-Type Logic
86
+ if (request instanceof Blob) {
87
+ headers["Content-Type"] = `${request.type}; charset=utf-8`
88
+ } else if (!(request instanceof FormData)) {
89
+ headers["Content-Type"] = "application/json"
54
90
  }
55
- if (this.token)
56
- requestHeaders["X-Auth-Token"] = this.token
91
+
92
+ // Session & Auth
93
+ const token = Session.authentication.get()?.token || this.token
94
+ if (token)
95
+ headers["X-Auth-Token"] = token
57
96
  if (this.#pax2payPortalLanguage)
58
- requestHeaders["Pax2pay-Portal-Language"] = this.#pax2payPortalLanguage
97
+ headers["Pax2pay-Portal-Language"] = this.#pax2payPortalLanguage
59
98
  if (this.assumedOrg)
60
- requestHeaders["x-assume"] = this.assumedOrg
99
+ headers["x-assume"] = this.assumedOrg
100
+
101
+ const cookie = window.localStorage.getItem("cookie")
61
102
  if (cookie)
62
- requestHeaders["x-otp-cookie"] = cookie
103
+ headers["x-otp-cookie"] = cookie
104
+
105
+ const publicKey = Session.publicKey.get()
63
106
  if (publicKey)
64
- requestHeaders["cde-public-key"] = publicKey
65
- let caughtErrorResponse
66
- const response = await fetch(
67
- this.url +
68
- "/" +
69
- path +
70
- (parameters
71
- ? "?" +
72
- Object.entries(parameters)
73
- .map(([key, value]) =>
74
- Array.isArray(value) ? `${key}=${value.join(",")}` : value != undefined ? `${key}=${value}` : undefined
75
- )
76
- .filter(param => param != undefined)
77
- .join("&")
78
- : ""),
79
- {
80
- method,
81
- headers: requestHeaders,
82
- body: !isMultipart
83
- ? request && JSON.stringify(request, (_, value) => (typeof value == "string" ? value.trim() : value))
84
- : request,
85
- }
86
- ).catch((error: Error) => {
87
- caughtErrorResponse = { code: 500, errors: [{ message: error.message }] }
88
- console.error(error)
89
- })
90
- if (caughtErrorResponse)
91
- return caughtErrorResponse
92
- if (response && response.headers.has("x-otp-cookie"))
93
- window.localStorage.setItem("cookie", response.headers.get("x-otp-cookie") ?? "")
94
- //get temp token to set up 2fa before login
95
- if (
96
- response &&
97
- response.status == 403 &&
98
- (response.url.includes("login") || response.url.includes("sso/google")) &&
99
- response.headers.has("X-Auth-Token")
100
- )
107
+ headers["cde-public-key"] = publicKey
108
+
109
+ return headers
110
+ }
111
+
112
+ private handleSessionSideEffects(response: Response): void {
113
+ const otpCookie = response.headers.get("x-otp-cookie")
114
+ if (otpCookie)
115
+ window.localStorage.setItem("cookie", otpCookie)
116
+
117
+ const isLoginPath = response.url.includes("login") || response.url.includes("sso/google")
118
+ if (response.status === 403 && isLoginPath && response.headers.has("X-Auth-Token")) {
101
119
  Session.authentication.set({ token: response.headers.get("X-Auth-Token") ?? undefined })
120
+ }
121
+ }
122
+ private async parseResponse(response: Response): Promise<any> {
123
+ if (!response || response.status === 503) {
124
+ return { code: 503, errors: [{ message: "Service unavailable" }] }
125
+ }
102
126
 
103
- return !response
104
- ? { code: 503, errors: [{ message: "Service unavailable" }] }
105
- : response.status == 401 && (await this.unauthorized(this))
106
- ? await this.fetch<Response, Codes>(path, method, request, parameters)
107
- : response.headers.get("Content-Type")?.startsWith("application/json")
108
- ? response.ok
109
- ? response.headers.has("x-total-count")
110
- ? ({ list: await response.json(), totalCount: response.headers.get("x-total-count") } as Response)
111
- : await response.json()
112
- : { status: response.status, ...(await response.json()) }
113
- : { status: response.status, value: await response.text() }
127
+ const contentType = response.headers.get("Content-Type") ?? ""
128
+
129
+ if (contentType.includes("application/json")) {
130
+ const json = await response.json()
131
+ if (!response.ok)
132
+ return { status: response.status, ...json }
133
+
134
+ const totalCount = response.headers.get("x-total-count")
135
+ return totalCount ? { list: json, totalCount } : json
136
+ }
137
+ // Fallback
138
+ return { status: response.status, value: await response.text() }
114
139
  }
140
+
115
141
  async post<Response, Codes = 400 | 403 | 404 | 500>(
116
142
  path: string,
117
143
  request: any,
@@ -6,6 +6,7 @@ export declare class Batch extends List<model.Batch.Response> {
6
6
  protected readonly folder = "batch";
7
7
  private constructor();
8
8
  static create(connection: Connection): Batch;
9
+ create(type: model.Batch.Type, request: Blob): Promise<model.Batch.Response | model.ErrorResponse>;
9
10
  get(batchId: string): Promise<model.Batch.Response | model.ErrorResponse>;
10
11
  listByType(type: model.Batch.Type, previous?: Paginated<model.Batch.Response>, page?: number, size?: number, sort?: string): Promise<Paginated<model.Batch.Response> | model.ErrorResponse>;
11
12
  run(batchId: string, otp?: string): Promise<model.Batch.Response | model.ErrorResponse>;
@@ -7,6 +7,9 @@ export class Batch extends List {
7
7
  static create(connection) {
8
8
  return new Batch(connection);
9
9
  }
10
+ async create(type, request) {
11
+ return await this.connection.post(`${this.folder}/${type}`, request);
12
+ }
10
13
  async get(batchId) {
11
14
  return await this.connection.get(`${this.folder}/${batchId}`);
12
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Batch/index.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QAEvB,OAAO,MAAM,IAAI,CAAC,gBAAgB,CACjC,QAAQ,EACR,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CACpB,IAAI,CAAC,UAAU,CAAC,GAAG,CAClB,GAAG,IAAI,CAAC,MAAM,EAAE,EAChB,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAC1B,EACF,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,IAAI,CACJ,CAAA;IACF,CAAC;IACD,KAAK,CAAC,GAAG,CAAC,OAAe,EAAE,GAAY;QACtC,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAC/B,GAAG,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,EAC/B,SAAS,EACT,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAC3B,CAAA;IACF,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,OAAe;QAC3B,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAuB,GAAG,IAAI,CAAC,MAAM,IAAI,OAAO,SAAS,CAAC,CAAA;IAC3F,CAAC;IACD,KAAK,CAAC,SAAS,CACd,OAAe,EACf,QAAuB,EACvB,IAAa,EACb,IAAa;QAEb,OAAO,MAAM,IAAI,CAAC,gBAAgB,CACjC,QAAQ,EACR,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CACpB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAoC,GAAG,IAAI,CAAC,MAAM,IAAI,OAAO,QAAQ,EAAE;YACzF,IAAI;YACJ,IAAI;YACJ,IAAI;SACJ,CAAC,EACH,SAAS,EACT,IAAI,EACJ,IAAI,CACJ,CAAA;IACF,CAAC;CACD"}
@@ -9,10 +9,15 @@ export declare class Connection {
9
9
  private constructor();
10
10
  get assumedOrg(): string | undefined;
11
11
  set assumedOrg(value: string | undefined);
12
- fetch<Response, Codes = 400 | 403 | 404 | 500>(path: string, method: string, request?: any, parameters?: Record<string, any>, header?: any): Promise<Response | (model.ErrorResponse & {
12
+ fetch<T, Codes = 400 | 403 | 404 | 500>(path: string, method: string, request?: any, parameters?: Record<string, any>, overrides?: Record<string, string>): Promise<T | (model.ErrorResponse & {
13
13
  status?: number;
14
14
  value?: string;
15
15
  })>;
16
+ private buildUrl;
17
+ private prepareBody;
18
+ private prepareHeaders;
19
+ private handleSessionSideEffects;
20
+ private parseResponse;
16
21
  post<Response, Codes = 400 | 403 | 404 | 500>(path: string, request: any, parameters?: Record<string, any>, header?: any): Promise<Response | (model.ErrorResponse & {
17
22
  status?: number;
18
23
  value?: string;
@@ -35,75 +35,89 @@ export class Connection {
35
35
  set assumedOrg(value) {
36
36
  __classPrivateFieldSet(this, _Connection_assumedOrg, value, "f");
37
37
  }
38
- async fetch(path, method, request, parameters, header) {
39
- const isMultipart = request && request instanceof FormData;
40
- const cookie = window.localStorage.getItem("cookie");
41
- const publicKey = Session.publicKey.get();
42
- let requestHeaders = { "x-invoking-system": "portal_2" };
43
- if (!isMultipart)
44
- requestHeaders = {
45
- ...header,
46
- ...requestHeaders,
47
- "Content-Type": "application/json; charset=utf-8",
48
- };
38
+ async fetch(path, method, request, parameters, overrides) {
39
+ const url = this.buildUrl(path, parameters);
40
+ const headers = this.prepareHeaders(request, overrides);
41
+ const body = this.prepareBody(request);
49
42
  try {
50
- const data = Session.authentication.get();
51
- __classPrivateFieldSet(this, _Connection_token, data?.token, "f");
43
+ const response = await fetch(url, { method, headers, body });
44
+ this.handleSessionSideEffects(response);
45
+ if (response.status === 401 && (await this.unauthorized(this))) {
46
+ return this.fetch(path, method, request, parameters, overrides);
47
+ }
48
+ return await this.parseResponse(response);
49
+ }
50
+ catch (error) {
51
+ console.error("Fetch Error:", error);
52
+ return { code: 500, errors: [{ message: error.message || "Internal Server Error" }] };
53
+ }
54
+ }
55
+ buildUrl(path, parameters) {
56
+ const url = new URL(`${this.url}/${path}`);
57
+ if (parameters) {
58
+ Object.entries(parameters).forEach(([key, value]) => {
59
+ if (value === undefined)
60
+ return;
61
+ url.searchParams.append(key, Array.isArray(value) ? value.join(",") : String(value));
62
+ });
63
+ }
64
+ return url.toString();
65
+ }
66
+ prepareBody(request) {
67
+ if (!request)
68
+ return undefined;
69
+ if (request instanceof FormData || request instanceof Blob)
70
+ return request;
71
+ return JSON.stringify(request, (_, v) => (typeof v === "string" ? v.trim() : v));
72
+ }
73
+ prepareHeaders(request, overrides) {
74
+ const headers = {
75
+ "x-invoking-system": "portal_2",
76
+ ...overrides,
77
+ };
78
+ if (request instanceof Blob) {
79
+ headers["Content-Type"] = `${request.type}; charset=utf-8`;
52
80
  }
53
- catch (e) {
54
- if (this.token)
55
- console.error("Caught exception ", JSON.stringify(e));
81
+ else if (!(request instanceof FormData)) {
82
+ headers["Content-Type"] = "application/json";
56
83
  }
57
- if (this.token)
58
- requestHeaders["X-Auth-Token"] = this.token;
84
+ const token = Session.authentication.get()?.token || this.token;
85
+ if (token)
86
+ headers["X-Auth-Token"] = token;
59
87
  if (__classPrivateFieldGet(this, _Connection_pax2payPortalLanguage, "f"))
60
- requestHeaders["Pax2pay-Portal-Language"] = __classPrivateFieldGet(this, _Connection_pax2payPortalLanguage, "f");
88
+ headers["Pax2pay-Portal-Language"] = __classPrivateFieldGet(this, _Connection_pax2payPortalLanguage, "f");
61
89
  if (this.assumedOrg)
62
- requestHeaders["x-assume"] = this.assumedOrg;
90
+ headers["x-assume"] = this.assumedOrg;
91
+ const cookie = window.localStorage.getItem("cookie");
63
92
  if (cookie)
64
- requestHeaders["x-otp-cookie"] = cookie;
93
+ headers["x-otp-cookie"] = cookie;
94
+ const publicKey = Session.publicKey.get();
65
95
  if (publicKey)
66
- requestHeaders["cde-public-key"] = publicKey;
67
- let caughtErrorResponse;
68
- const response = await fetch(this.url +
69
- "/" +
70
- path +
71
- (parameters
72
- ? "?" +
73
- Object.entries(parameters)
74
- .map(([key, value]) => Array.isArray(value) ? `${key}=${value.join(",")}` : value != undefined ? `${key}=${value}` : undefined)
75
- .filter(param => param != undefined)
76
- .join("&")
77
- : ""), {
78
- method,
79
- headers: requestHeaders,
80
- body: !isMultipart
81
- ? request && JSON.stringify(request, (_, value) => (typeof value == "string" ? value.trim() : value))
82
- : request,
83
- }).catch((error) => {
84
- caughtErrorResponse = { code: 500, errors: [{ message: error.message }] };
85
- console.error(error);
86
- });
87
- if (caughtErrorResponse)
88
- return caughtErrorResponse;
89
- if (response && response.headers.has("x-otp-cookie"))
90
- window.localStorage.setItem("cookie", response.headers.get("x-otp-cookie") ?? "");
91
- if (response &&
92
- response.status == 403 &&
93
- (response.url.includes("login") || response.url.includes("sso/google")) &&
94
- response.headers.has("X-Auth-Token"))
96
+ headers["cde-public-key"] = publicKey;
97
+ return headers;
98
+ }
99
+ handleSessionSideEffects(response) {
100
+ const otpCookie = response.headers.get("x-otp-cookie");
101
+ if (otpCookie)
102
+ window.localStorage.setItem("cookie", otpCookie);
103
+ const isLoginPath = response.url.includes("login") || response.url.includes("sso/google");
104
+ if (response.status === 403 && isLoginPath && response.headers.has("X-Auth-Token")) {
95
105
  Session.authentication.set({ token: response.headers.get("X-Auth-Token") ?? undefined });
96
- return !response
97
- ? { code: 503, errors: [{ message: "Service unavailable" }] }
98
- : response.status == 401 && (await this.unauthorized(this))
99
- ? await this.fetch(path, method, request, parameters)
100
- : response.headers.get("Content-Type")?.startsWith("application/json")
101
- ? response.ok
102
- ? response.headers.has("x-total-count")
103
- ? { list: await response.json(), totalCount: response.headers.get("x-total-count") }
104
- : await response.json()
105
- : { status: response.status, ...(await response.json()) }
106
- : { status: response.status, value: await response.text() };
106
+ }
107
+ }
108
+ async parseResponse(response) {
109
+ if (!response || response.status === 503) {
110
+ return { code: 503, errors: [{ message: "Service unavailable" }] };
111
+ }
112
+ const contentType = response.headers.get("Content-Type") ?? "";
113
+ if (contentType.includes("application/json")) {
114
+ const json = await response.json();
115
+ if (!response.ok)
116
+ return { status: response.status, ...json };
117
+ const totalCount = response.headers.get("x-total-count");
118
+ return totalCount ? { list: json, totalCount } : json;
119
+ }
120
+ return { status: response.status, value: await response.text() };
107
121
  }
108
122
  async post(path, request, parameters, header) {
109
123
  return await this.fetch(path, "POST", request, parameters, header);
@@ -1 +1 @@
1
- {"version":3,"file":"Connection.js","sourceRoot":"../","sources":["Client/Connection.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAExC,MAAM,OAAO,UAAU;IAGtB,IAAI,qBAAqB,CAAC,KAAa;QACtC,uBAAA,IAAI,qCAA0B,KAAK,MAAA,CAAA;IACpC,CAAC;IAID,IAAI,KAAK;QACR,OAAO,uBAAA,IAAI,yBAAO,CAAA;IACnB,CAAC;IACD,IAAI,KAAK,CAAC,KAAyB;QAClC,uBAAA,IAAI,qBAAU,KAAK,MAAA,CAAA;IACpB,CAAC;IACD,YAA6B,GAAW,EAAE,KAAc;QAA3B,QAAG,GAAH,GAAG,CAAQ;QAbxC,oDAA+B;QAK/B,oCAAe;QACf,yCAAoB;QAQnB,uBAAA,IAAI,qBAAU,KAAK,MAAA,CAAA;IACpB,CAAC;IAED,IAAI,UAAU;QACb,OAAO,uBAAA,IAAI,8BAAY,CAAA;IACxB,CAAC;IACD,IAAI,UAAU,CAAC,KAAyB;QACvC,uBAAA,IAAI,0BAAe,KAAK,MAAA,CAAA;IACzB,CAAC;IAED,KAAK,CAAC,KAAK,CACV,IAAY,EACZ,MAAc,EACd,OAAa,EACb,UAAgC,EAChC,MAAY;QAEZ,MAAM,WAAW,GAAG,OAAO,IAAI,OAAO,YAAY,QAAQ,CAAA;QAC1D,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;QACpD,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,CAA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AAO,OAAO,KAAK,IAAI,QAAQ,IAAI,OAAO,KAAK,CAAC,MAAM,IAAI,QAAQ,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,CAAA;IAC1F,CAAC;CACD"}
@@ -1,7 +1,7 @@
1
1
  import { isly } from "isly";
2
2
  export type Status = typeof Status.values[number];
3
3
  export declare namespace Status {
4
- const values: readonly ["todo", "processing", "completed", "failed to finalise", "cancelled"];
5
- const type: isly.Type<"completed" | "todo" | "processing" | "failed to finalise" | "cancelled">;
6
- const is: (value: any | ("completed" | "todo" | "processing" | "failed to finalise" | "cancelled")) => value is "completed" | "todo" | "processing" | "failed to finalise" | "cancelled";
4
+ const values: readonly ["todo", "processing", "completed", "failed to finalise", "cancelled", "importing"];
5
+ const type: isly.Type<"completed" | "todo" | "processing" | "failed to finalise" | "cancelled" | "importing">;
6
+ const is: (value: any | ("completed" | "todo" | "processing" | "failed to finalise" | "cancelled" | "importing")) => value is "completed" | "todo" | "processing" | "failed to finalise" | "cancelled" | "importing";
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { isly } from "isly";
2
2
  export var Status;
3
3
  (function (Status) {
4
- Status.values = ["todo", "processing", "completed", "failed to finalise", "cancelled"];
4
+ Status.values = ["todo", "processing", "completed", "failed to finalise", "cancelled", "importing"];
5
5
  Status.type = isly.string(Status.values);
6
6
  Status.is = Status.type.is;
7
7
  })(Status || (Status = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"Status.js","sourceRoot":"../","sources":["model/Batch/Status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAI3B,MAAM,KAAW,MAAM,CAItB;AAJD,WAAiB,MAAM;IACT,aAAM,GAAG,CAAC,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,WAAW,CAAU,CAAA;IACxF,WAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAA,MAAM,CAAC,CAAA;IAC1B,SAAE,GAAG,OAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAJgB,MAAM,KAAN,MAAM,QAItB"}
1
+ {"version":3,"file":"Status.js","sourceRoot":"../","sources":["model/Batch/Status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAI3B,MAAM,KAAW,MAAM,CAItB;AAJD,WAAiB,MAAM;IACT,aAAM,GAAG,CAAC,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,WAAW,EAAE,WAAW,CAAU,CAAA;IACrG,WAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAA,MAAM,CAAC,CAAA;IAC1B,SAAE,GAAG,OAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAJgB,MAAM,KAAN,MAAM,QAItB"}
@@ -3,7 +3,7 @@ import { isly } from "isly"
3
3
  export type Status = typeof Status.values[number]
4
4
 
5
5
  export namespace Status {
6
- export const values = ["todo", "processing", "completed", "failed to finalise", "cancelled"] as const
6
+ export const values = ["todo", "processing", "completed", "failed to finalise", "cancelled", "importing"] as const
7
7
  export const type = isly.string(values)
8
8
  export const is = type.is
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/client",
3
- "version": "0.10.10",
3
+ "version": "0.10.11",
4
4
  "description": "Client library for the Pax2Pay API",
5
5
  "author": "Pax2Pay Ltd.",
6
6
  "license": "MIT",