create-payload-app 3.20.0-canary.a40bec2 → 3.20.0-canary.fb49f3a

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.
@@ -13,6 +13,7 @@ export default async function HomePage() {
13
13
  const payload = await getPayload({ config: payloadConfig })
14
14
  const { user } = await payload.auth({ headers })
15
15
 
16
+ const adminRoute = payloadConfig.routes?.admin || '/admin'
16
17
  const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
17
18
 
18
19
  return (
@@ -30,12 +31,7 @@ export default async function HomePage() {
30
31
  {!user && <h1>Welcome to your new project.</h1>}
31
32
  {user && <h1>Welcome back, {user.email}</h1>}
32
33
  <div className="links">
33
- <a
34
- className="admin"
35
- href={payloadConfig.routes.admin}
36
- rel="noopener noreferrer"
37
- target="_blank"
38
- >
34
+ <a className="admin" href={adminRoute} rel="noopener noreferrer" target="_blank">
39
35
  Go to admin panel
40
36
  </a>
41
37
  <a
@@ -13,17 +13,31 @@ export interface Config {
13
13
  collections: {
14
14
  users: User;
15
15
  media: Media;
16
+ 'payload-locked-documents': PayloadLockedDocument;
16
17
  'payload-preferences': PayloadPreference;
17
18
  'payload-migrations': PayloadMigration;
18
19
  };
20
+ collectionsJoins: {};
21
+ collectionsSelect: {
22
+ users: UsersSelect<false> | UsersSelect<true>;
23
+ media: MediaSelect<false> | MediaSelect<true>;
24
+ 'payload-locked-documents': PayloadLockedDocumentsSelect<false> | PayloadLockedDocumentsSelect<true>;
25
+ 'payload-preferences': PayloadPreferencesSelect<false> | PayloadPreferencesSelect<true>;
26
+ 'payload-migrations': PayloadMigrationsSelect<false> | PayloadMigrationsSelect<true>;
27
+ };
19
28
  db: {
20
29
  defaultIDType: string;
21
30
  };
22
31
  globals: {};
32
+ globalsSelect: {};
23
33
  locale: null;
24
34
  user: User & {
25
35
  collection: 'users';
26
36
  };
37
+ jobs: {
38
+ tasks: unknown;
39
+ workflows: unknown;
40
+ };
27
41
  }
28
42
  export interface UserAuthOperations {
29
43
  forgotPassword: {
@@ -79,6 +93,29 @@ export interface Media {
79
93
  focalX?: number | null;
80
94
  focalY?: number | null;
81
95
  }
96
+ /**
97
+ * This interface was referenced by `Config`'s JSON-Schema
98
+ * via the `definition` "payload-locked-documents".
99
+ */
100
+ export interface PayloadLockedDocument {
101
+ id: string;
102
+ document?:
103
+ | ({
104
+ relationTo: 'users';
105
+ value: string | User;
106
+ } | null)
107
+ | ({
108
+ relationTo: 'media';
109
+ value: string | Media;
110
+ } | null);
111
+ globalSlug?: string | null;
112
+ user: {
113
+ relationTo: 'users';
114
+ value: string | User;
115
+ };
116
+ updatedAt: string;
117
+ createdAt: string;
118
+ }
82
119
  /**
83
120
  * This interface was referenced by `Config`'s JSON-Schema
84
121
  * via the `definition` "payload-preferences".
@@ -113,6 +150,71 @@ export interface PayloadMigration {
113
150
  updatedAt: string;
114
151
  createdAt: string;
115
152
  }
153
+ /**
154
+ * This interface was referenced by `Config`'s JSON-Schema
155
+ * via the `definition` "users_select".
156
+ */
157
+ export interface UsersSelect<T extends boolean = true> {
158
+ updatedAt?: T;
159
+ createdAt?: T;
160
+ email?: T;
161
+ resetPasswordToken?: T;
162
+ resetPasswordExpiration?: T;
163
+ salt?: T;
164
+ hash?: T;
165
+ loginAttempts?: T;
166
+ lockUntil?: T;
167
+ }
168
+ /**
169
+ * This interface was referenced by `Config`'s JSON-Schema
170
+ * via the `definition` "media_select".
171
+ */
172
+ export interface MediaSelect<T extends boolean = true> {
173
+ alt?: T;
174
+ updatedAt?: T;
175
+ createdAt?: T;
176
+ url?: T;
177
+ thumbnailURL?: T;
178
+ filename?: T;
179
+ mimeType?: T;
180
+ filesize?: T;
181
+ width?: T;
182
+ height?: T;
183
+ focalX?: T;
184
+ focalY?: T;
185
+ }
186
+ /**
187
+ * This interface was referenced by `Config`'s JSON-Schema
188
+ * via the `definition` "payload-locked-documents_select".
189
+ */
190
+ export interface PayloadLockedDocumentsSelect<T extends boolean = true> {
191
+ document?: T;
192
+ globalSlug?: T;
193
+ user?: T;
194
+ updatedAt?: T;
195
+ createdAt?: T;
196
+ }
197
+ /**
198
+ * This interface was referenced by `Config`'s JSON-Schema
199
+ * via the `definition` "payload-preferences_select".
200
+ */
201
+ export interface PayloadPreferencesSelect<T extends boolean = true> {
202
+ user?: T;
203
+ key?: T;
204
+ value?: T;
205
+ updatedAt?: T;
206
+ createdAt?: T;
207
+ }
208
+ /**
209
+ * This interface was referenced by `Config`'s JSON-Schema
210
+ * via the `definition` "payload-migrations_select".
211
+ */
212
+ export interface PayloadMigrationsSelect<T extends boolean = true> {
213
+ name?: T;
214
+ batch?: T;
215
+ updatedAt?: T;
216
+ createdAt?: T;
217
+ }
116
218
  /**
117
219
  * This interface was referenced by `Config`'s JSON-Schema
118
220
  * via the `definition` "auth".
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-payload-app",
3
- "version": "3.20.0-canary.a40bec2",
3
+ "version": "3.20.0-canary.fb49f3a",
4
4
  "homepage": "https://payloadcms.com",
5
5
  "repository": {
6
6
  "type": "git",