@pexip-engage-public/plugin-events
Advanced tools
Comparing version 1.0.30-canary-20231025140910 to 1.0.30
# @pexip-engage-public/plugin-events | ||
## 1.0.30-canary-20231025140910 | ||
## 1.0.30 | ||
### Patch Changes | ||
- c49c5a4aa: SKED-11604: plugin-instance-hooks | ||
- Updated dependencies [d5413de87] | ||
- @pexip-engage-public/plugin-state@1.2.2-canary-20231025140910 | ||
- @pexip-engage-public/plugin-state@1.2.2 | ||
- @pexip-engage-public/plugin-configuration@1.2.0 | ||
@@ -10,0 +11,0 @@ - skedify-types@0.5.0 |
{ | ||
"name": "@pexip-engage-public/plugin-events", | ||
"version": "1.0.30-canary-20231025140910", | ||
"version": "1.0.30", | ||
"homepage": "https://github.com/skedify/frontend-mono/tree/develop/apps/plugin-remix/packages/plugin-events#readme", | ||
@@ -36,3 +36,3 @@ "bugs": { | ||
"@pexip-engage-public/plugin-configuration": "1.2.0", | ||
"@pexip-engage-public/plugin-state": "1.2.2-canary-20231025140910", | ||
"@pexip-engage-public/plugin-state": "1.2.2", | ||
"skedify-types": "0.5.0" | ||
@@ -43,3 +43,3 @@ }, | ||
"@pexip-engage/tsconfig": "0.0.9", | ||
"eslint-config-pexip-engage": "0.0.41-canary-20231025140910" | ||
"eslint-config-pexip-engage": "0.0.41" | ||
}, | ||
@@ -46,0 +46,0 @@ "volta": { |
@@ -22,3 +22,3 @@ import type { PluginState } from "@pexip-engage-public/plugin-state"; | ||
export const RequestEvent = { | ||
REQUEST_METADATA: "REQUEST_METADATA", | ||
PRE_APPOINTMENT_REQUEST: "PRE_APPOINTMENT_REQUEST", | ||
REQUEST_GEOLOCATION: "REQUEST_GEOLOCATION", | ||
@@ -65,3 +65,3 @@ REQUEST_ORIGIN_URL: "REQUEST_ORIGIN_URL", | ||
| PluginEventMessage | ||
| RequestEventMessage; | ||
| RequestEventMessage<RequestEvent>; | ||
@@ -101,8 +101,9 @@ export interface StateUpdateMessage { | ||
export interface RequestEventMessage { | ||
type: RequestEvent; | ||
export interface RequestEventMessage<T extends RequestEvent> { | ||
type: T; | ||
payload: IFrameRequestPayloadMap[T]; | ||
} | ||
export type IFrameObjectMessage = | ||
| MetadataResponseMessage | ||
| PreAppointmentRequestResponseMessage | ||
| GeolocationResponseMessage | ||
@@ -113,4 +114,12 @@ | CssVarUpdateResponseMessage | ||
export interface IFrameRequestPayloadMap { | ||
[RequestEvent.PRE_APPOINTMENT_REQUEST]: PreAppointmentRequestPayload; | ||
[RequestEvent.REQUEST_GEOLOCATION]: null; | ||
[RequestEvent.REQUEST_ORIGIN_URL]: null; | ||
[RequestEvent.CSS_VAR_UPDATE]: null; | ||
[RequestEvent.CUSTOM_CSS_UPDATE]: null; | ||
} | ||
export interface IFrameResponseMap { | ||
[RequestEvent.REQUEST_METADATA]: MetadataResponseMessage["payload"]; | ||
[RequestEvent.PRE_APPOINTMENT_REQUEST]: PreAppointmentRequestResponseMessage["payload"]; | ||
[RequestEvent.REQUEST_GEOLOCATION]: GeolocationResponseMessage["payload"]; | ||
@@ -122,5 +131,5 @@ [RequestEvent.REQUEST_ORIGIN_URL]: OriginResponseMessage["payload"]; | ||
export interface MetadataResponseMessage { | ||
type: (typeof RequestEvent)["REQUEST_METADATA"]; | ||
payload: Record<string, unknown> | null; | ||
export interface PreAppointmentRequestResponseMessage { | ||
type: (typeof RequestEvent)["PRE_APPOINTMENT_REQUEST"]; | ||
payload: { meta: Record<string, unknown> }; | ||
} | ||
@@ -147,1 +156,41 @@ | ||
} | ||
export interface PreAppointmentRequestPayload { | ||
employee?: { externalId?: string; firstName?: string; lastName?: string }; | ||
meetingType: "office" | "phone" | "video" | "on_location"; | ||
office: { externalId?: string; title: string }; | ||
subject: { externalId?: string; title: string }; | ||
customer: { externalId?: string; firstName?: string; lastName?: string }; | ||
questions: ReadonlyArray<{ | ||
label: string; | ||
externalId?: string; | ||
answer: | ||
| { | ||
type: Exclude<NextGenQuestionInputType, "SELECT" | "MULTI_SELECT">; | ||
value?: string; | ||
} | ||
| { | ||
type: Extract<NextGenQuestionInputType, "SELECT" | "MULTI_SELECT">; | ||
selectedAnswerOptions: ReadonlyArray<{ | ||
externalId?: string; | ||
value?: string; | ||
label: string; | ||
}>; | ||
}; | ||
}>; | ||
} | ||
export type NextGenQuestionInputType = | ||
| "ADDRESS" | ||
| "BOOLEAN" | ||
| "DATE" | ||
| "DATE_TIME" | ||
| "EMAIL" | ||
| "FETCH" | ||
| "LONG_TEXT" | ||
| "MULTI_SELECT" | ||
| "NUMBER" | ||
| "PHONE" | ||
| "SELECT" | ||
| "SHORT_TEXT" | ||
| "URL"; |
@@ -18,3 +18,3 @@ import type { PluginState } from "@pexip-engage-public/plugin-state"; | ||
export declare const RequestEvent: { | ||
readonly REQUEST_METADATA: "REQUEST_METADATA"; | ||
readonly PRE_APPOINTMENT_REQUEST: "PRE_APPOINTMENT_REQUEST"; | ||
readonly REQUEST_GEOLOCATION: "REQUEST_GEOLOCATION"; | ||
@@ -50,3 +50,3 @@ readonly REQUEST_ORIGIN_URL: "REQUEST_ORIGIN_URL"; | ||
export type PluginError = ValueOf<typeof PluginError>; | ||
export type IFrameMessage = StateUpdateMessage | StepShownMessage | PluginMisconfiguredMessage | PluginEventMessage | RequestEventMessage; | ||
export type IFrameMessage = StateUpdateMessage | StepShownMessage | PluginMisconfiguredMessage | PluginEventMessage | RequestEventMessage<RequestEvent>; | ||
export interface StateUpdateMessage { | ||
@@ -86,8 +86,16 @@ type: "STATE_UPDATE"; | ||
} | ||
export interface RequestEventMessage { | ||
type: RequestEvent; | ||
export interface RequestEventMessage<T extends RequestEvent> { | ||
type: T; | ||
payload: IFrameRequestPayloadMap[T]; | ||
} | ||
export type IFrameObjectMessage = MetadataResponseMessage | GeolocationResponseMessage | CssVarUpdateResponseMessage | OriginResponseMessage | CustomCssUpdateResponseMessage; | ||
export type IFrameObjectMessage = PreAppointmentRequestResponseMessage | GeolocationResponseMessage | CssVarUpdateResponseMessage | OriginResponseMessage | CustomCssUpdateResponseMessage; | ||
export interface IFrameRequestPayloadMap { | ||
[RequestEvent.PRE_APPOINTMENT_REQUEST]: PreAppointmentRequestPayload; | ||
[RequestEvent.REQUEST_GEOLOCATION]: null; | ||
[RequestEvent.REQUEST_ORIGIN_URL]: null; | ||
[RequestEvent.CSS_VAR_UPDATE]: null; | ||
[RequestEvent.CUSTOM_CSS_UPDATE]: null; | ||
} | ||
export interface IFrameResponseMap { | ||
[RequestEvent.REQUEST_METADATA]: MetadataResponseMessage["payload"]; | ||
[RequestEvent.PRE_APPOINTMENT_REQUEST]: PreAppointmentRequestResponseMessage["payload"]; | ||
[RequestEvent.REQUEST_GEOLOCATION]: GeolocationResponseMessage["payload"]; | ||
@@ -98,5 +106,7 @@ [RequestEvent.REQUEST_ORIGIN_URL]: OriginResponseMessage["payload"]; | ||
} | ||
export interface MetadataResponseMessage { | ||
type: (typeof RequestEvent)["REQUEST_METADATA"]; | ||
payload: Record<string, unknown> | null; | ||
export interface PreAppointmentRequestResponseMessage { | ||
type: (typeof RequestEvent)["PRE_APPOINTMENT_REQUEST"]; | ||
payload: { | ||
meta: Record<string, unknown>; | ||
}; | ||
} | ||
@@ -128,2 +138,39 @@ export interface GeolocationResponseMessage { | ||
} | ||
export interface PreAppointmentRequestPayload { | ||
employee?: { | ||
externalId?: string; | ||
firstName?: string; | ||
lastName?: string; | ||
}; | ||
meetingType: "office" | "phone" | "video" | "on_location"; | ||
office: { | ||
externalId?: string; | ||
title: string; | ||
}; | ||
subject: { | ||
externalId?: string; | ||
title: string; | ||
}; | ||
customer: { | ||
externalId?: string; | ||
firstName?: string; | ||
lastName?: string; | ||
}; | ||
questions: ReadonlyArray<{ | ||
label: string; | ||
externalId?: string; | ||
answer: { | ||
type: Exclude<NextGenQuestionInputType, "SELECT" | "MULTI_SELECT">; | ||
value?: string; | ||
} | { | ||
type: Extract<NextGenQuestionInputType, "SELECT" | "MULTI_SELECT">; | ||
selectedAnswerOptions: ReadonlyArray<{ | ||
externalId?: string; | ||
value?: string; | ||
label: string; | ||
}>; | ||
}; | ||
}>; | ||
} | ||
export type NextGenQuestionInputType = "ADDRESS" | "BOOLEAN" | "DATE" | "DATE_TIME" | "EMAIL" | "FETCH" | "LONG_TEXT" | "MULTI_SELECT" | "NUMBER" | "PHONE" | "SELECT" | "SHORT_TEXT" | "URL"; | ||
//# sourceMappingURL=event-types.d.ts.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
65854
680
1
+ Added@pexip-engage-public/plugin-state@1.2.2(transitive)
- Removed@pexip-engage-public/plugin-state@1.2.2-canary-20231025140910(transitive)