@code.store/arcxp-sdk-ts 4.5.1 → 4.6.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,7 +1,9 @@
1
1
  import { Section, SetSection } from '../../types/section';
2
2
  import { ArcAbstractAPI, ArcAPIOptions } from '../abstract-api';
3
+ import { Website } from './types';
3
4
  export declare class ArcSite extends ArcAbstractAPI {
4
5
  constructor(options: ArcAPIOptions);
5
6
  getSection(id: string, website: string): Promise<Section>;
6
7
  putSection(section: SetSection): Promise<any>;
8
+ getWebsites(): Promise<Website[]>;
7
9
  }
@@ -14,6 +14,10 @@ class ArcSite extends abstract_api_1.ArcAbstractAPI {
14
14
  const { data } = await this.client.put(`/website/${section.website}/section?_id=${section._id}`, section);
15
15
  return data;
16
16
  }
17
+ async getWebsites() {
18
+ const { data } = await this.client.get('/website');
19
+ return data;
20
+ }
17
21
  }
18
22
  exports.ArcSite = ArcSite;
19
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/site/index.ts"],"names":[],"mappings":";;;AACA,kDAAgE;AAEhE,MAAa,OAAQ,SAAQ,6BAAc;IACzC,YAAY,OAAsB;QAChC,KAAK,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,EAAU,EAAE,OAAe;QAC1C,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAU,YAAY,OAAO,gBAAgB,EAAE,EAAE,CAAC,CAAC;QAEzF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,OAAmB;QAClC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,OAAO,CAAC,OAAO,gBAAgB,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC;QAE1G,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAhBD,0BAgBC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/site/index.ts"],"names":[],"mappings":";;;AACA,kDAAgE;AAGhE,MAAa,OAAQ,SAAQ,6BAAc;IACzC,YAAY,OAAsB;QAChC,KAAK,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,EAAU,EAAE,OAAe;QAC1C,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAU,YAAY,OAAO,gBAAgB,EAAE,EAAE,CAAC,CAAC;QAEzF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,OAAmB;QAClC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,OAAO,CAAC,OAAO,gBAAgB,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC;QAE1G,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,WAAW;QACf,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAY,UAAU,CAAC,CAAC;QAE9D,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAtBD,0BAsBC"}
@@ -1 +1,7 @@
1
- export {};
1
+ export type Website = {
2
+ _id: string;
3
+ display_name: string;
4
+ base_path: string;
5
+ is_default_website: boolean;
6
+ domains: string[];
7
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code.store/arcxp-sdk-ts",
3
- "version": "4.5.1",
3
+ "version": "4.6.0",
4
4
  "description": "",
5
5
  "type": "commonjs",
6
6
  "main": "./dist/index.js",