@farcaster/frame-core 0.0.21 → 0.0.22

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.
Files changed (65) hide show
  1. package/dist/actions/AddFrame.d.ts +36 -0
  2. package/dist/actions/AddFrame.js +57 -0
  3. package/dist/actions/{signIn.d.ts → SignIn.d.ts} +7 -6
  4. package/dist/actions/{signIn.js → SignIn.js} +1 -1
  5. package/dist/actions/index.d.ts +2 -0
  6. package/dist/actions/index.js +38 -0
  7. package/dist/errors.js +1 -1
  8. package/dist/index.d.ts +3 -3
  9. package/dist/index.js +2 -25
  10. package/dist/internal/types.d.ts +3 -2
  11. package/dist/schemas/embeds.d.ts +1 -1
  12. package/dist/schemas/embeds.js +3 -3
  13. package/dist/schemas/events.d.ts +1 -1
  14. package/dist/schemas/events.js +5 -5
  15. package/dist/schemas/index.d.ts +5 -5
  16. package/dist/schemas/manifest.d.ts +1 -1
  17. package/dist/schemas/manifest.js +4 -4
  18. package/dist/schemas/notifications.d.ts +1 -1
  19. package/dist/schemas/shared.d.ts +1 -1
  20. package/dist/schemas/shared.js +4 -4
  21. package/dist/types.d.ts +42 -31
  22. package/esm/actions/AddFrame.d.ts +40 -0
  23. package/esm/actions/AddFrame.js +19 -0
  24. package/esm/actions/SignIn.d.ts +43 -0
  25. package/esm/actions/SignIn.js +10 -0
  26. package/esm/actions/index.d.ts +2 -0
  27. package/esm/actions/index.js +2 -0
  28. package/esm/errors.d.ts +9 -7
  29. package/esm/errors.js +6 -6
  30. package/esm/index.d.ts +3 -3
  31. package/esm/index.js +3 -3
  32. package/esm/internal/types.d.ts +19 -7
  33. package/esm/internal/types.js +1 -1
  34. package/esm/schemas/embeds.d.ts +231 -169
  35. package/esm/schemas/embeds.js +25 -19
  36. package/esm/schemas/events.d.ts +225 -129
  37. package/esm/schemas/events.js +18 -18
  38. package/esm/schemas/index.d.ts +5 -5
  39. package/esm/schemas/index.js +5 -5
  40. package/esm/schemas/manifest.d.ts +154 -110
  41. package/esm/schemas/manifest.js +29 -23
  42. package/esm/schemas/notifications.d.ts +86 -58
  43. package/esm/schemas/notifications.js +17 -17
  44. package/esm/schemas/shared.d.ts +49 -33
  45. package/esm/schemas/shared.js +20 -19
  46. package/esm/tsconfig.tsbuildinfo +1 -1
  47. package/esm/types.d.ts +180 -140
  48. package/esm/types.js +2 -2
  49. package/package.json +4 -5
  50. package/src/actions/AddFrame.ts +51 -0
  51. package/src/actions/SignIn.ts +51 -0
  52. package/src/actions/index.ts +2 -0
  53. package/src/errors.ts +4 -4
  54. package/src/index.ts +3 -3
  55. package/src/internal/types.ts +3 -4
  56. package/src/schemas/embeds.ts +13 -13
  57. package/src/schemas/events.ts +17 -17
  58. package/src/schemas/index.ts +5 -5
  59. package/src/schemas/manifest.ts +11 -11
  60. package/src/schemas/notifications.ts +8 -10
  61. package/src/schemas/shared.ts +13 -13
  62. package/src/types.ts +125 -124
  63. package/esm/actions/signIn.d.ts +0 -40
  64. package/esm/actions/signIn.js +0 -10
  65. package/src/actions/signIn.ts +0 -50
