@sanity/blueprints 0.34.0 → 0.35.0

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 (149) hide show
  1. package/dist/definers/agents.d.ts +3 -1
  2. package/dist/definers/agents.js +3 -1
  3. package/dist/definers/agents.js.map +1 -1
  4. package/dist/definers/applications.d.ts +30 -18
  5. package/dist/definers/applications.js +30 -18
  6. package/dist/definers/applications.js.map +1 -1
  7. package/dist/definers/blueprints.d.ts +1 -0
  8. package/dist/definers/blueprints.js +1 -25
  9. package/dist/definers/blueprints.js.map +1 -1
  10. package/dist/definers/context.d.ts +6 -2
  11. package/dist/definers/context.js +6 -2
  12. package/dist/definers/context.js.map +1 -1
  13. package/dist/definers/cors.d.ts +11 -1
  14. package/dist/definers/cors.js +10 -12
  15. package/dist/definers/cors.js.map +1 -1
  16. package/dist/definers/datasets.d.ts +12 -2
  17. package/dist/definers/datasets.js +11 -14
  18. package/dist/definers/datasets.js.map +1 -1
  19. package/dist/definers/functions/document.d.ts +30 -0
  20. package/dist/definers/functions/document.js.map +1 -1
  21. package/dist/definers/functions/durable.d.ts +4 -3
  22. package/dist/definers/functions/durable.js +4 -3
  23. package/dist/definers/functions/durable.js.map +1 -1
  24. package/dist/definers/functions/media-library.d.ts +31 -0
  25. package/dist/definers/functions/media-library.js +18 -19
  26. package/dist/definers/functions/media-library.js.map +1 -1
  27. package/dist/definers/functions/pubsub.d.ts +2 -3
  28. package/dist/definers/functions/pubsub.js +2 -3
  29. package/dist/definers/functions/pubsub.js.map +1 -1
  30. package/dist/definers/functions/queue.d.ts +15 -4
  31. package/dist/definers/functions/queue.js +19 -6
  32. package/dist/definers/functions/queue.js.map +1 -1
  33. package/dist/definers/functions/scheduled.d.ts +7 -6
  34. package/dist/definers/functions/scheduled.js +7 -6
  35. package/dist/definers/functions/scheduled.js.map +1 -1
  36. package/dist/definers/functions/sync-tag-invalidate.d.ts +5 -2
  37. package/dist/definers/functions/sync-tag-invalidate.js +5 -2
  38. package/dist/definers/functions/sync-tag-invalidate.js.map +1 -1
  39. package/dist/definers/installation-config.d.ts +4 -2
  40. package/dist/definers/installation-config.js +4 -2
  41. package/dist/definers/installation-config.js.map +1 -1
  42. package/dist/definers/permissions.d.ts +8 -2
  43. package/dist/definers/permissions.js +8 -2
  44. package/dist/definers/permissions.js.map +1 -1
  45. package/dist/definers/projects.d.ts +3 -4
  46. package/dist/definers/projects.js +3 -4
  47. package/dist/definers/projects.js.map +1 -1
  48. package/dist/definers/resources.d.ts +1 -0
  49. package/dist/definers/resources.js +1 -11
  50. package/dist/definers/resources.js.map +1 -1
  51. package/dist/definers/robotTokens.d.ts +22 -3
  52. package/dist/definers/robotTokens.js +17 -18
  53. package/dist/definers/robotTokens.js.map +1 -1
  54. package/dist/definers/roles.d.ts +53 -5
  55. package/dist/definers/roles.js +38 -40
  56. package/dist/definers/roles.js.map +1 -1
  57. package/dist/definers/studios.d.ts +5 -3
  58. package/dist/definers/studios.js +5 -3
  59. package/dist/definers/studios.js.map +1 -1
  60. package/dist/definers/webhooks.d.ts +19 -1
  61. package/dist/definers/webhooks.js +15 -17
  62. package/dist/definers/webhooks.js.map +1 -1
  63. package/dist/index.d.ts +18 -18
  64. package/dist/index.js +19 -20
  65. package/dist/index.js.map +1 -1
  66. package/dist/resolve/index.d.ts +2 -3
  67. package/dist/resolve/index.js +2 -3
  68. package/dist/resolve/index.js.map +1 -1
  69. package/dist/types/agents.d.ts +7 -3
  70. package/dist/types/applications.d.ts +67 -49
  71. package/dist/types/applications.js +9 -6
  72. package/dist/types/applications.js.map +1 -1
  73. package/dist/types/context.d.ts +17 -7
  74. package/dist/types/cors.d.ts +0 -2
  75. package/dist/types/datasets.d.ts +0 -6
  76. package/dist/types/functions/index.d.ts +64 -14
  77. package/dist/types/functions/index.js +2 -1
  78. package/dist/types/functions/index.js.map +1 -1
  79. package/dist/types/installation-config.d.ts +13 -10
  80. package/dist/types/permissions.d.ts +8 -4
  81. package/dist/types/projects.d.ts +5 -4
  82. package/dist/types/robotTokens.d.ts +0 -3
  83. package/dist/types/roles.d.ts +0 -4
  84. package/dist/types/studios.d.ts +28 -15
  85. package/dist/types/studios.js +3 -2
  86. package/dist/types/studios.js.map +1 -1
  87. package/dist/types/webhooks.d.ts +0 -3
  88. package/dist/utils/debounce.d.ts +0 -11
  89. package/dist/utils/debounce.js +0 -22
  90. package/dist/utils/debounce.js.map +1 -1
  91. package/dist/utils/parse-duration.d.ts +13 -0
  92. package/dist/utils/parse-duration.js +24 -0
  93. package/dist/utils/parse-duration.js.map +1 -1
  94. package/dist/utils/throttle.d.ts +9 -0
  95. package/dist/utils/throttle.js +22 -0
  96. package/dist/utils/throttle.js.map +1 -0
  97. package/dist/validation/applications.js +7 -2
  98. package/dist/validation/applications.js.map +1 -1
  99. package/dist/validation/functions.d.ts +10 -0
  100. package/dist/validation/functions.js +112 -12
  101. package/dist/validation/functions.js.map +1 -1
  102. package/dist/validation/projects.js +3 -0
  103. package/dist/validation/projects.js.map +1 -1
  104. package/dist/validation/studios.js +4 -5
  105. package/dist/validation/studios.js.map +1 -1
  106. package/package.json +1 -1
  107. package/src/definers/agents.ts +3 -1
  108. package/src/definers/applications.ts +30 -18
  109. package/src/definers/blueprints.ts +1 -25
  110. package/src/definers/context.ts +6 -2
  111. package/src/definers/cors.ts +10 -12
  112. package/src/definers/datasets.ts +11 -14
  113. package/src/definers/functions/document.ts +17 -24
  114. package/src/definers/functions/durable.ts +4 -3
  115. package/src/definers/functions/media-library.ts +18 -19
  116. package/src/definers/functions/pubsub.ts +2 -3
  117. package/src/definers/functions/queue.ts +19 -6
  118. package/src/definers/functions/scheduled.ts +7 -6
  119. package/src/definers/functions/sync-tag-invalidate.ts +5 -2
  120. package/src/definers/installation-config.ts +4 -2
  121. package/src/definers/permissions.ts +8 -2
  122. package/src/definers/projects.ts +3 -4
  123. package/src/definers/resources.ts +1 -11
  124. package/src/definers/robotTokens.ts +17 -18
  125. package/src/definers/roles.ts +38 -40
  126. package/src/definers/studios.ts +5 -3
  127. package/src/definers/webhooks.ts +15 -17
  128. package/src/index.ts +20 -21
  129. package/src/resolve/index.ts +2 -4
  130. package/src/types/agents.ts +7 -3
  131. package/src/types/applications.ts +67 -49
  132. package/src/types/context.ts +17 -7
  133. package/src/types/cors.ts +0 -2
  134. package/src/types/datasets.ts +0 -6
  135. package/src/types/functions/index.ts +67 -14
  136. package/src/types/installation-config.ts +13 -10
  137. package/src/types/permissions.ts +8 -4
  138. package/src/types/projects.ts +6 -4
  139. package/src/types/robotTokens.ts +0 -3
  140. package/src/types/roles.ts +0 -4
  141. package/src/types/studios.ts +28 -16
  142. package/src/types/webhooks.ts +0 -3
  143. package/src/utils/debounce.ts +0 -25
  144. package/src/utils/parse-duration.ts +27 -0
  145. package/src/utils/throttle.ts +25 -0
  146. package/src/validation/applications.ts +6 -2
  147. package/src/validation/functions.ts +123 -12
  148. package/src/validation/projects.ts +4 -0
  149. package/src/validation/studios.ts +3 -6
