@crosspost/types 0.1.10 → 0.1.12
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/index.cjs +275 -276
- package/dist/index.d.cts +124 -42
- package/dist/index.d.ts +124 -42
- package/dist/index.js +275 -276
- package/package.json +1 -1
- package/src/auth.ts +3 -5
package/package.json
CHANGED
package/src/auth.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { z } from 'zod';
|
2
2
|
import { PlatformSchema } from './common.ts';
|
3
|
+
import { UserProfileSchema } from './user-profile.ts';
|
3
4
|
|
4
5
|
export const PlatformParamSchema = z.object({
|
5
6
|
platform: z.string().describe('Social media platform'),
|
@@ -17,8 +18,6 @@ export const AuthInitRequestSchema = z.object({
|
|
17
18
|
|
18
19
|
export const AuthUrlResponseSchema = z.object({
|
19
20
|
url: z.string().describe('Authentication URL to redirect the user to'),
|
20
|
-
state: z.string().describe('State parameter for CSRF protection'),
|
21
|
-
platform: PlatformSchema,
|
22
21
|
}).describe('Auth URL response');
|
23
22
|
|
24
23
|
export const AuthCallbackQuerySchema = z.object({
|
@@ -65,9 +64,8 @@ export const AuthRevokeResponseSchema = z.object({
|
|
65
64
|
export const ConnectedAccountSchema = z.object({
|
66
65
|
platform: PlatformSchema,
|
67
66
|
userId: z.string().describe('User ID on the platform'),
|
68
|
-
|
69
|
-
|
70
|
-
connectedAt: z.string().optional().describe('When the account was connected'),
|
67
|
+
connectedAt: z.string().describe('When the account was connected'),
|
68
|
+
profile: UserProfileSchema.nullable().describe('Full user profile data'),
|
71
69
|
}).describe('Connected account');
|
72
70
|
|
73
71
|
export const ConnectedAccountsResponseSchema = z.object({
|