@qite/tide-client 1.1.178 → 1.1.179

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.
@@ -8,6 +8,7 @@ export interface BookingPackageSearchRequest {
8
8
  destination?: BookingPackageDestination;
9
9
  productIds?: number[];
10
10
  productCodes?: string[];
11
+ accommodationCodes?: string[];
11
12
  regimeCodes?: string[];
12
13
  fromDate: string;
13
14
  toDate: string;
@@ -0,0 +1,12 @@
1
+ export declare const FormFieldType: {
2
+ Text: number;
3
+ Number: number;
4
+ YesNo: number;
5
+ Checkbox: number;
6
+ Dropdown: number;
7
+ Multiline: number;
8
+ InfoText: number;
9
+ Calculated: number;
10
+ Date: number;
11
+ Email: number;
12
+ };
@@ -0,0 +1,8 @@
1
+ export declare const FormFieldWidth: {
2
+ Full: number;
3
+ ThreeQuarters: number;
4
+ TwoThirds: number;
5
+ Half: number;
6
+ OneThird: number;
7
+ OneQuarter: number;
8
+ };
@@ -0,0 +1,4 @@
1
+ export declare const FormType: {
2
+ Simple: number;
3
+ Wizard: number;
4
+ };
@@ -3,15 +3,20 @@ export * from "./allotment-status";
3
3
  export * from "./allotment-type";
4
4
  export * from "./availability-search-type";
5
5
  export * from "./data-type";
6
+ export * from "./date-amount-type";
6
7
  export * from "./dossier-type";
7
8
  export * from "./entry-line-flag";
8
9
  export * from "./entry-line-status";
9
10
  export * from "./entry-status";
10
11
  export * from "./export-status";
12
+ export * from "./form-field-type";
13
+ export * from "./form-field-width";
14
+ export * from "./form-type";
11
15
  export * from "./gender";
12
16
  export * from "./meta-data-item-property-type";
13
17
  export * from "./meta-data-type";
14
18
  export * from "./payment-type";
19
+ export * from "./portal-qsm-type";
15
20
  export * from "./price-chart-type";
16
21
  export * from "./print-action-group";
17
22
  export * from "./requirement-type";
@@ -20,5 +25,3 @@ export * from "./sale-type";
20
25
  export * from "./service-type";
21
26
  export * from "./unit-of-measure";
22
27
  export * from "./vendor-type";
23
- export * from "./date-amount-type";
24
- export * from "./portal-qsm-type";
@@ -17,3 +17,4 @@ export * from "./portal";
17
17
  export * from "./airport";
18
18
  export * from "./website-configuration";
19
19
  export * from "./style-sheet";
20
+ export * from "./web-form";
@@ -0,0 +1,68 @@
1
+ export interface TideWebFormContext {
2
+ key: string;
3
+ identifier: string;
4
+ }
5
+ export interface TideWebForm {
6
+ type: number;
7
+ successMessage: string;
8
+ steps: WebFormStep[];
9
+ captcha: CaptchaConfig | null;
10
+ }
11
+ export interface CaptchaConfig {
12
+ provider: "recaptcha-v3" | "hcaptcha" | "turnstile";
13
+ siteKey: string;
14
+ }
15
+ export interface WebFormStep {
16
+ order: number;
17
+ name: string;
18
+ title: string;
19
+ visibilityConfiguration: string | null;
20
+ segments: WebFormSegment[];
21
+ }
22
+ export interface WebFormSegment {
23
+ order: number;
24
+ name: string;
25
+ title: string;
26
+ visibilityConfiguration: string | null;
27
+ fields: WebFormField[];
28
+ }
29
+ export interface WebFormField {
30
+ name: string;
31
+ title: string;
32
+ placeholder: string | null;
33
+ helpText: string | null;
34
+ isRequired: boolean;
35
+ isHidden: boolean;
36
+ order: number;
37
+ type: number;
38
+ width: number;
39
+ configuration: string;
40
+ visibilityConfiguration: string | null;
41
+ }
42
+ export interface WebFormSubmitRequest {
43
+ data: object;
44
+ captchaToken: string | null;
45
+ }
46
+ export interface VisibilityConfiguration {
47
+ field: string | null;
48
+ notEmpty: boolean;
49
+ isRepeating: boolean;
50
+ inFirstRepitition: boolean;
51
+ askFirst: boolean;
52
+ values: {
53
+ value: string;
54
+ }[];
55
+ }
56
+ export interface FormOptionValueConfiguration {
57
+ multiSelect: boolean;
58
+ allowOther: boolean;
59
+ values: {
60
+ order: number;
61
+ value: string;
62
+ label: string;
63
+ }[];
64
+ }
65
+ export interface InfoTextConfiguration {
66
+ text: string;
67
+ containerClass: string;
68
+ }
@@ -0,0 +1,36 @@
1
+ import {
2
+ TideClientConfig,
3
+ TideWebForm,
4
+ TideWebFormContext,
5
+ WebFormSubmitRequest,
6
+ } from "../types";
7
+ /**
8
+ * api/web/form/:id
9
+ * Retrieve a form.
10
+ * @param config
11
+ * @param request
12
+ * @param signal
13
+ * @returns TideWebForm
14
+ */
15
+ export declare const readForm: (
16
+ config: TideClientConfig,
17
+ id: number,
18
+ contexts: TideWebFormContext[],
19
+ languageCode: string,
20
+ signal?: AbortSignal | undefined
21
+ ) => Promise<TideWebForm>;
22
+ /**
23
+ * api/web/form/:id/submit
24
+ * Submits the form data
25
+ * @param config
26
+ * @param id
27
+ * @param request
28
+ * @param signal
29
+ * @returns OK on success
30
+ */
31
+ export declare const submitForm: (
32
+ config: TideClientConfig,
33
+ id: number,
34
+ request: WebFormSubmitRequest,
35
+ signal?: AbortSignal | undefined
36
+ ) => Promise<Response>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-client",
3
- "version": "1.1.178",
3
+ "version": "1.1.179",
4
4
  "description": "Frontend client for Tide",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -8,7 +8,7 @@
8
8
  "tsc": "tsc --noEmit",
9
9
  "format": "prettier --write .",
10
10
  "test": "jest",
11
- "copy": "cpx \"**/*.*\" \"../travelworld.gatsby/node_modules/@qite/tide-client\""
11
+ "copy": "cpx \"**/*.*\" \"../tide-booking-component/node_modules/@qite/tide-client\""
12
12
  },
