Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refactor exports for top-level domains #773

Merged
merged 2 commits into from
Jul 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lib/rest/Accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ import {CredentialListInstance} from './accounts/v1/credential';
import {SecondaryAuthTokenListInstance} from './accounts/v1/secondaryAuthToken';
import AccountsBase from './AccountsBase';

export default class Accounts extends AccountsBase {
class Accounts extends AccountsBase {
/**
* @deprecated - Use v1.authTokenPromotion; instead
*/
get authTokenPromotion(): AuthTokenPromotionListInstance {
console.warn('authTokenPromotion is deprecated. Use v1.authTokenPromotion; instead.');
return this.v1.authTokenPromotion;

}

/**
Expand All @@ -19,7 +18,6 @@ export default class Accounts extends AccountsBase {
get credentials(): CredentialListInstance {
console.warn('credentials is deprecated. Use v1.credentials; instead.');
return this.v1.credentials;

}

/**
Expand All @@ -28,6 +26,7 @@ export default class Accounts extends AccountsBase {
get secondaryAuthToken(): SecondaryAuthTokenListInstance {
console.warn('secondaryAuthToken is deprecated. Use v1.secondaryAuthToken; instead.');
return this.v1.secondaryAuthToken;

}
}

export = Accounts;
7 changes: 4 additions & 3 deletions lib/rest/AccountsBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
'use strict'

import Domain from '../base/Domain';
import V1 from './accounts/V1';

export default class AccountsBase extends Domain {
_v1: V1;
class AccountsBase extends Domain {
_v1?: V1;

/**
* Initialize accounts domain
Expand All @@ -30,3 +29,5 @@ export default class AccountsBase extends Domain {
return this._v1;
}
}

export = AccountsBase;
4 changes: 3 additions & 1 deletion lib/rest/Api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {UsageListInstance} from './api/v2010/account/usage';
import {ValidationRequestListInstance} from './api/v2010/account/validationRequest';
import ApiBase from "./ApiBase";

export default class Api extends ApiBase {
class Api extends ApiBase {
/**
* @deprecated - Use v2010.account instead
*/
Expand Down Expand Up @@ -234,3 +234,5 @@ export default class Api extends ApiBase {
return this.account.validationRequests;
}
}

export = Api;
7 changes: 4 additions & 3 deletions lib/rest/ApiBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
'use strict'

import Domain from '../base/Domain';
import V2010 from './api/V2010';

export default class ApiBase extends Domain {
_v2010: V2010;
class ApiBase extends Domain {
_v2010?: V2010;

/**
* Initialize api domain
Expand All @@ -30,3 +29,5 @@ export default class ApiBase extends Domain {
return this._v2010;
}
}

export = ApiBase;
4 changes: 3 additions & 1 deletion lib/rest/Autopilot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {AssistantListInstance} from './autopilot/v1/assistant';
import {RestoreAssistantListInstance} from './autopilot/v1/restoreAssistant';
import AutopilotBase from "./AutopilotBase";

export default class Autopilot extends AutopilotBase {
class Autopilot extends AutopilotBase {
/**
* @deprecated - Use v1.assistants instead
*/
Expand All @@ -19,3 +19,5 @@ export default class Autopilot extends AutopilotBase {
return this.v1.restoreAssistant;
}
}

export = Autopilot;
7 changes: 4 additions & 3 deletions lib/rest/AutopilotBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
'use strict'

import Domain from '../base/Domain';
import V1 from './autopilot/V1';

export default class AutopilotBase extends Domain {
_v1: V1;
class AutopilotBase extends Domain {
_v1?: V1;

/**
* Initialize autopilot domain
Expand All @@ -30,3 +29,5 @@ export default class AutopilotBase extends Domain {
return this._v1;
}
}

export = AutopilotBase;
4 changes: 3 additions & 1 deletion lib/rest/Bulkexports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ExportListInstance} from "./bulkexports/v1/export";
import {ExportConfigurationListInstance} from "./bulkexports/v1/exportConfiguration";
import BulkexportsBase from "./BulkexportsBase";

export default class Bulkexports extends BulkexportsBase {
class Bulkexports extends BulkexportsBase {
/**
* @deprecated - Use v1.exports instead
*/
Expand All @@ -19,3 +19,5 @@ export default class Bulkexports extends BulkexportsBase {
return this.v1.exportConfiguration;
}
}

export = Bulkexports;
7 changes: 4 additions & 3 deletions lib/rest/BulkexportsBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
'use strict'

import Domain from '../base/Domain';
import V1 from './bulkexports/V1';

export default class BulkexportsBase extends Domain {
_v1: V1;
class BulkexportsBase extends Domain {
_v1?: V1;

/**
* Initialize bulkexports domain
Expand All @@ -30,3 +29,5 @@ export default class BulkexportsBase extends Domain {
return this._v1;
}
}

export = BulkexportsBase;
4 changes: 3 additions & 1 deletion lib/rest/Chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {ServiceListInstance} from './chat/v2/service';
import {ChannelListInstance} from './chat/v3/channel';
import ChatBase from "./ChatBase";

export default class Chat extends ChatBase {
class Chat extends ChatBase {
/**
* @deprecated - Use v2.credentials instead
*/
Expand All @@ -28,3 +28,5 @@ export default class Chat extends ChatBase {
return this.v3.channels;
}
}

export = Chat;
11 changes: 6 additions & 5 deletions lib/rest/ChatBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
'use strict'

import Domain from '../base/Domain';
import V1 from './chat/V1';
import V2 from './chat/V2';
import V3 from './chat/V3';

export default class ChatBase extends Domain {
_v1: V1;
_v2: V2;
_v3: V3;
class ChatBase extends Domain {
_v1?: V1;
_v2?: V2;
_v3?: V3;

/**
* Initialize chat domain
Expand All @@ -42,3 +41,5 @@ export default class ChatBase extends Domain {
return this._v3;
}
}

export = ChatBase;
4 changes: 3 additions & 1 deletion lib/rest/Conversations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {ServiceListInstance} from './conversations/v1/service';
import {UserListInstance} from './conversations/v1/user';
import ConversationsBase from "./ConversationsBase";

export default class Conversations extends ConversationsBase {
class Conversations extends ConversationsBase {
/**
* @deprecated - Use v1.configuration instead
*/
Expand Down Expand Up @@ -73,3 +73,5 @@ export default class Conversations extends ConversationsBase {
return this.v1.users;
}
}

export = Conversations;
7 changes: 4 additions & 3 deletions lib/rest/ConversationsBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
'use strict'

import Domain from '../base/Domain';
import V1 from './conversations/V1';

export default class ConversationsBase extends Domain {
_v1: V1;
class ConversationsBase extends Domain {
_v1?: V1;

/**
* Initialize conversations domain
Expand All @@ -30,3 +29,5 @@ export default class ConversationsBase extends Domain {
return this._v1;
}
}

export = ConversationsBase;
4 changes: 3 additions & 1 deletion lib/rest/Events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {SinkListInstance} from './events/v1/sink';
import {SubscriptionListInstance} from './events/v1/subscription';
import EventsBase from "./EventsBase";

export default class Events extends EventsBase {
class Events extends EventsBase {
/**
* @deprecated - Use v1.eventTypes instead
*/
Expand Down Expand Up @@ -37,3 +37,5 @@ export default class Events extends EventsBase {
return this.v1.subscriptions;
}
}

export = Events;
7 changes: 4 additions & 3 deletions lib/rest/EventsBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
'use strict'

import Domain from '../base/Domain';
import V1 from './events/V1';

export default class EventsBase extends Domain {
_v1: V1;
class EventsBase extends Domain {
_v1?: V1;

/**
* Initialize events domain
Expand All @@ -30,3 +29,5 @@ export default class EventsBase extends Domain {
return this._v1;
}
}

export = EventsBase;
4 changes: 3 additions & 1 deletion lib/rest/Fax.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {FaxListInstance} from "./fax/v1/fax";
import FaxBase from "./FaxBase";

export default class Fax extends FaxBase {
class Fax extends FaxBase {
/**
* @deprecated - Use v1.faxes instead
*/
Expand All @@ -10,3 +10,5 @@ export default class Fax extends FaxBase {
return this.v1.faxes;
}
}

export = Fax;
4 changes: 3 additions & 1 deletion lib/rest/FlexApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {InteractionListInstance} from "./flexApi/v1/interaction";
import {WebChannelListInstance} from "./flexApi/v1/webChannel";
import FlexApiBase from "./FlexApiBase";

export default class FlexApi extends FlexApiBase {
class FlexApi extends FlexApiBase {
/**
* @deprecated - Use v1.channel instead
*/
Expand Down Expand Up @@ -46,3 +46,5 @@ export default class FlexApi extends FlexApiBase {
return this.v1.webChannel;
}
}

export = FlexApi;
7 changes: 4 additions & 3 deletions lib/rest/FlexApiBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
'use strict'

import Domain from '../base/Domain';
import V1 from './flex/V1';

export default class FlexApiBase extends Domain {
_v1: V1;
class FlexApiBase extends Domain {
_v1?: V1;

/**
* Initialize flex domain
Expand All @@ -30,3 +29,5 @@ export default class FlexApiBase extends Domain {
return this._v1;
}
}

export = FlexApiBase;
4 changes: 3 additions & 1 deletion lib/rest/FrontlineApi.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {UserListInstance} from "./frontlineApi/v1/user";
import FrontlineApiBase from "./FrontlineApiBase";

export default class FrontlineApi extends FrontlineApiBase {
class FrontlineApi extends FrontlineApiBase {
/**
* @deprecated - Use v1.users instead
*/
Expand All @@ -10,3 +10,5 @@ export default class FrontlineApi extends FrontlineApiBase {
return this.v1.users;
}
}

export = FrontlineApi;
7 changes: 4 additions & 3 deletions lib/rest/FrontlineApiBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
'use strict'

import Domain from '../base/Domain';
import V1 from './frontline/V1';

export default class FrontlineApiBase extends Domain {
_v1: V1;
class FrontlineApiBase extends Domain {
_v1?: V1;

/**
* Initialize frontline domain
Expand All @@ -30,3 +29,5 @@ export default class FrontlineApiBase extends Domain {
return this._v1;
}
}

export = FrontlineApiBase;
4 changes: 3 additions & 1 deletion lib/rest/Insights.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {RoomListInstance} from "./insights/v1/room";
import {SettingListInstance} from "./insights/v1/setting";
import InsightsBase from "./InsightsBase";

export default class Insights extends InsightsBase {
class Insights extends InsightsBase {
/**
* @deprecated - Use v1.settings instead
*/
Expand Down Expand Up @@ -55,3 +55,5 @@ export default class Insights extends InsightsBase {
return this.v1.rooms;
}
}

export = Insights;
Loading