@patientprism/snippet-sdk 1.1.0 → 1.1.2
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/package.json +4 -1
- package/types/index.d.ts +26 -0
- package/package.json.backup +0 -26
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@patientprism/snippet-sdk",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"types": "types/index.d.ts",
|
|
5
|
-
"version": "1.1.
|
|
5
|
+
"version": "1.1.2",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "vitest run",
|
|
8
8
|
"test:watch": "vitest watch",
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
"build": "vite build",
|
|
11
11
|
"build:types": "sh ./build-type-declarations.sh"
|
|
12
12
|
},
|
|
13
|
+
"files": [
|
|
14
|
+
"types/"
|
|
15
|
+
],
|
|
13
16
|
"dependencies": {},
|
|
14
17
|
"devDependencies": {}
|
|
15
18
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -41,6 +41,14 @@
|
|
|
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} BookingSDK
|
|
46
|
+
*
|
|
47
|
+
* Object containing methods related to Online Booking functionality.
|
|
48
|
+
*
|
|
49
|
+
* @property {(source: string, options?: Object) => Object} create Create a booking session
|
|
50
|
+
* @property {(formElement: HTMLElement, source: string, options?: Object) => Object} track Track a form for booking lifecycle (convenience method)
|
|
51
|
+
*/
|
|
44
52
|
/**
|
|
45
53
|
* @typedef {Object} PrismSDK
|
|
46
54
|
*
|
|
@@ -52,6 +60,7 @@
|
|
|
52
60
|
* @property {SwapSDK} swap Object containing methods related to Swap functionality.
|
|
53
61
|
* @property {SubmissionSDK} submission Object containing methods related to Submission functionality.
|
|
54
62
|
* @property {CustomFieldSDK} custom_fields Object containing methods related to the Custom Field functionality.
|
|
63
|
+
* @property {BookingSDK} bookings Object containing methods related to Online Booking functionality.
|
|
55
64
|
*/
|
|
56
65
|
export default function handle(): void;
|
|
57
66
|
export type SubmissionField = {
|
|
@@ -96,6 +105,19 @@ export type CustomFieldSDK = {
|
|
|
96
105
|
*/
|
|
97
106
|
recapture: (keys?: string | string[] | Set<string>) => Promise<void>;
|
|
98
107
|
};
|
|
108
|
+
/**
|
|
109
|
+
* Object containing methods related to Online Booking functionality.
|
|
110
|
+
*/
|
|
111
|
+
export type BookingSDK = {
|
|
112
|
+
/**
|
|
113
|
+
* Create a booking session
|
|
114
|
+
*/
|
|
115
|
+
create: (source: string, options?: any) => any;
|
|
116
|
+
/**
|
|
117
|
+
* Track a form for booking lifecycle (convenience method)
|
|
118
|
+
*/
|
|
119
|
+
track: (formElement: HTMLElement, source: string, options?: any) => any;
|
|
120
|
+
};
|
|
99
121
|
/**
|
|
100
122
|
* The global `$prism` object for managing Prism-related functionality.
|
|
101
123
|
*/
|
|
@@ -124,6 +146,10 @@ export type PrismSDK = {
|
|
|
124
146
|
* Object containing methods related to the Custom Field functionality.
|
|
125
147
|
*/
|
|
126
148
|
custom_fields: CustomFieldSDK;
|
|
149
|
+
/**
|
|
150
|
+
* Object containing methods related to Online Booking functionality.
|
|
151
|
+
*/
|
|
152
|
+
bookings: BookingSDK;
|
|
127
153
|
};
|
|
128
154
|
|
|
129
155
|
declare global {
|
package/package.json.backup
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@patientprism/snippet-sdk",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"types": "types/index.d.ts",
|
|
5
|
-
"version": "1.1.0",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "vitest run",
|
|
8
|
-
"test:watch": "vitest watch",
|
|
9
|
-
"dev": "vite dev",
|
|
10
|
-
"build": "vite build",
|
|
11
|
-
"build:types": "sh ./build-type-declarations.sh"
|
|
12
|
-
},
|
|
13
|
-
"dependencies": {
|
|
14
|
-
"collect.js": "^4.36.1",
|
|
15
|
-
"js-cookie": "^3.0.5",
|
|
16
|
-
"jsdom": "^23.0.1",
|
|
17
|
-
"libphonenumber-js": "^1.10.51",
|
|
18
|
-
"vite": "^7.1.5",
|
|
19
|
-
"vitest": "^3.2.4",
|
|
20
|
-
"ziggy-js": "^2.5.0"
|
|
21
|
-
},
|
|
22
|
-
"devDependencies": {
|
|
23
|
-
"json": "^11.0.0",
|
|
24
|
-
"typescript": "^5.5.4"
|
|
25
|
-
}
|
|
26
|
-
}
|