13
13
  "repository": {
14
14
  "type": "git",
@@ -23,6 +23,9 @@
23
23
  "Bram De Cuyper <bram.de.cuyper@qite.be>",
24
24
  "Maarten Brysbaert <maarten.brysbaert@qite.be>"
25
25
  ],
26
+ "files": [
27
+ "build"
28
+ ],
26
29
  "license": "OBSD",
27
30
  "homepage": "https://bitbucket.org/qitegeneral/tide-client#readme",
28
31
  "devDependencies": {
@@ -1,6 +0,0 @@
1
- export interface AdditionalServices {
2
- luggageExtraCostPerPiece: number;
3
- luggageExtraIsPerPassenger: boolean;
4
- productCode: string;
5
- accommodationCode: string;
6
- }
@@ -1,5 +0,0 @@
1
- export interface PageResult<T> {
2
- count: number;
3
- items: T[];
4
- nextPageLink: string;
5
- }
@@ -1,10 +0,0 @@
1
- export interface Tag {
2
- id: number;
3
- name: string;
4
- tagGroupId: number;
5
- localizedNames: TagLocalization[];
6
- }
7
- export interface TagLocalization {
8
- languageCode: string;
9
- value: string;
10
- }
package/rollup.config.js DELETED
@@ -1,20 +0,0 @@
1
- import commonjs from "@rollup/plugin-commonjs";
2
- import nodeResolve from "@rollup/plugin-node-resolve";
3
- import packageJson from "./package.json";
4
- import typescript from "rollup-plugin-typescript2";
5
-
6
- export default {
7
- input: "./src/index.ts",
8
- output: [
9
- {
10
- file: packageJson.main,
11
- format: "cjs",
12
- sourcemap: true,
13
- },
14
- ],
15
- plugins: [
16
- nodeResolve(),
17
- commonjs(),
18
- typescript({ useTsconfigDeclarationDir: true }),
19
- ],
20
- };