@sanity/blueprints 0.4.1 → 0.4.2

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/types.d.ts CHANGED
@@ -49,21 +49,24 @@ export interface BlueprintMediaLibraryAssetFunctionResource extends BlueprintBas
49
49
  type: 'sanity.function.media-library.asset';
50
50
  event: BlueprintMediaLibraryFunctionResourceEvent;
51
51
  }
52
+ export type WebhookTrigger = 'create' | 'update' | 'delete';
52
53
  export interface BlueprintDocumentWebhookResource extends BlueprintResource {
53
54
  type: 'sanity.project.webhook';
54
55
  project?: string;
55
56
  displayName?: string;
56
57
  description?: string | null;
57
58
  url: string;
58
- on: string[];
59
- filter?: string | null;
60
- projection?: string | null;
59
+ on: WebhookTrigger[];
60
+ filter?: string;
61
+ projection?: string;
61
62
  status?: 'enabled' | 'disabled';
62
63
  httpMethod?: 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'GET';
63
64
  headers?: Record<string, string>;
64
65
  includeDrafts?: boolean;
65
- secret?: string | null;
66
+ includeAllVersions?: boolean;
67
+ secret?: string;
66
68
  dataset?: string;
69
+ apiVersion?: string;
67
70
  }
68
71
  export type BlueprintDocumentWebhookConfig = Omit<BlueprintDocumentWebhookResource, 'type'>;
69
72
  export interface BlueprintOutput {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/blueprints",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Helper methods and type definitions for Sanity Blueprints",
5
5
  "keywords": [
6
6
  "sanity",
package/src/types.ts CHANGED
@@ -55,21 +55,24 @@ export interface BlueprintMediaLibraryAssetFunctionResource extends BlueprintBas
55
55
  event: BlueprintMediaLibraryFunctionResourceEvent
56
56
  }
57
57
 
58
+ export type WebhookTrigger = 'create' | 'update' | 'delete'
58
59
  export interface BlueprintDocumentWebhookResource extends BlueprintResource {
59
60
  type: 'sanity.project.webhook'
60
61
  project?: string
61
62
  displayName?: string
62
63
  description?: string | null
63
64
  url: string
64
- on: string[]
65
- filter?: string | null
66
- projection?: string | null
65
+ on: WebhookTrigger[]
66
+ filter?: string
67
+ projection?: string
67
68
  status?: 'enabled' | 'disabled'
68
69
  httpMethod?: 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'GET'
69
70
  headers?: Record<string, string>
70
71
  includeDrafts?: boolean
71
- secret?: string | null
72
+ includeAllVersions?: boolean
73
+ secret?: string
72
74
  dataset?: string
75
+ apiVersion?: string
73
76
  }
74
77
  export type BlueprintDocumentWebhookConfig = Omit<BlueprintDocumentWebhookResource, 'type'>
75
78