@x12i/files-ingest 0.1.0 → 0.1.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.
- package/dist/client.d.ts +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +4 -4
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type IngestArtifact, type IngestClient } from "@x12i/files-core";
|
|
2
2
|
export type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class X12iIngestClient implements IngestClient {
|
|
4
4
|
private readonly options;
|
|
5
5
|
private readonly fetchImpl;
|
|
6
6
|
constructor(options: {
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEjF,qBAAa,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEjF,qBAAa,gBAAiB,YAAW,YAAY;IAGvC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAFpC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;gBAET,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,SAAS,CAAA;KAAE;IAIrF,IAAI,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CA4BpD"}
|
package/dist/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { idempotencyKey, PermanentFileError, RetryableSyncError, } from "@x12i/files-core";
|
|
2
|
-
export class
|
|
2
|
+
export class X12iIngestClient {
|
|
3
3
|
options;
|
|
4
4
|
fetchImpl;
|
|
5
5
|
constructor(options) {
|
|
@@ -22,7 +22,7 @@ export class NowroxIngestClient {
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
catch (error) {
|
|
25
|
-
throw new RetryableSyncError(error instanceof Error ? error.message : "
|
|
25
|
+
throw new RetryableSyncError(error instanceof Error ? error.message : "X12i ingest network error");
|
|
26
26
|
}
|
|
27
27
|
if (response.status >= 200 && response.status < 300) {
|
|
28
28
|
await response.body?.cancel();
|
|
@@ -30,9 +30,9 @@ export class NowroxIngestClient {
|
|
|
30
30
|
}
|
|
31
31
|
await response.body?.cancel();
|
|
32
32
|
if (response.status === 401 || response.status === 429 || response.status >= 500) {
|
|
33
|
-
throw new RetryableSyncError(`
|
|
33
|
+
throw new RetryableSyncError(`X12i ingest failed with ${response.status}`, response.status);
|
|
34
34
|
}
|
|
35
|
-
throw new PermanentFileError("ingest_rejected", `
|
|
35
|
+
throw new PermanentFileError("ingest_rejected", `X12i ingest rejected the file with ${response.status}`);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
//# sourceMappingURL=client.js.map
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,E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AI,QAAQ,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC;YACpD,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;YAC9B,OAAO;QACT,CAAC;QACD,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;QAC9B,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;YACjF,MAAM,IAAI,kBAAkB,CAAC,2BAA2B,QAAQ,CAAC,MAAM,EAAE,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC9F,CAAC;QACD,MAAM,IAAI,kBAAkB,CAAC,iBAAiB,EAAE,sCAAsC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3G,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { X12iIngestClient, type FetchLike } from "./client.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { X12iIngestClient } from "./client.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAkB,MAAM,aAAa,CAAC"}
|