@natch-the-storage/heathershaw-platform-types 1.2.0 → 1.3.0

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.
@@ -224,3 +224,99 @@ export interface Script {
224
224
  imageKey?: string | null;
225
225
  }
226
226
  export type ScriptCreate = Omit<Script, "id">;
227
+ export declare const apiRoutes: {
228
+ orders: {
229
+ list: string;
230
+ get: (id: number) => string;
231
+ create: string;
232
+ update: string;
233
+ delete: (id: number) => string;
234
+ };
235
+ patientRecords: {
236
+ list: string;
237
+ get: (id: number) => string;
238
+ getByUser: (userId: string) => string;
239
+ create: string;
240
+ update: string;
241
+ delete: (id: number) => string;
242
+ };
243
+ prescribers: {
244
+ list: string;
245
+ get: (id: number) => string;
246
+ create: string;
247
+ update: string;
248
+ delete: (id: number) => string;
249
+ };
250
+ scripts: {
251
+ list: string;
252
+ get: (id: number) => string;
253
+ create: string;
254
+ update: string;
255
+ delete: (id: number) => string;
256
+ };
257
+ products: {
258
+ list: string;
259
+ get: (id: number) => string;
260
+ create: string;
261
+ update: string;
262
+ delete: (id: number) => string;
263
+ };
264
+ quotes: {
265
+ list: string;
266
+ get: (id: number) => string;
267
+ create: string;
268
+ update: string;
269
+ delete: (id: number) => string;
270
+ };
271
+ paperScriptReminders: {
272
+ list: string;
273
+ get: (id: number) => string;
274
+ create: string;
275
+ update: string;
276
+ delete: (id: number) => string;
277
+ };
278
+ repeatReminders: {
279
+ list: string;
280
+ get: (id: number) => string;
281
+ history: (id: number) => string;
282
+ create: string;
283
+ update: string;
284
+ delete: (id: number) => string;
285
+ };
286
+ priceMatches: {
287
+ list: string;
288
+ get: (id: number) => string;
289
+ create: string;
290
+ update: string;
291
+ delete: (id: number) => string;
292
+ };
293
+ directUserProfiles: {
294
+ list: string;
295
+ get: (id: number) => string;
296
+ getByUser: (userId: string) => string;
297
+ create: string;
298
+ onboard: (userId: string) => string;
299
+ update: string;
300
+ delete: (id: number) => string;
301
+ };
302
+ partnerPharmacyProfiles: {
303
+ list: string;
304
+ get: (id: number) => string;
305
+ getByUser: (userId: string) => string;
306
+ create: string;
307
+ update: string;
308
+ delete: (id: number) => string;
309
+ };
310
+ users: {
311
+ data: (userId: string) => string;
312
+ };
313
+ uploads: {
314
+ presign: string;
315
+ delete: string;
316
+ };
317
+ sms: {
318
+ twilioStatus: string;
319
+ send: string;
320
+ };
321
+ email: {};
322
+ };
@@ -20,3 +20,99 @@ export const repeatStorageValues = [
20
20
  export const scriptTypeValues = ["eRx", "PAPER"];
21
21
  export const shippingTypeValues = ["STANDARD", "COLD_CHAIN"];
22
22
  export const hazardTagsValues = ["Hazardous", "Cytotoxic", "High-Risk"];
23
+ export const apiRoutes = {
24
+ orders: {
25
+ list: '/api/orders',
26
+ get: (id) => `/api/orders/${id}`,
27
+ create: '/api/orders',
28
+ update: '/api/orders',
29
+ delete: (id) => `/api/orders/${id}`,
30
+ },
31
+ patientRecords: {
32
+ list: '/api/patient-records',
33
+ get: (id) => `/api/patient-records/${id}`,
34
+ getByUser: (userId) => `/api/patient-records/user/${userId}`,
35
+ create: '/api/patient-records',
36
+ update: '/api/patient-records',
37
+ delete: (id) => `/api/patient-records/${id}`,
38
+ },
39
+ prescribers: {
40
+ list: '/api/prescribers',
41
+ get: (id) => `/api/prescribers/${id}`,
42
+ create: '/api/prescribers',
43
+ update: '/api/prescribers',
44
+ delete: (id) => `/api/prescribers/${id}`,
45
+ },
46
+ scripts: {
47
+ list: '/api/scripts',
48
+ get: (id) => `/api/scripts/${id}`,
49
+ create: '/api/scripts',
50
+ update: '/api/scripts',
51
+ delete: (id) => `/api/scripts/${id}`,
52
+ },
53
+ products: {
54
+ list: '/api/products',
55
+ get: (id) => `/api/products/${id}`,
56
+ create: '/api/products',
57
+ update: '/api/products',
58
+ delete: (id) => `/api/products/${id}`,
59
+ },
60
+ quotes: {
61
+ list: '/api/quotes',
62
+ get: (id) => `/api/quotes/${id}`,
63
+ create: '/api/quotes',
64
+ update: '/api/quotes',
65
+ delete: (id) => `/api/quotes/${id}`,
66
+ },
67
+ paperScriptReminders: {
68
+ list: '/api/paper-script-reminders',
69
+ get: (id) => `/api/paper-script-reminders/${id}`,
70
+ create: '/api/paper-script-reminders',
71
+ update: '/api/paper-script-reminders',
72
+ delete: (id) => `/api/paper-script-reminders/${id}`,
73
+ },
74
+ repeatReminders: {
75
+ list: '/api/reminders/repeats',
76
+ get: (id) => `/api/reminders/repeats/${id}`,
77
+ history: (id) => `/api/reminders/repeats/${id}/history`,
78
+ create: '/api/reminders/repeats',
79
+ update: '/api/reminders/repeats',
80
+ delete: (id) => `/api/reminders/repeats/${id}`,
81
+ },
82
+ priceMatches: {
83
+ list: '/api/price-matches',
84
+ get: (id) => `/api/price-matches/${id}`,
85
+ create: '/api/price-matches',
86
+ update: '/api/price-matches',
87
+ delete: (id) => `/api/price-matches/${id}`,
88
+ },
89
+ directUserProfiles: {
90
+ list: '/api/profiles/direct-users',
91
+ get: (id) => `/api/profiles/direct-users/${id}`,
92
+ getByUser: (userId) => `/api/profiles/direct-users/user/${userId}`,
93
+ create: '/api/profiles/direct-users',
94
+ onboard: (userId) => `/api/profiles/direct-users/${userId}`,
95
+ update: '/api/profiles/direct-users',
96
+ delete: (id) => `/api/profiles/direct-users/${id}`,
97
+ },
98
+ partnerPharmacyProfiles: {
99
+ list: '/api/profiles/partner-pharmacies',
100
+ get: (id) => `/api/profiles/partner-pharmacies/${id}`,
101
+ getByUser: (userId) => `/api/profiles/partner-pharmacies/user/${userId}`,
102
+ create: '/api/profiles/partner-pharmacies',
103
+ update: '/api/profiles/partner-pharmacies',
104
+ delete: (id) => `/api/profiles/partner-pharmacies/${id}`,
105
+ },
106
+ users: {
107
+ data: (userId) => `/api/users/data/${userId}`,
108
+ },
109
+ uploads: {
110
+ presign: '/api/uploads/presign',
111
+ delete: '/api/uploads',
112
+ },
113
+ sms: {
114
+ twilioStatus: '/api/webhooks/twilio/status',
115
+ send: '/api/reminders/sms',
116
+ },
117
+ email: {},
118
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@natch-the-storage/heathershaw-platform-types",
3
- "version": "1.2.0",
4
- "description": "Validation and interfaces to use on the client",
3
+ "version": "1.3.0",
4
+ "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",
7
7
  "type": "module",
@@ -17,7 +17,8 @@
17
17
  "build"
18
18
  ],
19
19
  "scripts": {
20
- "build": "tsc"
20
+ "build": "tsc",
21
+ "publish": "npm run build && npm publish --access public"
21
22
  },
22
23
  "devDependencies": {
23
24
  "typescript": "^6.0.3"