@stacksjs/types 0.75.34 → 0.75.35

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/app.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { SeoOptions } from './seo';
1
2
  /**
2
3
  * **Application Options**
3
4
  *
@@ -25,6 +26,7 @@ export declare interface AppOptions {
25
26
  docMode: boolean
26
27
  primaryColor: string
27
28
  supportEmail: string
29
+ seo?: SeoOptions
28
30
  }
29
31
  // `(string & {})` rather than a bare `string`, which would absorb every
30
32
  // literal beside it and collapse the union to `string` - erasing the named
package/dist/auth.d.ts CHANGED
@@ -44,6 +44,14 @@ export declare interface OAuthProviderConsentWorkspaceContext {
44
44
  user: AuthenticatedUser
45
45
  request: RequestInstance
46
46
  }
47
+ /** Current subject and delegated grant presented to an OAuth policy hook. */
48
+ export declare interface OAuthProviderSubject {
49
+ type: string
50
+ id: number
51
+ clientId: number
52
+ grantId: string
53
+ workspaceId: string | null
54
+ }
47
55
  export declare interface OAuthProviderConfig {
48
56
  enabled?: boolean
49
57
  issuer?: string
@@ -51,10 +59,14 @@ export declare interface OAuthProviderConfig {
51
59
  authorization?: string
52
60
  token?: string
53
61
  revocation?: string
62
+ introspection?: string
54
63
  }
55
64
  scopes?: Record<string, OAuthProviderScopeConfig>
56
65
  resources?: Record<string, OAuthProviderResourceConfig>
57
66
  clientTypes?: readonly ('confidential' | 'public')[]
67
+ clientCredentials?: boolean
68
+ introspection?: boolean
69
+ subjectEligibility?: OAuthProviderSubjectEligibility
58
70
  lifetimes?: {
59
71
  authorizationRequest?: number
60
72
  authorizationCode?: number
@@ -143,6 +155,16 @@ export declare interface Authenticatable {
143
155
  export type OAuthProviderConsentWorkspaceResolver = (
144
156
  context: OAuthProviderConsentWorkspaceContext,
145
157
  ) => OAuthProviderConsentWorkspace | null | Promise<OAuthProviderConsentWorkspace | null>;
158
+ /**
159
+ * Application-owned eligibility policy for delegated OAuth subjects.
160
+ *
161
+ * The default provider can verify that a user row still exists, but only the
162
+ * application knows whether an account is disabled, suspended, or otherwise
163
+ * barred from receiving delegated access.
164
+ */
165
+ export type OAuthProviderSubjectEligibility = (
166
+ subject: OAuthProviderSubject,
167
+ ) => boolean | Promise<boolean>;
146
168
  export type AuthConfig = Partial<AuthOptions>;
147
169
  export type GuardType = 'session' | 'token';
148
170
  export type ProviderType = 'database';
package/dist/index.d.ts CHANGED
@@ -71,6 +71,7 @@ export * from './saas';
71
71
  export * from './scheduler';
72
72
  export * from './search-engine';
73
73
  export * from './security';
74
+ export * from './seo';
74
75
  export * from './server';
75
76
  export * from './services';
76
77
  export * from './sites';
package/dist/seo.d.ts ADDED
@@ -0,0 +1,41 @@
1
+ /**
2
+ * **SEO Options** (`config/app.ts` → `seo`)
3
+ *
4
+ * The views server answers `/sitemap.xml` and `/robots.txt` for every app, in
5
+ * development and production alike, generated from `resources/views` at
6
+ * request time. Nothing here is required: an app with no `seo` block gets a
7
+ * sitemap of its static pages and a robots.txt that points at it.
8
+ *
9
+ * A page stays out of the sitemap when its source says `noindex` - a
10
+ * `<meta name="robots" content="noindex">` tag, a `robots: 'noindex'` head
11
+ * entry, or the `const noindex = true` flag a shared head partial turns into
12
+ * that tag - or when it is dynamic (`[param].stx`), an error page, behind the
13
+ * `auth` page middleware, or disallowed by robots.txt.
14
+ */
15
+ export declare interface SeoOptions {
16
+ origin?: string
17
+ handwritten?: 'prefer' | 'replace'
18
+ sitemap?: false | SeoSitemapOptions
19
+ robots?: false | SeoRobotsOptions
20
+ }
21
+ export declare interface SeoSitemapEntry {
22
+ loc: string
23
+ lastmod?: string
24
+ changefreq?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never'
25
+ priority?: number
26
+ }
27
+ export declare interface SeoSitemapOptions {
28
+ include?: (string | SeoSitemapEntry)[]
29
+ entries?: () => (string | SeoSitemapEntry)[] | Promise<(string | SeoSitemapEntry)[]>
30
+ exclude?: string[]
31
+ }
32
+ export declare interface SeoRobotsRule {
33
+ userAgent: string
34
+ allow?: string[]
35
+ disallow?: string[]
36
+ crawlDelay?: number
37
+ }
38
+ export declare interface SeoRobotsOptions {
39
+ disallow?: string[]
40
+ rules?: SeoRobotsRule[]
41
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/types",
3
3
  "type": "module",
4
- "version": "0.75.34",
4
+ "version": "0.75.35",
5
5
  "description": "The Stacks framework types.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": [
@@ -58,9 +58,9 @@
58
58
  "dependencies": {
59
59
  "@stacksjs/bunpress": "^0.2.8",
60
60
  "@stacksjs/clapp": "^0.2.12",
61
- "@stacksjs/events": "0.75.34",
62
- "@stacksjs/strings": "0.75.34",
63
- "@stacksjs/stx": "^0.2.341",
61
+ "@stacksjs/events": "0.75.35",
62
+ "@stacksjs/strings": "0.75.35",
63
+ "@stacksjs/stx": "^0.2.343",
64
64
  "@stacksjs/ts-validation": "^0.5.6",
65
65
  "bun-query-builder": "^0.3.0"
66
66
  },
@@ -73,7 +73,7 @@
73
73
  }
74
74
  },
75
75
  "devDependencies": {
76
- "@stacksjs/validation": "0.75.34",
76
+ "@stacksjs/validation": "0.75.35",
77
77
  "better-dx": "^0.2.24",
78
78
  "meilisearch": "^0.59.0"
79
79
  },