@zeplin/sdk
Version:
Zeplin API client for JavaScript
48 lines (45 loc) • 2.12 kB
JavaScript
;
require("core-js/modules/es.object.define-property.js");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.transformWorkspaceOrganizationEventToJSON = exports.transformJSONToWorkspaceOrganizationEvent = void 0;
var _workspaceOrganizationJoinRequestedEvent = require("./workspace-organization-join-requested-event");
var _workspaceOrganizationUpdatedEvent = require("./workspace-organization-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 transformJSONToWorkspaceOrganizationEvent = function transformJSONToWorkspaceOrganizationEvent(value) {
switch (value.action) {
case 'join_requested':
return (0, _workspaceOrganizationJoinRequestedEvent.transformJSONToWorkspaceOrganizationJoinRequestedEvent)(value);
case 'updated':
return (0, _workspaceOrganizationUpdatedEvent.transformJSONToWorkspaceOrganizationUpdatedEvent)(value);
default:
throw new Error("No variant of WorkspaceOrganizationEvent exists with 'action=".concat(value.action, "'"));
}
};
exports.transformJSONToWorkspaceOrganizationEvent = transformJSONToWorkspaceOrganizationEvent;
var transformWorkspaceOrganizationEventToJSON = function transformWorkspaceOrganizationEventToJSON(value) {
switch (value.action) {
case 'join_requested':
return (0, _workspaceOrganizationJoinRequestedEvent.transformWorkspaceOrganizationJoinRequestedEventToJSON)(value);
case 'updated':
return (0, _workspaceOrganizationUpdatedEvent.transformWorkspaceOrganizationUpdatedEventToJSON)(value);
}
};
/**
* @type WorkspaceOrganizationEvent
* This event is used to notify webhooks about any of these activies: - Name or logo of the organization was changed - User requested to join the organization
* @export
*/
exports.transformWorkspaceOrganizationEventToJSON = transformWorkspaceOrganizationEventToJSON;