package/esm/types.d.ts CHANGED
@@ -1,155 +1,195 @@
1
- import type { Address, Provider, RpcRequest, RpcResponse, RpcSchema } from "ox";
2
- import { FrameNotificationDetails, EventFrameAdded, EventFrameRemoved, EventNotificationsEnabled, EventNotificationsDisabled } from "./schemas";
3
- import * as SignIn from "./actions/signIn";
4
- export type SetPrimaryButton = (options: {
5
- text: string;
6
- loading?: boolean;
7
- disabled?: boolean;
8
- hidden?: boolean;
9
- }) => void;
10
- export type EthProviderRequest = Provider.RequestFn<RpcSchema.Default>;
1
+ import type { Address, Provider, RpcRequest, RpcResponse, RpcSchema } from 'ox'
2
+ import type { AddFrame, SignIn } from './actions'
3
+ import type {
4
+ EventFrameAdded,
5
+ EventFrameRemoved,
6
+ EventNotificationsDisabled,
7
+ EventNotificationsEnabled,
8
+ FrameNotificationDetails,
9
+ } from './schemas'
10
+ export type SetPrimaryButtonOptions = {
11
+ text: string
12
+ loading?: boolean
13
+ disabled?: boolean
14
+ hidden?: boolean
15
+ }
16
+ export type SetPrimaryButton = (options: SetPrimaryButtonOptions) => void
17
+ export type EthProviderRequest = Provider.RequestFn<RpcSchema.Default>
11
18
  export type AccountLocation = {
12
- placeId: string;
13
- /**
14
- * Human-readable string describing the location
15
- */
16
- description: string;
17
- };
19
+ placeId: string
20
+ /**
21
+ * Human-readable string describing the location
22
+ */
23
+ description: string
24
+ }
18
25
  export type FrameLocationContextCastEmbed = {
19
- type: "cast_embed";
20
- embed: string;
21
- cast: {
22
- fid: number;
23
- hash: string;
24
- };
25
- };
26
+ type: 'cast_embed'
27
+ embed: string
28
+ cast: {
29
+ fid: number
30
+ hash: string
31
+ }
32
+ }
26
33
  export type FrameLocationContextNotification = {
27
- type: "notification";
28
- notification: {
29
- notificationId: string;
30
- title: string;
31
- body: string;
32
- };
33
- };
34
+ type: 'notification'
35
+ notification: {
36
+ notificationId: string
37
+ title: string
38
+ body: string
39
+ }
40
+ }
34
41
  export type FrameLocationContextLauncher = {
35
- type: "launcher";
36
- };
37
- export type FrameLocationContext = FrameLocationContextCastEmbed | FrameLocationContextNotification | FrameLocationContextLauncher;
42
+ type: 'launcher'
43
+ }
44
+ export type FrameLocationContext =
45
+ | FrameLocationContextCastEmbed
46
+ | FrameLocationContextNotification
47
+ | FrameLocationContextLauncher
38
48
  export type SafeAreaInsets = {
39
- top: number;
40
- bottom: number;
41
- left: number;
42
- right: number;
43
- };
49
+ top: number
50
+ bottom: number
51
+ left: number
52
+ right: number
53
+ }
44
54
  export type FrameContext = {
45
- user: {
46
- fid: number;
47
- username?: string;
48
- displayName?: string;
49
- /**
50
- * Profile image URL
51
- */
52
- pfpUrl?: string;
53
- location?: AccountLocation;
54
- };
55
- location?: FrameLocationContext;
56
- client: {
57
- clientFid: number;
58
- added: boolean;
59
- notificationDetails?: FrameNotificationDetails;
60
- safeAreaInsets?: SafeAreaInsets;
61
- };
62
- };
63
- export type AddFrameRejectedReason = "invalid_domain_manifest" | "rejected_by_user";
64
- export type AddFrameResult = {
65
- added: true;
66
- notificationDetails?: FrameNotificationDetails;
67
- } | {
68
- added: false;
69
- reason: AddFrameRejectedReason;
70
- };
71
- export type AddFrame = () => Promise<AddFrameResult>;
72
- export type ReadyOptions = {
55
+ user: {
56
+ fid: number
57
+ username?: string
58
+ displayName?: string
73
59
  /**
74
- * Disable native gestures. Use this option if your frame uses gestures
75
- * that conflict with native gestures.
76
- *
77
- * @defaultValue false
60
+ * Profile image URL
78
61
  */
79
- disableNativeGestures: boolean;
80
- };
81
- export declare const DEFAULT_READY_OPTIONS: ReadyOptions;
62
+ pfpUrl?: string
63
+ location?: AccountLocation
64
+ }
65
+ location?: FrameLocationContext
66
+ client: {
67
+ clientFid: number
68
+ added: boolean
69
+ notificationDetails?: FrameNotificationDetails
70
+ safeAreaInsets?: SafeAreaInsets
71
+ }
72
+ }
73
+ export type ReadyOptions = {
74
+ /**
75
+ * Disable native gestures. Use this option if your frame uses gestures
76
+ * that conflict with native gestures.
77
+ *
78
+ * @defaultValue false
79
+ */
80
+ disableNativeGestures: boolean
81
+ }
82
+ export declare const DEFAULT_READY_OPTIONS: ReadyOptions
82
83
  export type SignInOptions = {
83
- /**
84
- * A random string used to prevent replay attacks.
85
- */
86
- nonce: string;
87
- /**
88
- * Start time at which the signature becomes valid.
89
- * ISO 8601 datetime.
90
- */
91
- notBefore?: string;
92
- /**
93
- * Expiration time at which the signature is no longer valid.
94
- * ISO 8601 datetime.
95
- */
96
- expirationTime?: string;
97
- };
84
+ /**
85
+ * A random string used to prevent replay attacks.
86
+ */
87
+ nonce: string
88
+ /**
89
+ * Start time at which the signature becomes valid.
90
+ * ISO 8601 datetime.
91
+ */
92
+ notBefore?: string
93
+ /**
94
+ * Expiration time at which the signature is no longer valid.
95
+ * ISO 8601 datetime.
96
+ */
97
+ expirationTime?: string
98
+ }
98
99
  export type WireFrameHost = {
99
- context: FrameContext;
100
- close: () => void;
101
- ready: (options?: Partial<ReadyOptions>) => void;
102
- openUrl: (url: string) => void;
103
- signIn: SignIn.WireSignIn;
104
- setPrimaryButton: SetPrimaryButton;
105
- ethProviderRequest: EthProviderRequest;
106
- ethProviderRequestV2: RpcTransport;
107
- addFrame: AddFrame;
108
- };
100
+ context: FrameContext
101
+ close: () => void
102
+ ready: (options?: Partial<ReadyOptions>) => void
103
+ openUrl: (url: string) => void
104
+ signIn: SignIn.WireSignIn
105
+ setPrimaryButton: SetPrimaryButton
106
+ ethProviderRequest: EthProviderRequest
107
+ ethProviderRequestV2: RpcTransport
108
+ eip6963RequestProvider: () => void
109
+ addFrame: AddFrame.WireAddFrame
110
+ }
109
111
  export type FrameHost = {
110
- context: FrameContext;
111
- close: () => void;
112
- ready: (options?: Partial<ReadyOptions>) => void;
113
- openUrl: (url: string) => void;
114
- signIn: SignIn.SignIn;
115
- setPrimaryButton: SetPrimaryButton;
116
- ethProviderRequest: EthProviderRequest;
117
- ethProviderRequestV2: RpcTransport;
118
- addFrame: AddFrame;
119
- };
112
+ context: FrameContext
113
+ close: () => void
114
+ ready: (options?: Partial<ReadyOptions>) => void
115
+ openUrl: (url: string) => void
116
+ signIn: SignIn.SignIn
117
+ setPrimaryButton: SetPrimaryButton
118
+ ethProviderRequest: EthProviderRequest
119
+ ethProviderRequestV2: RpcTransport
120
+ /**
121
+ * Receive forwarded eip6963:requestProvider events from the frame document.
122
+ * Hosts must emit an EventEip6963AnnounceProvider in response.
123
+ */
124
+ eip6963RequestProvider: () => void
125
+ addFrame: AddFrame.AddFrame
126
+ }
120
127
  export type FrameEthProviderEventData = {
121
- type: "frame_eth_provider_event";
122
- } & EthProviderWireEvent;
123
- export type RpcTransport = (request: RpcRequest.RpcRequest) => Promise<RpcResponse.RpcResponse>;
128
+ type: 'frame_eth_provider_event'
129
+ } & EthProviderWireEvent
130
+ export type RpcTransport = (
131
+ request: RpcRequest.RpcRequest,
132
+ ) => Promise<RpcResponse.RpcResponse>
124
133
  export type ProviderRpcError = {
125
- code: number;
126
- details?: string;
127
- message?: string;
128
- };
129
- export type EthProviderWireEvent = {
130
- event: "accountsChanged";
131
- params: [readonly Address.Address[]];
132
- } | {
133
- event: "chainChanged";
134
- params: [string];
135
- } | {
136
- event: "connect";
137
- params: [Provider.ConnectInfo];
138
- } | {
139
- event: "disconnect";
140
- params: [ProviderRpcError];
141
- } | {
142
- event: "message";
143
- params: [Provider.Message];
144
- };
145
- export type EmitEthProvider = <event extends EthProviderWireEvent["event"]>(event: event, params: Extract<EthProviderWireEvent, {
146
- event: event;
147
- }>["params"]) => void;
134
+ code: number
135
+ details?: string
136
+ message?: string
137
+ }
138
+ export type EthProviderWireEvent =
139
+ | {
140
+ event: 'accountsChanged'
141
+ params: [readonly Address.Address[]]
142
+ }
143
+ | {
144
+ event: 'chainChanged'
145
+ params: [string]
146
+ }
147
+ | {
148
+ event: 'connect'
149
+ params: [Provider.ConnectInfo]
150
+ }
151
+ | {
152
+ event: 'disconnect'
153
+ params: [ProviderRpcError]
154
+ }
155
+ | {
156
+ event: 'message'
157
+ params: [Provider.Message]
158
+ }
159
+ export type EmitEthProvider = <event extends EthProviderWireEvent['event']>(
160
+ event: event,
161
+ params: Extract<
162
+ EthProviderWireEvent,
163
+ {
164
+ event: event
165
+ }
166
+ >['params'],
167
+ ) => void
148
168
  export type EventFrameAddRejected = {
149
- event: "frame_add_rejected";
150
- reason: AddFrameRejectedReason;
151
- };
169
+ event: 'frame_add_rejected'
170
+ reason: AddFrame.AddFrameRejectedReason
171
+ }
152
172
  export type EventPrimaryButtonClicked = {
153
- event: "primary_button_clicked";
154
- };
155
- export type FrameClientEvent = EventFrameAdded | EventFrameAddRejected | EventFrameRemoved | EventNotificationsEnabled | EventNotificationsDisabled | EventPrimaryButtonClicked;
173
+ event: 'primary_button_clicked'
174
+ }
175
+ /**
176
+ * Metadata of the EIP-1193 Provider.
177
+ */
178
+ export interface EIP6963ProviderInfo {
179
+ icon: `data:image/${string}`
180
+ name: string
181
+ rdns: string
182
+ uuid: string
183
+ }
184
+ export type EventEip6963AnnounceProvider = {
185
+ event: 'eip6963:announceProvider'
186
+ info: EIP6963ProviderInfo
187
+ }
188
+ export type FrameClientEvent =
189
+ | EventFrameAdded
190
+ | EventFrameAddRejected
191
+ | EventFrameRemoved
192
+ | EventNotificationsEnabled
193
+ | EventNotificationsDisabled
194
+ | EventPrimaryButtonClicked
195
+ | EventEip6963AnnounceProvider
package/esm/types.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export const DEFAULT_READY_OPTIONS = {
2
- disableNativeGestures: false,
3
- };
2
+ disableNativeGestures: false,
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farcaster/frame-core",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "main": "dist/index.js",
5
5
  "module": "esm/index.js",
6
6
  "files": [
@@ -9,13 +9,12 @@
9
9
  "src"
10
10
  ],
11
11
  "devDependencies": {
12
- "tsup": "^8.3.5",
13
- "typescript": "^5.6.3",
12
+ "typescript": "^5.7.2",
14
13
  "@farcaster/tsconfig": "0.0.2"
15
14
  },
16
15
  "dependencies": {
17
- "ox": "^0.4.0",
18
- "zod": "^3.23.8"
16
+ "ox": "^0.4.4",
17
+ "zod": "^3.24.1"
19
18
  },
20
19
  "publishConfig": {
21
20
  "access": "public"
@@ -0,0 +1,51 @@
1
+ import * as Errors from '../errors'
2
+ import type { OneOf } from '../internal/types'
3
+ import type { FrameNotificationDetails } from '../schemas'
4
+
5
+ export type AddFrameResult = {
6
+ notificationDetails?: FrameNotificationDetails
7
+ }
8
+
9
+ export type AddFrame = () => Promise<AddFrameResult>
10
+
11
+ type InvalidDomainManifestJsonError = {
12
+ type: 'invalid_domain_manifest'
13
+ }
14
+
15
+ type RejectedByUserJsonError = {
16
+ type: 'rejected_by_user'
17
+ }
18
+
19
+ export type AddFrameJsonError =
20
+ | InvalidDomainManifestJsonError
21
+ | RejectedByUserJsonError
22
+
23
+ export type AddFrameRejectedReason = AddFrameJsonError['type']
24
+
25
+ export type AddFrameJsonResult = OneOf<
26
+ { result: AddFrameResult } | { error: AddFrameJsonError }
27
+ >
28
+
29
+ export type WireAddFrame = () => Promise<AddFrameJsonResult>
30
+
31
+ /**
32
+ * Thrown when the frame does not have a valid domain manifest.
33
+ */
34
+ export class InvalidDomainManifest extends Errors.BaseError {
35
+ override readonly name = 'AddFrame.InvalidDomainManifest'
36
+
37
+ constructor() {
38
+ super('Invalid domain manifest')
39
+ }
40
+ }
41
+
42
+ /**
43
+ * Thrown when add frame action was rejected by the user.
44
+ */
45
+ export class RejectedByUser extends Errors.BaseError {
46
+ override readonly name = 'AddFrame.RejectedByUser'
47
+
48
+ constructor() {
49
+ super('Add frame rejected by user')
50
+ }
51
+ }
@@ -0,0 +1,51 @@
1
+ import * as Errors from '../errors'
2
+ import type { OneOf } from '../internal/types'
3
+
4
+ export type SignInOptions = {
5
+ /**
6
+ * A random string used to prevent replay attacks.
7
+ */
8
+ nonce: string
9
+
10
+ /**
11
+ * Start time at which the signature becomes valid.
12
+ * ISO 8601 datetime.
13
+ */
14
+ notBefore?: string
15
+
16
+ /**
17
+ * Expiration time at which the signature is no longer valid.
18
+ * ISO 8601 datetime.
19
+ */
20
+ expirationTime?: string
21
+ }
22
+
23
+ export type SignInResult = {
24
+ signature: string
25
+ message: string
26
+ }
27
+
28
+ export type SignIn = (options: SignInOptions) => Promise<SignInResult>
29
+
30
+ type RejectedByUserJsonError = {
31
+ type: 'rejected_by_user'
32
+ }
33
+
34
+ export type SignInJsonError = RejectedByUserJsonError
35
+
36
+ export type SignInJsonResult = OneOf<
37
+ { result: SignInResult } | { error: SignInJsonError }
38
+ >
39
+
40
+ export type WireSignIn = (options: SignInOptions) => Promise<SignInJsonResult>
41
+
42
+ /**
43
+ * Thrown when a sign in action was rejected.
44
+ */
45
+ export class RejectedByUser extends Errors.BaseError {
46
+ override readonly name = 'SignIn.RejectedByUser'
47
+
48
+ constructor() {
49
+ super('Sign in rejected by user')
50
+ }
51
+ }
@@ -0,0 +1,2 @@
1
+ export * as AddFrame from './AddFrame'
2
+ export * as SignIn from './SignIn'
package/src/errors.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  export class BaseError<
2
- cause extends Error | undefined = undefined
2
+ cause extends Error | undefined = undefined,
3
3
  > extends Error {
4
- override name = "BaseError";
5
- cause: cause;
4
+ override name = 'BaseError'
5
+ cause: cause
6
6
 
7
7
  constructor(message: string, options: BaseError.Options<cause> = {}) {
8
8
  super(message, options.cause ? { cause: options.cause } : undefined)
9
- this.cause = options.cause as any;
9
+ this.cause = options.cause as any
10
10
  }
11
11
  }
12
12
 
package/src/index.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * as SignIn from "./actions/signIn";
2
- export * from "./types";
3
- export * from "./schemas";
1
+ export * from './actions'
2
+ export * from './schemas'
3
+ export * from './types'
@@ -1,4 +1,6 @@
1
- export type Compute<type> = { [key in keyof type]: type[key] } & unknown
1
+ type Compute<type> = { [key in keyof type]: type[key] } & unknown
2
+
3
+ type KeyofUnion<type> = type extends type ? keyof type : never
2
4
 
3
5
  export type OneOf<
4
6
  union extends object,
@@ -16,6 +18,3 @@ export type OneOf<
16
18
  }
17
19
  >
18
20
  : never
19
-
20
- export type KeyofUnion<type> = type extends type ? keyof type : never
21
-
@@ -1,35 +1,35 @@
1
- import { z } from "zod";
1
+ import { z } from 'zod'
2
2
  import {
3
- hexColorSchema,
3
+ buttonTitleSchema,
4
4
  frameNameSchema,
5
+ hexColorSchema,
5
6
  secureUrlSchema,
6
- buttonTitleSchema,
7
- } from "./shared";
7
+ } from './shared'
8
8
 
9
9
  export const actionLaunchFrameSchema = z.object({
10
- type: z.literal("launch_frame"),
10
+ type: z.literal('launch_frame'),
11
11
  name: frameNameSchema,
12
12
  url: secureUrlSchema,
13
13
  splashImageUrl: secureUrlSchema.optional(),
14
14
  splashBackgroundColor: hexColorSchema.optional(),
15
- });
15
+ })
16
16
 
17
- export const actionSchema = z.discriminatedUnion("type", [
17
+ export const actionSchema = z.discriminatedUnion('type', [
18
18
  actionLaunchFrameSchema,
19
- ]);
19
+ ])
20
20
 
21
21
  export const buttonSchema = z.object({
22
22
  title: buttonTitleSchema,
23
23
  action: actionSchema,
24
- });
24
+ })
25
25
 
26
26
  export const frameEmbedNextSchema = z.object({
27
- version: z.literal("next"),
27
+ version: z.literal('next'),
28
28
  imageUrl: secureUrlSchema,
29
29
  button: buttonSchema,
30
- });
30
+ })
31
31
 
32
32
  export const safeParseFrameEmbed = (rawResponse: unknown) =>
33
- frameEmbedNextSchema.safeParse(rawResponse);
33
+ frameEmbedNextSchema.safeParse(rawResponse)
34
34
 
35
- export type FrameEmbedNext = z.infer<typeof frameEmbedNextSchema>;
35
+ export type FrameEmbedNext = z.infer<typeof frameEmbedNextSchema>
@@ -1,41 +1,41 @@
1
- import { z } from "zod";
2
- import { notificationDetailsSchema } from "./notifications";
1
+ import { z } from 'zod'
2
+ import { notificationDetailsSchema } from './notifications'
3
3
 
4
4
  export const eventFrameAddedSchema = z.object({
5
- event: z.literal("frame_added"),
5
+ event: z.literal('frame_added'),
6
6
  notificationDetails: notificationDetailsSchema.optional(),
7
- });
7
+ })
8
8
 
9
- export type EventFrameAdded = z.infer<typeof eventFrameAddedSchema>;
9
+ export type EventFrameAdded = z.infer<typeof eventFrameAddedSchema>
10
10
 
11
11
  export const eventFrameRemovedSchema = z.object({
12
- event: z.literal("frame_removed"),
13
- });
12
+ event: z.literal('frame_removed'),
13
+ })
14
14
 
15
- export type EventFrameRemoved = z.infer<typeof eventFrameRemovedSchema>;
15
+ export type EventFrameRemoved = z.infer<typeof eventFrameRemovedSchema>
16
16
 
17
17
  export const eventNotificationsEnabledSchema = z.object({
18
- event: z.literal("notifications_enabled"),
18
+ event: z.literal('notifications_enabled'),
19
19
  notificationDetails: notificationDetailsSchema.required(),
20
- });
20
+ })
21
21
 
22
22
  export type EventNotificationsEnabled = z.infer<
23
23
  typeof eventNotificationsEnabledSchema
24
- >;
24
+ >
25
25
 
26
26
  export const notificationsDisabledSchema = z.object({
27
- event: z.literal("notifications_disabled"),
28
- });
27
+ event: z.literal('notifications_disabled'),
28
+ })
29
29
 
30
30
  export type EventNotificationsDisabled = z.infer<
31
31
  typeof notificationsDisabledSchema
32
- >;
32
+ >
33
33
 
34
- export const serverEventSchema = z.discriminatedUnion("event", [
34
+ export const serverEventSchema = z.discriminatedUnion('event', [
35
35
  eventFrameAddedSchema,
36
36
  eventFrameRemovedSchema,
37
37
  eventNotificationsEnabledSchema,
38
38
  notificationsDisabledSchema,
39
- ]);
39
+ ])
40
40
 
41
- export type FrameServerEvent = z.infer<typeof serverEventSchema>;
41
+ export type FrameServerEvent = z.infer<typeof serverEventSchema>
@@ -1,5 +1,5 @@
1
- export * from "./embeds";
2
- export * from "./events";
3
- export * from "./shared";
4
- export * from "./manifest";
5
- export * from "./notifications";
1
+ export * from './embeds'
2
+ export * from './events'
3
+ export * from './shared'
4
+ export * from './manifest'
5
+ export * from './notifications'