@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.
- package/build/index.d.ts +1 -0
- package/build/index.js +166 -97
- package/build/index.js.map +1 -1
- package/build/types/booking-v2/request/booking-package-search-request.d.ts +1 -0
- package/build/types/enums/form-field-type.d.ts +12 -0
- package/build/types/enums/form-field-width.d.ts +8 -0
- package/build/types/enums/form-type.d.ts +4 -0
- package/build/types/enums/index.d.ts +5 -2
- package/build/types/web/index.d.ts +1 -0
- package/build/types/web/web-form.d.ts +68 -0
- package/build/utils/web-form.d.ts +36 -0
- package/package.json +5 -2
- package/build/types/offer/additional-services.d.ts +0 -6
- package/build/types/offer/page-result.d.ts +0 -5
- package/build/types/web/tag.d.ts +0 -10
- package/rollup.config.js +0 -20
|
@@ -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";
|
|
@@ -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.
|
|
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 \"**/*.*\" \"../
|
|
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": {
|
package/build/types/web/tag.d.ts
DELETED
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
|
-
};
|