@zeplin/sdk
Version:
Zeplin API client for JavaScript
48 lines (45 loc) • 1.99 kB
JavaScript
;
require("core-js/modules/es.object.define-property.js");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.transformWorkspaceNotificationEventToJSON = exports.transformJSONToWorkspaceNotificationEvent = void 0;
var _workspaceNotificationCreatedEvent = require("./workspace-notification-created-event");
var _workspaceNotificationUpdatedEvent = require("./workspace-notification-updated-event");
/* tslint:disable */
/* eslint-disable */
/**
* Zeplin API
* Access your resources in Zeplin
*
* Contact: support@zeplin.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var transformJSONToWorkspaceNotificationEvent = function transformJSONToWorkspaceNotificationEvent(value) {
switch (value.action) {
case 'created':
return (0, _workspaceNotificationCreatedEvent.transformJSONToWorkspaceNotificationCreatedEvent)(value);
case 'updated':
return (0, _workspaceNotificationUpdatedEvent.transformJSONToWorkspaceNotificationUpdatedEvent)(value);
default:
throw new Error("No variant of WorkspaceNotificationEvent exists with 'action=".concat(value.action, "'"));
}
};
exports.transformJSONToWorkspaceNotificationEvent = transformJSONToWorkspaceNotificationEvent;
var transformWorkspaceNotificationEventToJSON = function transformWorkspaceNotificationEventToJSON(value) {
switch (value.action) {
case 'created':
return (0, _workspaceNotificationCreatedEvent.transformWorkspaceNotificationCreatedEventToJSON)(value);
case 'updated':
return (0, _workspaceNotificationUpdatedEvent.transformWorkspaceNotificationUpdatedEventToJSON)(value);
}
};
/**
* @type WorkspaceNotificationEvent
* This event is used to notify webhooks about changes related to user\'s notifications.
* @export
*/
exports.transformWorkspaceNotificationEventToJSON = transformWorkspaceNotificationEventToJSON;