@natch-the-storage/heathershaw-platform-types 1.3.2 → 1.3.3

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/README.md +51 -14
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -10,26 +10,67 @@ npm install @natch-the-storage/heathershaw-platform-types
10
10
 
11
11
  ## Usage
12
12
 
13
- ### TypeScript types
13
+ ### Interfaces
14
+
15
+ Each domain object has a base interface (with `id`) and a `Create` variant (base minus `id`):
14
16
 
15
17
  ```ts
16
- import type { CreateOrderBody, Address, ScriptSelect } from "@natch-the-storage/heathershaw-platform-types";
18
+ import type {
19
+ // Domain objects
20
+ DirectUserProfile, DirectUserProfileCreate,
21
+ Order, OrderCreate,
22
+ PaperScriptReminder, PaperScriptReminderCreate,
23
+ PartnerPharmacyProfile, PartnerPharmacyProfileCreate,
24
+ PatientRecord, PatientRecordCreate,
25
+ Prescriber, PrescriberCreate,
26
+ PriceMatch, PriceMatchCreate,
27
+ Product, ProductCreate,
28
+ Quote, QuoteCreate,
29
+ RepeatReminder, RepeatReminderCreate,
30
+ Script, ScriptCreate,
31
+
32
+ // Shared sub-types
33
+ Address, HealthInfo, PrescriberSelect, ScriptSelect, OrderSelect,
34
+
35
+ // Query / utility types
36
+ GetById, GetAll, GetPatientRecordsQuery, DevEmail, Sms,
37
+ } from "@natch-the-storage/heathershaw-platform-types";
17
38
  ```
18
39
 
19
40
  ### Enum value arrays
20
41
 
21
- The raw value arrays are exported for use in UI components (e.g. populating a select):
42
+ Raw arrays for populating selects and similar UI components:
22
43
 
23
44
  ```ts
24
- import { shippingTypeValues } from "@natch-the-storage/heathershaw-platform-types";
25
- // ["STANDARD", "COLD_CHAIN"]
45
+ import {
46
+ paperScriptReminderStatusValues,
47
+ quoteStatusValues,
48
+ paymentModeAtOrderValues,
49
+ paymentStatusValues,
50
+ productCategoryValues,
51
+ repeatStorageValues,
52
+ scriptTypeValues,
53
+ shippingTypeValues,
54
+ hazardTagsValues,
55
+ } from "@natch-the-storage/heathershaw-platform-types";
26
56
  ```
27
57
 
28
- Each array also has a matching union type:
58
+ ### Enum union types
59
+
60
+ Each array has a matching union type:
29
61
 
30
62
  ```ts
31
- import type { ShippingType } from "@natch-the-storage/heathershaw-platform-types";
32
- // "STANDARD" | "COLD_CHAIN"
63
+ import type {
64
+ PaperScriptReminderStatus,
65
+ QuoteStatus,
66
+ PaymentModeAtOrder,
67
+ PaymentStatus,
68
+ ProductCategory,
69
+ RepeatStorage,
70
+ ScriptType,
71
+ ShippingType,
72
+ HazardTag,
73
+ } from "@natch-the-storage/heathershaw-platform-types";
33
74
  ```
34
75
 
35
76
  ## Notes
@@ -39,13 +80,9 @@ import type { ShippingType } from "@natch-the-storage/heathershaw-platform-types
39
80
  ## Publishing to npm
40
81
 
41
82
  1. Bump the version in `package.json`
42
- 2. Build the output:
43
- ```bash
44
- npm run build
45
- ```
46
- 3. Publish:
83
+ 2. Build and publish:
47
84
  ```bash
48
- npm publish --access public
85
+ npm run publish
49
86
  ```
50
87
 
51
88
  > You must be logged in (`npm login`) and have publish access to the `@natch-the-storage` scope.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natch-the-storage/heathershaw-platform-types",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",