@pexip-engage-public/plugin 1.0.42 → 1.0.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.
- package/CHANGELOG.md +20 -0
- package/dist/configuration/PluginConfiguration.schema.d.ts +4 -3
- package/dist/configuration/PluginConfiguration.schema.d.ts.map +1 -1
- package/dist/configuration/PluginConfiguration.schema.js +5 -4
- package/dist/configuration/PluginConfiguration.schema.js.map +1 -1
- package/dist/state/PluginState.schema.d.ts +5 -5
- package/package.json +4 -4
- package/src/configuration/PluginConfiguration.schema.ts +8 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @pexip-engage-public/plugin
|
|
2
2
|
|
|
3
|
+
## 1.0.44
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5925482: chore(deps): update all non-major dependencies
|
|
8
|
+
- aff3a3b: bug: easen meeting type configuration parsing to allow bare meeting type strings
|
|
9
|
+
|
|
10
|
+
Sentry ref: https://skedify.sentry.io/issues/5384930803/
|
|
11
|
+
|
|
12
|
+
- Updated dependencies [5925482]
|
|
13
|
+
- @pexip-engage-public/graphql@1.0.29
|
|
14
|
+
|
|
15
|
+
## 1.0.43
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 379784a: chore(deps): update all non-major dependencies
|
|
20
|
+
- Updated dependencies [379784a]
|
|
21
|
+
- @pexip-engage-public/graphql@1.0.28
|
|
22
|
+
|
|
3
23
|
## 1.0.42
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import type { MeetingType } from "@pexip-engage-public/graphql";
|
|
2
3
|
/**
|
|
3
4
|
* A sequence of characters that indicates the order of steps to be shown. The following characters are supported:
|
|
4
5
|
* - `S`: Subject. The step that allows the customer to pick a subject.
|
|
@@ -219,7 +220,7 @@ export declare const PluginConfigurationSchema: z.ZodDefault<z.ZodObject<{
|
|
|
219
220
|
}>>;
|
|
220
221
|
/** @deprecated Only use me during application init! */
|
|
221
222
|
initialFormattedAddress: z.ZodOptional<z.ZodString>;
|
|
222
|
-
meetingTypes: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.
|
|
223
|
+
meetingTypes: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>, string[], string | string[] | null | undefined>, MeetingType[], string | string[] | null | undefined>;
|
|
223
224
|
oauth: z.ZodDefault<z.ZodObject<{
|
|
224
225
|
/** A resource_code of an existing appointment. This will allow you to complete or change an appointment. This parameter is mostly used by redirects from external sources (e.g. e-mails) and should usually not be provided manually. */
|
|
225
226
|
resourceCode: z.ZodOptional<z.ZodString>;
|
|
@@ -351,7 +352,7 @@ export declare const PluginConfigurationSchema: z.ZodDefault<z.ZodObject<{
|
|
|
351
352
|
type: "id" | "code";
|
|
352
353
|
id?: string | undefined;
|
|
353
354
|
};
|
|
354
|
-
meetingTypes:
|
|
355
|
+
meetingTypes: MeetingType[];
|
|
355
356
|
oauth: {
|
|
356
357
|
resourceCode?: string | undefined;
|
|
357
358
|
};
|
|
@@ -468,7 +469,7 @@ export declare const PluginConfigurationSchema: z.ZodDefault<z.ZodObject<{
|
|
|
468
469
|
type?: "id" | "code" | undefined;
|
|
469
470
|
} | undefined;
|
|
470
471
|
initialFormattedAddress?: string | undefined;
|
|
471
|
-
meetingTypes?:
|
|
472
|
+
meetingTypes?: string | string[] | null | undefined;
|
|
472
473
|
oauth?: {
|
|
473
474
|
resourceCode?: string | undefined;
|
|
474
475
|
} | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginConfiguration.schema.d.ts","sourceRoot":"","sources":["../../src/configuration/PluginConfiguration.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"PluginConfiguration.schema.d.ts","sourceRoot":"","sources":["../../src/configuration/PluginConfiguration.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAchE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,UAAU,2BAAmC,CAAC;AAQ3D,eAAO,MAAM,yBAAyB;;;;IAKlC;;;;;;OAMG;;;;;;;;;;;;;QAQC;;;;WAIG;;QAEH;;;;WAIG;;QAEH;;;;WAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYP,8FAA8F;IAC9F,uDAAuD;;;;;;;;;;;IAEvD,uDAAuD;;;;;;;;;;;IAEvD,uDAAuD;;;;QAKnD,yOAAyO;;;;;;;;;;;;;;;;;IAK7O;;;;OAIG;;;QAIC,gHAAgH;;QAEhH,uCAAuC;;QAEvC,oDAAoD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYxD;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGO,CAAC"}
|
|
@@ -24,6 +24,10 @@ import { util, CustomerFormSchema, IdTypeSchema, IntentSchema, LeadSegmentTypeSc
|
|
|
24
24
|
* @default "SMOTQC"
|
|
25
25
|
*/
|
|
26
26
|
export const FlowSchema = z.string().default(DEFAULT_FLOW);
|
|
27
|
+
function isMeetingType(meetingType) {
|
|
28
|
+
const uppercased = meetingType.toUpperCase();
|
|
29
|
+
return MeetingTypeSchema.options.includes(uppercased);
|
|
30
|
+
}
|
|
27
31
|
export const PluginConfigurationSchema = z
|
|
28
32
|
.object({
|
|
29
33
|
version: z.enum(["1.0.0"]).optional(),
|
|
@@ -78,10 +82,7 @@ export const PluginConfigurationSchema = z
|
|
|
78
82
|
listing: z.object({ id: util.coerced.string, type: IdTypeSchema }).default({}),
|
|
79
83
|
/** @deprecated Only use me during application init! */
|
|
80
84
|
initialFormattedAddress: z.string().optional(),
|
|
81
|
-
meetingTypes:
|
|
82
|
-
.union([MeetingTypeSchema, MeetingTypeSchema.array()])
|
|
83
|
-
.optional()
|
|
84
|
-
.transform((val) => valueToArray(val) ?? []),
|
|
85
|
+
meetingTypes: util.coerced.array.transform((val) => val.filter(isMeetingType)),
|
|
85
86
|
oauth: z
|
|
86
87
|
.object({
|
|
87
88
|
/** A resource_code of an existing appointment. This will allow you to complete or change an appointment. This parameter is mostly used by redirects from external sources (e.g. e-mails) and should usually not be provided manually. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginConfiguration.schema.js","sourceRoot":"","sources":["../../src/configuration/PluginConfiguration.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"PluginConfiguration.schema.js","sourceRoot":"","sources":["../../src/configuration/PluginConfiguration.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EACL,IAAI,EACJ,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,IAAI,EACJ,YAAY,GACb,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;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AAE,CAAC,CAAC"}
|
|
@@ -403,7 +403,7 @@ export declare const PluginStateSchema: z.ZodObject<{
|
|
|
403
403
|
type?: "id" | "externalId" | undefined;
|
|
404
404
|
}>>;
|
|
405
405
|
initialFormattedAddress: z.ZodOptional<z.ZodString>;
|
|
406
|
-
meetingTypes: z.ZodEffects<z.ZodOptional<z.ZodUnion<[z.
|
|
406
|
+
meetingTypes: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>, string[], string | string[] | null | undefined>, import("@pexip-engage-public/graphql").MeetingType[], string | string[] | null | undefined>;
|
|
407
407
|
oauth: z.ZodDefault<z.ZodObject<{
|
|
408
408
|
resourceCode: z.ZodOptional<z.ZodString>;
|
|
409
409
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -521,7 +521,7 @@ export declare const PluginStateSchema: z.ZodObject<{
|
|
|
521
521
|
type: "id" | "code";
|
|
522
522
|
id?: string | undefined;
|
|
523
523
|
};
|
|
524
|
-
meetingTypes: ("
|
|
524
|
+
meetingTypes: import("@pexip-engage-public/graphql").MeetingType[];
|
|
525
525
|
oauth: {
|
|
526
526
|
resourceCode?: string | undefined;
|
|
527
527
|
};
|
|
@@ -638,7 +638,7 @@ export declare const PluginStateSchema: z.ZodObject<{
|
|
|
638
638
|
type?: "id" | "code" | undefined;
|
|
639
639
|
} | undefined;
|
|
640
640
|
initialFormattedAddress?: string | undefined;
|
|
641
|
-
meetingTypes?:
|
|
641
|
+
meetingTypes?: string | string[] | null | undefined;
|
|
642
642
|
oauth?: {
|
|
643
643
|
resourceCode?: string | undefined;
|
|
644
644
|
} | undefined;
|
|
@@ -706,7 +706,7 @@ export declare const PluginStateSchema: z.ZodObject<{
|
|
|
706
706
|
type: "id" | "code";
|
|
707
707
|
id?: string | undefined;
|
|
708
708
|
};
|
|
709
|
-
meetingTypes: ("
|
|
709
|
+
meetingTypes: import("@pexip-engage-public/graphql").MeetingType[];
|
|
710
710
|
oauth: {
|
|
711
711
|
resourceCode?: string | undefined;
|
|
712
712
|
};
|
|
@@ -897,7 +897,7 @@ export declare const PluginStateSchema: z.ZodObject<{
|
|
|
897
897
|
type?: "id" | "code" | undefined;
|
|
898
898
|
} | undefined;
|
|
899
899
|
initialFormattedAddress?: string | undefined;
|
|
900
|
-
meetingTypes?:
|
|
900
|
+
meetingTypes?: string | string[] | null | undefined;
|
|
901
901
|
oauth?: {
|
|
902
902
|
resourceCode?: string | undefined;
|
|
903
903
|
} | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pexip-engage-public/plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.44",
|
|
4
4
|
"homepage": "https://github.com/skedify/frontend-mono/tree/develop/apps/booking-plugin/packages/plugin-public#readme",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/skedify/frontend-mono/issues"
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"src"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"iframe-resizer": "^4.
|
|
38
|
+
"iframe-resizer": "^4.4.0",
|
|
39
39
|
"skedify-uri-encoding": "^2.1.2",
|
|
40
40
|
"zod": "^3.23.8",
|
|
41
|
-
"@pexip-engage-public/graphql": "1.0.
|
|
41
|
+
"@pexip-engage-public/graphql": "1.0.29"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@total-typescript/ts-reset": "^0.5.1",
|
|
45
|
-
"happy-dom": "^14.
|
|
45
|
+
"happy-dom": "^14.11.0",
|
|
46
46
|
"vitest": "^1.6.0",
|
|
47
47
|
"@pexip-engage/tsconfig": "0.1.1",
|
|
48
48
|
"eslint-config-pexip-engage": "0.1.18"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
|
+
import type { MeetingType } from "@pexip-engage-public/graphql";
|
|
3
4
|
import { DEFAULT_FLOW, getSupportedLng } from "../constants.js";
|
|
4
5
|
import {
|
|
5
6
|
util,
|
|
@@ -37,6 +38,12 @@ import {
|
|
|
37
38
|
*/
|
|
38
39
|
export const FlowSchema = z.string().default(DEFAULT_FLOW);
|
|
39
40
|
|
|
41
|
+
function isMeetingType(meetingType: string): meetingType is MeetingType {
|
|
42
|
+
const uppercased = meetingType.toUpperCase();
|
|
43
|
+
|
|
44
|
+
return MeetingTypeSchema.options.includes(uppercased);
|
|
45
|
+
}
|
|
46
|
+
|
|
40
47
|
export const PluginConfigurationSchema = z
|
|
41
48
|
.object({
|
|
42
49
|
version: z.enum(["1.0.0"]).optional(),
|
|
@@ -91,10 +98,7 @@ export const PluginConfigurationSchema = z
|
|
|
91
98
|
listing: z.object({ id: util.coerced.string, type: IdTypeSchema }).default({}),
|
|
92
99
|
/** @deprecated Only use me during application init! */
|
|
93
100
|
initialFormattedAddress: z.string().optional(),
|
|
94
|
-
meetingTypes:
|
|
95
|
-
.union([MeetingTypeSchema, MeetingTypeSchema.array()])
|
|
96
|
-
.optional()
|
|
97
|
-
.transform((val) => valueToArray(val) ?? []),
|
|
101
|
+
meetingTypes: util.coerced.array.transform((val) => val.filter(isMeetingType)),
|
|
98
102
|
oauth: z
|
|
99
103
|
.object({
|
|
100
104
|
/** A resource_code of an existing appointment. This will allow you to complete or change an appointment. This parameter is mostly used by redirects from external sources (e.g. e-mails) and should usually not be provided manually. */
|