@@ -10,46 +10,45 @@ import {
10
10
  } from '../index.js'
11
11
  import {runValidation} from '../utils/validation.js'
12
12
 
13
- /*
14
- * FUTURE example (move below @example when ready)
15
- * @example All options
13
+ /**
14
+ * Defines a role that is scoped to the same resource as the blueprint.
15
+ *
16
+ * @example
16
17
  * ```ts
17
18
  * defineRole({
18
- * name: 'ci-deploy-role',
19
- * title: 'CI Deploy Role',
20
- * description: 'Permissions for CI/CD pipelines to manage CORS and datasets',
19
+ * name: 'custom-robot-role',
20
+ * title: 'Custom Robot Role',
21
21
  * appliesToRobots: true,
22
22
  * appliesToUsers: false,
23
23
  * permissions: [{
24
24
  * name: 'sanity-project-cors',
25
25
  * action: 'create',
26
- * }, {
27
- * name: 'sanity-project-cors',
28
- * action: 'read',
29
- * }, {
30
- * name: 'sanity-project-cors',
31
- * action: 'delete',
32
26
  * }],
33
27
  * })
34
28
  * ```
35
- */
36
- /**
37
- * Defines a role that is scoped to the same resource as the blueprint.
38
29
  *
30
+ * @example All options
39
31
  * ```ts
40
32
  * defineRole({
41
- * name: 'custom-robot-role',
42
- * title: 'Custom Robot Role',
33
+ * name: 'ci-deploy-role',
34
+ * title: 'CI Deploy Role',
35
+ * description: 'Permissions for CI/CD pipelines to manage CORS origins',
43
36
  * appliesToRobots: true,
37
+ * appliesToUsers: false,
44
38
  * permissions: [{
45
39
  * name: 'sanity-project-cors',
46
40
  * action: 'create',
41
+ * }, {
42
+ * name: 'sanity-project-cors',
43
+ * action: 'read',
44
+ * }, {
45
+ * name: 'sanity-project-cors',
46
+ * action: 'delete',
47
47
  * }],
48
48
  * })
49
49
  * ```
50
50
  * @param parameters The configuration of the role
51
51
  * @public
52
- * @beta Deploying Roles via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.
53
52
  * @category Definers
54
53
  * @expandType BlueprintRoleConfig
55
54
  * @returns The role resource
@@ -74,14 +73,30 @@ export function defineRole(parameters: BlueprintRoleConfig, options?: {skipValid
74
73
  return roleResource
75
74
  }
76
75
 
77
- /*
78
- * FUTURE example (move below @example when ready)
76
+ /**
77
+ * Defines a role that is scoped to the specified project.
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * defineProjectRole('my-project-id', {
82
+ * name: 'viewer-role',
83
+ * title: 'Viewer',
84
+ * appliesToUsers: true,
85
+ * appliesToRobots: false,
86
+ * permissions: [{
87
+ * name: 'sanity-project-cors',
88
+ * action: 'read',
89
+ * }],
90
+ * })
91
+ * ```
92
+ *
79
93
  * @example Cross-resource references
80
94
  * ```ts
81
- * const role = defineProjectRole(projectId, {
95
+ * defineProjectRole('my-project-id', {
82
96
  * name: 'ci-deploy-role',
83
97
  * title: 'CI Deploy Role',
84
98
  * appliesToRobots: true,
99
+ * appliesToUsers: false,
85
100
  * permissions: [{
86
101
  * name: 'sanity-project-cors',
87
102
  * action: 'create',
@@ -95,29 +110,12 @@ export function defineRole(parameters: BlueprintRoleConfig, options?: {skipValid
95
110
  * name: 'ci-robot',
96
111
  * memberships: [{
97
112
  * resourceType: 'project',
98
- * resourceId: projectId,
113
+ * resourceId: 'my-project-id',
99
114
  * roleNames: ['$.resources.ci-deploy-role'],
100
115
  * }],
101
116
  * })
102
117
  * ```
103
- */
104
- /**
105
- * Defines a role that is scoped to the specified project.
106
- *
107
- * ```ts
108
- * defineProjectRole(projectId, {
109
- * name: 'viewer-role',
110
- * title: 'Viewer',
111
- * appliesToUsers: true,
112
- * permissions: [{
113
- * name: 'sanity-project-cors',
114
- * action: 'read',
115
- * }],
116
- * })
117
- * ```
118
118
  * @public
119
- * @beta Deploying Roles via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.
120
- * @hidden
121
119
  * @category Definers
122
120
  * @expandType BlueprintRoleConfig
123
121
  * @param projectId The ID of the project to which the role will be scoped
@@ -141,6 +139,7 @@ export function defineProjectRole(projectId: string, parameters: BlueprintRoleCo
141
139
  /**
142
140
  * Creates a reference to a role in another stack.
143
141
  *
142
+ * @example
144
143
  * ```ts
145
144
  * referenceRole({
146
145
  * name: 'editor-role',
@@ -149,7 +148,6 @@ export function defineProjectRole(projectId: string, parameters: BlueprintRoleCo
149
148
  * ```
150
149
  *
151
150
  * @public
152
- * @beta Referencing Roles via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.
153
151
  * @category Referencers
154
152
  * @expandType BlueprintCrossStackReferenceConfig
155
153
  * @param params The parameters for referencing the role
@@ -5,6 +5,9 @@ import {runValidation} from '../utils/validation.js'
5
5
  /**
6
6
  * Defines a studio.
7
7
  *
8
+ * Deploying Studios via Blueprints is experimental. This may be subject to breaking changes.
9
+ *
10
+ * @example
8
11
  * ```ts
9
12
  * defineStudio({
10
13
  * name: 'my-studio',
@@ -15,13 +18,12 @@ import {runValidation} from '../utils/validation.js'
15
18
  * }
16
19
  * })
17
20
  * ```
18
- * @param parameters The studio configuration
21
+ * @param config The studio configuration
19
22
  * @public
20
- * @beta Deploying Studios via Blueprints is experimental. This may be subject to breaking changes.
23
+ * @beta
21
24
  * @category Definers
22
25
  * @expandType BlueprintStudioConfig
23
26
  * @returns The studio resource
24
- * @hidden
25
27
  */
