-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add trigger webhook and slug support
- Loading branch information
1 parent
e279862
commit f8e940a
Showing
4 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@cosmicjs/sdk': patch | ||
--- | ||
|
||
Added typescript type for add revision method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
export type GenericObject = Record<string, any>; | ||
export type NonEmptyObject<T extends Record<string, unknown>> = | ||
T extends Record<string, never> ? never : T; | ||
|
||
export type GenericOptionsType = { | ||
slug_field?: boolean; | ||
content_editor?: boolean; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { GenericObject, GenericOptionsType } from './generic.types'; | ||
|
||
export type InsertObjectRevisionType = { | ||
title?: string; | ||
slug?: string; | ||
content?: string; | ||
options?: GenericOptionsType; | ||
publish_at?: number; | ||
unpublish_at?: number; | ||
metadata?: GenericObject; | ||
locale?: string; | ||
thumbnail?: string; | ||
trigger_webhook?: boolean; | ||
pretty?: boolean; | ||
}; |