@c-rex/services 0.1.3 → 0.1.5

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/dist/index.d.mts CHANGED
@@ -2,14 +2,18 @@ import { CrexApi } from '@c-rex/core';
2
2
  import { Method } from 'axios';
3
3
  import { informationUnitsRenditions, DirectoryNodes, DirectoryNodesResponse, informationUnitsResponse, informationUnitsItems, LanguageAndCountries } from '@c-rex/interfaces';
4
4
 
5
+ declare const WILD_CARD_OPTIONS: {
6
+ readonly BOTH: "BOTH";
7
+ readonly END: "END";
8
+ readonly START: "START";
9
+ readonly NONE: "NONE";
10
+ };
11
+
5
12
  type QueryParams = {
6
13
  key: string;
7
14
  value: string;
8
15
  };
9
- type FileRenditionType = {
10
- format: string;
11
- link: string;
12
- };
16
+ type WildCardType = keyof typeof WILD_CARD_OPTIONS;
13
17
 
14
18
  /**
15
19
  * Base service class that provides common functionality for API interactions.
@@ -61,19 +65,6 @@ declare class RenditionsService extends BaseService {
61
65
  getHTMLRendition({ renditions }: {
62
66
  renditions: informationUnitsRenditions[];
63
67
  }): Promise<string>;
64
- /**
65
- * Processes a list of renditions and categorizes them into files to download and files to open.
66
- * Excludes renditions with formats 'application/xhtml+xml', 'application/json', and 'application/llm+xml'.
67
- *
68
- * @param renditions - Array of rendition objects to process
69
- * @returns An object containing arrays of file renditions categorized as 'filesToDownload' and 'filesToOpen'
70
- */
71
- getFileRenditions: ({ renditions }: {
72
- renditions: informationUnitsRenditions[];
73
- }) => {
74
- filesToDownload: FileRenditionType[];
75
- filesToOpen: FileRenditionType[];
76
- };
77
68
  }
78
69
 
79
70
  /**
@@ -138,12 +129,16 @@ declare class InformationUnitsService extends BaseService {
138
129
  * @returns A promise that resolves to the information units response
139
130
  * @throws Error if the API request fails
140
131
  */
141
- getList({ queries, page, fields, filters, languages }: {
132
+ getList({ queries, page, fields, filters, restrict, languages, wildcard, operator, like, }: {
142
133
  queries?: string;
143
134
  page?: number;
144
135
  filters?: string[];
136
+ restrict?: string[];
145
137
  fields?: string[];
146
138
  languages?: string[];
139
+ wildcard?: WildCardType;
140
+ operator?: string;
141
+ like?: boolean;
147
142
  }): Promise<informationUnitsResponse>;
148
143
  /**
149
144
  * Retrieves a specific information unit by its ID.
package/dist/index.d.ts CHANGED
@@ -2,14 +2,18 @@ import { CrexApi } from '@c-rex/core';
2
2
  import { Method } from 'axios';
3
3
  import { informationUnitsRenditions, DirectoryNodes, DirectoryNodesResponse, informationUnitsResponse, informationUnitsItems, LanguageAndCountries } from '@c-rex/interfaces';
4
4
 
5
+ declare const WILD_CARD_OPTIONS: {
6
+ readonly BOTH: "BOTH";
7
+ readonly END: "END";
8
+ readonly START: "START";
9
+ readonly NONE: "NONE";
10
+ };
11
+
5
12
  type QueryParams = {
6
13
  key: string;
7
14
  value: string;
8
15
  };
9
- type FileRenditionType = {
10
- format: string;
11
- link: string;
12
- };
16
+ type WildCardType = keyof typeof WILD_CARD_OPTIONS;
13
17
 
14
18
  /**
15
19
  * Base service class that provides common functionality for API interactions.
@@ -61,19 +65,6 @@ declare class RenditionsService extends BaseService {
61
65
  getHTMLRendition({ renditions }: {
62
66
  renditions: informationUnitsRenditions[];
63
67
  }): Promise<string>;
64
- /**
65
- * Processes a list of renditions and categorizes them into files to download and files to open.
66
- * Excludes renditions with formats 'application/xhtml+xml', 'application/json', and 'application/llm+xml'.
67
- *
68
- * @param renditions - Array of rendition objects to process
69
- * @returns An object containing arrays of file renditions categorized as 'filesToDownload' and 'filesToOpen'
70
- */
71
- getFileRenditions: ({ renditions }: {
72
- renditions: informationUnitsRenditions[];
73
- }) => {
74
- filesToDownload: FileRenditionType[];
75
- filesToOpen: FileRenditionType[];
76
- };
77
68
  }
78
69
 
79
70
  /**
@@ -138,12 +129,16 @@ declare class InformationUnitsService extends BaseService {
138
129
  * @returns A promise that resolves to the information units response
139
130
  * @throws Error if the API request fails
140
131
  */
141
- getList({ queries, page, fields, filters, languages }: {
132
+ getList({ queries, page, fields, filters, restrict, languages, wildcard, operator, like, }: {
142
133
  queries?: string;
143
134
  page?: number;
144
135
  filters?: string[];
136
+ restrict?: string[];
145
137
  fields?: string[];
146
138
  languages?: string[];
139
+ wildcard?: WildCardType;
140
+ operator?: string;
141
+ like?: boolean;
147
142
  }): Promise<informationUnitsResponse>;
148
143
  /**
149
144
  * Retrieves a specific information unit by its ID.