@xyo-network/api-models 3.0.7 → 3.0.9
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/neutral/Config.d.ts +15 -0
- package/dist/neutral/Config.d.ts.map +1 -0
- package/dist/neutral/Envelope.d.ts +15 -0
- package/dist/neutral/Envelope.d.ts.map +1 -0
- package/dist/neutral/Error.d.ts +5 -0
- package/dist/neutral/Error.d.ts.map +1 -0
- package/dist/neutral/Reportable.d.ts +8 -0
- package/dist/neutral/Reportable.d.ts.map +1 -0
- package/dist/neutral/Response.d.ts +8 -0
- package/dist/neutral/Response.d.ts.map +1 -0
- package/dist/neutral/Warning.d.ts +2 -0
- package/dist/neutral/Warning.d.ts.map +1 -0
- package/dist/neutral/index.d.ts +7 -47
- package/dist/neutral/index.d.ts.map +1 -0
- package/package.json +4 -4
- package/xy.config.ts +1 -3
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ApiReportable } from './Reportable.ts';
|
|
2
|
+
interface ApiConfig extends ApiReportable {
|
|
3
|
+
apiDomain: string;
|
|
4
|
+
apiKey?: string;
|
|
5
|
+
compressionThreshold?: number;
|
|
6
|
+
jwtToken?: string;
|
|
7
|
+
query?: string;
|
|
8
|
+
reportableParent?: ApiReportable;
|
|
9
|
+
root?: string;
|
|
10
|
+
throwError?: boolean;
|
|
11
|
+
throwFailure?: boolean;
|
|
12
|
+
userid?: string;
|
|
13
|
+
}
|
|
14
|
+
export type { ApiConfig };
|
|
15
|
+
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAEpD,UAAU,SAAU,SAAQ,aAAa;IAEvC,SAAS,EAAE,MAAM,CAAA;IAGjB,MAAM,CAAC,EAAE,MAAM,CAAA;IAGf,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAG7B,QAAQ,CAAC,EAAE,MAAM,CAAA;IAGjB,KAAK,CAAC,EAAE,MAAM,CAAA;IAGd,gBAAgB,CAAC,EAAE,aAAa,CAAA;IAGhC,IAAI,CAAC,EAAE,MAAM,CAAA;IAGb,UAAU,CAAC,EAAE,OAAO,CAAA;IAGpB,YAAY,CAAC,EAAE,OAAO,CAAA;IAGtB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,YAAY,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ApiError } from './Error.ts';
|
|
2
|
+
import type { ApiWarning } from './Warning.ts';
|
|
3
|
+
export interface ApiEnvelopeBase {
|
|
4
|
+
warning?: ApiWarning[];
|
|
5
|
+
}
|
|
6
|
+
export interface ApiEnvelopeSuccess<T> extends ApiEnvelopeBase {
|
|
7
|
+
data: T;
|
|
8
|
+
errors: never;
|
|
9
|
+
}
|
|
10
|
+
export interface ApiEnvelopeError extends ApiEnvelopeBase {
|
|
11
|
+
data: never;
|
|
12
|
+
errors: ApiError[];
|
|
13
|
+
}
|
|
14
|
+
export type ApiEnvelope<T> = ApiEnvelopeSuccess<T> | ApiEnvelopeError;
|
|
15
|
+
//# sourceMappingURL=Envelope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Envelope.d.ts","sourceRoot":"","sources":["../../src/Envelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,UAAU,EAAE,CAAA;CACvB;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC,CAAE,SAAQ,eAAe;IAC5D,IAAI,EAAE,CAAC,CAAA;IACP,MAAM,EAAE,KAAK,CAAA;CACd;AAED,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,IAAI,EAAE,KAAK,CAAA;IACX,MAAM,EAAE,QAAQ,EAAE,CAAA;CACnB;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,kBAAkB,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["../../src/Error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGvC,MAAM,WAAW,QAAQ,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,CAAE,SAAQ,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;IAClE,OAAO,EAAE,IAAI,CAAA;CACd"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ApiError } from './Error.ts';
|
|
2
|
+
import type { ApiResponse } from './Response.ts';
|
|
3
|
+
export interface ApiReportable {
|
|
4
|
+
onError?: (error: ApiError, depth: number) => void;
|
|
5
|
+
onFailure?: (response: ApiResponse, depth: number) => void;
|
|
6
|
+
onSuccess?: (response: ApiResponse, depth: number) => void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=Reportable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Reportable.d.ts","sourceRoot":"","sources":["../../src/Reportable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAEhD,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAElD,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAE1D,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAC3D"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AxiosResponse } from 'axios';
|
|
2
|
+
import type { ApiEnvelope } from './Envelope.ts';
|
|
3
|
+
export type ApiResponse<T = unknown, D = unknown> = AxiosResponse<T, D>;
|
|
4
|
+
export type ApiResponseBody<T> = T | undefined;
|
|
5
|
+
export type ApiResponseTuple<T> = [T | undefined, ApiEnvelope<T | undefined>, ApiResponse<ApiEnvelope<T | undefined>>];
|
|
6
|
+
export type ApiResponseTupleOrBody<T> = ApiResponseTuple<T> | ApiResponseBody<T>;
|
|
7
|
+
export type ApiResponseType = 'body' | 'tuple';
|
|
8
|
+
//# sourceMappingURL=Response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Response.d.ts","sourceRoot":"","sources":["../../src/Response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAEhD,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,IAAI,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAEvE,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAA;AAE9C,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,EAAE,WAAW,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAA;AAEtH,MAAM,MAAM,sBAAsB,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAA;AAEhF,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Warning.d.ts","sourceRoot":"","sources":["../../src/Warning.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,KAAK,CAAA"}
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,47 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
interface ApiEnvelopeBase {
|
|
10
|
-
warning?: ApiWarning[];
|
|
11
|
-
}
|
|
12
|
-
interface ApiEnvelopeSuccess<T> extends ApiEnvelopeBase {
|
|
13
|
-
data: T;
|
|
14
|
-
errors: never;
|
|
15
|
-
}
|
|
16
|
-
interface ApiEnvelopeError extends ApiEnvelopeBase {
|
|
17
|
-
data: never;
|
|
18
|
-
errors: ApiError[];
|
|
19
|
-
}
|
|
20
|
-
type ApiEnvelope<T> = ApiEnvelopeSuccess<T> | ApiEnvelopeError;
|
|
21
|
-
|
|
22
|
-
type ApiResponse<T = unknown, D = unknown> = AxiosResponse<T, D>;
|
|
23
|
-
type ApiResponseBody<T> = T | undefined;
|
|
24
|
-
type ApiResponseTuple<T> = [T | undefined, ApiEnvelope<T | undefined>, ApiResponse<ApiEnvelope<T | undefined>>];
|
|
25
|
-
type ApiResponseTupleOrBody<T> = ApiResponseTuple<T> | ApiResponseBody<T>;
|
|
26
|
-
type ApiResponseType = 'body' | 'tuple';
|
|
27
|
-
|
|
28
|
-
interface ApiReportable {
|
|
29
|
-
onError?: (error: ApiError, depth: number) => void;
|
|
30
|
-
onFailure?: (response: ApiResponse, depth: number) => void;
|
|
31
|
-
onSuccess?: (response: ApiResponse, depth: number) => void;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
interface ApiConfig extends ApiReportable {
|
|
35
|
-
apiDomain: string;
|
|
36
|
-
apiKey?: string;
|
|
37
|
-
compressionThreshold?: number;
|
|
38
|
-
jwtToken?: string;
|
|
39
|
-
query?: string;
|
|
40
|
-
reportableParent?: ApiReportable;
|
|
41
|
-
root?: string;
|
|
42
|
-
throwError?: boolean;
|
|
43
|
-
throwFailure?: boolean;
|
|
44
|
-
userid?: string;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export type { ApiConfig, ApiEnvelope, ApiEnvelopeBase, ApiEnvelopeError, ApiEnvelopeSuccess, ApiError, ApiReportable, ApiResponse, ApiResponseBody, ApiResponseTuple, ApiResponseTupleOrBody, ApiResponseType, ApiWarning };
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export * from './Envelope.ts';
|
|
3
|
+
export * from './Error.ts';
|
|
4
|
+
export * from './Reportable.ts';
|
|
5
|
+
export * from './Response.ts';
|
|
6
|
+
export * from './Warning.ts';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/api-models",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.9",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"axios": "^1.7.
|
|
32
|
+
"axios": "^1.7.5"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@xylabs/ts-scripts-yarn3": "^4.0.
|
|
36
|
-
"@xylabs/tsconfig": "^4.0.
|
|
35
|
+
"@xylabs/ts-scripts-yarn3": "^4.0.7",
|
|
36
|
+
"@xylabs/tsconfig": "^4.0.7",
|
|
37
37
|
"typescript": "^5.5.4"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|