salesprompter-cli 0.1.8 → 0.1.9
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/dist/auth.js +9 -8
- package/package.json +1 -1
package/dist/auth.js
CHANGED
|
@@ -8,13 +8,14 @@ const DEFAULT_API_BASE_URL = "https://salesprompter.ai";
|
|
|
8
8
|
const CLIENT_HEADER = "salesprompter-cli/0.2";
|
|
9
9
|
const DEFAULT_DEVICE_POLL_INTERVAL_SECONDS = 3;
|
|
10
10
|
const DEFAULT_DEVICE_TIMEOUT_SECONDS = 180;
|
|
11
|
+
const nullableOptionalString = z.string().min(1).nullish().transform((value) => value ?? undefined);
|
|
11
12
|
const UserSchema = z.object({
|
|
12
13
|
id: z.string().min(1),
|
|
13
14
|
email: z.string().email(),
|
|
14
|
-
name:
|
|
15
|
-
orgId:
|
|
16
|
-
orgName:
|
|
17
|
-
orgSlug:
|
|
15
|
+
name: nullableOptionalString,
|
|
16
|
+
orgId: nullableOptionalString,
|
|
17
|
+
orgName: nullableOptionalString,
|
|
18
|
+
orgSlug: nullableOptionalString
|
|
18
19
|
});
|
|
19
20
|
const AuthSessionSchema = z.object({
|
|
20
21
|
accessToken: z.string().min(1),
|
|
@@ -59,10 +60,10 @@ const WhoAmIResponseSchema = z
|
|
|
59
60
|
z.object({
|
|
60
61
|
id: z.string().min(1),
|
|
61
62
|
email: z.string().email(),
|
|
62
|
-
name:
|
|
63
|
-
orgId:
|
|
64
|
-
orgName:
|
|
65
|
-
orgSlug:
|
|
63
|
+
name: nullableOptionalString,
|
|
64
|
+
orgId: nullableOptionalString,
|
|
65
|
+
orgName: nullableOptionalString,
|
|
66
|
+
orgSlug: nullableOptionalString,
|
|
66
67
|
expiresAt: z.string().datetime().optional()
|
|
67
68
|
}),
|
|
68
69
|
z.object({
|
package/package.json
CHANGED