@stacksjs/types 0.75.90 → 0.75.92
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/dashboard.d.ts +10 -0
- package/dist/socials.d.ts +94 -2
- package/package.json +4 -4
package/dist/dashboard.d.ts
CHANGED
|
@@ -61,6 +61,16 @@ export declare interface DashboardOptions {
|
|
|
61
61
|
retentionHours?: number
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
+
feedback?: {
|
|
65
|
+
attachments?: {
|
|
66
|
+
disk?: string
|
|
67
|
+
}
|
|
68
|
+
notifications?: {
|
|
69
|
+
enabled?: boolean
|
|
70
|
+
channels?: Array<'email' | 'sms' | 'chat' | 'database'>
|
|
71
|
+
recipients?: Array<{ email?: string, phone?: string, userId?: number }>
|
|
72
|
+
}
|
|
73
|
+
}
|
|
64
74
|
providers?: DashboardProviderOptions
|
|
65
75
|
}
|
|
66
76
|
/**
|
package/dist/socials.d.ts
CHANGED
|
@@ -19,6 +19,10 @@ export declare interface SocialIdentityOptions {
|
|
|
19
19
|
export declare interface SocialCredentialsByPlatform {
|
|
20
20
|
bluesky: BlueskyCredentialOptions
|
|
21
21
|
twitter: TwitterCredentialOptions
|
|
22
|
+
linkedin: LinkedInCredentialOptions
|
|
23
|
+
mastodon: MastodonCredentialOptions
|
|
24
|
+
instagram: InstagramCredentialOptions
|
|
25
|
+
threads: ThreadsCredentialOptions
|
|
22
26
|
}
|
|
23
27
|
/**
|
|
24
28
|
* Bluesky authenticates with an app password, not an OAuth token.
|
|
@@ -53,6 +57,94 @@ export declare interface TwitterCredentialOptions {
|
|
|
53
57
|
accessToken?: string
|
|
54
58
|
refreshToken?: string
|
|
55
59
|
}
|
|
56
|
-
/**
|
|
57
|
-
|
|
60
|
+
/**
|
|
61
|
+
* LinkedIn posts as a member, named by URN.
|
|
62
|
+
*
|
|
63
|
+
* `LinkedInPublishingDriver.publish()` reads `identity.did` as the author
|
|
64
|
+
* URN and refuses without it, so the URN is a credential here rather than
|
|
65
|
+
* something to look up per post. It comes out of the consent flow's
|
|
66
|
+
* `getProfile()` as `urn:li:person:{sub}`.
|
|
67
|
+
*
|
|
68
|
+
* `clientId` and `clientSecret` are only for refreshing: posting itself needs
|
|
69
|
+
* the access token and the URN.
|
|
70
|
+
*
|
|
71
|
+
* Environment convention: `SOCIALS_<IDENTITY>_LINKEDIN_ACCESS_TOKEN`,
|
|
72
|
+
* `_MEMBER_URN`, and optionally `_CLIENT_ID`, `_CLIENT_SECRET`,
|
|
73
|
+
* `_API_VERSION`.
|
|
74
|
+
*/
|
|
75
|
+
export declare interface LinkedInCredentialOptions {
|
|
76
|
+
accessToken?: string
|
|
77
|
+
memberUrn?: string
|
|
78
|
+
clientId?: string
|
|
79
|
+
clientSecret?: string
|
|
80
|
+
apiVersion?: string
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Mastodon is one protocol across many hosts, so the host is a credential.
|
|
84
|
+
*
|
|
85
|
+
* `MastodonPublishingDriver` reads `identity.did` as the instance base URL,
|
|
86
|
+
* because an access token means nothing without the instance that issued it.
|
|
87
|
+
*
|
|
88
|
+
* The token is generated by hand in the instance's Preferences, Development,
|
|
89
|
+
* so there is no consent URL or code exchange to run: this is the one platform
|
|
90
|
+
* here whose credentials can be pasted into `.env` complete.
|
|
91
|
+
*
|
|
92
|
+
* Environment convention: `SOCIALS_<IDENTITY>_MASTODON_ACCESS_TOKEN` and
|
|
93
|
+
* `_INSTANCE_URL`.
|
|
94
|
+
*/
|
|
95
|
+
export declare interface MastodonCredentialOptions {
|
|
96
|
+
accessToken?: string
|
|
97
|
+
instanceUrl?: string
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Instagram posts to a Business account, named by id.
|
|
101
|
+
*
|
|
102
|
+
* `InstagramPublishingDriver` reads `identity.did` as the account id and
|
|
103
|
+
* refuses without it. Note that Instagram also refuses a text-only post: its
|
|
104
|
+
* `publish()` requires `media[0].url` to be a publicly reachable image, so an
|
|
105
|
+
* identity configured for Instagram alone cannot post what the others can.
|
|
106
|
+
*
|
|
107
|
+
* Environment convention: `SOCIALS_<IDENTITY>_INSTAGRAM_ACCESS_TOKEN` and
|
|
108
|
+
* `_ACCOUNT_ID`.
|
|
109
|
+
*/
|
|
110
|
+
export declare interface InstagramCredentialOptions {
|
|
111
|
+
accessToken?: string
|
|
112
|
+
accountId?: string
|
|
113
|
+
clientId?: string
|
|
114
|
+
clientSecret?: string
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Threads posts as a user, named by id.
|
|
118
|
+
*
|
|
119
|
+
* `ThreadsPublishingDriver` reads `identity.did` as the user id, which the
|
|
120
|
+
* token exchange returns alongside the access token.
|
|
121
|
+
*
|
|
122
|
+
* Environment convention: `SOCIALS_<IDENTITY>_THREADS_ACCESS_TOKEN` and
|
|
123
|
+
* `_USER_ID`.
|
|
124
|
+
*/
|
|
125
|
+
export declare interface ThreadsCredentialOptions {
|
|
126
|
+
accessToken?: string
|
|
127
|
+
userId?: string
|
|
128
|
+
clientId?: string
|
|
129
|
+
clientSecret?: string
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* The platforms whose credential shape is confirmed against their driver.
|
|
133
|
+
*
|
|
134
|
+
* Read off each driver's `publish()` rather than from its documentation: what
|
|
135
|
+
* a driver refuses to post without is the only authority on what a credential
|
|
136
|
+
* has to carry. Every one of these is the full set of fields its driver
|
|
137
|
+
* dereferences.
|
|
138
|
+
*
|
|
139
|
+
* Deliberately not {@link SocialProviderName}, which is the OAuth sign-in
|
|
140
|
+
* layer. Signing a visitor in with Google and posting as an account are
|
|
141
|
+
* different capabilities, and a type that conflates them lets a sign-in
|
|
142
|
+
* provider be passed where a publishing driver is meant.
|
|
143
|
+
*/
|
|
144
|
+
export type SocialCredentialPlatform = | 'bluesky'
|
|
145
|
+
| 'twitter'
|
|
146
|
+
| 'linkedin'
|
|
147
|
+
| 'mastodon'
|
|
148
|
+
| 'instagram'
|
|
149
|
+
| 'threads';
|
|
58
150
|
export type SocialsConfig = Partial<SocialsOptions>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/types",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.75.
|
|
4
|
+
"version": "0.75.92",
|
|
5
5
|
"description": "The Stacks framework types.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"contributors": [
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@stacksjs/bunpress": "^0.2.15",
|
|
60
60
|
"@stacksjs/clapp": "^0.2.12",
|
|
61
|
-
"@stacksjs/events": "0.75.
|
|
62
|
-
"@stacksjs/strings": "0.75.
|
|
61
|
+
"@stacksjs/events": "0.75.92",
|
|
62
|
+
"@stacksjs/strings": "0.75.92",
|
|
63
63
|
"@stacksjs/stx": "^0.2.395",
|
|
64
64
|
"@stacksjs/ts-validation": "^0.5.6",
|
|
65
65
|
"bun-query-builder": "^0.3.5"
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@stacksjs/validation": "0.75.
|
|
76
|
+
"@stacksjs/validation": "0.75.92",
|
|
77
77
|
"better-dx": "^0.2.24",
|
|
78
78
|
"meilisearch": "^0.62.0"
|
|
79
79
|
},
|