n8n-nodes-base
Version:
Base nodes of n8n
53 lines (49 loc) • 1.31 kB
text/typescript
/**
* Ghost Node - Version 1
* Discriminator: resource=post, operation=get
*/
interface Credentials {
ghostAdminApi: CredentialReference;
ghostContentApi: CredentialReference;
}
/** Get a post */
export type GhostV1PostGetParams = {
resource: 'post';
operation: 'get';
/**
* Pick where your data comes from, Content or Admin API
* @default contentApi
*/
source?: 'adminApi' | 'contentApi' | Expression<string>;
/**
* Get the post either by slug or ID
* @displayOptions.show { source: ["contentApi", "adminApi"] }
* @default id
*/
by?: 'id' | 'slug' | Expression<string>;
/**
* The ID or slug of the post to get
* @displayOptions.show { source: ["contentApi", "adminApi"] }
*/
identifier?: string | Expression<string> | PlaceholderValue;
/**
* Options
* @displayOptions.show { source: ["adminApi"] }
* @default {}
*/
options?: {
/** Limit the fields returned in the response object. E.g. for posts fields=title,url.
*/
fields?: string | Expression<string> | PlaceholderValue;
/** Formats
* @default ["mobiledoc"]
*/
formats?: Array<'html' | 'mobiledoc' | 'lexical'>;
};
};
export type GhostV1PostGetNode = {
type: 'n8n-nodes-base.ghost';
version: 1;
credentials?: Credentials;
config: NodeConfig<GhostV1PostGetParams>;
};