@code.store/arcxp-sdk-ts 4.18.1 → 4.20.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.
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { AnImage } from '../../types/story';
|
|
2
2
|
import { ArcAbstractAPI, ArcAPIOptions } from '../abstract-api';
|
|
3
|
-
import { GetImagesParams, GetImagesResponse } from './types';
|
|
3
|
+
import { GetGalleriesParams, GetGalleriesResponse, GetImagesParams, GetImagesResponse } from './types';
|
|
4
|
+
import { AGallery } from '../../types/gallery';
|
|
4
5
|
export declare class ArcProtoCenter extends ArcAbstractAPI {
|
|
5
6
|
constructor(options: ArcAPIOptions);
|
|
6
7
|
getImageDataById(imageId: string): Promise<AnImage>;
|
|
7
8
|
uploadImageANS(image: AnImage): Promise<AnImage>;
|
|
8
9
|
deleteImage(imageId: string): Promise<any>;
|
|
10
|
+
deleteGallery(galleryId: string): Promise<any>;
|
|
9
11
|
getImages(params: GetImagesParams): Promise<GetImagesResponse>;
|
|
12
|
+
getGalleries(params: GetGalleriesParams): Promise<GetGalleriesResponse>;
|
|
13
|
+
getGallery(galleryId: string): Promise<AGallery>;
|
|
10
14
|
}
|
|
@@ -27,10 +27,22 @@ class ArcProtoCenter extends abstract_api_1.ArcAbstractAPI {
|
|
|
27
27
|
const { data } = await this.client.delete(`/v2/photos/${imageId}`);
|
|
28
28
|
return data;
|
|
29
29
|
}
|
|
30
|
+
async deleteGallery(galleryId) {
|
|
31
|
+
const { data } = await this.client.delete(`/v2/galleries/${galleryId}`);
|
|
32
|
+
return data;
|
|
33
|
+
}
|
|
30
34
|
async getImages(params) {
|
|
31
35
|
const { data } = await this.client.get(`/v2/photos`, { params });
|
|
32
36
|
return data;
|
|
33
37
|
}
|
|
38
|
+
async getGalleries(params) {
|
|
39
|
+
const { data } = await this.client.get(`/v2/galleries`, { params });
|
|
40
|
+
return data;
|
|
41
|
+
}
|
|
42
|
+
async getGallery(galleryId) {
|
|
43
|
+
const { data } = await this.client.get(`/v2/galleries/${galleryId}`);
|
|
44
|
+
return data;
|
|
45
|
+
}
|
|
34
46
|
}
|
|
35
47
|
exports.ArcProtoCenter = ArcProtoCenter;
|
|
36
48
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/photo-center/index.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAiC;AAEjC,kDAAgE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/photo-center/index.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAiC;AAEjC,kDAAgE;AAIhE,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;IAED,KAAK,CAAC,WAAW,CAAC,OAAe;QAC/B,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,OAAO,EAAE,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,SAAiB;QACnC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,iBAAiB,SAAS,EAAE,CAAC,CAAC;QACxE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,MAAuB;QACrC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAoB,YAAY,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;QACpF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,MAA0B;QAC3C,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAuB,eAAe,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;QAC1F,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,SAAiB;QAChC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAW,iBAAiB,SAAS,EAAE,CAAC,CAAC;QAC/E,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA3CD,wCA2CC"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import { AGallery } from '../../types/gallery';
|
|
1
2
|
import { AnImage } from '../../types/story';
|
|
2
3
|
export type GetImagesParams = Partial<{
|
|
3
4
|
primaryWebsite: string;
|
|
4
5
|
offset: number;
|
|
5
6
|
limit: number;
|
|
6
7
|
}>;
|
|
8
|
+
export type GetGalleriesParams = Partial<{
|
|
9
|
+
offset: number;
|
|
10
|
+
limit: number;
|
|
11
|
+
}>;
|
|
7
12
|
export type GetImagesResponse = AnImage[];
|
|
13
|
+
export type GetGalleriesResponse = AGallery[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code.store/arcxp-sdk-ts",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.20.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",
|