@code.store/arcxp-sdk-ts 4.43.0 → 4.43.1

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,9 +1,9 @@
1
1
  import type { Section, SetSection } from '../../types/section';
2
2
  import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
3
- import type { GetLinksParams, GetLinksResponse, GetSectionsResponse, Link, Website } from './types';
3
+ import type { GetLinksParams, GetLinksResponse, GetSectionParams, GetSectionsResponse, Link, Website } from './types';
4
4
  export declare class ArcSite extends ArcAbstractAPI {
5
5
  constructor(options: ArcAPIOptions);
6
- getSections(website: string, offset?: number): Promise<GetSectionsResponse>;
6
+ getSections(params: GetSectionParams): Promise<GetSectionsResponse>;
7
7
  getSection(id: string, website: string): Promise<Section>;
8
8
  deleteSection(id: string, website: string): Promise<void>;
9
9
  putSection(section: SetSection): Promise<any>;
@@ -6,9 +6,9 @@ class ArcSite extends abstract_api_1.ArcAbstractAPI {
6
6
  constructor(options) {
7
7
  super({ ...options, apiPath: 'site/v3' });
8
8
  }
9
- async getSections(website, offset) {
10
- const { data } = await this.client.get(`/website/${website}/section`, {
11
- params: { _website: website, offset },
9
+ async getSections(params) {
10
+ const { data } = await this.client.get(`/website/${params.website}/section`, {
11
+ params: { _website: params.website, ...params },
12
12
  });
13
13
  return data;
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/site/index.ts"],"names":[],"mappings":";;;AACA,kDAAqE;AAGrE,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,WAAW,CAAC,OAAe,EAAE,MAAe;QAChD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAsB,YAAY,OAAO,UA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AAE,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;IAED,KAAK,CAAC,OAAO,CAAC,IAAU;QACtB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAO,YAAY,IAAI,CAAC,QAAQ,SAAS,IAAI,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC;QAEjG,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,EAAU,EAAE,OAAe;QAC1C,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,OAAO,SAAS,EAAE,EAAE,CAAC,CAAC;QAE5E,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,MAAsB;QACnC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAmB,YAAY,MAAM,CAAC,OAAO,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;QAExG,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AApDD,0BAoDC"}
@@ -29,3 +29,8 @@ export type GetLinksParams = {
29
29
  export type GetLinksResponse = {
30
30
  q_results: Link[];
31
31
  };
32
+ export type GetSectionParams = {
33
+ website: string;
34
+ offset?: number;
35
+ include_inactive?: boolean;
36
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code.store/arcxp-sdk-ts",
3
- "version": "4.43.0",
3
+ "version": "4.43.1",
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",