@jpmorganchase/mosaic-types 0.1.0-beta.95 → 0.1.0-beta.96
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/Source.d.ts +28 -0
- package/package.json +2 -2
package/dist/Source.d.ts
CHANGED
|
@@ -19,6 +19,34 @@ export type SourceConfig = {
|
|
|
19
19
|
*/
|
|
20
20
|
schedule: SourceSchedule;
|
|
21
21
|
};
|
|
22
|
+
export interface SourceHttpError {
|
|
23
|
+
type: 'error';
|
|
24
|
+
kind: 'http';
|
|
25
|
+
message: string;
|
|
26
|
+
index: number;
|
|
27
|
+
url: string;
|
|
28
|
+
status: number;
|
|
29
|
+
statusText: string;
|
|
30
|
+
headers: Record<string, string>;
|
|
31
|
+
}
|
|
32
|
+
export interface SourceThrownError {
|
|
33
|
+
type: 'error';
|
|
34
|
+
kind: 'thrown';
|
|
35
|
+
message: string;
|
|
36
|
+
index: number;
|
|
37
|
+
url: string;
|
|
38
|
+
}
|
|
39
|
+
export type SourceError = SourceHttpError | SourceThrownError;
|
|
40
|
+
export type SourceResult<TPage> = {
|
|
41
|
+
type: 'success';
|
|
42
|
+
index: number;
|
|
43
|
+
data: TPage;
|
|
44
|
+
url: string;
|
|
45
|
+
};
|
|
46
|
+
export type SourceResultSummary<TPage> = {
|
|
47
|
+
results: SourceResult<TPage>[];
|
|
48
|
+
errors: SourceError[];
|
|
49
|
+
};
|
|
22
50
|
export type Source<TOptions = Record<string, unknown>, TPage extends Page = Page> = {
|
|
23
51
|
create(options: TOptions, helpers: SourceConfig): Observable<TPage[]>;
|
|
24
52
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jpmorganchase/mosaic-types",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.96",
|
|
4
4
|
"description": "Mosaic BitBucket source for core file system",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"lint": "eslint --ignore-pattern \"**/__tests__/**\""
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@jpmorganchase/mosaic-schemas": "^0.1.0-beta.
|
|
31
|
+
"@jpmorganchase/mosaic-schemas": "^0.1.0-beta.96",
|
|
32
32
|
"memfs": "^4.0.0",
|
|
33
33
|
"rxjs": "^7.5.5",
|
|
34
34
|
"zod": "^3.22.3"
|