@workwell-global/toolkit 1.1.44 → 1.1.45
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/README.md +4 -2
- package/dist/models/schemas/api/batch/SBatchAPI.d.ts +26 -5
- package/dist/models/schemas/api/batch/SBatchAPI.d.ts.map +1 -1
- package/dist/models/schemas/api/batch/SBatchAPI.js +11 -2
- package/dist/models/schemas/api/batch/SBatchAPI.js.map +1 -1
- package/dist/models/schemas/api/note/DNoteAPI.d.ts +64 -0
- package/dist/models/schemas/api/note/DNoteAPI.d.ts.map +1 -0
- package/dist/models/schemas/api/note/DNoteAPI.js +43 -0
- package/dist/models/schemas/api/note/DNoteAPI.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Shared utilities, types, and helpers for Workwell Global projects.
|
|
|
7
7
|
For complete documentation, please see the [docs](./docs) folder:
|
|
8
8
|
|
|
9
9
|
- **[Quick Start Guide](./docs/QUICK-START.md)** - Complete publishing and usage instructions
|
|
10
|
-
- **[Next.js Troubleshooting](./docs/NEXTJS-TROUBLESHOOTING.md)** - Comprehensive solutions for Next.js projects
|
|
10
|
+
- **[Next.js Troubleshooting](./docs/NEXTJS-TROUBLESHOOTING.md)** - Comprehensive solutions for Next.js projects
|
|
11
11
|
- **[Consuming Project Setup](./docs/CONSUMING-PROJECT-SETUP.md)** - General setup guide for any TypeScript project
|
|
12
12
|
- **[Publishing Checklist](./docs/PUBLISHING-CHECKLIST.md)** - Step-by-step publishing guide
|
|
13
13
|
|
|
@@ -55,6 +55,7 @@ See [docs/QUICK-START.md](./docs/QUICK-START.md) for complete instructions.
|
|
|
55
55
|
## 🔧 Troubleshooting
|
|
56
56
|
|
|
57
57
|
Having issues? Check:
|
|
58
|
+
|
|
58
59
|
1. **[Next.js Troubleshooting Guide](./docs/NEXTJS-TROUBLESHOOTING.md)** - For Next.js specific issues
|
|
59
60
|
2. **[Consuming Project Setup](./docs/CONSUMING-PROJECT-SETUP.md)** - For general TypeScript setup
|
|
60
61
|
|
|
@@ -74,10 +75,12 @@ app/mappings/userPermissionsMapper.ts uses enums/LinkedRoles: Status
|
|
|
74
75
|
## IMPLEMENTATION PROGRESS - SERVICES
|
|
75
76
|
|
|
76
77
|
app/mappings/webPortalLoginMapper.ts uses
|
|
78
|
+
|
|
77
79
|
- models/crm-dynamics: I365WebPortalLogin
|
|
78
80
|
- models/objects: IWebPortalLogin
|
|
79
81
|
|
|
80
82
|
app/mappings/bankAccountMapper.ts uses
|
|
83
|
+
|
|
81
84
|
- models/crm-dynamics: I365WebBackAccount
|
|
82
85
|
- models/objects: IBankAccount
|
|
83
86
|
|
|
@@ -85,4 +88,3 @@ uses models/objects/
|
|
|
85
88
|
uses models/objects/
|
|
86
89
|
uses models/objects/
|
|
87
90
|
uses models/objects/
|
|
88
|
-
|
|
@@ -1,21 +1,42 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const SBatchAPI: z.ZodObject<{
|
|
2
|
+
export declare const SBatchAPI: z.ZodUnion<[z.ZodObject<{
|
|
3
3
|
method: z.ZodEnum<["POST", "PATCH", "DELETE"]>;
|
|
4
4
|
type: z.ZodString;
|
|
5
|
-
data: z.ZodRecord<z.ZodString, z.
|
|
5
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6
6
|
id: z.ZodOptional<z.ZodString>;
|
|
7
7
|
refId: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
}, "strip", z.ZodTypeAny, {
|
|
9
9
|
type: string;
|
|
10
|
-
data: Record<string,
|
|
10
|
+
data: Record<string, unknown>;
|
|
11
11
|
method: "POST" | "PATCH" | "DELETE";
|
|
12
12
|
id?: string | undefined;
|
|
13
13
|
refId?: number | undefined;
|
|
14
14
|
}, {
|
|
15
15
|
type: string;
|
|
16
|
-
data: Record<string,
|
|
16
|
+
data: Record<string, unknown>;
|
|
17
17
|
method: "POST" | "PATCH" | "DELETE";
|
|
18
18
|
id?: string | undefined;
|
|
19
19
|
refId?: number | undefined;
|
|
20
|
-
}
|
|
20
|
+
}>, z.ZodObject<{
|
|
21
|
+
method: z.ZodLiteral<"GET">;
|
|
22
|
+
type: z.ZodString;
|
|
23
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
24
|
+
id: z.ZodOptional<z.ZodString>;
|
|
25
|
+
query: z.ZodOptional<z.ZodString>;
|
|
26
|
+
key: z.ZodOptional<z.ZodString>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
type: string;
|
|
29
|
+
method: "GET";
|
|
30
|
+
id?: string | undefined;
|
|
31
|
+
data?: Record<string, unknown> | undefined;
|
|
32
|
+
key?: string | undefined;
|
|
33
|
+
query?: string | undefined;
|
|
34
|
+
}, {
|
|
35
|
+
type: string;
|
|
36
|
+
method: "GET";
|
|
37
|
+
id?: string | undefined;
|
|
38
|
+
data?: Record<string, unknown> | undefined;
|
|
39
|
+
key?: string | undefined;
|
|
40
|
+
query?: string | undefined;
|
|
41
|
+
}>]>;
|
|
21
42
|
//# sourceMappingURL=SBatchAPI.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SBatchAPI.d.ts","sourceRoot":"","sources":["../../../../../src/models/schemas/api/batch/SBatchAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"SBatchAPI.d.ts","sourceRoot":"","sources":["../../../../../src/models/schemas/api/batch/SBatchAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAmBvB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAA8C,CAAA"}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
2
|
+
const SBatchMutationAPI = z.object({
|
|
3
3
|
method: z.enum(['POST', 'PATCH', 'DELETE']),
|
|
4
4
|
type: z.string(),
|
|
5
|
-
data: z.record(z.
|
|
5
|
+
data: z.record(z.unknown()),
|
|
6
6
|
id: z.string().optional(),
|
|
7
7
|
refId: z.number().optional(),
|
|
8
8
|
});
|
|
9
|
+
const SBatchReadAPI = z.object({
|
|
10
|
+
method: z.literal('GET'),
|
|
11
|
+
type: z.string(),
|
|
12
|
+
data: z.record(z.unknown()).optional(),
|
|
13
|
+
id: z.string().optional(),
|
|
14
|
+
query: z.string().optional(),
|
|
15
|
+
key: z.string().optional(),
|
|
16
|
+
});
|
|
17
|
+
export const SBatchAPI = z.union([SBatchMutationAPI, SBatchReadAPI]);
|
|
9
18
|
//# sourceMappingURL=SBatchAPI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SBatchAPI.js","sourceRoot":"","sources":["../../../../../src/models/schemas/api/batch/SBatchAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,
|
|
1
|
+
{"version":3,"file":"SBatchAPI.js","sourceRoot":"","sources":["../../../../../src/models/schemas/api/batch/SBatchAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC3C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IAC3B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAA;AAEF,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IACxB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const noteOptions: {
|
|
3
|
+
readonly DocumentAttached: {
|
|
4
|
+
readonly no: 0;
|
|
5
|
+
readonly yes: 1;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export declare const noteRelationships: {
|
|
9
|
+
regardingAssignment: {
|
|
10
|
+
relationshipName: string;
|
|
11
|
+
entity: "ww_assignments";
|
|
12
|
+
};
|
|
13
|
+
regardingReferral: {
|
|
14
|
+
relationshipName: string;
|
|
15
|
+
entity: "ww_saleschecklists";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const noteFields: {
|
|
19
|
+
readonly annotationid: {
|
|
20
|
+
readonly pretty: "noteId";
|
|
21
|
+
readonly type: z.ZodString;
|
|
22
|
+
};
|
|
23
|
+
readonly regardingobject: {
|
|
24
|
+
readonly pretty: "regarding";
|
|
25
|
+
readonly type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
};
|
|
27
|
+
readonly isdocument: {
|
|
28
|
+
readonly pretty: "documentAttached";
|
|
29
|
+
readonly type: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
30
|
+
};
|
|
31
|
+
readonly filenameattachment: {
|
|
32
|
+
readonly pretty: "fileName";
|
|
33
|
+
readonly type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
34
|
+
};
|
|
35
|
+
readonly filesize: {
|
|
36
|
+
readonly pretty: "fileSizeBytes";
|
|
37
|
+
readonly type: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
38
|
+
};
|
|
39
|
+
readonly notetext: {
|
|
40
|
+
readonly pretty: "noteText";
|
|
41
|
+
readonly type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
42
|
+
};
|
|
43
|
+
readonly egg: {
|
|
44
|
+
readonly pretty: "avocado";
|
|
45
|
+
readonly type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
+
};
|
|
47
|
+
readonly _objectid_value: {
|
|
48
|
+
readonly pretty: "inRelationTo";
|
|
49
|
+
readonly type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
50
|
+
};
|
|
51
|
+
readonly objectid_ww_assignment: {
|
|
52
|
+
readonly relationshipName: string;
|
|
53
|
+
readonly entity: "ww_assignments";
|
|
54
|
+
readonly pretty: "regardingAssignment";
|
|
55
|
+
readonly type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
56
|
+
};
|
|
57
|
+
readonly objectid_ww_saleschecklist: {
|
|
58
|
+
readonly relationshipName: string;
|
|
59
|
+
readonly entity: "ww_saleschecklists";
|
|
60
|
+
readonly pretty: "regardingReferral";
|
|
61
|
+
readonly type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=DNoteAPI.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DNoteAPI.d.ts","sourceRoot":"","sources":["../../../../../src/models/schemas/api/note/DNoteAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,WAAW;;;;;CAKd,CAAA;AAEV,eAAO,MAAM,iBAAiB;;;;;;;;;CAS7B,CAAA;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuBb,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { EntityNames } from '../../../../enums/EntityNames.js';
|
|
3
|
+
export const noteOptions = {
|
|
4
|
+
DocumentAttached: {
|
|
5
|
+
no: 0,
|
|
6
|
+
yes: 1,
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
export const noteRelationships = {
|
|
10
|
+
regardingAssignment: {
|
|
11
|
+
relationshipName: 'objectid_ww_assignment',
|
|
12
|
+
entity: EntityNames.assignment.entitySetName,
|
|
13
|
+
},
|
|
14
|
+
regardingReferral: {
|
|
15
|
+
relationshipName: 'objectid_ww_saleschecklist',
|
|
16
|
+
entity: EntityNames.referral.entitySetName,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
export const noteFields = {
|
|
20
|
+
annotationid: { pretty: 'noteId', type: z.string().uuid() },
|
|
21
|
+
regardingobject: { pretty: 'regarding', type: z.string().nullish() },
|
|
22
|
+
isdocument: { pretty: 'documentAttached', type: z.boolean().nullish() },
|
|
23
|
+
filenameattachment: { pretty: 'fileName', type: z.string().nullish() },
|
|
24
|
+
filesize: { pretty: 'fileSizeBytes', type: z.number().nullish() },
|
|
25
|
+
notetext: { pretty: 'noteText', type: z.string().nullish() },
|
|
26
|
+
egg: { pretty: 'avocado', type: z.string().nullish() },
|
|
27
|
+
_objectid_value: {
|
|
28
|
+
pretty: 'inRelationTo',
|
|
29
|
+
type: z.string().uuid().nullish(),
|
|
30
|
+
},
|
|
31
|
+
//polymorphic POST stuff
|
|
32
|
+
objectid_ww_assignment: {
|
|
33
|
+
pretty: 'regardingAssignment',
|
|
34
|
+
type: z.string().uuid().nullish(),
|
|
35
|
+
...noteRelationships.regardingAssignment,
|
|
36
|
+
},
|
|
37
|
+
objectid_ww_saleschecklist: {
|
|
38
|
+
pretty: 'regardingReferral',
|
|
39
|
+
type: z.string().uuid().nullish(),
|
|
40
|
+
...noteRelationships.regardingReferral,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=DNoteAPI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DNoteAPI.js","sourceRoot":"","sources":["../../../../../src/models/schemas/api/note/DNoteAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAE9D,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,gBAAgB,EAAE;QAChB,EAAE,EAAE,CAAC;QACL,GAAG,EAAE,CAAC;KACP;CACO,CAAA;AAEV,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,mBAAmB,EAAE;QACnB,gBAAgB,EAAE,wBAAwB;QAC1C,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,aAAa;KAC7C;IACD,iBAAiB,EAAE;QACjB,gBAAgB,EAAE,4BAA4B;QAC9C,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,aAAa;KAC3C;CACF,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,YAAY,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;IAC3D,eAAe,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE;IACpE,UAAU,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE;IACvE,kBAAkB,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE;IACtE,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE;IACjE,QAAQ,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE;IAC5D,GAAG,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE;IACtD,eAAe,EAAE;QACf,MAAM,EAAE,cAAc;QACtB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE;KAClC;IACD,wBAAwB;IACxB,sBAAsB,EAAE;QACtB,MAAM,EAAE,qBAAqB;QAC7B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE;QACjC,GAAG,iBAAiB,CAAC,mBAAmB;KACzC;IACD,0BAA0B,EAAE;QAC1B,MAAM,EAAE,mBAAmB;QAC3B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE;QACjC,GAAG,iBAAiB,CAAC,iBAAiB;KACvC;CACO,CAAA"}
|