@star-insure/sdk 6.0.0 → 6.0.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
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@star-insure/sdk",
|
|
3
3
|
"description": "The SDK for Star Insure client apps with shared helper functions and TypeScript definitions.",
|
|
4
4
|
"author": "alexclark_nz",
|
|
5
|
-
"version": "6.0.
|
|
5
|
+
"version": "6.0.2",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Basic types that can be directly converted to FormData
|
|
2
|
+
type FormDataPrimitive = string | number | boolean | null | undefined | File | Blob | Date;
|
|
3
|
+
|
|
4
|
+
type FormDataArray = FormDataConvertible[];
|
|
5
|
+
|
|
6
|
+
// Type to handle nested objects
|
|
7
|
+
type FormDataObject = { [key: string]: FormDataConvertible };
|
|
8
|
+
|
|
9
|
+
// Union of all possible types that can be converted to FormData
|
|
10
|
+
type FormDataConvertible = FormDataPrimitive | FormDataArray | FormDataObject;
|
|
11
|
+
|
|
12
|
+
// Helper type to make any type compatible with FormData used in the Inertia JS `useForm()` function
|
|
13
|
+
export type FormDataCompatible<T> = T extends FormDataConvertible
|
|
14
|
+
? T
|
|
15
|
+
: T extends object
|
|
16
|
+
? {
|
|
17
|
+
[K in keyof T]: T[K] extends (infer U)[] ? FormDataCompatible<U>[] : FormDataCompatible<T[K]>;
|
|
18
|
+
}
|
|
19
|
+
: FormDataConvertible;
|
package/src/types/misc/index.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { StreetAddress } from "./StreetAddress";
|
|
|
14
14
|
|
|
15
15
|
export type QuoteRequestStatus = 'new' | 'draft' | 'in-progress' | 'with-customer' | 'sold' | 'bound' | 'customer-modified' | 'closed';
|
|
16
16
|
|
|
17
|
-
export type QuoteRequestSource = 'web' | 'phone' | 'show' | 'existing-customer' | 'mighway' | 'agent' | 'broker' | 'entry-form' | 'bularangi';
|
|
17
|
+
export type QuoteRequestSource = 'web' | 'phone' | 'show' | 'existing-customer' | 'mighway' | 'agent' | 'broker' | 'entry-form' | 'bularangi' | 'eric-t';
|
|
18
18
|
|
|
19
19
|
export type QuoteRequestAutomatch = 'quote' | 'email' | 'registration' | 'duplicate';
|
|
20
20
|
|