UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
56 lines (55 loc) 2.07 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API * * The version of the OpenAPI document: 0.18.6 * Contact: contact@emergentmethods.ai * * 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.UserProfileSubscriptionToJSON = exports.UserProfileSubscriptionFromJSONTyped = exports.UserProfileSubscriptionFromJSON = exports.instanceOfUserProfileSubscription = void 0; /** * Check if a given object implements the UserProfileSubscription interface. */ function instanceOfUserProfileSubscription(value) { if (!('status' in value)) return false; if (!('plan' in value)) return false; return true; } exports.instanceOfUserProfileSubscription = instanceOfUserProfileSubscription; function UserProfileSubscriptionFromJSON(json) { return UserProfileSubscriptionFromJSONTyped(json, false); } exports.UserProfileSubscriptionFromJSON = UserProfileSubscriptionFromJSON; function UserProfileSubscriptionFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'status': json['status'], 'plan': json['plan'], 'periodStart': json['period_start'] == null ? undefined : (new Date(json['period_start'])), 'periodEnd': json['period_end'] == null ? undefined : (new Date(json['period_end'])), }; } exports.UserProfileSubscriptionFromJSONTyped = UserProfileSubscriptionFromJSONTyped; function UserProfileSubscriptionToJSON(value) { if (value == null) { return value; } return { 'status': value['status'], 'plan': value['plan'], 'period_start': value['periodStart'] == null ? undefined : (value['periodStart'].toISOString()), 'period_end': value['periodEnd'] == null ? undefined : (value['periodEnd'].toISOString()), }; } exports.UserProfileSubscriptionToJSON = UserProfileSubscriptionToJSON;