flowus-api-sdk
Version:
Official TypeScript/JavaScript SDK for FlowUs API - Create, manage, and interact with FlowUs pages, databases, and blocks
69 lines (68 loc) • 2.81 kB
JavaScript
;
/* 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.instanceOfCreateDatabaseRequest = instanceOfCreateDatabaseRequest;
exports.CreateDatabaseRequestFromJSON = CreateDatabaseRequestFromJSON;
exports.CreateDatabaseRequestFromJSONTyped = CreateDatabaseRequestFromJSONTyped;
exports.CreateDatabaseRequestToJSON = CreateDatabaseRequestToJSON;
exports.CreateDatabaseRequestToJSONTyped = CreateDatabaseRequestToJSONTyped;
const runtime_1 = require("../runtime");
const Cover_1 = require("./Cover");
const Parent_1 = require("./Parent");
const PropertySchema_1 = require("./PropertySchema");
const RichTextItem_1 = require("./RichTextItem");
const Icon_1 = require("./Icon");
/**
* Check if a given object implements the CreateDatabaseRequest interface.
*/
function instanceOfCreateDatabaseRequest(value) {
if (!('title' in value) || value['title'] === undefined)
return false;
if (!('properties' in value) || value['properties'] === undefined)
return false;
return true;
}
function CreateDatabaseRequestFromJSON(json) {
return CreateDatabaseRequestFromJSONTyped(json, false);
}
function CreateDatabaseRequestFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'parent': json['parent'] == null ? undefined : (0, Parent_1.ParentFromJSON)(json['parent']),
'title': (json['title'].map(RichTextItem_1.RichTextItemFromJSON)),
'icon': json['icon'] == null ? undefined : (0, Icon_1.IconFromJSON)(json['icon']),
'cover': json['cover'] == null ? undefined : (0, Cover_1.CoverFromJSON)(json['cover']),
'properties': ((0, runtime_1.mapValues)(json['properties'], PropertySchema_1.PropertySchemaFromJSON)),
'is_inline': json['is_inline'] == null ? undefined : json['is_inline'],
};
}
function CreateDatabaseRequestToJSON(json) {
return CreateDatabaseRequestToJSONTyped(json, false);
}
function CreateDatabaseRequestToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'parent': (0, Parent_1.ParentToJSON)(value['parent']),
'title': (value['title'].map(RichTextItem_1.RichTextItemToJSON)),
'icon': (0, Icon_1.IconToJSON)(value['icon']),
'cover': (0, Cover_1.CoverToJSON)(value['cover']),
'properties': ((0, runtime_1.mapValues)(value['properties'], PropertySchema_1.PropertySchemaToJSON)),
'is_inline': value['is_inline'],
};
}