@xyo-network/api 7.0.5 → 7.0.7
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/README.md +1 -47
- package/dist/neutral/index.d.ts +5 -5
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +2 -186
- package/dist/neutral/index.mjs.map +3 -3
- package/package.json +17 -26
- package/dist/neutral/Api/Api.d.ts +0 -8
- package/dist/neutral/Api/Api.d.ts.map +0 -1
- package/dist/neutral/Api/index.d.ts +0 -2
- package/dist/neutral/Api/index.d.ts.map +0 -1
- package/dist/neutral/Base.d.ts +0 -32
- package/dist/neutral/Base.d.ts.map +0 -1
- package/dist/neutral/Simple.d.ts +0 -22
- package/dist/neutral/Simple.d.ts.map +0 -1
- package/dist/neutral/WithArchive.d.ts +0 -4
- package/dist/neutral/WithArchive.d.ts.map +0 -1
- package/dist/neutral/models/ArchivePath.d.ts +0 -4
- package/dist/neutral/models/ArchivePath.d.ts.map +0 -1
- package/dist/neutral/models/index.d.ts +0 -2
- package/dist/neutral/models/index.d.ts.map +0 -1
- package/dist/neutral/objToQuery.d.ts +0 -2
- package/dist/neutral/objToQuery.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,49 +1,3 @@
|
|
|
1
|
-
[![logo][]](https://xyo.network)
|
|
2
|
-
|
|
3
1
|
# @xyo-network/api
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
[![license][license-badge]][license-link]
|
|
7
|
-
|
|
8
|
-
> Primary SDK for using XYO Protocol 2.0
|
|
9
|
-
|
|
10
|
-
## Install
|
|
11
|
-
|
|
12
|
-
Using npm:
|
|
13
|
-
|
|
14
|
-
```sh
|
|
15
|
-
npm install {{name}}
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Using yarn:
|
|
19
|
-
|
|
20
|
-
```sh
|
|
21
|
-
yarn add {{name}}
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Using pnpm:
|
|
25
|
-
|
|
26
|
-
```sh
|
|
27
|
-
pnpm add {{name}}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Using bun:
|
|
31
|
-
|
|
32
|
-
```sh
|
|
33
|
-
bun add {{name}}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
## License
|
|
38
|
-
|
|
39
|
-
See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
|
|
40
|
-
|
|
41
|
-
## Credits
|
|
42
|
-
|
|
43
|
-
[Made with 🔥 and ❄️ by XYO Foundation](https://xyo.network)
|
|
44
|
-
|
|
45
|
-
[npm-badge]: https://img.shields.io/npm/v/@xyo-network/api.svg
|
|
46
|
-
[npm-link]: https://www.npmjs.com/package/@xyo-network/api
|
|
47
|
-
[license-badge]: https://img.shields.io/npm/l/@xyo-network/api.svg
|
|
48
|
-
[license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
|
|
49
|
-
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
3
|
+
Deprecated compatibility stub. Use `@xyo-network/sdk-protocol/api` instead.
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export * from '
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Use `@xyo-network/sdk-protocol/api` instead.
|
|
3
|
+
* `@xyo-network/api` is a backward-compatibility re-export stub.
|
|
4
|
+
*/
|
|
5
|
+
export * from '@xyo-network/sdk-protocol/api';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,+BAA+B,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -1,187 +1,3 @@
|
|
|
1
|
-
// src/
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
// src/Base.ts
|
|
5
|
-
import {
|
|
6
|
-
FetchClientError,
|
|
7
|
-
FetchJsonClient,
|
|
8
|
-
isString
|
|
9
|
-
} from "@xylabs/sdk";
|
|
10
|
-
var ApiBase = class _ApiBase {
|
|
11
|
-
config;
|
|
12
|
-
fetchClient;
|
|
13
|
-
constructor(config) {
|
|
14
|
-
this.config = config;
|
|
15
|
-
this.fetchClient = new FetchJsonClient({ ...this.config, headers: this.headers });
|
|
16
|
-
}
|
|
17
|
-
static resolveResponse(result) {
|
|
18
|
-
return [result?.data?.data, result?.data, result];
|
|
19
|
-
}
|
|
20
|
-
static shapeResponse(response, responseType) {
|
|
21
|
-
const resolvedResponse = this.resolveResponse(response);
|
|
22
|
-
return responseType === "tuple" ? resolvedResponse : resolvedResponse[0];
|
|
23
|
-
}
|
|
24
|
-
resolveRoot() {
|
|
25
|
-
return `${this.config.apiDomain}${this.root}`;
|
|
26
|
-
}
|
|
27
|
-
get authenticated() {
|
|
28
|
-
return isString(this.config.apiKey) || isString(this.config.jwtToken);
|
|
29
|
-
}
|
|
30
|
-
get headers() {
|
|
31
|
-
const headers = {};
|
|
32
|
-
if (isString(this.config.jwtToken)) {
|
|
33
|
-
headers.Authorization = `Bearer ${this.config.jwtToken}`;
|
|
34
|
-
}
|
|
35
|
-
if (isString(this.config.apiKey)) {
|
|
36
|
-
headers["x-api-key"] = this.config.apiKey;
|
|
37
|
-
}
|
|
38
|
-
return headers;
|
|
39
|
-
}
|
|
40
|
-
get query() {
|
|
41
|
-
return this.config.query ?? "";
|
|
42
|
-
}
|
|
43
|
-
get root() {
|
|
44
|
-
return this.config.root ?? "/";
|
|
45
|
-
}
|
|
46
|
-
onError(error, depth = 0) {
|
|
47
|
-
this.config.reportableParent?.onError?.(error, depth + 1);
|
|
48
|
-
this.config.onError?.(error, depth);
|
|
49
|
-
}
|
|
50
|
-
onFailure(response, depth = 0) {
|
|
51
|
-
this.config.reportableParent?.onFailure?.(response, depth + 1);
|
|
52
|
-
this.config.onFailure?.(response, depth);
|
|
53
|
-
}
|
|
54
|
-
onSuccess(response, depth = 0) {
|
|
55
|
-
this.config.reportableParent?.onSuccess?.(response, depth + 1);
|
|
56
|
-
this.config.onSuccess?.(response, depth);
|
|
57
|
-
}
|
|
58
|
-
async deleteEndpoint(endPoint = "", responseType) {
|
|
59
|
-
const response = await this.monitorResponse(async () => {
|
|
60
|
-
return await this.fetchClient.delete(`${this.resolveRoot()}${endPoint}${this.query}`);
|
|
61
|
-
});
|
|
62
|
-
return _ApiBase.shapeResponse(response, responseType);
|
|
63
|
-
}
|
|
64
|
-
async getEndpoint(endPoint = "", responseType) {
|
|
65
|
-
const response = await this.monitorResponse(async () => {
|
|
66
|
-
return await this.fetchClient.get(`${this.resolveRoot()}${endPoint}${this.query}`);
|
|
67
|
-
});
|
|
68
|
-
return _ApiBase.shapeResponse(response, responseType);
|
|
69
|
-
}
|
|
70
|
-
handleMonitorResponseError(error, trapFetchException) {
|
|
71
|
-
if (!(error instanceof FetchClientError)) {
|
|
72
|
-
throw error;
|
|
73
|
-
}
|
|
74
|
-
if (trapFetchException) {
|
|
75
|
-
this.onFailure(error.response);
|
|
76
|
-
if (this.config.throwFailure === true) {
|
|
77
|
-
throw error;
|
|
78
|
-
}
|
|
79
|
-
return error.response;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
async monitorResponse(closure) {
|
|
83
|
-
let trapFetchException = true;
|
|
84
|
-
try {
|
|
85
|
-
const response = await closure();
|
|
86
|
-
trapFetchException = false;
|
|
87
|
-
if (response.status < 300) {
|
|
88
|
-
this.onSuccess(response);
|
|
89
|
-
} else {
|
|
90
|
-
this.onFailure(response);
|
|
91
|
-
}
|
|
92
|
-
return response;
|
|
93
|
-
} catch (error) {
|
|
94
|
-
this.handleMonitorResponseError(error, trapFetchException);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
async postEndpoint(endPoint = "", data, responseType) {
|
|
98
|
-
const response = await this.monitorResponse(async () => {
|
|
99
|
-
return await this.fetchClient.post(`${this.resolveRoot()}${endPoint}${this.query}`, data);
|
|
100
|
-
});
|
|
101
|
-
return _ApiBase.shapeResponse(response, responseType);
|
|
102
|
-
}
|
|
103
|
-
async putEndpoint(endPoint = "", data, responseType) {
|
|
104
|
-
const response = await this.monitorResponse(async () => {
|
|
105
|
-
return await this.fetchClient.put(`${this.resolveRoot()}${endPoint}${this.query}`, data);
|
|
106
|
-
});
|
|
107
|
-
return _ApiBase.shapeResponse(response, responseType);
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
// src/objToQuery.ts
|
|
112
|
-
var objToQuery = (obj) => {
|
|
113
|
-
return `?${Object.entries(obj).map(([key, value]) => {
|
|
114
|
-
return `${key}=${value}`;
|
|
115
|
-
}).filter((value) => value !== void 0).join("&")}`;
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
// src/Simple.ts
|
|
119
|
-
var ApiSimple = class extends ApiBase {
|
|
120
|
-
async delete(responseType) {
|
|
121
|
-
switch (responseType) {
|
|
122
|
-
case "tuple": {
|
|
123
|
-
return await this.deleteEndpoint(void 0, "tuple");
|
|
124
|
-
}
|
|
125
|
-
default: {
|
|
126
|
-
return await this.deleteEndpoint();
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
async find(query = {}, responseType) {
|
|
131
|
-
switch (responseType) {
|
|
132
|
-
case "tuple": {
|
|
133
|
-
return await this.getEndpoint(objToQuery(query), "tuple");
|
|
134
|
-
}
|
|
135
|
-
default: {
|
|
136
|
-
return await this.getEndpoint(objToQuery(query));
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
async get(responseType) {
|
|
141
|
-
switch (responseType) {
|
|
142
|
-
case "tuple": {
|
|
143
|
-
return await this.getEndpoint(void 0, "tuple");
|
|
144
|
-
}
|
|
145
|
-
default: {
|
|
146
|
-
return await this.getEndpoint();
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
async post(data, responseType) {
|
|
151
|
-
switch (responseType) {
|
|
152
|
-
case "tuple": {
|
|
153
|
-
return await this.postEndpoint(void 0, data, "tuple");
|
|
154
|
-
}
|
|
155
|
-
default: {
|
|
156
|
-
return await this.postEndpoint(void 0, data);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
async put(data, responseType) {
|
|
161
|
-
switch (responseType) {
|
|
162
|
-
case "tuple": {
|
|
163
|
-
return await this.putEndpoint(void 0, data, "tuple");
|
|
164
|
-
}
|
|
165
|
-
default: {
|
|
166
|
-
return await this.putEndpoint(void 0, data);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
// src/Api/Api.ts
|
|
173
|
-
var ArchivistApi = class extends ApiSimple {
|
|
174
|
-
huri(huri) {
|
|
175
|
-
const huriObj = typeof huri === "string" ? new Huri(huri) : huri;
|
|
176
|
-
return new ApiSimple({
|
|
177
|
-
...this.config,
|
|
178
|
-
root: `${this.root}${huriObj.href}/`
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
export {
|
|
183
|
-
ApiBase,
|
|
184
|
-
ApiSimple,
|
|
185
|
-
ArchivistApi
|
|
186
|
-
};
|
|
1
|
+
// src/index.ts
|
|
2
|
+
export * from "@xyo-network/sdk-protocol/api";
|
|
187
3
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @deprecated Use `@xyo-network/sdk-protocol/api` instead.\n * `@xyo-network/api` is a backward-compatibility re-export stub.\n */\nexport * from '@xyo-network/sdk-protocol/api'\n"],
|
|
5
|
+
"mappings": ";AAIA,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/api",
|
|
3
|
-
"version": "7.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.0.7",
|
|
4
|
+
"description": "DEPRECATED - use @xyo-network/sdk-protocol/api. Backward-compatibility re-export stub for @xyo-network/api.",
|
|
5
|
+
"deprecated": "Use @xyo-network/sdk-protocol/api instead. @xyo-network/api is a backward-compatibility re-export stub and will not receive further updates.",
|
|
5
6
|
"homepage": "https://xyo.network",
|
|
6
7
|
"bugs": {
|
|
7
8
|
"url": "git+https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues",
|
|
@@ -34,43 +35,33 @@
|
|
|
34
35
|
"README.md"
|
|
35
36
|
],
|
|
36
37
|
"dependencies": {
|
|
37
|
-
"@xyo-network/
|
|
38
|
-
"@xyo-network/huri": "~7.0.5",
|
|
39
|
-
"@xyo-network/payload-model": "~7.0.5"
|
|
38
|
+
"@xyo-network/sdk-protocol": "~7.0.7"
|
|
40
39
|
},
|
|
41
40
|
"devDependencies": {
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"@opentelemetry/sdk-trace-base": "^2.8.0",
|
|
45
|
-
"@scure/base": "~2.2.0",
|
|
46
|
-
"@xylabs/sdk": "^7.0.1",
|
|
47
|
-
"@xylabs/threads": "~7.0.1",
|
|
48
|
-
"@xylabs/toolchain": "~8.5.3",
|
|
49
|
-
"@xylabs/tsconfig": "~8.5.3",
|
|
50
|
-
"@xylabs/vitest-extended": "^7.0.1",
|
|
51
|
-
"async-mutex": "^0.5.0",
|
|
41
|
+
"@xylabs/toolchain": "~8.5.13",
|
|
42
|
+
"@xylabs/tsconfig": "~8.5.13",
|
|
52
43
|
"browserslist": "4.28.4",
|
|
53
|
-
"debug": "^4.4.3",
|
|
54
44
|
"eslint": "^10.6.0",
|
|
55
45
|
"eslint-import-resolver-typescript": "^4.4.5",
|
|
56
|
-
"
|
|
57
|
-
"hash-wasm": "~4.12.0",
|
|
58
|
-
"observable-fns": "^0.6.1",
|
|
59
|
-
"typescript": "~6.0.3",
|
|
60
|
-
"vite": "^8.1.0",
|
|
61
|
-
"vitest": "~4.1.9",
|
|
62
|
-
"zod": "^4.4.3",
|
|
63
|
-
"@xyo-network/boundwitness-model": "~7.0.5",
|
|
64
|
-
"@xyo-network/query-payload-plugin": "~7.0.5"
|
|
46
|
+
"typescript": "~6.0.3"
|
|
65
47
|
},
|
|
66
48
|
"peerDependencies": {
|
|
49
|
+
"@ariestools/sdk": "^7.0.4",
|
|
67
50
|
"@bitauth/libauth": "~3.0",
|
|
51
|
+
"@noble/post-quantum": "~0.6.1",
|
|
68
52
|
"@opentelemetry/api": "^1.9",
|
|
69
53
|
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
70
54
|
"@scure/base": "~2.2",
|
|
71
|
-
"@
|
|
55
|
+
"@scure/bip39": "~2.2",
|
|
56
|
+
"@xylabs/geo": "^7.0",
|
|
57
|
+
"@xylabs/threads": "^7.0",
|
|
58
|
+
"ajv": "^8.20",
|
|
72
59
|
"async-mutex": "^0.5",
|
|
60
|
+
"debug": "^4.4",
|
|
73
61
|
"ethers": "^6.16",
|
|
62
|
+
"hash-wasm": "~4.12",
|
|
63
|
+
"idb": "^8.0",
|
|
64
|
+
"observable-fns": "^0.6",
|
|
74
65
|
"zod": "^4.4"
|
|
75
66
|
},
|
|
76
67
|
"engines": {
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ApiConfig } from '@xyo-network/api-models';
|
|
2
|
-
import { Huri } from '@xyo-network/huri';
|
|
3
|
-
import type { Payload } from '@xyo-network/payload-model';
|
|
4
|
-
import { ApiSimple } from '../Simple.ts';
|
|
5
|
-
export declare class ArchivistApi<C extends ApiConfig = ApiConfig> extends ApiSimple<Payload[], C> {
|
|
6
|
-
huri(huri: Huri | string): ApiSimple<Payload, Payload, import("@xyo-network/payload-model").PayloadFindFilter, ApiConfig>;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=Api.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Api.d.ts","sourceRoot":"","sources":["../../../src/Api/Api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,qBAAa,YAAY,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,CAAE,SAAQ,SAAS,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACxF,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;CAOzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Api/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA"}
|
package/dist/neutral/Base.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { FetchJsonClient } from '@xylabs/sdk';
|
|
2
|
-
import type { ApiConfig, ApiEnvelope, ApiError, ApiReportable, ApiResponse, ApiResponseBody, ApiResponseTuple } from '@xyo-network/api-models';
|
|
3
|
-
export declare class ApiBase<C extends ApiConfig = ApiConfig> implements ApiReportable {
|
|
4
|
-
readonly config: C;
|
|
5
|
-
protected fetchClient: FetchJsonClient;
|
|
6
|
-
constructor(config: C);
|
|
7
|
-
private static resolveResponse;
|
|
8
|
-
private static shapeResponse;
|
|
9
|
-
private resolveRoot;
|
|
10
|
-
get authenticated(): boolean;
|
|
11
|
-
protected get headers(): Record<string, string>;
|
|
12
|
-
protected get query(): string;
|
|
13
|
-
protected get root(): string;
|
|
14
|
-
onError(error: ApiError, depth?: number): void;
|
|
15
|
-
onFailure(response: ApiResponse, depth?: number): void;
|
|
16
|
-
onSuccess(response: ApiResponse, depth?: number): void;
|
|
17
|
-
protected deleteEndpoint<T = unknown>(endPoint?: string): Promise<ApiResponseBody<T>>;
|
|
18
|
-
protected deleteEndpoint<T = unknown>(endPoint?: string, responseType?: 'body'): Promise<ApiResponseBody<T>>;
|
|
19
|
-
protected deleteEndpoint<T = unknown>(endPoint?: string, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
|
|
20
|
-
protected getEndpoint<T = unknown>(endPoint?: string): Promise<ApiResponseBody<T>>;
|
|
21
|
-
protected getEndpoint<T = unknown>(endPoint?: string, responseType?: 'body'): Promise<ApiResponseBody<T>>;
|
|
22
|
-
protected getEndpoint<T = unknown>(endPoint?: string, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
|
|
23
|
-
protected handleMonitorResponseError<T>(error: unknown, trapFetchException: boolean): ApiResponse<ApiEnvelope<T>> | undefined;
|
|
24
|
-
protected monitorResponse<T>(closure: () => Promise<ApiResponse<ApiEnvelope<T>>>): Promise<ApiResponse<ApiEnvelope<T>> | undefined>;
|
|
25
|
-
protected postEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D): Promise<ApiResponseBody<T>>;
|
|
26
|
-
protected postEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D, responseType?: 'body'): Promise<ApiResponseBody<T>>;
|
|
27
|
-
protected postEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
|
|
28
|
-
protected putEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D): Promise<ApiResponseBody<T>>;
|
|
29
|
-
protected putEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D, responseType?: 'body'): Promise<ApiResponseBody<T>>;
|
|
30
|
-
protected putEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=Base.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Base.d.ts","sourceRoot":"","sources":["../../src/Base.ts"],"names":[],"mappings":"AAAA,OAAO,EACa,eAAe,EAClC,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,QAAQ,EACR,aAAa,EACb,WAAW,EACX,eAAe,EACf,gBAAgB,EAGjB,MAAM,yBAAyB,CAAA;AAEhC,qBAAa,OAAO,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,CAAE,YAAW,aAAa;IAC5E,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;IAClB,SAAS,CAAC,WAAW,EAAE,eAAe,CAAA;gBAE1B,MAAM,EAAE,CAAC;IAKrB,OAAO,CAAC,MAAM,CAAC,eAAe;IAI9B,OAAO,CAAC,MAAM,CAAC,aAAa;IAK5B,OAAO,CAAC,WAAW;IAInB,IAAI,aAAa,YAEhB;IAED,SAAS,KAAK,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAS9C;IAED,SAAS,KAAK,KAAK,WAElB;IAED,SAAS,KAAK,IAAI,WAEjB;IAED,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,SAAI;IAKlC,SAAS,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,SAAI;IAK1C,SAAS,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,SAAI;cAK1B,cAAc,CAAC,CAAC,GAAG,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;cAC3E,cAAc,CAAC,CAAC,GAAG,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAA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AE,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;cAYzH,WAAW,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;cAC/F,WAAW,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;cACtH,WAAW,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;CAOzI"}
|
package/dist/neutral/Simple.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { ApiConfig, ApiResponseBody, ApiResponseTuple } from '@xyo-network/api-models';
|
|
2
|
-
import type { Payload, PayloadFindFilter } from '@xyo-network/payload-model';
|
|
3
|
-
import { ApiBase } from './Base.ts';
|
|
4
|
-
export type ApiSimpleQuery = PayloadFindFilter;
|
|
5
|
-
export declare class ApiSimple<T = Payload, D = T, Q extends ApiSimpleQuery = ApiSimpleQuery, C extends ApiConfig = ApiConfig> extends ApiBase<C> {
|
|
6
|
-
delete(): Promise<ApiResponseBody<T>>;
|
|
7
|
-
delete(responseType?: 'body'): Promise<ApiResponseBody<T>>;
|
|
8
|
-
delete(responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
|
|
9
|
-
find(query?: Q): Promise<ApiResponseBody<T>>;
|
|
10
|
-
find(query?: Q, responseType?: 'body'): Promise<ApiResponseBody<T>>;
|
|
11
|
-
find(query?: Q, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
|
|
12
|
-
get(): Promise<ApiResponseBody<T>>;
|
|
13
|
-
get(responseType?: 'body'): Promise<ApiResponseBody<T>>;
|
|
14
|
-
get(responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
|
|
15
|
-
post(data?: D): Promise<ApiResponseBody<T>>;
|
|
16
|
-
post(data?: D, responseType?: 'body'): Promise<ApiResponseBody<T>>;
|
|
17
|
-
post(data?: D, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
|
|
18
|
-
put(data?: D): Promise<ApiResponseBody<T>>;
|
|
19
|
-
put(data?: D, responseType?: 'body'): Promise<ApiResponseBody<T>>;
|
|
20
|
-
put(data?: D, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=Simple.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Simple.d.ts","sourceRoot":"","sources":["../../src/Simple.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAC7C,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE5E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGnC,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAAA;AAE9C,qBAAa,SAAS,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,cAAc,GAAG,cAAc,EAAE,CAAC,SAAS,SAAS,GAAG,SAAS,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IACjI,MAAM,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IACrC,MAA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AAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IACjE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;CAW1E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WithArchive.d.ts","sourceRoot":"","sources":["../../src/WithArchive.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,MAAM,WAAW,CAAC,kBAAkB,IAAI,kBAAkB,GAAG;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ArchivePath.d.ts","sourceRoot":"","sources":["../../../src/models/ArchivePath.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAA;CAChB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"objToQuery.d.ts","sourceRoot":"","sources":["../../src/objToQuery.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,WAO1E,CAAA"}
|