@qite/tide-client 1.1.43 → 1.1.44

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,5 @@
1
+ export interface TranslationDictionaryItemLocalized {
2
+ languageCode: string;
3
+ languageId: number;
4
+ value: string;
5
+ }
@@ -0,0 +1,6 @@
1
+ import { TranslationDictionaryItemLocalized } from "./translation-dictionary-item-localized.model";
2
+ export interface TranslationDictionaryItem {
3
+ id: number;
4
+ key: string;
5
+ value: TranslationDictionaryItemLocalized[];
6
+ }
@@ -0,0 +1,7 @@
1
+ import { TranslationDictionaryItem } from "./translation-dictionary-item.model";
2
+ export interface TranslationDictionarySegment {
3
+ name: string;
4
+ key: string;
5
+ items: TranslationDictionaryItem[];
6
+ children: TranslationDictionarySegment[];
7
+ }
@@ -0,0 +1,4 @@
1
+ import { TranslationDictionarySegment } from "./translation-dictionary-segment.model";
2
+ export interface TranslationDictionary {
3
+ segments: TranslationDictionarySegment[];
4
+ }
@@ -15,7 +15,7 @@ export interface DossierViewResult {
15
15
  modifiedBy: string;
16
16
  dateModified: Date;
17
17
  status: number;
18
- customEntryStatusId: number;
18
+ customEntryStatusId?: number;
19
19
  isB2B: boolean;
20
20
  departureDate?: Date;
21
21
  returnDate?: Date;
@@ -1,4 +1,5 @@
1
1
  import { CrmContactRequest, TideClientConfig } from "../types";
2
+ import { TranslationDictionary } from "../types/cms/translation-dictionary.model";
2
3
  import { Affiliate } from "../types/offer/affiliate";
3
4
  /**
4
5
  * api/web/crmcontact
@@ -17,3 +18,4 @@ export declare const createCrmContact: (config: TideClientConfig, request: CrmCo
17
18
  * @returns OK if succeeded.
18
19
  */
19
20
  export declare const getAffiliates: (config: TideClientConfig, signal?: AbortSignal | undefined) => Promise<[Affiliate]>;
21
+ export declare const getTranslationDictionary: (config: TideClientConfig, segmentKey: string, signal?: AbortSignal | undefined) => Promise<TranslationDictionary>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-client",
3
- "version": "1.1.43",
3
+ "version": "1.1.44",
4
4
  "description": "Frontend client for Tide",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -1,4 +1,5 @@
1
1
  import { CrmContactRequest, TideClientConfig } from "../types";
2
+ import { TranslationDictionary } from "../types/cms/translation-dictionary.model";
2
3
  import { Affiliate } from "../types/offer/affiliate";
3
4
 
4
5
  import { post } from "./api";
@@ -7,6 +8,7 @@ import { get } from "./common-client";
7
8
  const ENDPOINT = "/api/web";
8
9
  const ENDPOINT_CREATE_CRM_CONTACT = `${ENDPOINT}/crmcontact`;
9
10
  const ENDPOINT_CREATE_AFFILIATES = `${ENDPOINT}/affiliates`;
11
+ const ENDPOINT_TRANSLATION_DICTIONARY = `${ENDPOINT}/translation-dictionary`;
10
12
 
11
13
  /**
12
14
  * api/web/crmcontact
@@ -44,3 +46,14 @@ export const getAffiliates = (
44
46
 
45
47
  return get(url, apiKey, config.token, signal, true);
46
48
  };
49
+
50
+ export const getTranslationDictionary = (
51
+ config: TideClientConfig,
52
+ segmentKey: string,
53
+ signal?: AbortSignal
54
+ ): Promise<{[key: string]: object}> => {
55
+ const url = `${config.host}${ENDPOINT_TRANSLATION_DICTIONARY}/${segmentKey}`;
56
+ const apiKey = config.apiKey;
57
+
58
+ return get(url, apiKey, undefined, signal);
59
+ }