@code.store/arcxp-sdk-ts 4.10.0 → 4.11.0
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.
|
@@ -3,4 +3,5 @@ import { ArcAbstractAPI, ArcAPIOptions } from '../abstract-api';
|
|
|
3
3
|
export declare class ArcProtoCenter extends ArcAbstractAPI {
|
|
4
4
|
constructor(options: ArcAPIOptions);
|
|
5
5
|
getImageDataById(photoId: string): Promise<AnImage>;
|
|
6
|
+
uploadImageANS(image: AnImage): Promise<AnImage>;
|
|
6
7
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.ArcProtoCenter = void 0;
|
|
7
|
+
const form_data_1 = __importDefault(require("form-data"));
|
|
4
8
|
const abstract_api_1 = require("../abstract-api");
|
|
5
9
|
class ArcProtoCenter extends abstract_api_1.ArcAbstractAPI {
|
|
6
10
|
constructor(options) {
|
|
@@ -10,6 +14,15 @@ class ArcProtoCenter extends abstract_api_1.ArcAbstractAPI {
|
|
|
10
14
|
const { data } = await this.client.get(`/v2/photos/${photoId}`);
|
|
11
15
|
return data;
|
|
12
16
|
}
|
|
17
|
+
async uploadImageANS(image) {
|
|
18
|
+
const form = new form_data_1.default();
|
|
19
|
+
form.append('ans', JSON.stringify(image), {
|
|
20
|
+
filename: 'ans.json',
|
|
21
|
+
contentType: 'application/json',
|
|
22
|
+
});
|
|
23
|
+
const { data } = await this.client.post(`/v2/photos`, form, { headers: form.getHeaders() });
|
|
24
|
+
return data;
|
|
25
|
+
}
|
|
13
26
|
}
|
|
14
27
|
exports.ArcProtoCenter = ArcProtoCenter;
|
|
15
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/photo-center/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/photo-center/index.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAiC;AAEjC,kDAAgE;AAEhE,MAAa,cAAe,SAAQ,6BAAc;IAChD,YAAY,OAAsB;QAChC,KAAK,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;IAC9C,CAAC;IACD,KAAK,CAAC,gBAAgB,CAAC,OAAe;QACpC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,OAAO,EAAE,CAAC,CAAC;QAChE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,KAAc;QACjC,MAAM,IAAI,GAAG,IAAI,mBAAQ,EAAE,CAAC;QAC5B,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;YACxC,QAAQ,EAAE,UAAU;YACpB,WAAW,EAAE,kBAAkB;SAChC,CAAC,CAAC;QACH,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAU,YAAY,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QACrG,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlBD,wCAkBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code.store/arcxp-sdk-ts",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.11.0",
|
|
4
4
|
"description": "A strongly typed set of ArcXP API's and utilities reduce the amount of work required to develop with ArcXP, starting with reducing the boilerplate code you have to write.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./dist/index.js",
|