UNPKG

flowus-api-sdk

Version:

Official TypeScript/JavaScript SDK for FlowUs API - Create, manage, and interact with FlowUs pages, databases, and blocks

110 lines (109 loc) 3.8 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * FlowUs API * FlowUs Developer API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.BlockTypeEnum = exports.BlockObjectEnum = void 0; exports.instanceOfBlock = instanceOfBlock; exports.BlockFromJSON = BlockFromJSON; exports.BlockFromJSONTyped = BlockFromJSONTyped; exports.BlockToJSON = BlockToJSON; exports.BlockToJSONTyped = BlockToJSONTyped; const User_1 = require("./User"); const Parent_1 = require("./Parent"); const BlockData_1 = require("./BlockData"); /** * @export */ exports.BlockObjectEnum = { Block: 'block' }; /** * @export */ exports.BlockTypeEnum = { Paragraph: 'paragraph', Heading1: 'heading_1', Heading2: 'heading_2', Heading3: 'heading_3', BulletedListItem: 'bulleted_list_item', NumberedListItem: 'numbered_list_item', ToDo: 'to_do', Quote: 'quote', Toggle: 'toggle', Code: 'code', Image: 'image', File: 'file', Bookmark: 'bookmark', Embed: 'embed', Callout: 'callout', Equation: 'equation', LinkToPage: 'link_to_page', Template: 'template', SyncedBlock: 'synced_block', Divider: 'divider', ColumnList: 'column_list', Column: 'column', Table: 'table', TableRow: 'table_row', ChildPage: 'child_page', ChildDatabase: 'child_database' }; /** * Check if a given object implements the Block interface. */ function instanceOfBlock(value) { return true; } function BlockFromJSON(json) { return BlockFromJSONTyped(json, false); } function BlockFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'object': json['object'] == null ? undefined : json['object'], 'id': json['id'] == null ? undefined : json['id'], 'parent': json['parent'] == null ? undefined : (0, Parent_1.ParentFromJSON)(json['parent']), 'type': json['type'] == null ? undefined : json['type'], 'created_time': json['created_time'] == null ? undefined : (new Date(json['created_time'])), 'created_by': json['created_by'] == null ? undefined : (0, User_1.UserFromJSON)(json['created_by']), 'last_edited_time': json['last_edited_time'] == null ? undefined : (new Date(json['last_edited_time'])), 'last_edited_by': json['last_edited_by'] == null ? undefined : (0, User_1.UserFromJSON)(json['last_edited_by']), 'archived': json['archived'] == null ? undefined : json['archived'], 'has_children': json['has_children'] == null ? undefined : json['has_children'], 'data': json['data'] == null ? undefined : (0, BlockData_1.BlockDataFromJSON)(json['data']), }; } function BlockToJSON(json) { return BlockToJSONTyped(json, false); } function BlockToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'object': value['object'], 'id': value['id'], 'parent': (0, Parent_1.ParentToJSON)(value['parent']), 'type': value['type'], 'created_time': value['created_time'] == null ? undefined : ((value['created_time']).toISOString()), 'created_by': (0, User_1.UserToJSON)(value['created_by']), 'last_edited_time': value['last_edited_time'] == null ? undefined : ((value['last_edited_time']).toISOString()), 'last_edited_by': (0, User_1.UserToJSON)(value['last_edited_by']), 'archived': value['archived'], 'has_children': value['has_children'], 'data': (0, BlockData_1.BlockDataToJSON)(value['data']), }; }