26
28
  export function defineStudio(config: BlueprintStudioConfig): BlueprintStudioResource {
27
29
  const autoUpdates: BlueprintStudioResource['autoUpdates'] = {enabled: config.autoUpdates?.enabled ?? true}
@@ -1,8 +1,21 @@
1
1
  import {type BlueprintDocumentWebhookConfig, type BlueprintDocumentWebhookResource, validateDocumentWebhook} from '../index.js'
2
2
  import {runValidation} from '../utils/validation.js'
3
3
 
4
- /*
5
- * FUTURE example (move below @example when ready)
4
+ /**
5
+ * Defines a webhook that is called when document changes occur.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * defineDocumentWebhook({
10
+ * name: 'my-webhook',
11
+ * on: ['create'],
12
+ * url: 'https://example.com/webhook',
13
+ * projection: '{_id}',
14
+ * dataset: 'production',
15
+ * apiVersion: 'v2026-01-01',
16
+ * })
17
+ * ```
18
+ *
6
19
  * @example All options
7
20
  * ```ts
8
21
  * defineDocumentWebhook({
@@ -20,23 +33,8 @@ import {runValidation} from '../utils/validation.js'
20
33
  * status: 'enabled',
21
34
  * })
22
35
  * ```
23
- */
24
- /**
25
- * Defines a webhook that is called when document changes occur.
26
- *
27
- * ```ts
28
- * defineDocumentWebhook({
29
- * name: 'my-webhook',
30
- * on: ['create'],
31
- * url: 'https://example.com/webhook',
32
- * projection: '{_id}',
33
- * dataset: 'production',
34
- * apiVersion: 'v2026-01-01',
35
- * })
36
- * ```
37
36
  * @param parameters The webhook configuration
38
37
  * @public
39
- * @beta Deploying Webhooks via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.
40
38
  * @category Definers
41
39
  * @expandType BlueprintDocumentWebhookConfig
42
40
  * @returns The webhook resource
package/src/index.ts CHANGED
@@ -1,12 +1,29 @@
1
- // DEFINERS - helper functions to create resources
2
1
  /**
2
+ * @packageDocumentation
3
+ *
3
4
  * @categoryDescription Definers
4
5
  * These functions are used to define resources in a Blueprint.
5
- */
6
- /**
6
+ *
7
+ * @categoryDescription Application Children
8
+ * These functions define the views and web workers of an application. Pass them to `defineApplication`.
9
+ *
7
10
  * @categoryDescription Referencers
8
11
  * These functions are used to reference resources in another Blueprint.
12
+ *
13
+ * @categoryDescription Resource Types
14
+ * These types are used to define the shape of resources in a Blueprint.
15
+ *
16
+ * @categoryDescription Functions Types
17
+ * Resource types for functions in a Blueprint.
18
+ *
19
+ * @categoryDescription Validation
20
+ * These functions are used to validate resources in a Blueprint.
21
+ *
22
+ * @categoryDescription Blueprint Internals
23
+ * Shared types that Blueprints and resources are built on. Definers and resource types use them, so most code does not need to import them.
9
24
  */
25
+
26
+ // DEFINERS - helper functions to create resources
10
27
  export * from './definers/agents.js'
11
28
  export * from './definers/applications.js'
12
29
  export * from './definers/blueprints.js'
@@ -32,14 +49,6 @@ export * from './definers/studios.js'
32
49
  export * from './definers/webhooks.js'
33
50
 
34
51
  // TYPES - base types for all resources
35
- /**
36
- * @categoryDescription Resource Types
37
- * These types are used to define the shape of resources in a Blueprint.
38
- */
39
- /**
40
- * @categoryDescription Functions Types
41
- * Resource types for functions in a Blueprint.
42
- */
43
52
  export * from './types/agents.js'
44
53
  export * from './types/applications.js'
45
54
  export * from './types/blueprints.js'
@@ -59,10 +68,6 @@ export * from './types/studios.js'
59
68
  export * from './types/webhooks.js'
60
69
 
61
70
  // VALIDATION - validation for all resources
62
- /**
63
- * @categoryDescription Validation
64
- * These functions are used to validate resources in a Blueprint.
65
- */
66
71
  export * from './validation/agents.js'
67
72
  export * from './validation/applications.js'
68
73
  export * from './validation/blueprints.js'
@@ -79,9 +84,3 @@ export * from './validation/robotTokens.js'
79
84
  export * from './validation/roles.js'
80
85
  export * from './validation/studios.js'
81
86
  export * from './validation/webhooks.js'
82
-
83
- // Public BLUEPRINTS INTERNALS - published bucket of misc Blueprint types
84
- /**
85
- * @categoryDescription Blueprint Internals
86
- * Miscellaneous Blueprint types that make up the public API but are not exported directly.
87
- */
@@ -6,12 +6,10 @@
6
6
  * {@link readStack} reads remote stack.
7
7
  *
8
8
  * This entry point imports Node built-ins, so it is separate from `@sanity/blueprints`.
9
- * @module
10
- */
11
-
12
- /**
9
+ *
13
10
  * @categoryDescription Resolve
14
11
  * These functions read a blueprint from disk, resolve the Stack it deploys to, and read that Stack from the Blueprints API.
12
+ * @module
15
13
  */
16
14
  export {
17
15
  BLUEPRINT_FILE_NAMES,
@@ -3,9 +3,11 @@ import type {BlueprintProjectResourceLifecycle, BlueprintResource} from '../inde
3
3
  /**
4
4
  * The model value carried on a {@link BlueprintAgentResource}.
5
5
  *
6
+ * This feature is subject to breaking changes.
7
+ *
6
8
  * @remarks
7
9
  * `provider`, `id`, and `baseURL` are non-secret and ride on the resource literally; `apiKey` is passed by reference and resolved at blueprint-eval time.
8
- * @alpha This feature is subject to breaking changes.
10
+ * @alpha
9
11
  * @hidden
10
12
  * @category Resource Types
11
13
  */
@@ -22,7 +24,9 @@ export interface BlueprintAgentModel {
22
24
 
23
25
  /**
24
26
  * Represents an Agent resource.
25
- * @alpha This feature is subject to breaking changes.
27
+ *
28
+ * This feature is subject to breaking changes.
29
+ * @alpha
26
30
  * @hidden
27
31
  * @category Resource Types
28
32
  */
@@ -42,7 +46,7 @@ export interface BlueprintAgentResource extends BlueprintResource<BlueprintProje
42
46
 
43
47
  /**
44
48
  * Configuration for an Agent resource.
45
- * @alpha This feature is subject to breaking changes.
49
+ * @alpha
46
50
  * @hidden
47
51
  * @category Resource Types
48
52
  * @interface
@@ -3,61 +3,68 @@ import type {ApplicationVisibility, BlueprintResource} from '../index.js'
3
3
  /**
4
4
  * The set of valid tile footprint families.
5
5
  *
6
+ * This feature is subject to breaking changes.
7
+ *
6
8
  * Modelled on widget families rather than a linear scale: `banner` is
7
9
  * full-width and shallow, which a `small` → `large` magnitude can't express.
8
- * @beta This feature is subject to breaking changes.
10
+ * @beta
9
11
  * @category Resource Types
10
- * @hidden
11
12
  */
12
13
  export const APPLICATION_TILE_SIZES = ['small', 'large', 'banner'] as const
13
14
 
14
15
  /**
15
16
  * The footprint family a tile view occupies on the dashboard.
16
- * @beta This feature is subject to breaking changes.
17
+ *
18
+ * This feature is subject to breaking changes.
19
+ * @beta
17
20
  * @category Resource Types
18
- * @hidden
19
21
  */
20
22
  export type ApplicationTileSize = (typeof APPLICATION_TILE_SIZES)[number]
21
23
 
22
24
  /**
23
25
  * The set of surfaces a view can target within the Dashboard/Workbench.
24
- * @beta This feature is subject to breaking changes.
26
+ *
27
+ * This feature is subject to breaking changes.
28
+ * @beta
25
29
  * @category Resource Types
26
- * @hidden
27
30
  */
28
31
  export const APPLICATION_VIEW_SURFACES = ['window', 'panel', 'asset-source', 'tile'] as const
29
32
 
30
33
  /**
31
34
  * The surface a view targets. Used as the discriminator on view configs; the
32
35
  * definers transform it to the emitted view `type` the backend expects.
33
- * @beta This feature is subject to breaking changes.
36
+ *
37
+ * This feature is subject to breaking changes.
38
+ * @beta
34
39
  * @category Resource Types
35
- * @hidden
36
40
  */
37
41
  export type ApplicationViewSurface = (typeof APPLICATION_VIEW_SURFACES)[number]
38
42
 
39
43
  /**
40
44
  * The set of dock groups a window or panel view can be placed into.
41
- * @beta This feature is subject to breaking changes.
45
+ *
46
+ * This feature is subject to breaking changes.
47
+ * @beta
42
48
  * @category Resource Types
43
- * @hidden
44
49
  */
45
50
  export const APPLICATION_DOCK_GROUPS = ['system', 'applications'] as const
46
51
 
47
52
  /**
48
53
  * The dock group a window or panel view is placed into.
49
- * @beta This feature is subject to breaking changes.
54
+ *
55
+ * This feature is subject to breaking changes.
56
+ * @beta
50
57
  * @category Resource Types
51
- * @hidden
52
58
  */
53
59
  export type ApplicationDockGroup = (typeof APPLICATION_DOCK_GROUPS)[number]
54
60
 
55
61
  /**
56
62
  * Dock placement for a window view.
57
- * @beta This feature is subject to breaking changes.
63
+ *
64
+ * This feature is subject to breaking changes.
65
+ * @beta
58
66
  * @category Resource Types
59
67
  * @expand
60
- * @hidden
61
68
  */
62
69
  export interface BlueprintApplicationDock {
63
70
  /**
@@ -77,9 +84,10 @@ export interface BlueprintApplicationDock {
77
84
 
78
85
  /**
79
86
  * Fields shared by every view and web worker an application exposes.
80
- * @beta This feature is subject to breaking changes.
87
+ *
88
+ * This feature is subject to breaking changes.
89
+ * @beta
81
90
  * @category Resource Types
82
- * @hidden
83
91
  */
84
92
  export interface BlueprintApplicationChildBase {
85
93
  /** Unique within the application. Must match `^[a-zA-Z0-9_-]+$`. */
@@ -94,9 +102,10 @@ export interface BlueprintApplicationChildBase {
94
102
 
95
103
  /**
96
104
  * A window view — the navigable, full-page view of an application.
97
- * @beta This feature is subject to breaking changes.
105
+ *
106
+ * This feature is subject to breaking changes.
107
+ * @beta
98
108
  * @category Resource Types
99
- * @hidden
100
109
  */
101
110
  export interface BlueprintWindowView extends BlueprintApplicationChildBase {
102
111
  type: 'app'
@@ -111,9 +120,10 @@ export interface BlueprintWindowView extends BlueprintApplicationChildBase {
111
120
 
112
121
  /**
113
122
  * A panel view — renders in the dock.
114
- * @beta This feature is subject to breaking changes.
123
+ *
124
+ * This feature is subject to breaking changes.
125
+ * @beta
115
126
  * @category Resource Types
116
- * @hidden
117
127
  */
118
128
  export interface BlueprintPanelView extends BlueprintApplicationChildBase {
119
129
  type: 'panel'
@@ -128,9 +138,10 @@ export interface BlueprintPanelView extends BlueprintApplicationChildBase {
128
138
 
129
139
  /**
130
140
  * An asset source view — contributes an asset source.
131
- * @beta This feature is subject to breaking changes.
141
+ *
142
+ * This feature is subject to breaking changes.
143
+ * @beta
132
144
  * @category Resource Types
133
- * @hidden
134
145
  */
135
146
  export interface BlueprintAssetSourceView extends BlueprintApplicationChildBase {
136
147
  type: 'asset_source'
@@ -138,9 +149,10 @@ export interface BlueprintAssetSourceView extends BlueprintApplicationChildBase
138
149
 
139
150
  /**
140
151
  * A tile view — docks on the dashboard with a footprint `size`.
141
- * @beta This feature is subject to breaking changes.
152
+ *
153
+ * This feature is subject to breaking changes.
154
+ * @beta
142
155
  * @category Resource Types
143
- * @hidden
144
156
  */
145
157
  export interface BlueprintTileView extends BlueprintApplicationChildBase {
146
158
  type: 'tile'
@@ -158,9 +170,10 @@ export interface BlueprintTileView extends BlueprintApplicationChildBase {
158
170
 
159
171
  /**
160
172
  * A background web worker an application runs.
161
- * @beta This feature is subject to breaking changes.
173
+ *
174
+ * This feature is subject to breaking changes.
175
+ * @beta
162
176
  * @category Resource Types
163
- * @hidden
164
177
  */
165
178
  export interface BlueprintWebWorker extends BlueprintApplicationChildBase {
166
179
  type: 'worker'
@@ -168,26 +181,29 @@ export interface BlueprintWebWorker extends BlueprintApplicationChildBase {
168
181
 
169
182
  /**
170
183
  * A union of all view declarations an application can expose.
171
- * @beta This feature is subject to breaking changes.
184
+ *
185
+ * This feature is subject to breaking changes.
186
+ * @beta
172
187
  * @category Resource Types
173
188
  * @expand
174
- * @hidden
175
189
  */
176
190
  export type BlueprintApplicationView = BlueprintWindowView | BlueprintPanelView | BlueprintAssetSourceView | BlueprintTileView
177
191
 
178
192
  /**
179
193
  * A union of everything an application declares — its views and web workers.
180
- * @beta This feature is subject to breaking changes.
194
+ *
195
+ * This feature is subject to breaking changes.
196
+ * @beta
181
197
  * @category Resource Types
182
- * @hidden
183
198
  */
184
199
  export type BlueprintApplicationChild = BlueprintApplicationView | BlueprintWebWorker
185
200
 
186
201
  /**
187
202
  * Represents an Application resource.
188
- * @beta This feature is subject to breaking changes.
203
+ *
204
+ * This feature is subject to breaking changes.
205
+ * @beta
189
206
  * @category Resource Types
190
- * @hidden
191
207
  */
192
208
  export interface BlueprintApplicationResource extends BlueprintResource {
193
209
  type: 'sanity.application'
@@ -200,12 +216,15 @@ export interface BlueprintApplicationResource extends BlueprintResource {
200
216
 
201
217
  /**
202
218
  * The application root directory, relative to the blueprint file. Contains the
203
- * application's `package.json`; every view and web worker `src` is resolved
204
- * relative to it.
219
+ * application's `package.json`; `icon` and every view and web worker `src` are
220
+ * resolved relative to it.
205
221
  */
206
222
  root: string
207
223
 
208
- /** Icon for the application (path to an SVG). */
224
+ /**
225
+ * Path to the icon image, relative to `root`. Uploaded on every deploy; omitting it removes the icon.
226
+ * PNG, JPEG, BMP, GIF, TIFF, SVG, WebP, HEIF or AVIF, up to 5 MB.
227
+ */
209
228
  icon?: string
210
229
 
211
230
  /** Dashboard visibility. */
@@ -227,7 +246,13 @@ export interface BlueprintApplicationResource extends BlueprintResource {
227
246
  mfManifest?: Record<string, unknown>
228
247
  }
229
248
 
249
+ /**
250
+ * Base shape shared by all view configs.
251
+ * @beta
252
+ * @category Resource Types
253
+ */
230
254
  export interface BlueprintViewConfigBase {
255
+ /** Set by the view definers. */
231
256
  type: 'view'
232
257
  }
233
258
 
@@ -237,10 +262,9 @@ export interface BlueprintViewConfigBase {
237
262
  * @remarks
238
263
  * Discriminated by `surface`. The definer transforms `surface: 'window'` to the
239
264
  * emitted view `type: 'app'`.
240
- * @beta This feature is subject to breaking changes.
265
+ * @beta
241
266
  * @category Resource Types
242
267
  * @interface
243
- * @hidden
244
268
  */
245
269
  export type BlueprintWindowViewConfig = Omit<BlueprintWindowView, 'type'> &
246
270
  BlueprintViewConfigBase & {
@@ -254,10 +278,9 @@ export type BlueprintWindowViewConfig = Omit<BlueprintWindowView, 'type'> &
254
278
  * @remarks
255
279
  * Discriminated by `surface`. The definer transforms `surface: 'panel'` to the
256
280
  * emitted view `type: 'panel'`.
257
- * @beta This feature is subject to breaking changes.
281
+ * @beta
258
282
  * @category Resource Types
259
283
  * @interface
260
- * @hidden
261
284
  */
262
285
  export type BlueprintPanelViewConfig = Omit<BlueprintPanelView, 'type'> &
263
286
  BlueprintViewConfigBase & {
@@ -271,10 +294,9 @@ export type BlueprintPanelViewConfig = Omit<BlueprintPanelView, 'type'> &
271
294
  * @remarks
272
295
  * Discriminated by `surface`. The definer transforms `surface: 'asset-source'`
273
296
  * to the emitted view `type: 'asset_source'`.
274
- * @beta This feature is subject to breaking changes.
297
+ * @beta
275
298
  * @category Resource Types
276
299
  * @interface
277
- * @hidden
278
300
  */
279
301
  export type BlueprintAssetSourceViewConfig = Omit<BlueprintAssetSourceView, 'type'> &
280
302
  BlueprintViewConfigBase & {
@@ -288,10 +310,9 @@ export type BlueprintAssetSourceViewConfig = Omit<BlueprintAssetSourceView, 'typ
288
310
  * @remarks
289
311
  * Discriminated by `surface`. The definer transforms `surface: 'tile'` to the
290
312
  * emitted view `type: 'tile'`.
291
- * @beta This feature is subject to breaking changes.
313
+ * @beta
292
314
  * @category Resource Types
293
315
  * @interface
294
- * @hidden
295
316
  */
296
317
  export type BlueprintTileViewConfig = Omit<BlueprintTileView, 'type'> &
297
318
  BlueprintViewConfigBase & {
@@ -301,19 +322,17 @@ export type BlueprintTileViewConfig = Omit<BlueprintTileView, 'type'> &
301
322
 
302
323
  /**
303
324
  * Configuration for a web worker.
304
- * @beta This feature is subject to breaking changes.
325
+ * @beta
305
326
  * @category Resource Types
306
327
  * @interface
307
- * @hidden
308
328
  */
309
329
  export type BlueprintWebWorkerConfig = Omit<BlueprintWebWorker, 'type'>
310
330
 
311
331
  /**
312
332
  * A union of all view configs an application can declare, discriminated by `surface`.
313
- * @beta This feature is subject to breaking changes.
333
+ * @beta
314
334
  * @category Resource Types
315
335
  * @expand
316
- * @hidden
317
336
  */
318
337
  export type BlueprintApplicationViewConfig =
319
338
  | BlueprintWindowViewConfig
@@ -323,10 +342,9 @@ export type BlueprintApplicationViewConfig =
323
342
 
324
343
  /**
325
344
  * Configuration for an Application resource.
326
- * @beta This feature is subject to breaking changes.
345
+ * @beta
327
346
  * @category Resource Types
328
347
  * @interface
329
- * @hidden
330
348
  */
331
349
  export type BlueprintApplicationConfig = Omit<BlueprintApplicationResource, 'type' | 'slug' | 'views'> & {
332
350
  /**