@patientprism/snippet-sdk 1.1.23 → 1.1.24

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.
Files changed (2) hide show
  1. package/package.json +2 -1
  2. package/types/index.d.ts +21 -0
package/package.json CHANGED
@@ -2,12 +2,13 @@
2
2
  "name": "@patientprism/snippet-sdk",
3
3
  "type": "module",
4
4
  "types": "types/index.d.ts",
5
- "version": "1.1.23",
5
+ "version": "1.1.24",
6
6
  "scripts": {
7
7
  "test": "vitest run",
8
8
  "test:watch": "vitest watch",
9
9
  "dev": "vite dev",
10
10
  "build": "vite build",
11
+ "build:webchat": "vite build --config ./vite.webchat.config.js",
11
12
  "build:types": "sh ./build-type-declarations.sh"
12
13
  },
13
14
  "files": [
package/types/index.d.ts CHANGED
@@ -41,6 +41,13 @@
41
41
  *
42
42
  * @property {(keys?: string|string[]|Set<string>) => Promise<void>} recapture Recapture some or all of the custom fields.
43
43
  */
44
+ /**
45
+ * @typedef {Object} WebChatSDK
46
+ *
47
+ * Object containing methods related to WebChat functionality.
48
+ *
49
+ * @property {() => Promise<Object|null>} getLocations Fetch locations available for web chat.
50
+ */
44
51
  /**
45
52
  * @typedef {Object} BookingSDK
46
53
  *
@@ -61,6 +68,7 @@
61
68
  * @property {SubmissionSDK} submission Object containing methods related to Submission functionality.
62
69
  * @property {CustomFieldSDK} custom_fields Object containing methods related to the Custom Field functionality.
63
70
  * @property {BookingSDK} bookings Object containing methods related to Online Booking functionality.
71
+ * @property {WebChatSDK} webchat Object containing methods related to WebChat functionality.
64
72
  */
65
73
  export default function handle(): void;
66
74
  export type SubmissionField = {
@@ -105,6 +113,15 @@ export type CustomFieldSDK = {
105
113
  */
106
114
  recapture: (keys?: string | string[] | Set<string>) => Promise<void>;
107
115
  };
116
+ /**
117
+ * Object containing methods related to WebChat functionality.
118
+ */
119
+ export type WebChatSDK = {
120
+ /**
121
+ * Fetch locations available for web chat.
122
+ */
123
+ getLocations: () => Promise<any | null>;
124
+ };
108
125
  /**
109
126
  * Object containing methods related to Online Booking functionality.
110
127
  */
@@ -150,6 +167,10 @@ export type PrismSDK = {
150
167
  * Object containing methods related to Online Booking functionality.
151
168
  */
152
169
  bookings: BookingSDK;
170
+ /**
171
+ * Object containing methods related to WebChat functionality.
172
+ */
173
+ webchat: WebChatSDK;
153
174
  };
154
175
 
155
176
  declare global {