@xyo-network/api-models 5.3.22 → 5.3.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/api-models",
3
- "version": "5.3.22",
3
+ "version": "5.3.24",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -30,7 +30,6 @@
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "files": [
32
32
  "dist",
33
- "src",
34
33
  "!**/*.bench.*",
35
34
  "!**/*.spec.*",
36
35
  "!**/*.test.*",
@@ -38,15 +37,12 @@
38
37
  ],
39
38
  "devDependencies": {
40
39
  "@types/node": "^25.5.0",
41
- "@xylabs/ts-scripts-common": "~7.6.8",
42
- "@xylabs/ts-scripts-yarn3": "~7.6.8",
43
- "@xylabs/tsconfig": "~7.6.8",
40
+ "@xylabs/ts-scripts-common": "~7.6.16",
41
+ "@xylabs/ts-scripts-pnpm": "~7.6.16",
42
+ "@xylabs/tsconfig": "~7.6.16",
44
43
  "acorn": "^8.16.0",
45
44
  "axios": "^1.14.0",
46
- "cosmiconfig": "^9.0.1",
47
- "esbuild": "^0.27.4",
48
- "eslint": "^10.1.0",
49
- "rollup": "^4.60.1",
45
+ "esbuild": "^0.28.0",
50
46
  "typescript": "~5.9.3"
51
47
  },
52
48
  "peerDependencies": {
@@ -55,4 +51,4 @@
55
51
  "publishConfig": {
56
52
  "access": "public"
57
53
  }
58
- }
54
+ }
package/src/Config.ts DELETED
@@ -1,35 +0,0 @@
1
- import type { ApiReportable } from './Reportable.ts'
2
-
3
- interface ApiConfig extends ApiReportable {
4
- /** @description The domain where the api is located */
5
- apiDomain: string
6
-
7
- /** @description The apiKey used for authentication */
8
- apiKey?: string
9
-
10
- /** @description Threshold for Content-Size to cause automatic gzip of request body [default = 1024] */
11
- compressionThreshold?: number
12
-
13
- /** @description The jwtToken of the currently logged in user */
14
- jwtToken?: string
15
-
16
- /** @description The query string, if any, that is added to the end of every request */
17
- query?: string
18
-
19
- /** @description Parent that should also report events from this api */
20
- reportableParent?: ApiReportable
21
-
22
- /** @description The location in the API tree where this API object is mounted */
23
- root?: string
24
-
25
- /** @description Throw on error */
26
- throwError?: boolean
27
-
28
- /** @description Throw on failures */
29
- throwFailure?: boolean
30
-
31
- /** @deprecated use the jwtToken instead */
32
- userid?: string
33
- }
34
-
35
- export type { ApiConfig }
package/src/Envelope.ts DELETED
@@ -1,18 +0,0 @@
1
- import type { ApiError } from './Error.ts'
2
- import type { ApiWarning } from './Warning.ts'
3
-
4
- export interface ApiEnvelopeBase {
5
- warning?: ApiWarning[]
6
- }
7
-
8
- export interface ApiEnvelopeSuccess<T> extends ApiEnvelopeBase {
9
- data: T
10
- errors: never
11
- }
12
-
13
- export interface ApiEnvelopeError extends ApiEnvelopeBase {
14
- data: never
15
- errors: ApiError[]
16
- }
17
-
18
- export type ApiEnvelope<T> = ApiEnvelopeSuccess<T> | ApiEnvelopeError
package/src/Error.ts DELETED
@@ -1,6 +0,0 @@
1
- import type { AxiosError } from 'axios'
2
-
3
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4
- export interface ApiError<T = any, D = any> extends AxiosError<T, D> {
5
- isError: true
6
- }
package/src/Reportable.ts DELETED
@@ -1,10 +0,0 @@
1
- import type { ApiError } from './Error.ts'
2
- import type { ApiResponse } from './Response.ts'
3
-
4
- export interface ApiReportable {
5
- onError?: (error: ApiError, depth: number) => void
6
-
7
- onFailure?: (response: ApiResponse, depth: number) => void
8
-
9
- onSuccess?: (response: ApiResponse, depth: number) => void
10
- }
package/src/Response.ts DELETED
@@ -1,13 +0,0 @@
1
- import type { AxiosResponse } from 'axios'
2
-
3
- import type { ApiEnvelope } from './Envelope.ts'
4
-
5
- export type ApiResponse<T = unknown, D = unknown> = AxiosResponse<T, D>
6
-
7
- export type ApiResponseBody<T> = T | undefined
8
-
9
- export type ApiResponseTuple<T> = [T | undefined, ApiEnvelope<T | undefined>, ApiResponse<ApiEnvelope<T | undefined>>]
10
-
11
- export type ApiResponseTupleOrBody<T> = ApiResponseTuple<T> | ApiResponseBody<T>
12
-
13
- export type ApiResponseType = 'body' | 'tuple'
package/src/Warning.ts DELETED
@@ -1 +0,0 @@
1
- export type ApiWarning = Error
package/src/index.ts DELETED
@@ -1,6 +0,0 @@
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'