increase 0.7.0 → 0.8.0
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/CHANGELOG.md +55 -0
- package/README.md +2 -4
- package/_shims/fetch.js +1 -1
- package/_shims/formdata.node.d.ts +1 -0
- package/core.d.ts +5 -10
- package/core.d.ts.map +1 -1
- package/core.js +43 -65
- package/core.js.map +1 -1
- package/core.mjs +40 -24
- package/core.mjs.map +1 -1
- package/index.d.mts +5 -5
- package/index.d.ts +5 -5
- package/index.d.ts.map +1 -1
- package/index.js +8 -4
- package/index.js.map +1 -1
- package/index.mjs +8 -4
- package/index.mjs.map +1 -1
- package/package.json +5 -5
- package/resources/check-transfers.d.ts +181 -97
- package/resources/check-transfers.d.ts.map +1 -1
- package/resources/check-transfers.js.map +1 -1
- package/resources/check-transfers.mjs.map +1 -1
- package/resources/declined-transactions.d.ts +14 -7
- package/resources/declined-transactions.d.ts.map +1 -1
- package/resources/declined-transactions.js.map +1 -1
- package/resources/declined-transactions.mjs.map +1 -1
- package/resources/limits.d.ts +2 -2
- package/resources/pending-transactions.d.ts +12 -7
- package/resources/pending-transactions.d.ts.map +1 -1
- package/resources/pending-transactions.js.map +1 -1
- package/resources/pending-transactions.mjs.map +1 -1
- package/resources/real-time-decisions.d.ts +54 -7
- package/resources/real-time-decisions.d.ts.map +1 -1
- package/resources/real-time-decisions.js.map +1 -1
- package/resources/real-time-decisions.mjs.map +1 -1
- package/resources/shared.d.ts +2 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/simulations/ach-transfers.d.ts +18 -7
- package/resources/simulations/ach-transfers.d.ts.map +1 -1
- package/resources/simulations/ach-transfers.js.map +1 -1
- package/resources/simulations/ach-transfers.mjs.map +1 -1
- package/resources/simulations/cards.d.ts +30 -14
- package/resources/simulations/cards.d.ts.map +1 -1
- package/resources/simulations/cards.js.map +1 -1
- package/resources/simulations/cards.mjs.map +1 -1
- package/resources/simulations/interest-payments.d.ts +4 -0
- package/resources/simulations/interest-payments.d.ts.map +1 -1
- package/resources/simulations/interest-payments.js.map +1 -1
- package/resources/simulations/interest-payments.mjs.map +1 -1
- package/resources/simulations/real-time-payments-transfers.d.ts +18 -7
- package/resources/simulations/real-time-payments-transfers.d.ts.map +1 -1
- package/resources/simulations/real-time-payments-transfers.js.map +1 -1
- package/resources/simulations/real-time-payments-transfers.mjs.map +1 -1
- package/resources/simulations/wire-transfers.d.ts +4 -0
- package/resources/simulations/wire-transfers.d.ts.map +1 -1
- package/resources/simulations/wire-transfers.js.map +1 -1
- package/resources/simulations/wire-transfers.mjs.map +1 -1
- package/resources/transactions.d.ts +4 -0
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js.map +1 -1
- package/resources/transactions.mjs.map +1 -1
- package/src/_shims/fetch.js +1 -1
- package/src/_shims/formdata.node.d.ts +1 -0
- package/src/core.ts +43 -24
- package/src/index.ts +11 -9
- package/src/resources/check-transfers.ts +204 -111
- package/src/resources/declined-transactions.ts +15 -7
- package/src/resources/limits.ts +2 -2
- package/src/resources/pending-transactions.ts +14 -8
- package/src/resources/real-time-decisions.ts +61 -7
- package/src/resources/shared.ts +2 -0
- package/src/resources/simulations/ach-transfers.ts +20 -7
- package/src/resources/simulations/cards.ts +34 -15
- package/src/resources/simulations/interest-payments.ts +5 -0
- package/src/resources/simulations/real-time-payments-transfers.ts +20 -7
- package/src/resources/simulations/wire-transfers.ts +5 -0
- package/src/resources/transactions.ts +5 -0
- package/src/uploads.ts +5 -5
- package/src/version.ts +1 -1
- package/uploads.d.ts +1 -1
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -3
- package/uploads.js.map +1 -1
- package/uploads.mjs +3 -3
- package/uploads.mjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/src/streaming.ts +0 -274
- package/streaming.d.ts +0 -14
- package/streaming.d.ts.map +0 -1
- package/streaming.js +0 -213
- package/streaming.js.map +0 -1
- package/streaming.mjs +0 -209
- package/streaming.mjs.map +0 -1
package/streaming.mjs
DELETED
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import { createResponseHeaders } from './core.mjs';
|
|
2
|
-
export class Stream {
|
|
3
|
-
constructor(response, controller) {
|
|
4
|
-
this.response = response;
|
|
5
|
-
this.controller = controller;
|
|
6
|
-
this.decoder = new SSEDecoder();
|
|
7
|
-
this.responseHeaders = createResponseHeaders(response.headers);
|
|
8
|
-
}
|
|
9
|
-
async *iterMessages() {
|
|
10
|
-
if (!this.response.body) {
|
|
11
|
-
this.controller.abort();
|
|
12
|
-
throw new Error(`Attempted to iterate over a response with no body`);
|
|
13
|
-
}
|
|
14
|
-
const lineDecoder = new LineDecoder();
|
|
15
|
-
const iter = readableStreamAsyncIterable(this.response.body);
|
|
16
|
-
for await (const chunk of iter) {
|
|
17
|
-
for (const line of lineDecoder.decode(chunk)) {
|
|
18
|
-
const sse = this.decoder.decode(line);
|
|
19
|
-
if (sse) yield sse;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
for (const line of lineDecoder.flush()) {
|
|
23
|
-
const sse = this.decoder.decode(line);
|
|
24
|
-
if (sse) yield sse;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
async *[Symbol.asyncIterator]() {
|
|
28
|
-
let done = false;
|
|
29
|
-
try {
|
|
30
|
-
for await (const sse of this.iterMessages()) {
|
|
31
|
-
try {
|
|
32
|
-
yield JSON.parse(sse.data);
|
|
33
|
-
} catch (e) {
|
|
34
|
-
console.error(`Could not parse message into JSON:`, sse.data);
|
|
35
|
-
console.error(`From chunk:`, sse.raw);
|
|
36
|
-
throw e;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
done = true;
|
|
40
|
-
} catch (e) {
|
|
41
|
-
// If the user calls `stream.controller.abort()`, we should exit without throwing.
|
|
42
|
-
if (e instanceof Error && e.name === 'AbortError') return;
|
|
43
|
-
throw e;
|
|
44
|
-
} finally {
|
|
45
|
-
// If the user `break`s, abort the ongoing request.
|
|
46
|
-
if (!done) this.controller.abort();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
class SSEDecoder {
|
|
51
|
-
constructor() {
|
|
52
|
-
this.event = null;
|
|
53
|
-
this.data = [];
|
|
54
|
-
this.chunks = [];
|
|
55
|
-
}
|
|
56
|
-
decode(line) {
|
|
57
|
-
if (line.endsWith('\r')) {
|
|
58
|
-
line = line.substring(0, line.length - 1);
|
|
59
|
-
}
|
|
60
|
-
if (!line) {
|
|
61
|
-
// empty line and we didn't previously encounter any messages
|
|
62
|
-
if (!this.event && !this.data.length) return null;
|
|
63
|
-
const sse = {
|
|
64
|
-
event: this.event,
|
|
65
|
-
data: this.data.join('\n'),
|
|
66
|
-
raw: this.chunks,
|
|
67
|
-
};
|
|
68
|
-
this.event = null;
|
|
69
|
-
this.data = [];
|
|
70
|
-
this.chunks = [];
|
|
71
|
-
return sse;
|
|
72
|
-
}
|
|
73
|
-
this.chunks.push(line);
|
|
74
|
-
if (line.startsWith(':')) {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
let [fieldname, _, value] = partition(line, ':');
|
|
78
|
-
if (value.startsWith(' ')) {
|
|
79
|
-
value = value.substring(1);
|
|
80
|
-
}
|
|
81
|
-
if (fieldname === 'event') {
|
|
82
|
-
this.event = value;
|
|
83
|
-
} else if (fieldname === 'data') {
|
|
84
|
-
this.data.push(value);
|
|
85
|
-
}
|
|
86
|
-
return null;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* A re-implementation of httpx's `LineDecoder` in Python that handles incrementally
|
|
91
|
-
* reading lines from text.
|
|
92
|
-
*
|
|
93
|
-
* https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258
|
|
94
|
-
*/
|
|
95
|
-
class LineDecoder {
|
|
96
|
-
constructor() {
|
|
97
|
-
this.buffer = [];
|
|
98
|
-
this.trailingCR = false;
|
|
99
|
-
}
|
|
100
|
-
decode(chunk) {
|
|
101
|
-
let text = this.decodeText(chunk);
|
|
102
|
-
if (this.trailingCR) {
|
|
103
|
-
text = '\r' + text;
|
|
104
|
-
this.trailingCR = false;
|
|
105
|
-
}
|
|
106
|
-
if (text.endsWith('\r')) {
|
|
107
|
-
this.trailingCR = true;
|
|
108
|
-
text = text.slice(0, -1);
|
|
109
|
-
}
|
|
110
|
-
if (!text) {
|
|
111
|
-
return [];
|
|
112
|
-
}
|
|
113
|
-
const trailingNewline = LineDecoder.NEWLINE_CHARS.has(text[text.length - 1] || '');
|
|
114
|
-
let lines = text.split(LineDecoder.NEWLINE_REGEXP);
|
|
115
|
-
if (lines.length === 1 && !trailingNewline) {
|
|
116
|
-
this.buffer.push(lines[0]);
|
|
117
|
-
return [];
|
|
118
|
-
}
|
|
119
|
-
if (this.buffer.length > 0) {
|
|
120
|
-
lines = [this.buffer.join('') + lines[0], ...lines.slice(1)];
|
|
121
|
-
this.buffer = [];
|
|
122
|
-
}
|
|
123
|
-
if (!trailingNewline) {
|
|
124
|
-
this.buffer = [lines.pop() || ''];
|
|
125
|
-
}
|
|
126
|
-
return lines;
|
|
127
|
-
}
|
|
128
|
-
decodeText(bytes) {
|
|
129
|
-
var _a;
|
|
130
|
-
if (bytes == null) return '';
|
|
131
|
-
if (typeof bytes === 'string') return bytes;
|
|
132
|
-
// Node:
|
|
133
|
-
if (typeof Buffer !== 'undefined') {
|
|
134
|
-
if (bytes instanceof Buffer) {
|
|
135
|
-
return bytes.toString();
|
|
136
|
-
}
|
|
137
|
-
if (bytes instanceof Uint8Array) {
|
|
138
|
-
return Buffer.from(bytes).toString();
|
|
139
|
-
}
|
|
140
|
-
throw new Error(
|
|
141
|
-
`Unexpected: received non-Uint8Array (${bytes.constructor.name}) stream chunk in an environment with a global "Buffer" defined, which this library assumes to be Node. Please report this error.`,
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
// Browser
|
|
145
|
-
if (typeof TextDecoder !== 'undefined') {
|
|
146
|
-
if (bytes instanceof Uint8Array || bytes instanceof ArrayBuffer) {
|
|
147
|
-
(_a = this.textDecoder) !== null && _a !== void 0 ? _a : (this.textDecoder = new TextDecoder('utf8'));
|
|
148
|
-
return this.textDecoder.decode(bytes);
|
|
149
|
-
}
|
|
150
|
-
throw new Error(
|
|
151
|
-
`Unexpected: received non-Uint8Array/ArrayBuffer (${bytes.constructor.name}) in a web platform. Please report this error.`,
|
|
152
|
-
);
|
|
153
|
-
}
|
|
154
|
-
throw new Error(
|
|
155
|
-
`Unexpected: neither Buffer nor TextDecoder are available as globals. Please report this error.`,
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
flush() {
|
|
159
|
-
if (!this.buffer.length && !this.trailingCR) {
|
|
160
|
-
return [];
|
|
161
|
-
}
|
|
162
|
-
const lines = [this.buffer.join('')];
|
|
163
|
-
this.buffer = [];
|
|
164
|
-
this.trailingCR = false;
|
|
165
|
-
return lines;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
// prettier-ignore
|
|
169
|
-
LineDecoder.NEWLINE_CHARS = new Set(['\n', '\r', '\x0b', '\x0c', '\x1c', '\x1d', '\x1e', '\x85', '\u2028', '\u2029']);
|
|
170
|
-
LineDecoder.NEWLINE_REGEXP = /\r\n|[\n\r\x0b\x0c\x1c\x1d\x1e\x85\u2028\u2029]/g;
|
|
171
|
-
function partition(str, delimiter) {
|
|
172
|
-
const index = str.indexOf(delimiter);
|
|
173
|
-
if (index !== -1) {
|
|
174
|
-
return [str.substring(0, index), delimiter, str.substring(index + delimiter.length)];
|
|
175
|
-
}
|
|
176
|
-
return [str, '', ''];
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Most browsers don't yet have async iterable support for ReadableStream,
|
|
180
|
-
* and Node has a very different way of reading bytes from its "ReadableStream".
|
|
181
|
-
*
|
|
182
|
-
* This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490
|
|
183
|
-
*/
|
|
184
|
-
function readableStreamAsyncIterable(stream) {
|
|
185
|
-
if (stream[Symbol.asyncIterator]) return stream;
|
|
186
|
-
const reader = stream.getReader();
|
|
187
|
-
return {
|
|
188
|
-
async next() {
|
|
189
|
-
try {
|
|
190
|
-
const result = await reader.read();
|
|
191
|
-
if (result === null || result === void 0 ? void 0 : result.done) reader.releaseLock(); // release lock when stream becomes closed
|
|
192
|
-
return result;
|
|
193
|
-
} catch (e) {
|
|
194
|
-
reader.releaseLock(); // release lock when stream becomes errored
|
|
195
|
-
throw e;
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
async return() {
|
|
199
|
-
const cancelPromise = reader.cancel();
|
|
200
|
-
reader.releaseLock();
|
|
201
|
-
await cancelPromise;
|
|
202
|
-
return { done: true, value: undefined };
|
|
203
|
-
},
|
|
204
|
-
[Symbol.asyncIterator]() {
|
|
205
|
-
return this;
|
|
206
|
-
},
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
//# sourceMappingURL=streaming.mjs.map
|
package/streaming.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"streaming.mjs","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":"OAEO,EAAwB,qBAAqB,EAAE;AAUtD,MAAM,OAAO,MAAM;IASjB,YAAY,QAAkB,EAAE,UAA2B;QACzD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,IAAI,UAAU,EAAE,CAAC;QAChC,IAAI,CAAC,eAAe,GAAG,qBAAqB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACjE,CAAC;IAEO,KAAK,CAAC,CAAC,YAAY;QACzB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;YACvB,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;YACxB,MAAM,IAAI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