@fonderie/workspaces 5.1.0 → 5.2.1
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/brain/signatures.md +5 -0
- package/dist/index.cjs +14 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -3
- package/dist/index.d.ts +16 -3
- package/dist/index.js +15 -10
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -59,6 +59,7 @@ interface IWorkspaceDTO {
|
|
|
59
59
|
isPersonal: boolean;
|
|
60
60
|
isArchived: boolean;
|
|
61
61
|
archivedAt: string;
|
|
62
|
+
archivedBy: string;
|
|
62
63
|
createdAt: string;
|
|
63
64
|
updatedAt: string;
|
|
64
65
|
}
|
|
@@ -77,6 +78,18 @@ interface IMemberDTO {
|
|
|
77
78
|
roleName: string;
|
|
78
79
|
confirmed: boolean;
|
|
79
80
|
createdAt: string;
|
|
81
|
+
/**
|
|
82
|
+
* Identity, carried so a member list is renderable from this endpoint alone.
|
|
83
|
+
*
|
|
84
|
+
* listMembers() already joins the users table for these; without them a
|
|
85
|
+
* client has no name to show and falls back to printing a user id.
|
|
86
|
+
*
|
|
87
|
+
* Empty string when absent, matching every other string field in this file.
|
|
88
|
+
*/
|
|
89
|
+
email: string;
|
|
90
|
+
firstName: string;
|
|
91
|
+
lastName: string;
|
|
92
|
+
profileImageUrl: string;
|
|
80
93
|
}
|
|
81
94
|
interface IInvitationDTO {
|
|
82
95
|
id: string;
|
|
@@ -116,10 +129,10 @@ declare const updateWorkspaceSchema: z.ZodObject<{
|
|
|
116
129
|
line1: z.ZodOptional<z.ZodString>;
|
|
117
130
|
line2: z.ZodOptional<z.ZodString>;
|
|
118
131
|
city: z.ZodOptional<z.ZodString>;
|
|
119
|
-
|
|
120
|
-
|
|
132
|
+
state: z.ZodOptional<z.ZodString>;
|
|
133
|
+
zip: z.ZodOptional<z.ZodString>;
|
|
121
134
|
country: z.ZodOptional<z.ZodString>;
|
|
122
|
-
}, z.core.$
|
|
135
|
+
}, z.core.$strip>>>;
|
|
123
136
|
}, z.core.$strip>;
|
|
124
137
|
declare const updateSettingsSchema: z.ZodObject<{
|
|
125
138
|
locale: z.ZodOptional<z.ZodString>;
|
package/dist/index.d.ts
CHANGED
|
@@ -59,6 +59,7 @@ interface IWorkspaceDTO {
|
|
|
59
59
|
isPersonal: boolean;
|
|
60
60
|
isArchived: boolean;
|
|
61
61
|
archivedAt: string;
|
|
62
|
+
archivedBy: string;
|
|
62
63
|
createdAt: string;
|
|
63
64
|
updatedAt: string;
|
|
64
65
|
}
|
|
@@ -77,6 +78,18 @@ interface IMemberDTO {
|
|
|
77
78
|
roleName: string;
|
|
78
79
|
confirmed: boolean;
|
|
79
80
|
createdAt: string;
|
|
81
|
+
/**
|
|
82
|
+
* Identity, carried so a member list is renderable from this endpoint alone.
|
|
83
|
+
*
|
|
84
|
+
* listMembers() already joins the users table for these; without them a
|
|
85
|
+
* client has no name to show and falls back to printing a user id.
|
|
86
|
+
*
|
|
87
|
+
* Empty string when absent, matching every other string field in this file.
|
|
88
|
+
*/
|
|
89
|
+
email: string;
|
|
90
|
+
firstName: string;
|
|
91
|
+
lastName: string;
|
|
92
|
+
profileImageUrl: string;
|
|
80
93
|
}
|
|
81
94
|
interface IInvitationDTO {
|
|
82
95
|
id: string;
|
|
@@ -116,10 +129,10 @@ declare const updateWorkspaceSchema: z.ZodObject<{
|
|
|
116
129
|
line1: z.ZodOptional<z.ZodString>;
|
|
117
130
|
line2: z.ZodOptional<z.ZodString>;
|
|
118
131
|
city: z.ZodOptional<z.ZodString>;
|
|
119
|
-
|
|
120
|
-
|
|
132
|
+
state: z.ZodOptional<z.ZodString>;
|
|
133
|
+
zip: z.ZodOptional<z.ZodString>;
|
|
121
134
|
country: z.ZodOptional<z.ZodString>;
|
|
122
|
-
}, z.core.$
|
|
135
|
+
}, z.core.$strip>>>;
|
|
123
136
|
}, z.core.$strip>;
|
|
124
137
|
declare const updateSettingsSchema: z.ZodObject<{
|
|
125
138
|
locale: z.ZodOptional<z.ZodString>;
|
package/dist/index.js
CHANGED
|
@@ -42,10 +42,10 @@ var addressSchema = z.object({
|
|
|
42
42
|
line1: z.string().max(200).optional(),
|
|
43
43
|
line2: z.string().max(200).optional(),
|
|
44
44
|
city: z.string().max(100).optional(),
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
state: z.string().max(100).optional(),
|
|
46
|
+
zip: z.string().max(20).optional(),
|
|
47
47
|
country: z.string().max(60).optional()
|
|
48
|
-
})
|
|
48
|
+
});
|
|
49
49
|
var updateWorkspaceSchema = z.object({
|
|
50
50
|
name: z.string().trim().min(1).max(200).optional(),
|
|
51
51
|
description: z.string().max(2e3).nullable().optional(),
|
|
@@ -633,7 +633,7 @@ var RoleModel = class {
|
|
|
633
633
|
};
|
|
634
634
|
|
|
635
635
|
// src/dtos/workspace.ts
|
|
636
|
-
import {
|
|
636
|
+
import { booleanOrFalse, dateOrEmpty, stringOrEmpty } from "@fonderie/core/parser";
|
|
637
637
|
function toWorkspaceDTO(ws) {
|
|
638
638
|
const addr = ws.address ?? {};
|
|
639
639
|
return {
|
|
@@ -657,9 +657,10 @@ function toWorkspaceDTO(ws) {
|
|
|
657
657
|
ownerId: stringOrEmpty(ws.ownerId),
|
|
658
658
|
isPersonal: booleanOrFalse(ws.isPersonal),
|
|
659
659
|
isArchived: ws.archivedAt !== null,
|
|
660
|
-
archivedAt:
|
|
661
|
-
|
|
662
|
-
|
|
660
|
+
archivedAt: dateOrEmpty(ws.archivedAt),
|
|
661
|
+
archivedBy: stringOrEmpty(ws.archivedBy),
|
|
662
|
+
createdAt: dateOrEmpty(ws.createdAt),
|
|
663
|
+
updatedAt: dateOrEmpty(ws.updatedAt)
|
|
663
664
|
};
|
|
664
665
|
}
|
|
665
666
|
function toRoleDTO(role) {
|
|
@@ -679,7 +680,11 @@ function toMemberDTO(m) {
|
|
|
679
680
|
roleId: stringOrEmpty(m.roleId),
|
|
680
681
|
roleName: stringOrEmpty(m.roleName),
|
|
681
682
|
confirmed: booleanOrFalse(m.confirmed),
|
|
682
|
-
createdAt:
|
|
683
|
+
createdAt: dateOrEmpty(m.createdAt),
|
|
684
|
+
email: stringOrEmpty(m.email),
|
|
685
|
+
firstName: stringOrEmpty(m.firstName),
|
|
686
|
+
lastName: stringOrEmpty(m.lastName),
|
|
687
|
+
profileImageUrl: stringOrEmpty(m.profileImageUrl)
|
|
683
688
|
};
|
|
684
689
|
}
|
|
685
690
|
function toInvitationDTO(inv) {
|
|
@@ -690,8 +695,8 @@ function toInvitationDTO(inv) {
|
|
|
690
695
|
roleId: stringOrEmpty(inv.roleId),
|
|
691
696
|
token: stringOrEmpty(inv.token),
|
|
692
697
|
status: stringOrEmpty(inv.status),
|
|
693
|
-
expiresAt:
|
|
694
|
-
createdAt:
|
|
698
|
+
expiresAt: dateOrEmpty(inv.expiresAt),
|
|
699
|
+
createdAt: dateOrEmpty(inv.createdAt)
|
|
695
700
|
};
|
|
696
701
|
}
|
|
697
702
|
function toSettingsDTO(s) {
|