Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pexip-engage-public/plugin-events

Package Overview
Dependencies
Maintainers
1
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pexip-engage-public/plugin-events - npm Package Compare versions

Comparing version 1.0.30-canary-20231025140910 to 1.0.30

5

CHANGELOG.md
# @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

6

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc