@farcaster/frame-core 0.0.21 → 0.0.23
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/actions/AddFrame.d.ts +36 -0
- package/dist/actions/AddFrame.js +57 -0
- package/dist/actions/{signIn.d.ts → SignIn.d.ts} +7 -6
- package/dist/actions/{signIn.js → SignIn.js} +1 -1
- package/dist/actions/index.d.ts +2 -0
- package/dist/actions/index.js +38 -0
- package/dist/context.d.ts +72 -0
- package/dist/context.js +2 -0
- package/dist/errors.js +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +6 -5
- package/dist/internal/types.d.ts +3 -2
- package/dist/schemas/embeds.d.ts +1 -1
- package/dist/schemas/embeds.js +3 -3
- package/dist/schemas/events.d.ts +1 -1
- package/dist/schemas/events.js +5 -5
- package/dist/schemas/index.d.ts +5 -5
- package/dist/schemas/manifest.d.ts +1 -1
- package/dist/schemas/manifest.js +4 -4
- package/dist/schemas/notifications.d.ts +1 -1
- package/dist/schemas/shared.d.ts +1 -1
- package/dist/schemas/shared.js +4 -4
- package/dist/types.d.ts +40 -80
- package/esm/actions/AddFrame.d.ts +40 -0
- package/esm/actions/AddFrame.js +19 -0
- package/esm/actions/SignIn.d.ts +43 -0
- package/esm/actions/SignIn.js +10 -0
- package/esm/actions/index.d.ts +2 -0
- package/esm/actions/index.js +2 -0
- package/esm/context.d.ts +76 -0
- package/esm/context.js +1 -0
- package/esm/errors.d.ts +9 -7
- package/esm/errors.js +6 -6
- package/esm/index.d.ts +4 -3
- package/esm/index.js +4 -3
- package/esm/internal/types.d.ts +19 -7
- package/esm/internal/types.js +1 -1
- package/esm/schemas/embeds.d.ts +231 -169
- package/esm/schemas/embeds.js +25 -19
- package/esm/schemas/events.d.ts +225 -129
- package/esm/schemas/events.js +18 -18
- package/esm/schemas/index.d.ts +5 -5
- package/esm/schemas/index.js +5 -5
- package/esm/schemas/manifest.d.ts +154 -110
- package/esm/schemas/manifest.js +29 -23
- package/esm/schemas/notifications.d.ts +86 -58
- package/esm/schemas/notifications.js +17 -17
- package/esm/schemas/shared.d.ts +49 -33
- package/esm/schemas/shared.js +20 -19
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/esm/types.d.ts +132 -147
- package/esm/types.js +2 -2
- package/package.json +4 -5
- package/src/actions/AddFrame.ts +51 -0
- package/src/actions/SignIn.ts +51 -0
- package/src/actions/index.ts +2 -0
- package/src/context.ts +90 -0
- package/src/errors.ts +4 -4
- package/src/index.ts +4 -3
- package/src/internal/types.ts +3 -4
- package/src/schemas/embeds.ts +13 -13
- package/src/schemas/events.ts +17 -17
- package/src/schemas/index.ts +5 -5
- package/src/schemas/manifest.ts +11 -11
- package/src/schemas/notifications.ts +8 -10
- package/src/schemas/shared.ts +13 -13
- package/src/types.ts +88 -149
- package/esm/actions/signIn.d.ts +0 -40
- package/esm/actions/signIn.js +0 -10
- package/src/actions/signIn.ts +0 -50
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as Errors from '../errors'
|
|
2
|
+
/**
|
|
3
|
+
* Thrown when the frame does not have a valid domain manifest.
|
|
4
|
+
*/
|
|
5
|
+
export class InvalidDomainManifest extends Errors.BaseError {
|
|
6
|
+
name = 'AddFrame.InvalidDomainManifest'
|
|
7
|
+
constructor() {
|
|
8
|
+
super('Invalid domain manifest')
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Thrown when add frame action was rejected by the user.
|
|
13
|
+
*/
|
|
14
|
+
export class RejectedByUser extends Errors.BaseError {
|
|
15
|
+
name = 'AddFrame.RejectedByUser'
|
|
16
|
+
constructor() {
|
|
17
|
+
super('Add frame rejected by user')
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as Errors from '../errors'
|
|
2
|
+
import type { OneOf } from '../internal/types'
|
|
3
|
+
export type SignInOptions = {
|
|
4
|
+
/**
|
|
5
|
+
* A random string used to prevent replay attacks.
|
|
6
|
+
*/
|
|
7
|
+
nonce: string
|
|
8
|
+
/**
|
|
9
|
+
* Start time at which the signature becomes valid.
|
|
10
|
+
* ISO 8601 datetime.
|
|
11
|
+
*/
|
|
12
|
+
notBefore?: string
|
|
13
|
+
/**
|
|
14
|
+
* Expiration time at which the signature is no longer valid.
|
|
15
|
+
* ISO 8601 datetime.
|
|
16
|
+
*/
|
|
17
|
+
expirationTime?: string
|
|
18
|
+
}
|
|
19
|
+
export type SignInResult = {
|
|
20
|
+
signature: string
|
|
21
|
+
message: string
|
|
22
|
+
}
|
|
23
|
+
export type SignIn = (options: SignInOptions) => Promise<SignInResult>
|
|
24
|
+
type RejectedByUserJsonError = {
|
|
25
|
+
type: 'rejected_by_user'
|
|
26
|
+
}
|
|
27
|
+
export type SignInJsonError = RejectedByUserJsonError
|
|
28
|
+
export type SignInJsonResult = OneOf<
|
|
29
|
+
| {
|
|
30
|
+
result: SignInResult
|
|
31
|
+
}
|
|
32
|
+
| {
|
|
33
|
+
error: SignInJsonError
|
|
34
|
+
}
|
|
35
|
+
>
|
|
36
|
+
export type WireSignIn = (options: SignInOptions) => Promise<SignInJsonResult>
|
|
37
|
+
/**
|
|
38
|
+
* Thrown when a sign in action was rejected.
|
|
39
|
+
*/
|
|
40
|
+
export declare class RejectedByUser extends Errors.BaseError {
|
|
41
|
+
readonly name = 'SignIn.RejectedByUser'
|
|
42
|
+
constructor()
|
|
43
|
+
}
|
package/esm/context.d.ts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { FrameNotificationDetails } from './schemas'
|
|
2
|
+
export type CastEmbedLocationContext = {
|
|
3
|
+
type: 'cast_embed'
|
|
4
|
+
embed: string
|
|
5
|
+
cast: {
|
|
6
|
+
fid: number
|
|
7
|
+
hash: string
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export type NotificationLocationContext = {
|
|
11
|
+
type: 'notification'
|
|
12
|
+
notification: {
|
|
13
|
+
notificationId: string
|
|
14
|
+
title: string
|
|
15
|
+
body: string
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export type LauncherLocationContext = {
|
|
19
|
+
type: 'launcher'
|
|
20
|
+
}
|
|
21
|
+
export type ChannelLocationContext = {
|
|
22
|
+
type: 'channel'
|
|
23
|
+
channel: {
|
|
24
|
+
/**
|
|
25
|
+
* Channel key identifier
|
|
26
|
+
*/
|
|
27
|
+
key: string
|
|
28
|
+
/**
|
|
29
|
+
* Channel name
|
|
30
|
+
*/
|
|
31
|
+
name: string
|
|
32
|
+
/**
|
|
33
|
+
* Channel profile image URL
|
|
34
|
+
*/
|
|
35
|
+
imageUrl?: string
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export type LocationContext =
|
|
39
|
+
| CastEmbedLocationContext
|
|
40
|
+
| NotificationLocationContext
|
|
41
|
+
| LauncherLocationContext
|
|
42
|
+
| ChannelLocationContext
|
|
43
|
+
export type AccountLocation = {
|
|
44
|
+
placeId: string
|
|
45
|
+
/**
|
|
46
|
+
* Human-readable string describing the location
|
|
47
|
+
*/
|
|
48
|
+
description: string
|
|
49
|
+
}
|
|
50
|
+
export type UserContext = {
|
|
51
|
+
fid: number
|
|
52
|
+
username?: string
|
|
53
|
+
displayName?: string
|
|
54
|
+
/**
|
|
55
|
+
* Profile image URL
|
|
56
|
+
*/
|
|
57
|
+
pfpUrl?: string
|
|
58
|
+
location?: AccountLocation
|
|
59
|
+
}
|
|
60
|
+
export type SafeAreaInsets = {
|
|
61
|
+
top: number
|
|
62
|
+
bottom: number
|
|
63
|
+
left: number
|
|
64
|
+
right: number
|
|
65
|
+
}
|
|
66
|
+
export type ClientContext = {
|
|
67
|
+
clientFid: number
|
|
68
|
+
added: boolean
|
|
69
|
+
notificationDetails?: FrameNotificationDetails
|
|
70
|
+
safeAreaInsets?: SafeAreaInsets
|
|
71
|
+
}
|
|
72
|
+
export type FrameContext = {
|
|
73
|
+
client: ClientContext
|
|
74
|
+
user: UserContext
|
|
75
|
+
location?: LocationContext
|
|
76
|
+
}
|
package/esm/context.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/esm/errors.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
export declare class BaseError<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export declare class BaseError<
|
|
2
|
+
cause extends Error | undefined = undefined,
|
|
3
|
+
> extends Error {
|
|
4
|
+
name: string
|
|
5
|
+
cause: cause
|
|
6
|
+
constructor(message: string, options?: BaseError.Options<cause>)
|
|
5
7
|
}
|
|
6
8
|
export declare namespace BaseError {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
type Options<cause extends Error | undefined = Error | undefined> = {
|
|
10
|
+
cause?: cause | undefined
|
|
11
|
+
}
|
|
10
12
|
}
|
package/esm/errors.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export class BaseError extends Error {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
name = 'BaseError'
|
|
3
|
+
cause
|
|
4
|
+
constructor(message, options = {}) {
|
|
5
|
+
super(message, options.cause ? { cause: options.cause } : undefined)
|
|
6
|
+
this.cause = options.cause
|
|
7
|
+
}
|
|
8
8
|
}
|
package/esm/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export *
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
1
|
+
export * from './actions'
|
|
2
|
+
export * as Context from './context'
|
|
3
|
+
export * from './types'
|
|
4
|
+
export * from './schemas'
|
package/esm/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export *
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
1
|
+
export * from './actions'
|
|
2
|
+
export * as Context from './context'
|
|
3
|
+
export * from './types'
|
|
4
|
+
export * from './schemas'
|
package/esm/internal/types.d.ts
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
} & unknown
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
type Compute<type> = {
|
|
2
|
+
[key in keyof type]: type[key]
|
|
3
|
+
} & unknown
|
|
4
|
+
type KeyofUnion<type> = type extends type ? keyof type : never
|
|
5
|
+
export type OneOf<
|
|
6
|
+
union extends object,
|
|
7
|
+
fallback extends object | undefined = undefined,
|
|
8
|
+
keys extends KeyofUnion<union> = KeyofUnion<union>,
|
|
9
|
+
> = union extends infer item
|
|
10
|
+
? Compute<
|
|
11
|
+
item & {
|
|
12
|
+
[key in Exclude<keys, keyof item>]?: fallback extends object
|
|
13
|
+
? key extends keyof fallback
|
|
14
|
+
? fallback[key]
|
|
15
|
+
: undefined
|
|
16
|
+
: undefined
|
|
17
|
+
}
|
|
18
|
+
>
|
|
19
|
+
: never
|
package/esm/internal/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {}
|
|
1
|
+
export {}
|
package/esm/schemas/embeds.d.ts
CHANGED
|
@@ -1,177 +1,239 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
export declare const actionLaunchFrameSchema: z.ZodObject<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
1
|
+
import type { z } from 'zod'
|
|
2
|
+
export declare const actionLaunchFrameSchema: z.ZodObject<
|
|
3
|
+
{
|
|
4
|
+
type: z.ZodLiteral<'launch_frame'>
|
|
5
|
+
name: z.ZodString
|
|
6
|
+
url: z.ZodString
|
|
7
|
+
splashImageUrl: z.ZodOptional<z.ZodString>
|
|
8
|
+
splashBackgroundColor: z.ZodOptional<z.ZodString>
|
|
9
|
+
},
|
|
10
|
+
'strip',
|
|
11
|
+
z.ZodTypeAny,
|
|
12
|
+
{
|
|
13
|
+
type: 'launch_frame'
|
|
14
|
+
name: string
|
|
15
|
+
url: string
|
|
16
|
+
splashImageUrl?: string | undefined
|
|
17
|
+
splashBackgroundColor?: string | undefined
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: 'launch_frame'
|
|
21
|
+
name: string
|
|
22
|
+
url: string
|
|
23
|
+
splashImageUrl?: string | undefined
|
|
24
|
+
splashBackgroundColor?: string | undefined
|
|
25
|
+
}
|
|
26
|
+
>
|
|
27
|
+
export declare const actionSchema: z.ZodDiscriminatedUnion<
|
|
28
|
+
'type',
|
|
29
|
+
[
|
|
30
|
+
z.ZodObject<
|
|
31
|
+
{
|
|
32
|
+
type: z.ZodLiteral<'launch_frame'>
|
|
33
|
+
name: z.ZodString
|
|
34
|
+
url: z.ZodString
|
|
35
|
+
splashImageUrl: z.ZodOptional<z.ZodString>
|
|
36
|
+
splashBackgroundColor: z.ZodOptional<z.ZodString>
|
|
37
|
+
},
|
|
38
|
+
'strip',
|
|
39
|
+
z.ZodTypeAny,
|
|
40
|
+
{
|
|
41
|
+
type: 'launch_frame'
|
|
42
|
+
name: string
|
|
43
|
+
url: string
|
|
44
|
+
splashImageUrl?: string | undefined
|
|
45
|
+
splashBackgroundColor?: string | undefined
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
type: 'launch_frame'
|
|
49
|
+
name: string
|
|
50
|
+
url: string
|
|
51
|
+
splashImageUrl?: string | undefined
|
|
52
|
+
splashBackgroundColor?: string | undefined
|
|
53
|
+
}
|
|
54
|
+
>,
|
|
55
|
+
]
|
|
56
|
+
>
|
|
57
|
+
export declare const buttonSchema: z.ZodObject<
|
|
58
|
+
{
|
|
59
|
+
title: z.ZodString
|
|
60
|
+
action: z.ZodDiscriminatedUnion<
|
|
61
|
+
'type',
|
|
62
|
+
[
|
|
63
|
+
z.ZodObject<
|
|
64
|
+
{
|
|
65
|
+
type: z.ZodLiteral<'launch_frame'>
|
|
66
|
+
name: z.ZodString
|
|
67
|
+
url: z.ZodString
|
|
68
|
+
splashImageUrl: z.ZodOptional<z.ZodString>
|
|
69
|
+
splashBackgroundColor: z.ZodOptional<z.ZodString>
|
|
70
|
+
},
|
|
71
|
+
'strip',
|
|
72
|
+
z.ZodTypeAny,
|
|
73
|
+
{
|
|
74
|
+
type: 'launch_frame'
|
|
75
|
+
name: string
|
|
76
|
+
url: string
|
|
77
|
+
splashImageUrl?: string | undefined
|
|
78
|
+
splashBackgroundColor?: string | undefined
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
type: 'launch_frame'
|
|
82
|
+
name: string
|
|
83
|
+
url: string
|
|
84
|
+
splashImageUrl?: string | undefined
|
|
85
|
+
splashBackgroundColor?: string | undefined
|
|
86
|
+
}
|
|
87
|
+
>,
|
|
88
|
+
]
|
|
89
|
+
>
|
|
90
|
+
},
|
|
91
|
+
'strip',
|
|
92
|
+
z.ZodTypeAny,
|
|
93
|
+
{
|
|
94
|
+
title: string
|
|
63
95
|
action: {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
|
|
96
|
+
type: 'launch_frame'
|
|
97
|
+
name: string
|
|
98
|
+
url: string
|
|
99
|
+
splashImageUrl?: string | undefined
|
|
100
|
+
splashBackgroundColor?: string | undefined
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
title: string
|
|
72
105
|
action: {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
type: 'launch_frame'
|
|
107
|
+
name: string
|
|
108
|
+
url: string
|
|
109
|
+
splashImageUrl?: string | undefined
|
|
110
|
+
splashBackgroundColor?: string | undefined
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
>
|
|
114
|
+
export declare const frameEmbedNextSchema: z.ZodObject<
|
|
115
|
+
{
|
|
116
|
+
version: z.ZodLiteral<'next'>
|
|
117
|
+
imageUrl: z.ZodString
|
|
118
|
+
button: z.ZodObject<
|
|
119
|
+
{
|
|
120
|
+
title: z.ZodString
|
|
121
|
+
action: z.ZodDiscriminatedUnion<
|
|
122
|
+
'type',
|
|
123
|
+
[
|
|
124
|
+
z.ZodObject<
|
|
125
|
+
{
|
|
126
|
+
type: z.ZodLiteral<'launch_frame'>
|
|
127
|
+
name: z.ZodString
|
|
128
|
+
url: z.ZodString
|
|
129
|
+
splashImageUrl: z.ZodOptional<z.ZodString>
|
|
130
|
+
splashBackgroundColor: z.ZodOptional<z.ZodString>
|
|
131
|
+
},
|
|
132
|
+
'strip',
|
|
133
|
+
z.ZodTypeAny,
|
|
134
|
+
{
|
|
135
|
+
type: 'launch_frame'
|
|
136
|
+
name: string
|
|
137
|
+
url: string
|
|
138
|
+
splashImageUrl?: string | undefined
|
|
139
|
+
splashBackgroundColor?: string | undefined
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
type: 'launch_frame'
|
|
143
|
+
name: string
|
|
144
|
+
url: string
|
|
145
|
+
splashImageUrl?: string | undefined
|
|
146
|
+
splashBackgroundColor?: string | undefined
|
|
147
|
+
}
|
|
148
|
+
>,
|
|
149
|
+
]
|
|
150
|
+
>
|
|
151
|
+
},
|
|
152
|
+
'strip',
|
|
153
|
+
z.ZodTypeAny,
|
|
154
|
+
{
|
|
155
|
+
title: string
|
|
106
156
|
action: {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
157
|
+
type: 'launch_frame'
|
|
158
|
+
name: string
|
|
159
|
+
url: string
|
|
160
|
+
splashImageUrl?: string | undefined
|
|
161
|
+
splashBackgroundColor?: string | undefined
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
title: string
|
|
115
166
|
action: {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
167
|
+
type: 'launch_frame'
|
|
168
|
+
name: string
|
|
169
|
+
url: string
|
|
170
|
+
splashImageUrl?: string | undefined
|
|
171
|
+
splashBackgroundColor?: string | undefined
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
>
|
|
175
|
+
},
|
|
176
|
+
'strip',
|
|
177
|
+
z.ZodTypeAny,
|
|
178
|
+
{
|
|
179
|
+
version: 'next'
|
|
180
|
+
imageUrl: string
|
|
126
181
|
button: {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
|
|
182
|
+
title: string
|
|
183
|
+
action: {
|
|
184
|
+
type: 'launch_frame'
|
|
185
|
+
name: string
|
|
186
|
+
url: string
|
|
187
|
+
splashImageUrl?: string | undefined
|
|
188
|
+
splashBackgroundColor?: string | undefined
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
version: 'next'
|
|
194
|
+
imageUrl: string
|
|
139
195
|
button: {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
196
|
+
title: string
|
|
197
|
+
action: {
|
|
198
|
+
type: 'launch_frame'
|
|
199
|
+
name: string
|
|
200
|
+
url: string
|
|
201
|
+
splashImageUrl?: string | undefined
|
|
202
|
+
splashBackgroundColor?: string | undefined
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
>
|
|
207
|
+
export declare const safeParseFrameEmbed: (
|
|
208
|
+
rawResponse: unknown,
|
|
209
|
+
) => z.SafeParseReturnType<
|
|
210
|
+
{
|
|
211
|
+
version: 'next'
|
|
212
|
+
imageUrl: string
|
|
153
213
|
button: {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
|
|
214
|
+
title: string
|
|
215
|
+
action: {
|
|
216
|
+
type: 'launch_frame'
|
|
217
|
+
name: string
|
|
218
|
+
url: string
|
|
219
|
+
splashImageUrl?: string | undefined
|
|
220
|
+
splashBackgroundColor?: string | undefined
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
version: 'next'
|
|
226
|
+
imageUrl: string
|
|
166
227
|
button: {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
228
|
+
title: string
|
|
229
|
+
action: {
|
|
230
|
+
type: 'launch_frame'
|
|
231
|
+
name: string
|
|
232
|
+
url: string
|
|
233
|
+
splashImageUrl?: string | undefined
|
|
234
|
+
splashBackgroundColor?: string | undefined
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
>
|
|
239
|
+
export type FrameEmbedNext = z.infer<typeof frameEmbedNextSchema>
|