@qite/tide-client 2.0.2 → 2.0.3

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.
@@ -0,0 +1,32 @@
1
+ export interface CountryBase {
2
+ id: number;
3
+ name: string;
4
+ }
5
+ export interface RegionBase {
6
+ id: number;
7
+ name: string;
8
+ }
9
+ export interface LocationBase {
10
+ id: number;
11
+ name: string;
12
+ }
13
+ export interface OordBase {
14
+ id: number;
15
+ name: string;
16
+ }
17
+ export interface GeographicalRegionLocalized {
18
+ id: number;
19
+ geographicalRegionId: number;
20
+ languageId: number;
21
+ name: string;
22
+ language: string;
23
+ }
24
+ export interface GeographicalRegion {
25
+ id: number;
26
+ name: string;
27
+ countries: CountryBase[];
28
+ regions: RegionBase[];
29
+ locations: LocationBase[];
30
+ oords: OordBase[];
31
+ localizations: GeographicalRegionLocalized[];
32
+ }
@@ -41,3 +41,5 @@ export * from "./person-tour-group-preference";
41
41
  export * from "./product-notification-result";
42
42
  export * from "./web-contact-form-request";
43
43
  export * from "./web-contact-has-tag-request";
44
+ export * from "./geographical-region";
45
+ export * from "./publishing";
@@ -0,0 +1,4 @@
1
+ export interface GeoJsonPoint {
2
+ type: "Point";
3
+ coordinates: number[];
4
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./geo-json-point";
2
+ export * from "./published-content-item";
3
+ export * from "./published-content";
@@ -0,0 +1,22 @@
1
+ import { GeoJsonPoint } from "./geo-json-point";
2
+ export interface PublishedContentItem {
3
+ publishedBy: string;
4
+ publishedAt: string;
5
+ publishedVersion: number;
6
+ itemId: number;
7
+ parentItemId: number | null;
8
+ name: string;
9
+ templateName: string;
10
+ position: number;
11
+ content: {
12
+ [culture: string]: {
13
+ [key: string]: unknown;
14
+ };
15
+ };
16
+ geographicalContent: {
17
+ [culture: string]: {
18
+ [key: string]: GeoJsonPoint;
19
+ };
20
+ };
21
+ children: PublishedContentItem[];
22
+ }
@@ -0,0 +1,10 @@
1
+ import { PublishedContentItem } from "./published-content-item";
2
+ export interface PublishedLanguages {
3
+ [language: string]: PublishedContentItem[];
4
+ }
5
+ export interface PublishedChannels {
6
+ [channel: string]: PublishedLanguages;
7
+ }
8
+ export interface PublishedContent {
9
+ channels: PublishedChannels;
10
+ }
@@ -0,0 +1,5 @@
1
+ export interface ContentByParentRequest {
2
+ channelId?: number | null;
3
+ languageId?: number | null;
4
+ parentId: number;
5
+ }
@@ -0,0 +1,10 @@
1
+ export interface ContentByPropertyRequest {
2
+ channelId?: number | null;
3
+ languageId?: number | null;
4
+ includeChildren: boolean;
5
+ propertyName: string;
6
+ /** Match a single value (e.g. one product code). For batch retrieval, use propertyValues. */
7
+ propertyValue?: unknown;
8
+ /** Match any of these values (IN-query). When non-empty, takes precedence over propertyValue. */
9
+ propertyValues?: unknown[];
10
+ }
@@ -0,0 +1,6 @@
1
+ export interface ContentByTemplateRequest {
2
+ channelId?: number | null;
3
+ languageId?: number | null;
4
+ includeChildren: boolean;
5
+ templateId: number;
6
+ }
@@ -18,3 +18,6 @@ export * from "./airport";
18
18
  export * from "./website-configuration";
19
19
  export * from "./style-sheet";
20
20
  export * from "./web-form";
21
+ export * from "./content-by-property-request";
22
+ export * from "./content-by-template-request";
23
+ export * from "./content-by-parent-request";
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  AirportItem,
3
3
  CountryItem,
4
+ GeographicalRegion,
4
5
  PageResult,
5
6
  Portal,
6
7
  TideClientConfig,
@@ -37,6 +38,17 @@ export declare const searchLocations: (
37
38
  searchTerm: string,
38
39
  signal?: AbortSignal | undefined
39
40
  ) => Promise<PageResult<LocationItem>>;
41
+ /**
42
+ * api/web/search/geographicalregions
43
+ * Gets all available Geographical Regions
44
+ * @param config
45
+ * @param signal
46
+ * @returns OK if succeeded.
47
+ */
48
+ export declare const getAvailableGeographicalRegions: (
49
+ config: TideClientConfig,
50
+ signal?: AbortSignal | undefined
51
+ ) => Promise<GeographicalRegion[]>;
40
52
  export declare const getPortal: (
41
53
  config: TideClientConfig,
42
54
  portalId: number,
@@ -0,0 +1,107 @@
1
+ import {
2
+ ContentByParentRequest,
3
+ ContentByPropertyRequest,
4
+ ContentByTemplateRequest,
5
+ PublishedContent,
6
+ TideClientConfig,
7
+ } from "../types";
8
+ /**
9
+ * api/web/content/live
10
+ * Gets all Live content
11
+ * @param config
12
+ * @param signal
13
+ * @returns OK if succeeded.
14
+ */
15
+ export declare const getContentLive: (
16
+ config: TideClientConfig,
17
+ signal?: AbortSignal | undefined
18
+ ) => Promise<PublishedContent>;
19
+ /**
20
+ * api/web/content/draft
21
+ * Gets all Draft (Internal) content
22
+ * @param config
23
+ * @param signal
24
+ * @returns OK if succeeded.
25
+ */
26
+ export declare const getContentDraft: (
27
+ config: TideClientConfig,
28
+ signal?: AbortSignal | undefined
29
+ ) => Promise<PublishedContent>;
30
+ /**
31
+ * api/web/content/live/by-property
32
+ * Gets Live content matching a property value (or values).
33
+ * @param config
34
+ * @param request
35
+ * @param signal
36
+ * @returns OK if succeeded.
37
+ */
38
+ export declare const getContentLiveByProperty: (
39
+ config: TideClientConfig,
40
+ request: ContentByPropertyRequest,
41
+ signal?: AbortSignal | undefined
42
+ ) => Promise<PublishedContent>;
43
+ /**
44
+ * api/web/content/draft/by-property
45
+ * Gets Draft (Internal) content matching a property value (or values).
46
+ * @param config
47
+ * @param request
48
+ * @param signal
49
+ * @returns OK if succeeded.
50
+ */
51
+ export declare const getContentDraftByProperty: (
52
+ config: TideClientConfig,
53
+ request: ContentByPropertyRequest,
54
+ signal?: AbortSignal | undefined
55
+ ) => Promise<PublishedContent>;
56
+ /**
57
+ * api/web/content/live/by-template
58
+ * Gets Live content of a given template.
59
+ * @param config
60
+ * @param request
61
+ * @param signal
62
+ * @returns OK if succeeded.
63
+ */
64
+ export declare const getContentLiveByTemplate: (
65
+ config: TideClientConfig,
66
+ request: ContentByTemplateRequest,
67
+ signal?: AbortSignal | undefined
68
+ ) => Promise<PublishedContent>;
69
+ /**
70
+ * api/web/content/draft/by-template
71
+ * Gets Draft (Internal) content of a given template.
72
+ * @param config
73
+ * @param request
74
+ * @param signal
75
+ * @returns OK if succeeded.
76
+ */
77
+ export declare const getContentDraftByTemplate: (
78
+ config: TideClientConfig,
79
+ request: ContentByTemplateRequest,
80
+ signal?: AbortSignal | undefined
81
+ ) => Promise<PublishedContent>;
82
+ /**
83
+ * api/web/content/live/children
84
+ * Gets the Live children of a parent item.
85
+ * @param config
86
+ * @param request
87
+ * @param signal
88
+ * @returns OK if succeeded.
89
+ */
90
+ export declare const getContentLiveChildren: (
91
+ config: TideClientConfig,
92
+ request: ContentByParentRequest,
93
+ signal?: AbortSignal | undefined
94
+ ) => Promise<PublishedContent>;
95
+ /**
96
+ * api/web/content/draft/children
97
+ * Gets the Draft (Internal) children of a parent item.
98
+ * @param config
99
+ * @param request
100
+ * @param signal
101
+ * @returns OK if succeeded.
102
+ */
103
+ export declare const getContentDraftChildren: (
104
+ config: TideClientConfig,
105
+ request: ContentByParentRequest,
106
+ signal?: AbortSignal | undefined
107
+ ) => Promise<PublishedContent>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-client",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Frontend client for Tide",
5
5
  "main": "build/index.js",
6
6
  "scripts": {