diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 5f7c2ca..3143607 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -18,88 +18,77 @@ api/usersApi.ts api/workspacesApi.ts git_push.sh model/activity.ts -model/attachment.ts +model/activityCollection.ts +model/apiError.ts +model/auth.ts model/callback.ts model/callbackAuth.ts model/callbackCall.ts -model/callbackCallCallback.ts +model/callbackCallCollection.ts +model/callbackCallEvent.ts model/callbackCallFrom.ts model/callbackCallResponseMessage.ts -model/callbackCallbacks.ts +model/callbackCollection.ts +model/callbackEvent.ts +model/callbackShort.ts model/contact.ts +model/contactCollection.ts +model/contactLocation.ts +model/contactMessagingOption.ts model/customList.ts -model/customListCustomlabellistsInner.ts -model/distributionlist.ts -model/distributionlistDistlistdetailsInner.ts -model/dlr.ts -model/dynamicdistributionlist.ts -model/email.ts -model/emailResources.ts +model/customListCollection.ts +model/customListItem.ts +model/distributionList.ts +model/distributionListCollection.ts +model/distributionListDetails.ts +model/distributionListDynamic.ts +model/distributionListStatic.ts model/event.ts -model/eventEventFormListInner.ts -model/eventEventFormListInnerEventFieldListInner.ts -model/features.ts -model/featuresAliasOption.ts -model/featuresPushOptions.ts -model/featuresPushOptionsApns.ts -model/featuresPushOptionsFcm.ts +model/eventCollection.ts +model/eventForm.ts +model/eventFormField.ts model/fieldMapping.ts -model/getActivities200Response.ts -model/getCallbackCalls200Response.ts -model/getCallbacks200Response.ts -model/getCallbacks200ResponseCallbacksInner.ts -model/getContacts200Response.ts -model/getCustomLists200Response.ts -model/getDistributionLists200Response.ts -model/getDistributionLists200ResponseDistributionListsInner.ts -model/getEvents200Response.ts -model/getMessageResponsesById200Response.ts -model/getMessages200Response.ts -model/getMessages400Response.ts -model/getMessages401Response.ts -model/getMessages403Response.ts -model/getMessages404Response.ts -model/getMessages405Response.ts -model/getMessages415Response.ts -model/getMessages422Response.ts -model/getMessages500Response.ts -model/getMessages501Response.ts -model/getResources200Response.ts -model/getResponseRules200Response.ts -model/getScenarios200Response.ts -model/getTemplates200Response.ts -model/getTemplates200ResponseMessagetemplatesInner.ts -model/getUsers200Response.ts -model/getWorkspaceActivities200Response.ts -model/getWorkspaces200Response.ts model/import.ts -model/linkInner.ts -model/listUsers.ts -model/locationsInner.ts +model/link.ts model/message.ts +model/messageAttachment.ts +model/messageCollection.ts +model/messageDlr.ts +model/messageEmail.ts +model/messageEmailResources.ts +model/messageFeatures.ts +model/messageFeaturesAliasOption.ts +model/messageFeaturesPushOptions.ts +model/messageFeaturesPushOptionsAPNS.ts +model/messageFeaturesPushOptionsFCM.ts +model/messageResponse.ts model/messageResponseDetailed.ts -model/messageResponseDetailedMessageresponsesInner.ts -model/messageResponseDetailedMessageresponsesInnerFrom.ts -model/messageResponseDetailedMessageresponsesInnerResponseMessage.ts +model/messageResponseDetailedStatus.ts +model/messageResponseDetailedStatusFrom.ts +model/messageResponseDetailedStatusResponseMessage.ts model/messageResponseSummary.ts -model/messageResponseSummaryMessageresponsesInner.ts +model/messageResponseSummaryStatus.ts +model/messageSocial.ts +model/messageSocialChannel.ts model/messageStatus.ts -model/messageStatusMessageStatusesInner.ts -model/messageStatusMessageStatusesInnerCategoriesInner.ts -model/messagingoptionsInner.ts +model/messageStatusChannel.ts +model/messageStatusSummary.ts +model/messageStatusSummaryCategory.ts +model/messageTemplateShort.ts +model/messageVoice.ts +model/messageVoiceResources.ts +model/messageWeb.ts model/models.ts -model/postAuth200Response.ts -model/postDistributionListsRequest.ts model/resource.ts +model/resourceCollection.ts model/responseRule.ts +model/responseRuleCollection.ts model/responseTemplatePattern.ts model/scenario.ts -model/social.ts -model/socialSocialInner.ts +model/scenarioCollection.ts model/template.ts +model/templateCollection.ts model/user.ts -model/voice.ts -model/voiceResources.ts -model/web.ts +model/userCollection.ts model/workspace.ts -tsconfig.json +model/workspaceCollection.ts diff --git a/api/activitiesApi.ts b/api/activitiesApi.ts index ae4be26..973d06d 100644 --- a/api/activitiesApi.ts +++ b/api/activitiesApi.ts @@ -3,17 +3,8 @@ import http from 'http'; /* tslint:disable:no-unused-locals */ import { Activity, ActivityWrite } from '../model/activity'; -import { GetActivities200Response, GetActivities200ResponseWrite } from '../model/getActivities200Response'; -import { GetMessages400Response, GetMessages400ResponseWrite } from '../model/getMessages400Response'; -import { GetMessages401Response, GetMessages401ResponseWrite } from '../model/getMessages401Response'; -import { GetMessages403Response, GetMessages403ResponseWrite } from '../model/getMessages403Response'; -import { GetMessages404Response, GetMessages404ResponseWrite } from '../model/getMessages404Response'; -import { GetMessages405Response, GetMessages405ResponseWrite } from '../model/getMessages405Response'; -import { GetMessages415Response, GetMessages415ResponseWrite } from '../model/getMessages415Response'; -import { GetMessages422Response, GetMessages422ResponseWrite } from '../model/getMessages422Response'; -import { GetMessages500Response, GetMessages500ResponseWrite } from '../model/getMessages500Response'; -import { GetMessages501Response, GetMessages501ResponseWrite } from '../model/getMessages501Response'; -import { GetWorkspaceActivities200Response, GetWorkspaceActivities200ResponseWrite } from '../model/getWorkspaceActivities200Response'; +import { ActivityCollection, ActivityCollectionWrite } from '../model/activityCollection'; +import { ApiError, ApiErrorWrite } from '../model/apiError'; import { ObjectSerializer, Interceptor } from '../model/models'; import { HttpError, RequestFile, ApiConfig, RequestOptions } from './apis'; @@ -67,7 +58,7 @@ export class ActivitiesApi { description?: string, startTime?: string, endTime?: string, - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & GetActivities200Response> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & ActivityCollection> { const { limit = 20, offset = 0, @@ -160,7 +151,7 @@ export class ActivitiesApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetActivities200Response"); + body = ObjectSerializer.deserialize(body, "ActivityCollection"); resolve({ lastResponse: response.toJSON(), ...body }); } else { @@ -188,7 +179,7 @@ export class ActivitiesApi { offset?: number, sortOrder?: 'asc' | 'desc', sortFields?: string, - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & GetWorkspaceActivities200Response> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & ActivityCollection> { const { workspaceId, limit = 20, @@ -251,7 +242,7 @@ export class ActivitiesApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetWorkspaceActivities200Response"); + body = ObjectSerializer.deserialize(body, "ActivityCollection"); resolve({ lastResponse: response.toJSON(), ...body }); } else { diff --git a/api/authApi.ts b/api/authApi.ts index c74ddde..dd2285e 100644 --- a/api/authApi.ts +++ b/api/authApi.ts @@ -2,16 +2,8 @@ import localVarRequest from 'request'; import http from 'http'; /* tslint:disable:no-unused-locals */ -import { GetMessages400Response, GetMessages400ResponseWrite } from '../model/getMessages400Response'; -import { GetMessages401Response, GetMessages401ResponseWrite } from '../model/getMessages401Response'; -import { GetMessages403Response, GetMessages403ResponseWrite } from '../model/getMessages403Response'; -import { GetMessages404Response, GetMessages404ResponseWrite } from '../model/getMessages404Response'; -import { GetMessages405Response, GetMessages405ResponseWrite } from '../model/getMessages405Response'; -import { GetMessages415Response, GetMessages415ResponseWrite } from '../model/getMessages415Response'; -import { GetMessages422Response, GetMessages422ResponseWrite } from '../model/getMessages422Response'; -import { GetMessages500Response, GetMessages500ResponseWrite } from '../model/getMessages500Response'; -import { GetMessages501Response, GetMessages501ResponseWrite } from '../model/getMessages501Response'; -import { PostAuth200Response, PostAuth200ResponseWrite } from '../model/postAuth200Response'; +import { ApiError, ApiErrorWrite } from '../model/apiError'; +import { Auth, AuthWrite } from '../model/auth'; import { ObjectSerializer, Interceptor } from '../model/models'; import { HttpError, RequestFile, ApiConfig, RequestOptions } from './apis'; @@ -40,7 +32,7 @@ export class AuthApi { * @param xApiKey The API key for authentication. * @param accept Application specific mime-type */ - public async verify(params?: { + public async retrieveVerification(params?: { }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage }> { const { } = params || {}; @@ -104,7 +96,7 @@ export class AuthApi { * @param accept Application specific mime-type */ public async create(params?: { - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage, id: string } & PostAuth200Response> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage, id: string } & Auth> { const { } = params || {}; @@ -150,7 +142,7 @@ export class AuthApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "PostAuth200Response"); + body = ObjectSerializer.deserialize(body, "Auth"); // Special case to extract the resource identifier from the `Location` header. const checkLocation = response?.headers?.location?.match(/\/([^\/]+)\/?$/); diff --git a/api/callbacksApi.ts b/api/callbacksApi.ts index 6cc4bd0..305392a 100644 --- a/api/callbacksApi.ts +++ b/api/callbacksApi.ts @@ -2,19 +2,11 @@ import localVarRequest from 'request'; import http from 'http'; /* tslint:disable:no-unused-locals */ +import { ApiError, ApiErrorWrite } from '../model/apiError'; import { Callback, CallbackWrite } from '../model/callback'; import { CallbackCall, CallbackCallWrite } from '../model/callbackCall'; -import { GetCallbackCalls200Response, GetCallbackCalls200ResponseWrite } from '../model/getCallbackCalls200Response'; -import { GetCallbacks200Response, GetCallbacks200ResponseWrite } from '../model/getCallbacks200Response'; -import { GetMessages400Response, GetMessages400ResponseWrite } from '../model/getMessages400Response'; -import { GetMessages401Response, GetMessages401ResponseWrite } from '../model/getMessages401Response'; -import { GetMessages403Response, GetMessages403ResponseWrite } from '../model/getMessages403Response'; -import { GetMessages404Response, GetMessages404ResponseWrite } from '../model/getMessages404Response'; -import { GetMessages405Response, GetMessages405ResponseWrite } from '../model/getMessages405Response'; -import { GetMessages415Response, GetMessages415ResponseWrite } from '../model/getMessages415Response'; -import { GetMessages422Response, GetMessages422ResponseWrite } from '../model/getMessages422Response'; -import { GetMessages500Response, GetMessages500ResponseWrite } from '../model/getMessages500Response'; -import { GetMessages501Response, GetMessages501ResponseWrite } from '../model/getMessages501Response'; +import { CallbackCallCollection, CallbackCallCollectionWrite } from '../model/callbackCallCollection'; +import { CallbackCollection, CallbackCollectionWrite } from '../model/callbackCollection'; import { ObjectSerializer, Interceptor } from '../model/models'; import { HttpError, RequestFile, ApiConfig, RequestOptions } from './apis'; @@ -191,7 +183,7 @@ export class CallbacksApi { sortOrder?: 'asc' | 'desc', sortFields?: string, status?: 'SUCCESS' | 'FAILED', - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & GetCallbackCalls200Response> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & CallbackCallCollection> { const { callbackId, limit = 20, @@ -258,7 +250,7 @@ export class CallbacksApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetCallbackCalls200Response"); + body = ObjectSerializer.deserialize(body, "CallbackCallCollection"); resolve({ lastResponse: response.toJSON(), ...body }); } else { @@ -284,7 +276,7 @@ export class CallbacksApi { offset?: number, sortOrder?: 'asc' | 'desc', sortFields?: string, - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & GetCallbacks200Response> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & CallbackCollection> { const { limit = 20, offset = 0, @@ -345,7 +337,7 @@ export class CallbacksApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetCallbacks200Response"); + body = ObjectSerializer.deserialize(body, "CallbackCollection"); resolve({ lastResponse: response.toJSON(), ...body }); } else { diff --git a/api/contactsApi.ts b/api/contactsApi.ts index ccbb2bf..df7db9e 100644 --- a/api/contactsApi.ts +++ b/api/contactsApi.ts @@ -2,17 +2,9 @@ import localVarRequest from 'request'; import http from 'http'; /* tslint:disable:no-unused-locals */ +import { ApiError, ApiErrorWrite } from '../model/apiError'; import { Contact, ContactWrite } from '../model/contact'; -import { GetContacts200Response, GetContacts200ResponseWrite } from '../model/getContacts200Response'; -import { GetMessages400Response, GetMessages400ResponseWrite } from '../model/getMessages400Response'; -import { GetMessages401Response, GetMessages401ResponseWrite } from '../model/getMessages401Response'; -import { GetMessages403Response, GetMessages403ResponseWrite } from '../model/getMessages403Response'; -import { GetMessages404Response, GetMessages404ResponseWrite } from '../model/getMessages404Response'; -import { GetMessages405Response, GetMessages405ResponseWrite } from '../model/getMessages405Response'; -import { GetMessages415Response, GetMessages415ResponseWrite } from '../model/getMessages415Response'; -import { GetMessages422Response, GetMessages422ResponseWrite } from '../model/getMessages422Response'; -import { GetMessages500Response, GetMessages500ResponseWrite } from '../model/getMessages500Response'; -import { GetMessages501Response, GetMessages501ResponseWrite } from '../model/getMessages501Response'; +import { ContactCollection, ContactCollectionWrite } from '../model/contactCollection'; import { ObjectSerializer, Interceptor } from '../model/models'; import { HttpError, RequestFile, ApiConfig, RequestOptions } from './apis'; @@ -130,7 +122,7 @@ export class ContactsApi { sortFields?: string, fieldname?: string, customFields?: boolean, - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & GetContacts200Response> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & ContactCollection> { const { workspaceId, limit = 20, @@ -201,7 +193,7 @@ export class ContactsApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetContacts200Response"); + body = ObjectSerializer.deserialize(body, "ContactCollection"); resolve({ lastResponse: response.toJSON(), ...body }); } else { diff --git a/api/customListsApi.ts b/api/customListsApi.ts index b9e97c4..7a6bd6f 100644 --- a/api/customListsApi.ts +++ b/api/customListsApi.ts @@ -2,17 +2,9 @@ import localVarRequest from 'request'; import http from 'http'; /* tslint:disable:no-unused-locals */ +import { ApiError, ApiErrorWrite } from '../model/apiError'; import { CustomList, CustomListWrite } from '../model/customList'; -import { GetCustomLists200Response, GetCustomLists200ResponseWrite } from '../model/getCustomLists200Response'; -import { GetMessages400Response, GetMessages400ResponseWrite } from '../model/getMessages400Response'; -import { GetMessages401Response, GetMessages401ResponseWrite } from '../model/getMessages401Response'; -import { GetMessages403Response, GetMessages403ResponseWrite } from '../model/getMessages403Response'; -import { GetMessages404Response, GetMessages404ResponseWrite } from '../model/getMessages404Response'; -import { GetMessages405Response, GetMessages405ResponseWrite } from '../model/getMessages405Response'; -import { GetMessages415Response, GetMessages415ResponseWrite } from '../model/getMessages415Response'; -import { GetMessages422Response, GetMessages422ResponseWrite } from '../model/getMessages422Response'; -import { GetMessages500Response, GetMessages500ResponseWrite } from '../model/getMessages500Response'; -import { GetMessages501Response, GetMessages501ResponseWrite } from '../model/getMessages501Response'; +import { CustomListCollection, CustomListCollectionWrite } from '../model/customListCollection'; import { ObjectSerializer, Interceptor } from '../model/models'; import { HttpError, RequestFile, ApiConfig, RequestOptions } from './apis'; @@ -54,7 +46,7 @@ export class CustomListsApi { sortFields?: string, name?: string, type?: 'INCIDENT' | 'MESSAGE' | 'CONTACT' | 'RSS', - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & GetCustomLists200Response> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & CustomListCollection> { const { limit = 20, offset = 0, @@ -123,7 +115,7 @@ export class CustomListsApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetCustomLists200Response"); + body = ObjectSerializer.deserialize(body, "CustomListCollection"); resolve({ lastResponse: response.toJSON(), ...body }); } else { diff --git a/api/distributionListsApi.ts b/api/distributionListsApi.ts index 00caea4..4ae9856 100644 --- a/api/distributionListsApi.ts +++ b/api/distributionListsApi.ts @@ -2,17 +2,9 @@ import localVarRequest from 'request'; import http from 'http'; /* tslint:disable:no-unused-locals */ -import { GetDistributionLists200Response, GetDistributionLists200ResponseWrite } from '../model/getDistributionLists200Response'; -import { GetMessages400Response, GetMessages400ResponseWrite } from '../model/getMessages400Response'; -import { GetMessages401Response, GetMessages401ResponseWrite } from '../model/getMessages401Response'; -import { GetMessages403Response, GetMessages403ResponseWrite } from '../model/getMessages403Response'; -import { GetMessages404Response, GetMessages404ResponseWrite } from '../model/getMessages404Response'; -import { GetMessages405Response, GetMessages405ResponseWrite } from '../model/getMessages405Response'; -import { GetMessages415Response, GetMessages415ResponseWrite } from '../model/getMessages415Response'; -import { GetMessages422Response, GetMessages422ResponseWrite } from '../model/getMessages422Response'; -import { GetMessages500Response, GetMessages500ResponseWrite } from '../model/getMessages500Response'; -import { GetMessages501Response, GetMessages501ResponseWrite } from '../model/getMessages501Response'; -import { PostDistributionListsRequest, PostDistributionListsRequestWrite } from '../model/postDistributionListsRequest'; +import { ApiError, ApiErrorWrite } from '../model/apiError'; +import { DistributionList, DistributionListWrite } from '../model/distributionList'; +import { DistributionListCollection, DistributionListCollectionWrite } from '../model/distributionListCollection'; import { ObjectSerializer, Interceptor } from '../model/models'; import { HttpError, RequestFile, ApiConfig, RequestOptions } from './apis'; @@ -124,7 +116,7 @@ export class DistributionListsApi { sortFields?: string, name?: string, description?: string, - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & GetDistributionLists200Response> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & DistributionListCollection> { const { workspaceId, limit = 20, @@ -195,7 +187,7 @@ export class DistributionListsApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetDistributionLists200Response"); + body = ObjectSerializer.deserialize(body, "DistributionListCollection"); resolve({ lastResponse: response.toJSON(), ...body }); } else { @@ -217,7 +209,7 @@ export class DistributionListsApi { public async retrieve(params?: { workspaceId: string, distributionlistId: string, - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & PostDistributionListsRequest> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & DistributionList> { const { workspaceId, distributionlistId, @@ -266,7 +258,7 @@ export class DistributionListsApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "PostDistributionListsRequest"); + body = ObjectSerializer.deserialize(body, "DistributionList"); resolve({ lastResponse: response.toJSON(), ...body }); } else { @@ -284,14 +276,14 @@ export class DistributionListsApi { * @param xApiKey The API key for authentication. * @param contentType Application specific mime-type. * @param accept Application specific mime-type. - * @param postDistributionListsRequest Distribution list object that needs to be create Distribution list + * @param distributionList Distribution list object that needs to be create Distribution list */ public async create(params?: { workspaceId: string, - } & PostDistributionListsRequestWrite, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage, id: string } & PostDistributionListsRequest> { + } & DistributionListWrite, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage, id: string } & DistributionList> { const { workspaceId, - ...postDistributionListsRequest + ...distributionList } = params || {}; const localVarPath = this.host + '/workspaces/{workspaceId}/distributionlists' @@ -313,7 +305,7 @@ export class DistributionListsApi { uri: localVarPath, useQuerystring: this.useQuerystring, json: true, - body: ObjectSerializer.serialize(postDistributionListsRequest, "PostDistributionListsRequest") + body: ObjectSerializer.serialize(distributionList, "DistributionList") }; let authenticationPromise = Promise.resolve(); @@ -338,7 +330,7 @@ export class DistributionListsApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "PostDistributionListsRequest"); + body = ObjectSerializer.deserialize(body, "DistributionList"); // Special case to extract the resource identifier from the `Location` header. const checkLocation = response?.headers?.location?.match(/\/([^\/]+)\/?$/); @@ -361,16 +353,16 @@ export class DistributionListsApi { * @param contentType Application specific mime-type. * @param accept Application specific mime-type. * @param distributionlistId Enter Distribution id. - * @param postDistributionListsRequest Distribution list object that needs to be update Distribution list + * @param distributionList Distribution list object that needs to be update Distribution list */ public async update(params?: { workspaceId: string, distributionlistId: string, - } & PostDistributionListsRequestWrite, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage }> { + } & DistributionListWrite, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage }> { const { workspaceId, distributionlistId, - ...postDistributionListsRequest + ...distributionList } = params || {}; const localVarPath = this.host + '/workspaces/{workspaceId}/distributionlists/{distributionlistId}' @@ -393,7 +385,7 @@ export class DistributionListsApi { uri: localVarPath, useQuerystring: this.useQuerystring, json: true, - body: ObjectSerializer.serialize(postDistributionListsRequest, "PostDistributionListsRequest") + body: ObjectSerializer.serialize(distributionList, "DistributionList") }; let authenticationPromise = Promise.resolve(); diff --git a/api/eventsApi.ts b/api/eventsApi.ts index 77c98b3..591634d 100644 --- a/api/eventsApi.ts +++ b/api/eventsApi.ts @@ -2,17 +2,9 @@ import localVarRequest from 'request'; import http from 'http'; /* tslint:disable:no-unused-locals */ +import { ApiError, ApiErrorWrite } from '../model/apiError'; import { Event, EventWrite } from '../model/event'; -import { GetEvents200Response, GetEvents200ResponseWrite } from '../model/getEvents200Response'; -import { GetMessages400Response, GetMessages400ResponseWrite } from '../model/getMessages400Response'; -import { GetMessages401Response, GetMessages401ResponseWrite } from '../model/getMessages401Response'; -import { GetMessages403Response, GetMessages403ResponseWrite } from '../model/getMessages403Response'; -import { GetMessages404Response, GetMessages404ResponseWrite } from '../model/getMessages404Response'; -import { GetMessages405Response, GetMessages405ResponseWrite } from '../model/getMessages405Response'; -import { GetMessages415Response, GetMessages415ResponseWrite } from '../model/getMessages415Response'; -import { GetMessages422Response, GetMessages422ResponseWrite } from '../model/getMessages422Response'; -import { GetMessages500Response, GetMessages500ResponseWrite } from '../model/getMessages500Response'; -import { GetMessages501Response, GetMessages501ResponseWrite } from '../model/getMessages501Response'; +import { EventCollection, EventCollectionWrite } from '../model/eventCollection'; import { ObjectSerializer, Interceptor } from '../model/models'; import { HttpError, RequestFile, ApiConfig, RequestOptions } from './apis'; @@ -225,7 +217,7 @@ export class EventsApi { offset?: number, sortOrder?: 'asc' | 'desc', sortFields?: string, - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & GetEvents200Response> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & EventCollection> { const { workspaceId, eventType, @@ -290,7 +282,7 @@ export class EventsApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetEvents200Response"); + body = ObjectSerializer.deserialize(body, "EventCollection"); resolve({ lastResponse: response.toJSON(), ...body }); } else { diff --git a/api/importsApi.ts b/api/importsApi.ts index eb97961..d343c67 100644 --- a/api/importsApi.ts +++ b/api/importsApi.ts @@ -2,15 +2,7 @@ import localVarRequest from 'request'; import http from 'http'; /* tslint:disable:no-unused-locals */ -import { GetMessages400Response, GetMessages400ResponseWrite } from '../model/getMessages400Response'; -import { GetMessages401Response, GetMessages401ResponseWrite } from '../model/getMessages401Response'; -import { GetMessages403Response, GetMessages403ResponseWrite } from '../model/getMessages403Response'; -import { GetMessages404Response, GetMessages404ResponseWrite } from '../model/getMessages404Response'; -import { GetMessages405Response, GetMessages405ResponseWrite } from '../model/getMessages405Response'; -import { GetMessages415Response, GetMessages415ResponseWrite } from '../model/getMessages415Response'; -import { GetMessages422Response, GetMessages422ResponseWrite } from '../model/getMessages422Response'; -import { GetMessages500Response, GetMessages500ResponseWrite } from '../model/getMessages500Response'; -import { GetMessages501Response, GetMessages501ResponseWrite } from '../model/getMessages501Response'; +import { ApiError, ApiErrorWrite } from '../model/apiError'; import { Import, ImportWrite } from '../model/import'; import { ObjectSerializer, Interceptor } from '../model/models'; import { HttpError, RequestFile, ApiConfig, RequestOptions } from './apis'; diff --git a/api/messagesApi.ts b/api/messagesApi.ts index e2ff465..90fc3e2 100644 --- a/api/messagesApi.ts +++ b/api/messagesApi.ts @@ -2,18 +2,10 @@ import localVarRequest from 'request'; import http from 'http'; /* tslint:disable:no-unused-locals */ -import { GetMessageResponsesById200Response, GetMessageResponsesById200ResponseWrite } from '../model/getMessageResponsesById200Response'; -import { GetMessages200Response, GetMessages200ResponseWrite } from '../model/getMessages200Response'; -import { GetMessages400Response, GetMessages400ResponseWrite } from '../model/getMessages400Response'; -import { GetMessages401Response, GetMessages401ResponseWrite } from '../model/getMessages401Response'; -import { GetMessages403Response, GetMessages403ResponseWrite } from '../model/getMessages403Response'; -import { GetMessages404Response, GetMessages404ResponseWrite } from '../model/getMessages404Response'; -import { GetMessages405Response, GetMessages405ResponseWrite } from '../model/getMessages405Response'; -import { GetMessages415Response, GetMessages415ResponseWrite } from '../model/getMessages415Response'; -import { GetMessages422Response, GetMessages422ResponseWrite } from '../model/getMessages422Response'; -import { GetMessages500Response, GetMessages500ResponseWrite } from '../model/getMessages500Response'; -import { GetMessages501Response, GetMessages501ResponseWrite } from '../model/getMessages501Response'; +import { ApiError, ApiErrorWrite } from '../model/apiError'; import { Message, MessageWrite } from '../model/message'; +import { MessageCollection, MessageCollectionWrite } from '../model/messageCollection'; +import { MessageResponse, MessageResponseWrite } from '../model/messageResponse'; import { MessageStatus, MessageStatusWrite } from '../model/messageStatus'; import { ObjectSerializer, Interceptor } from '../model/models'; import { HttpError, RequestFile, ApiConfig, RequestOptions } from './apis'; @@ -131,7 +123,7 @@ export class MessagesApi { sortFields?: string, view?: 'summary' | 'detailed', filter?: 'noresponse' | 'notmatched' | 'responserule', - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & GetMessageResponsesById200Response> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & MessageResponse> { const { workspaceId, messageId, @@ -204,7 +196,7 @@ export class MessagesApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetMessageResponsesById200Response"); + body = ObjectSerializer.deserialize(body, "MessageResponse"); resolve({ lastResponse: response.toJSON(), ...body }); } else { @@ -339,7 +331,7 @@ export class MessagesApi { offset?: number, sortOrder?: 'asc' | 'desc', sortFields?: string, - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & GetMessages200Response> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & MessageCollection> { const { workspaceId, limit = 20, @@ -402,7 +394,7 @@ export class MessagesApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetMessages200Response"); + body = ObjectSerializer.deserialize(body, "MessageCollection"); resolve({ lastResponse: response.toJSON(), ...body }); } else { diff --git a/api/resourcesApi.ts b/api/resourcesApi.ts index e72ae04..577047c 100644 --- a/api/resourcesApi.ts +++ b/api/resourcesApi.ts @@ -2,17 +2,9 @@ import localVarRequest from 'request'; import http from 'http'; /* tslint:disable:no-unused-locals */ -import { GetMessages400Response, GetMessages400ResponseWrite } from '../model/getMessages400Response'; -import { GetMessages401Response, GetMessages401ResponseWrite } from '../model/getMessages401Response'; -import { GetMessages403Response, GetMessages403ResponseWrite } from '../model/getMessages403Response'; -import { GetMessages404Response, GetMessages404ResponseWrite } from '../model/getMessages404Response'; -import { GetMessages405Response, GetMessages405ResponseWrite } from '../model/getMessages405Response'; -import { GetMessages415Response, GetMessages415ResponseWrite } from '../model/getMessages415Response'; -import { GetMessages422Response, GetMessages422ResponseWrite } from '../model/getMessages422Response'; -import { GetMessages500Response, GetMessages500ResponseWrite } from '../model/getMessages500Response'; -import { GetMessages501Response, GetMessages501ResponseWrite } from '../model/getMessages501Response'; -import { GetResources200Response, GetResources200ResponseWrite } from '../model/getResources200Response'; +import { ApiError, ApiErrorWrite } from '../model/apiError'; import { Resource, ResourceWrite } from '../model/resource'; +import { ResourceCollection, ResourceCollectionWrite } from '../model/resourceCollection'; import { ObjectSerializer, Interceptor } from '../model/models'; import { HttpError, RequestFile, ApiConfig, RequestOptions } from './apis'; @@ -124,7 +116,7 @@ export class ResourcesApi { sortFields?: string, scope?: 'private' | 'public', name?: string, - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & GetResources200Response> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & ResourceCollection> { const { workspaceId, limit = 20, @@ -195,7 +187,7 @@ export class ResourcesApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetResources200Response"); + body = ObjectSerializer.deserialize(body, "ResourceCollection"); resolve({ lastResponse: response.toJSON(), ...body }); } else { diff --git a/api/responseRulesApi.ts b/api/responseRulesApi.ts index 92c06ba..217bd56 100644 --- a/api/responseRulesApi.ts +++ b/api/responseRulesApi.ts @@ -2,17 +2,9 @@ import localVarRequest from 'request'; import http from 'http'; /* tslint:disable:no-unused-locals */ -import { GetMessages400Response, GetMessages400ResponseWrite } from '../model/getMessages400Response'; -import { GetMessages401Response, GetMessages401ResponseWrite } from '../model/getMessages401Response'; -import { GetMessages403Response, GetMessages403ResponseWrite } from '../model/getMessages403Response'; -import { GetMessages404Response, GetMessages404ResponseWrite } from '../model/getMessages404Response'; -import { GetMessages405Response, GetMessages405ResponseWrite } from '../model/getMessages405Response'; -import { GetMessages415Response, GetMessages415ResponseWrite } from '../model/getMessages415Response'; -import { GetMessages422Response, GetMessages422ResponseWrite } from '../model/getMessages422Response'; -import { GetMessages500Response, GetMessages500ResponseWrite } from '../model/getMessages500Response'; -import { GetMessages501Response, GetMessages501ResponseWrite } from '../model/getMessages501Response'; -import { GetResponseRules200Response, GetResponseRules200ResponseWrite } from '../model/getResponseRules200Response'; +import { ApiError, ApiErrorWrite } from '../model/apiError'; import { ResponseRule, ResponseRuleWrite } from '../model/responseRule'; +import { ResponseRuleCollection, ResponseRuleCollectionWrite } from '../model/responseRuleCollection'; import { ObjectSerializer, Interceptor } from '../model/models'; import { HttpError, RequestFile, ApiConfig, RequestOptions } from './apis'; @@ -120,7 +112,7 @@ export class ResponseRulesApi { offset?: number, sortOrder?: 'asc' | 'desc', sortFields?: string, - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & GetResponseRules200Response> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & ResponseRuleCollection> { const { workspaceId, limit = 20, @@ -183,7 +175,7 @@ export class ResponseRulesApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetResponseRules200Response"); + body = ObjectSerializer.deserialize(body, "ResponseRuleCollection"); resolve({ lastResponse: response.toJSON(), ...body }); } else { diff --git a/api/scenariosApi.ts b/api/scenariosApi.ts index 72b02c0..c3ed935 100644 --- a/api/scenariosApi.ts +++ b/api/scenariosApi.ts @@ -2,17 +2,9 @@ import localVarRequest from 'request'; import http from 'http'; /* tslint:disable:no-unused-locals */ -import { GetMessages400Response, GetMessages400ResponseWrite } from '../model/getMessages400Response'; -import { GetMessages401Response, GetMessages401ResponseWrite } from '../model/getMessages401Response'; -import { GetMessages403Response, GetMessages403ResponseWrite } from '../model/getMessages403Response'; -import { GetMessages404Response, GetMessages404ResponseWrite } from '../model/getMessages404Response'; -import { GetMessages405Response, GetMessages405ResponseWrite } from '../model/getMessages405Response'; -import { GetMessages415Response, GetMessages415ResponseWrite } from '../model/getMessages415Response'; -import { GetMessages422Response, GetMessages422ResponseWrite } from '../model/getMessages422Response'; -import { GetMessages500Response, GetMessages500ResponseWrite } from '../model/getMessages500Response'; -import { GetMessages501Response, GetMessages501ResponseWrite } from '../model/getMessages501Response'; -import { GetScenarios200Response, GetScenarios200ResponseWrite } from '../model/getScenarios200Response'; +import { ApiError, ApiErrorWrite } from '../model/apiError'; import { Scenario, ScenarioWrite } from '../model/scenario'; +import { ScenarioCollection, ScenarioCollectionWrite } from '../model/scenarioCollection'; import { ObjectSerializer, Interceptor } from '../model/models'; import { HttpError, RequestFile, ApiConfig, RequestOptions } from './apis'; @@ -120,7 +112,7 @@ export class ScenariosApi { offset?: number, sortOrder?: 'asc' | 'desc', sortFields?: string, - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & GetScenarios200Response> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & ScenarioCollection> { const { workspaceId, limit = 20, @@ -183,7 +175,7 @@ export class ScenariosApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetScenarios200Response"); + body = ObjectSerializer.deserialize(body, "ScenarioCollection"); resolve({ lastResponse: response.toJSON(), ...body }); } else { @@ -349,7 +341,7 @@ export class ScenariosApi { * @param accept Application specific mime-type. * @param scenarioId Enter Scenarios id. */ - public async run(params?: { + public async createRun(params?: { workspaceId: string, scenarioId: string, }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage }> { diff --git a/api/templatesApi.ts b/api/templatesApi.ts index 60815b5..b223843 100644 --- a/api/templatesApi.ts +++ b/api/templatesApi.ts @@ -2,17 +2,9 @@ import localVarRequest from 'request'; import http from 'http'; /* tslint:disable:no-unused-locals */ -import { GetMessages400Response, GetMessages400ResponseWrite } from '../model/getMessages400Response'; -import { GetMessages401Response, GetMessages401ResponseWrite } from '../model/getMessages401Response'; -import { GetMessages403Response, GetMessages403ResponseWrite } from '../model/getMessages403Response'; -import { GetMessages404Response, GetMessages404ResponseWrite } from '../model/getMessages404Response'; -import { GetMessages405Response, GetMessages405ResponseWrite } from '../model/getMessages405Response'; -import { GetMessages415Response, GetMessages415ResponseWrite } from '../model/getMessages415Response'; -import { GetMessages422Response, GetMessages422ResponseWrite } from '../model/getMessages422Response'; -import { GetMessages500Response, GetMessages500ResponseWrite } from '../model/getMessages500Response'; -import { GetMessages501Response, GetMessages501ResponseWrite } from '../model/getMessages501Response'; -import { GetTemplates200Response, GetTemplates200ResponseWrite } from '../model/getTemplates200Response'; +import { ApiError, ApiErrorWrite } from '../model/apiError'; import { Template, TemplateWrite } from '../model/template'; +import { TemplateCollection, TemplateCollectionWrite } from '../model/templateCollection'; import { ObjectSerializer, Interceptor } from '../model/models'; import { HttpError, RequestFile, ApiConfig, RequestOptions } from './apis'; @@ -124,7 +116,7 @@ export class TemplatesApi { offset?: number, sortOrder?: 'asc' | 'desc', sortFields?: string, - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & GetTemplates200Response> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & TemplateCollection> { const { workspaceId, limit = 20, @@ -187,7 +179,7 @@ export class TemplatesApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetTemplates200Response"); + body = ObjectSerializer.deserialize(body, "TemplateCollection"); resolve({ lastResponse: response.toJSON(), ...body }); } else { diff --git a/api/usersApi.ts b/api/usersApi.ts index dee1eaa..2521578 100644 --- a/api/usersApi.ts +++ b/api/usersApi.ts @@ -2,17 +2,9 @@ import localVarRequest from 'request'; import http from 'http'; /* tslint:disable:no-unused-locals */ -import { GetMessages400Response, GetMessages400ResponseWrite } from '../model/getMessages400Response'; -import { GetMessages401Response, GetMessages401ResponseWrite } from '../model/getMessages401Response'; -import { GetMessages403Response, GetMessages403ResponseWrite } from '../model/getMessages403Response'; -import { GetMessages404Response, GetMessages404ResponseWrite } from '../model/getMessages404Response'; -import { GetMessages405Response, GetMessages405ResponseWrite } from '../model/getMessages405Response'; -import { GetMessages415Response, GetMessages415ResponseWrite } from '../model/getMessages415Response'; -import { GetMessages422Response, GetMessages422ResponseWrite } from '../model/getMessages422Response'; -import { GetMessages500Response, GetMessages500ResponseWrite } from '../model/getMessages500Response'; -import { GetMessages501Response, GetMessages501ResponseWrite } from '../model/getMessages501Response'; -import { GetUsers200Response, GetUsers200ResponseWrite } from '../model/getUsers200Response'; +import { ApiError, ApiErrorWrite } from '../model/apiError'; import { User, UserWrite } from '../model/user'; +import { UserCollection, UserCollectionWrite } from '../model/userCollection'; import { ObjectSerializer, Interceptor } from '../model/models'; import { HttpError, RequestFile, ApiConfig, RequestOptions } from './apis'; @@ -184,7 +176,7 @@ export class UsersApi { sortFields?: string, limit?: number, offset?: number, - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & GetUsers200Response> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & UserCollection> { const { fieldname, sortOrder, @@ -249,7 +241,7 @@ export class UsersApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetUsers200Response"); + body = ObjectSerializer.deserialize(body, "UserCollection"); resolve({ lastResponse: response.toJSON(), ...body }); } else { @@ -344,7 +336,7 @@ export class UsersApi { sortFields?: string, limit?: number, offset?: number, - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & GetUsers200Response> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & UserCollection> { const { workspaceId, sortOrder, @@ -407,7 +399,7 @@ export class UsersApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetUsers200Response"); + body = ObjectSerializer.deserialize(body, "UserCollection"); resolve({ lastResponse: response.toJSON(), ...body }); } else { diff --git a/api/workspacesApi.ts b/api/workspacesApi.ts index d378a6e..668f1a5 100644 --- a/api/workspacesApi.ts +++ b/api/workspacesApi.ts @@ -2,17 +2,9 @@ import localVarRequest from 'request'; import http from 'http'; /* tslint:disable:no-unused-locals */ -import { GetMessages400Response, GetMessages400ResponseWrite } from '../model/getMessages400Response'; -import { GetMessages401Response, GetMessages401ResponseWrite } from '../model/getMessages401Response'; -import { GetMessages403Response, GetMessages403ResponseWrite } from '../model/getMessages403Response'; -import { GetMessages404Response, GetMessages404ResponseWrite } from '../model/getMessages404Response'; -import { GetMessages405Response, GetMessages405ResponseWrite } from '../model/getMessages405Response'; -import { GetMessages415Response, GetMessages415ResponseWrite } from '../model/getMessages415Response'; -import { GetMessages422Response, GetMessages422ResponseWrite } from '../model/getMessages422Response'; -import { GetMessages500Response, GetMessages500ResponseWrite } from '../model/getMessages500Response'; -import { GetMessages501Response, GetMessages501ResponseWrite } from '../model/getMessages501Response'; -import { GetWorkspaces200Response, GetWorkspaces200ResponseWrite } from '../model/getWorkspaces200Response'; +import { ApiError, ApiErrorWrite } from '../model/apiError'; import { Workspace, WorkspaceWrite } from '../model/workspace'; +import { WorkspaceCollection, WorkspaceCollectionWrite } from '../model/workspaceCollection'; import { ObjectSerializer, Interceptor } from '../model/models'; import { HttpError, RequestFile, ApiConfig, RequestOptions } from './apis'; @@ -50,7 +42,7 @@ export class WorkspacesApi { offset?: number, sortOrder?: 'asc' | 'desc', sortFields?: string, - }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & GetWorkspaces200Response> { + }, options?: RequestOptions): Promise<{ lastResponse: http.IncomingMessage } & WorkspaceCollection> { const { limit = 20, offset = 0, @@ -111,7 +103,7 @@ export class WorkspacesApi { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "GetWorkspaces200Response"); + body = ObjectSerializer.deserialize(body, "WorkspaceCollection"); resolve({ lastResponse: response.toJSON(), ...body }); } else { diff --git a/model/activity.ts b/model/activity.ts index 7e3a8a0..387abec 100644 --- a/model/activity.ts +++ b/model/activity.ts @@ -1,6 +1,6 @@ import { RequestFile } from './models'; -import { LinkInner, LinkInnerWrite } from './linkInner'; +import { Link, LinkWrite } from './link'; export type ActivityWrite = { @@ -77,7 +77,7 @@ export class Activity { /** * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. */ - 'link': Array; + 'link': Array; static discriminator: string | undefined = undefined; @@ -125,7 +125,7 @@ export class Activity { { "name": "link", "baseName": "link", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/activityCollection.ts b/model/activityCollection.ts new file mode 100644 index 0000000..abe75ea --- /dev/null +++ b/model/activityCollection.ts @@ -0,0 +1,41 @@ + +import { RequestFile } from './models'; +import { Activity, ActivityWrite } from './activity'; +import { Link, LinkWrite } from './link'; + + +export type ActivityCollectionWrite = { +} + +/** +* List activities response object +*/ +export class ActivityCollection { + /** + * List of activities + */ + 'activities': Array; + /** + * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. + */ + 'link': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "activities", + "baseName": "activities", + "type": "Array" + }, + { + "name": "link", + "baseName": "link", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ActivityCollection.attributeTypeMap; + } +} + diff --git a/model/apiError.ts b/model/apiError.ts new file mode 100644 index 0000000..5281116 --- /dev/null +++ b/model/apiError.ts @@ -0,0 +1,48 @@ + +import { RequestFile } from './models'; + + +export type ApiErrorWrite = { +} + +/** +* The generic error object +*/ +export class ApiError { + /** + * The summary of the error encountered. + */ + 'errorSummary': string; + /** + * The detailed description of the error encountered. + */ + 'errorText': string; + /** + * The additional details describing the error. + */ + 'errorDetail': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "errorSummary", + "baseName": "errorSummary", + "type": "string" + }, + { + "name": "errorText", + "baseName": "errorText", + "type": "string" + }, + { + "name": "errorDetail", + "baseName": "errorDetail", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ApiError.attributeTypeMap; + } +} + diff --git a/model/auth.ts b/model/auth.ts new file mode 100644 index 0000000..e6a0647 --- /dev/null +++ b/model/auth.ts @@ -0,0 +1,44 @@ + +import { RequestFile } from './models'; +import { Link, LinkWrite } from './link'; + + +export type AuthWrite = { + /** + * The JWT token. + */ + 'token'?: string; +} + +/** +* The create auth object. +*/ +export class Auth { + /** + * The JWT token. + */ + 'token': string; + /** + * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. + */ + 'link': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "token", + "baseName": "token", + "type": "string" + }, + { + "name": "link", + "baseName": "link", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return Auth.attributeTypeMap; + } +} + diff --git a/model/callback.ts b/model/callback.ts index ab0d7a8..70b81cd 100644 --- a/model/callback.ts +++ b/model/callback.ts @@ -1,8 +1,8 @@ import { RequestFile } from './models'; import { CallbackAuth, CallbackAuthWrite } from './callbackAuth'; -import { CallbackCallbacks, CallbackCallbacksWrite } from './callbackCallbacks'; -import { LinkInner, LinkInnerWrite } from './linkInner'; +import { CallbackEvent, CallbackEventWrite } from './callbackEvent'; +import { Link, LinkWrite } from './link'; export type CallbackWrite = { @@ -31,7 +31,7 @@ export type CallbackWrite = { * Whispir notify this email address that a callback has failed (only when retries are disabled). The email will contain the details of the callback content. */ 'email': string; - 'callbacks': CallbackCallbacksWrite; + 'callbacks': CallbackEventWrite; } /** @@ -67,11 +67,11 @@ export class Callback { * Whispir notify this email address that a callback has failed (only when retries are disabled). The email will contain the details of the callback content. */ 'email': string; - 'callbacks': CallbackCallbacks; + 'callbacks': CallbackEvent; /** * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. */ - 'link': Array; + 'link': Array; static discriminator: string | undefined = undefined; @@ -119,12 +119,12 @@ export class Callback { { "name": "callbacks", "baseName": "callbacks", - "type": "CallbackCallbacks" + "type": "CallbackEvent" }, { "name": "link", "baseName": "link", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/callbackCall.ts b/model/callbackCall.ts index bf825c4..7c57ed4 100644 --- a/model/callbackCall.ts +++ b/model/callbackCall.ts @@ -1,9 +1,9 @@ import { RequestFile } from './models'; -import { CallbackCallCallback, CallbackCallCallbackWrite } from './callbackCallCallback'; +import { CallbackCallEvent, CallbackCallEventWrite } from './callbackCallEvent'; import { CallbackCallFrom, CallbackCallFromWrite } from './callbackCallFrom'; import { CallbackCallResponseMessage, CallbackCallResponseMessageWrite } from './callbackCallResponseMessage'; -import { LinkInner, LinkInnerWrite } from './linkInner'; +import { Link, LinkWrite } from './link'; export type CallbackCallWrite = { @@ -13,7 +13,7 @@ export type CallbackCallWrite = { 'status': 'SUCCESS' | 'FAILED'; 'from'?: CallbackCallFromWrite; 'responseMessage'?: CallbackCallResponseMessageWrite; - 'callback'?: CallbackCallCallbackWrite; + 'callback'?: CallbackCallEventWrite; } /** @@ -38,11 +38,11 @@ export class CallbackCall { 'messageLocation': string; 'from': CallbackCallFrom; 'responseMessage': CallbackCallResponseMessage; - 'callback': CallbackCallCallback; + 'callback': CallbackCallEvent; /** * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. */ - 'link': Array; + 'link': Array; static discriminator: string | undefined = undefined; @@ -80,12 +80,12 @@ export class CallbackCall { { "name": "callback", "baseName": "callback", - "type": "CallbackCallCallback" + "type": "CallbackCallEvent" }, { "name": "link", "baseName": "link", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/callbackCallCollection.ts b/model/callbackCallCollection.ts new file mode 100644 index 0000000..9a15375 --- /dev/null +++ b/model/callbackCallCollection.ts @@ -0,0 +1,58 @@ + +import { RequestFile } from './models'; +import { CallbackCall, CallbackCallWrite } from './callbackCall'; +import { Link, LinkWrite } from './link'; + + +export type CallbackCallCollectionWrite = { + /** + * A list of callbacks + */ + 'calls'?: Array; + /** + * Provides the total number of records fetched. This attribute may return \"No records found\" when there are no callbacks available. + */ + 'status'?: string; +} + +/** +* List of callback calls +*/ +export class CallbackCallCollection { + /** + * A list of callbacks + */ + 'calls': Array; + /** + * Provides the total number of records fetched. This attribute may return \"No records found\" when there are no callbacks available. + */ + 'status': string; + /** + * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. + */ + 'link': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "calls", + "baseName": "calls", + "type": "Array" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "link", + "baseName": "link", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return CallbackCallCollection.attributeTypeMap; + } +} + diff --git a/model/callbackCallEvent.ts b/model/callbackCallEvent.ts new file mode 100644 index 0000000..c244820 --- /dev/null +++ b/model/callbackCallEvent.ts @@ -0,0 +1,75 @@ + +import { RequestFile } from './models'; + + +export type CallbackCallEventWrite = { +} + +/** +* The details about this particular callback attempt +*/ +export class CallbackCallEvent { + /** + * The ID of the callback attempting to be invoked + */ + 'id': string; + /** + * The name of the callback server attempting to be invoked + */ + 'name': string; + /** + * The URL of the callback server attempting to be invoked + */ + 'url': string; + /** + * The date/time that the callback server was attempted to be invoked + */ + 'attemptedDate': string; + /** + * The statuscode that was returned from the callback service + */ + 'statusCode': number; + /** + * The status message that was returned from the callback service + */ + 'statusMessage': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + }, + { + "name": "attemptedDate", + "baseName": "attemptedDate", + "type": "string" + }, + { + "name": "statusCode", + "baseName": "statusCode", + "type": "number" + }, + { + "name": "statusMessage", + "baseName": "statusMessage", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CallbackCallEvent.attributeTypeMap; + } +} + diff --git a/model/callbackCollection.ts b/model/callbackCollection.ts new file mode 100644 index 0000000..cdf2157 --- /dev/null +++ b/model/callbackCollection.ts @@ -0,0 +1,50 @@ + +import { RequestFile } from './models'; +import { CallbackShort, CallbackShortWrite } from './callbackShort'; +import { Link, LinkWrite } from './link'; + + +export type CallbackCollectionWrite = { +} + +/** +* List of callbacks +*/ +export class CallbackCollection { + /** + * Provides the total number of records fetched. This attribute may return \"No records found\" when there are no callbacks available. + */ + 'status': string; + /** + * A list of callbacks + */ + 'callbacks': Set; + /** + * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. + */ + 'link': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "callbacks", + "baseName": "callbacks", + "type": "Set" + }, + { + "name": "link", + "baseName": "link", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return CallbackCollection.attributeTypeMap; + } +} + diff --git a/model/callbackEvent.ts b/model/callbackEvent.ts new file mode 100644 index 0000000..8737685 --- /dev/null +++ b/model/callbackEvent.ts @@ -0,0 +1,47 @@ + +import { RequestFile } from './models'; + + +export type CallbackEventWrite = { + /** + * A boolean flag specifying whether message reply callbacks are enabled. + */ + 'reply': 'enabled' | 'disabled'; + /** + * A boolean flag specifying whether undeliverable message callbacks are enabled. + */ + 'undeliverable': 'enabled' | 'disabled'; +} + +/** +* The object to specify which events callbacks should be enabled for. +*/ +export class CallbackEvent { + /** + * A boolean flag specifying whether message reply callbacks are enabled. + */ + 'reply': 'enabled' | 'disabled'; + /** + * A boolean flag specifying whether undeliverable message callbacks are enabled. + */ + 'undeliverable': 'enabled' | 'disabled'; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "reply", + "baseName": "reply", + "type": "string" + }, + { + "name": "undeliverable", + "baseName": "undeliverable", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CallbackEvent.attributeTypeMap; + } +} + diff --git a/model/callbackShort.ts b/model/callbackShort.ts new file mode 100644 index 0000000..5f3c4da --- /dev/null +++ b/model/callbackShort.ts @@ -0,0 +1,64 @@ + +import { RequestFile } from './models'; +import { Link, LinkWrite } from './link'; + + +export type CallbackShortWrite = { +} + +export class CallbackShort { + /** + * The id of the callback. This is the value that should be passed when referring to the callback using the API endpoints + */ + 'id': string; + /** + * The name of the callback. This is the value that should be passed in the message payload for triggering the callbacks + */ + 'name': string; + /** + * The destination url on your servers that Whispir should reach out to. + */ + 'url': string; + /** + * If retriesEnabled is false, then Whispir will only try once and when a failure (non 200 OK response code) happens, it will not retry again When true, it will try every 5 mins for a maximum of 10 times. Refer to callback calls for more details on retrieving the SUCCESS and FAIL logs + */ + 'retriesEnabled': boolean; + /** + * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. + */ + 'link': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + }, + { + "name": "retriesEnabled", + "baseName": "retriesEnabled", + "type": "boolean" + }, + { + "name": "link", + "baseName": "link", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return CallbackShort.attributeTypeMap; + } +} + diff --git a/model/contact.ts b/model/contact.ts index 12998cd..7fb984b 100644 --- a/model/contact.ts +++ b/model/contact.ts @@ -1,8 +1,8 @@ import { RequestFile } from './models'; -import { LinkInner, LinkInnerWrite } from './linkInner'; -import { LocationsInner, LocationsInnerWrite } from './locationsInner'; -import { MessagingoptionsInner, MessagingoptionsInnerWrite } from './messagingoptionsInner'; +import { ContactLocation, ContactLocationWrite } from './contactLocation'; +import { ContactMessagingOption, ContactMessagingOptionWrite } from './contactMessagingOption'; +import { Link, LinkWrite } from './link'; export type ContactWrite = { @@ -237,11 +237,11 @@ export type ContactWrite = { /** * The locations for the contact. */ - 'locations'?: Array; + 'locations'?: Array; /** * The message channel options for the contact. */ - 'messagingoptions'?: Array; + 'messagingoptions'?: Array; } /** @@ -479,11 +479,11 @@ export class Contact { /** * The locations for the contact. */ - 'locations': Array; + 'locations': Array; /** * The message channel options for the contact. */ - 'messagingoptions': Array; + 'messagingoptions': Array; /** * - PROJECT - for Contacts stored in a User-defined workspace - COMPANY - for Contacts stored in the default workspace */ @@ -495,11 +495,11 @@ export class Contact { /** * Specifies the devices associated to this contact. See Contact Devices for more details about it */ - 'devices': Array; + 'devices': Array; /** * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. */ - 'link': Array; + 'link': Array; /** * Last Modified data and time */ @@ -796,12 +796,12 @@ export class Contact { { "name": "locations", "baseName": "locations", - "type": "Array" + "type": "Array" }, { "name": "messagingoptions", "baseName": "messagingoptions", - "type": "Array" + "type": "Array" }, { "name": "type", @@ -816,12 +816,12 @@ export class Contact { { "name": "devices", "baseName": "devices", - "type": "Array" + "type": "Array" }, { "name": "link", "baseName": "link", - "type": "Array" + "type": "Array" }, { "name": "lastModifiedTime", diff --git a/model/contactCollection.ts b/model/contactCollection.ts new file mode 100644 index 0000000..a5f01ee --- /dev/null +++ b/model/contactCollection.ts @@ -0,0 +1,44 @@ + +import { RequestFile } from './models'; +import { Contact, ContactWrite } from './contact'; + + +export type ContactCollectionWrite = { + /** + * list of contacts + */ + 'contacts'?: Array; +} + +/** +* List contacts object +*/ +export class ContactCollection { + /** + * Provides the total number of records fetched. This attribute may return \"No records found\" when there are no callbacks available. + */ + 'status': string; + /** + * list of contacts + */ + 'contacts': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "contacts", + "baseName": "contacts", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ContactCollection.attributeTypeMap; + } +} + diff --git a/model/contactLocation.ts b/model/contactLocation.ts new file mode 100644 index 0000000..5d27644 --- /dev/null +++ b/model/contactLocation.ts @@ -0,0 +1,60 @@ + +import { RequestFile } from './models'; + + +export type ContactLocationWrite = { + /** + * The measurement of distance north or south of the Equator, for the contact. + */ + 'latitude'?: number; + /** + * The measurement of distance east or west of the prime meridian, for the contact. + */ + 'longitude'?: number; + /** + * A description for the location. At least one element of the `locations` array must have a `type` equal to `CurrentLocation`. + */ + 'type'?: string; +} + +/** +* The location object. +*/ +export class ContactLocation { + /** + * The measurement of distance north or south of the Equator, for the contact. + */ + 'latitude': number; + /** + * The measurement of distance east or west of the prime meridian, for the contact. + */ + 'longitude': number; + /** + * A description for the location. At least one element of the `locations` array must have a `type` equal to `CurrentLocation`. + */ + 'type': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "latitude", + "baseName": "latitude", + "type": "number" + }, + { + "name": "longitude", + "baseName": "longitude", + "type": "number" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ContactLocation.attributeTypeMap; + } +} + diff --git a/model/contactMessagingOption.ts b/model/contactMessagingOption.ts new file mode 100644 index 0000000..167aeda --- /dev/null +++ b/model/contactMessagingOption.ts @@ -0,0 +1,86 @@ + +import { RequestFile } from './models'; + + +export type ContactMessagingOptionWrite = { + /** + * The message channel. + */ + 'channel'?: 'sms' | 'email' | 'voice'; + /** + * A boolean flag indicating whether messaging is enabled for the `channel`. + */ + 'enabled'?: boolean; + /** + * The primary contact address for the `channel`. + */ + 'primary'?: 'WorkMobilePhone1' | 'WorkMobilePhone2' | 'WorkEmailAddress1' | 'WorkEmailAddress2' | 'PersonalMobilePhone1' | 'PersonalEmailAddress1'; + /** + * The secondary contact address for the `channel`. + */ + 'secondary'?: 'WorkMobilePhone1' | 'WorkMobilePhone2' | 'WorkEmailAddress1' | 'WorkEmailAddress2' | 'PersonalMobilePhone1' | 'PersonalEmailAddress1'; + /** + * The tertiary contact address for the `channel`. + */ + 'tertiary'?: 'WorkMobilePhone1' | 'WorkMobilePhone2' | 'WorkEmailAddress1' | 'WorkEmailAddress2' | 'PersonalMobilePhone1' | 'PersonalEmailAddress1'; +} + +/** +* The object to configure message channel options. +*/ +export class ContactMessagingOption { + /** + * The message channel. + */ + 'channel': 'sms' | 'email' | 'voice'; + /** + * A boolean flag indicating whether messaging is enabled for the `channel`. + */ + 'enabled': boolean; + /** + * The primary contact address for the `channel`. + */ + 'primary': 'WorkMobilePhone1' | 'WorkMobilePhone2' | 'WorkEmailAddress1' | 'WorkEmailAddress2' | 'PersonalMobilePhone1' | 'PersonalEmailAddress1'; + /** + * The secondary contact address for the `channel`. + */ + 'secondary': 'WorkMobilePhone1' | 'WorkMobilePhone2' | 'WorkEmailAddress1' | 'WorkEmailAddress2' | 'PersonalMobilePhone1' | 'PersonalEmailAddress1'; + /** + * The tertiary contact address for the `channel`. + */ + 'tertiary': 'WorkMobilePhone1' | 'WorkMobilePhone2' | 'WorkEmailAddress1' | 'WorkEmailAddress2' | 'PersonalMobilePhone1' | 'PersonalEmailAddress1'; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "channel", + "baseName": "channel", + "type": "string" + }, + { + "name": "enabled", + "baseName": "enabled", + "type": "boolean" + }, + { + "name": "primary", + "baseName": "primary", + "type": "string" + }, + { + "name": "secondary", + "baseName": "secondary", + "type": "string" + }, + { + "name": "tertiary", + "baseName": "tertiary", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ContactMessagingOption.attributeTypeMap; + } +} + diff --git a/model/customList.ts b/model/customList.ts index d1a0cfd..4a6d2b3 100644 --- a/model/customList.ts +++ b/model/customList.ts @@ -1,7 +1,7 @@ import { RequestFile } from './models'; -import { CustomListCustomlabellistsInner, CustomListCustomlabellistsInnerWrite } from './customListCustomlabellistsInner'; -import { LinkInner, LinkInnerWrite } from './linkInner'; +import { CustomListItem, CustomListItemWrite } from './customListItem'; +import { Link, LinkWrite } from './link'; export type CustomListWrite = { @@ -38,11 +38,11 @@ export class CustomList { /** * Contains the individual items that make up this list */ - 'customlabellists': Array; + 'customlabellists': Array; /** * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. */ - 'link': Array; + 'link': Array; static discriminator: string | undefined = undefined; @@ -80,12 +80,12 @@ export class CustomList { { "name": "customlabellists", "baseName": "customlabellists", - "type": "Array" + "type": "Array" }, { "name": "link", "baseName": "link", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/customListCollection.ts b/model/customListCollection.ts new file mode 100644 index 0000000..67bbb56 --- /dev/null +++ b/model/customListCollection.ts @@ -0,0 +1,40 @@ + +import { RequestFile } from './models'; +import { CustomList, CustomListWrite } from './customList'; + + +export type CustomListCollectionWrite = { +} + +/** +* List of custom lists +*/ +export class CustomListCollection { + /** + * Provides the total number of records fetched. This attribute may return \"No records found\" when there are no callbacks available. + */ + 'status': string; + /** + * A list of custom lists + */ + 'customlabels': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "customlabels", + "baseName": "customlabels", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return CustomListCollection.attributeTypeMap; + } +} + diff --git a/model/customListItem.ts b/model/customListItem.ts new file mode 100644 index 0000000..4c22913 --- /dev/null +++ b/model/customListItem.ts @@ -0,0 +1,39 @@ + +import { RequestFile } from './models'; + + +export type CustomListItemWrite = { +} + +/** +* Contains the individual items that make up this list The ‘name’ is the text that is shown to the user The ‘value’ is the internally passed in value +*/ +export class CustomListItem { + /** + * Specifies the text that is show to the user + */ + 'name': string; + /** + * Specifies the value that is passed internally + */ + 'value': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CustomListItem.attributeTypeMap; + } +} + diff --git a/model/distributionList.ts b/model/distributionList.ts new file mode 100644 index 0000000..81e820a --- /dev/null +++ b/model/distributionList.ts @@ -0,0 +1,192 @@ + +import { RequestFile } from './models'; +import { DistributionListDetails, DistributionListDetailsWrite } from './distributionListDetails'; +import { DistributionListDynamic, DistributionListDynamicWrite } from './distributionListDynamic'; +import { DistributionListStatic, DistributionListStaticWrite } from './distributionListStatic'; +import { Link, LinkWrite } from './link'; + + +export type DistributionListWrite = { + /** + * Specifies the name of the distribution list. This has to be unique, and should not contain any special characters (except spaces) in it + */ + 'name': string; + /** + * Specifies a description for other users to see what this distribution list should be used for. + */ + 'description'?: string; + /** + * Total number of contacts in a Distribution List + */ + 'memberCount'?: string; + /** + * Allows you to specify the access type for this DL - Open: anyone can subscribe to this distribution list via the Whispir Contact Portal - ByApproval: anyone can subscribe using the Whispir Contact Portal. However, they are not officially on the list until their access is approved - Restricted: the distribution list is not visible in the Whispir Contact Portal + */ + 'access': string; + /** + * Allows you to specify the visibility for this DL - Public: Any user or active contact in any workspace can map themselves to this DL in the Whispir Contact Portal - Private: Only users or active contacts in the current workspace can map themselves to this DL + */ + 'visibility': string; + /** + * Comma separated list of Contacts to be associated to this DL. This information can be provided at the time of the DL creation or updated later via a PUT request + */ + 'contactIds'?: string; + /** + * Comma separated list of userIds who can manage this DL. This information can be provided at the time of the DL creation or also later updated via a PUT request + */ + 'userIds'?: string; + /** + * Comma separated list of Distribution List IDs that can be nested under this DL. This information can be provided at the time of the DL creation or later updated via a PUT request + */ + 'distListIds'?: string; + /** + * Allows you to specify the type for this DL - Static: The contacts on the list don’t change unless you manually add or remove them (unlike a dynamic DL) NOTE: \"static\" is also the default value for this parameter when this field is omitted + */ + 'type': string; + /** + * The value is currently strictly limited to \"contact\" + */ + 'entityType': string; + /** + * The array that specify the rules that should be applied on the entityType values to pick the appropriate contacts at the moment of usage [not creation] Each rule is an object with 3 keys in it. At least one rule must be specified when creating a Dynamic Distribution List - ruleFilter: contains any of the contact profile elements that are available for searching. For example, division, department, role. More details on the values for this field can be found below [required] - ruleFilterActualName: Contains the matching string to be compared for the DL. More details on the the values for this field can be found below [required] - ruleContent: Contains the matching string to be compared with the contact element for being a part of the DL [required] + */ + 'rules': string; +} + +/** +* Either a static or dynamic distribution list +*/ +export class DistributionList { + /** + * ID of the distribution list + */ + 'id': string; + /** + * Specifies the name of the distribution list. This has to be unique, and should not contain any special characters (except spaces) in it + */ + 'name': string; + /** + * Specifies the Message Resource Identifier of the Distribution List in Whispir + */ + 'mri': string; + /** + * Specifies a description for other users to see what this distribution list should be used for. + */ + 'description': string; + /** + * Total number of contacts in a Distribution List + */ + 'memberCount': string; + /** + * Allows you to specify the access type for this DL - Open: anyone can subscribe to this distribution list via the Whispir Contact Portal - ByApproval: anyone can subscribe using the Whispir Contact Portal. However, they are not officially on the list until their access is approved - Restricted: the distribution list is not visible in the Whispir Contact Portal + */ + 'access': string; + /** + * Allows you to specify the visibility for this DL - Public: Any user or active contact in any workspace can map themselves to this DL in the Whispir Contact Portal - Private: Only users or active contacts in the current workspace can map themselves to this DL + */ + 'visibility': string; + /** + * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. + */ + 'link': Array; + /** + * Comma separated list of Distribution List IDs that can be nested under this DL. This information can be provided at the time of the DL creation or later updated via a PUT request + */ + 'distListIds': string; + /** + * Details of Contacts included in the Distribution List + */ + 'distlistdetails': Array; + /** + * The value is currently strictly limited to \"contact\" + */ + 'entityType': string; + /** + * The array that specify the rules that should be applied on the entityType values to pick the appropriate contacts at the moment of usage [not creation] Each rule is an object with 3 keys in it. At least one rule must be specified when creating a Dynamic Distribution List - ruleFilter: contains any of the contact profile elements that are available for searching. For example, division, department, role. More details on the values for this field can be found below [required] - ruleFilterActualName: Contains the matching string to be compared for the DL. More details on the the values for this field can be found below [required] - ruleContent: Contains the matching string to be compared with the contact element for being a part of the DL [required] + */ + 'rules': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "mri", + "baseName": "mri", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "memberCount", + "baseName": "memberCount", + "type": "string" + }, + { + "name": "access", + "baseName": "access", + "type": "string" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "string" + }, + { + "name": "link", + "baseName": "link", + "type": "Array" + }, + { + "name": "contactIds", + "baseName": "contactIds", + "type": "string" + }, + { + "name": "userIds", + "baseName": "userIds", + "type": "string" + }, + { + "name": "distListIds", + "baseName": "distListIds", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "distlistdetails", + "baseName": "distlistdetails", + "type": "Array" + }, + { + "name": "entityType", + "baseName": "entityType", + "type": "string" + }, + { + "name": "rules", + "baseName": "rules", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return DistributionList.attributeTypeMap; + } +} + diff --git a/model/distributionListCollection.ts b/model/distributionListCollection.ts new file mode 100644 index 0000000..ee553bb --- /dev/null +++ b/model/distributionListCollection.ts @@ -0,0 +1,54 @@ + +import { RequestFile } from './models'; +import { DistributionList, DistributionListWrite } from './distributionList'; +import { Link, LinkWrite } from './link'; + + +export type DistributionListCollectionWrite = { + /** + * List of distribution lists + */ + 'distributionLists'?: Array; +} + +/** +* list of distribution lists +*/ +export class DistributionListCollection { + /** + * List of distribution lists + */ + 'distributionLists': Array; + /** + * Provides the total number of records fetched. This attribute may return \"No records found\" when there are no callbacks available. + */ + 'status': string; + /** + * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. + */ + 'link': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "distributionLists", + "baseName": "distributionLists", + "type": "Array" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "link", + "baseName": "link", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return DistributionListCollection.attributeTypeMap; + } +} + diff --git a/model/distributionListDetails.ts b/model/distributionListDetails.ts new file mode 100644 index 0000000..975b414 --- /dev/null +++ b/model/distributionListDetails.ts @@ -0,0 +1,55 @@ + +import { RequestFile } from './models'; +import { Link, LinkWrite } from './link'; + + +export type DistributionListDetailsWrite = { +} + +export class DistributionListDetails { + /** + * Id of contact + */ + 'id': string; + /** + * Name of Contact + */ + 'name': string; + /** + * Type of Contact + */ + 'type': string; + /** + * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. + */ + 'link': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "link", + "baseName": "link", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return DistributionListDetails.attributeTypeMap; + } +} + diff --git a/model/distributionListDynamic.ts b/model/distributionListDynamic.ts new file mode 100644 index 0000000..3736dce --- /dev/null +++ b/model/distributionListDynamic.ts @@ -0,0 +1,118 @@ + +import { RequestFile } from './models'; +import { Link, LinkWrite } from './link'; + + +export type DistributionListDynamicWrite = { + /** + * Specifies the name of the distribution list. This has to be unique, and should not contain any special characters (except spaces) in it + */ + 'name': string; + /** + * Specifies a description for other users to see what this distribution list should be used for. + */ + 'description'?: string; + /** + * Allows you to specify the access type for this DL - Open: anyone can subscribe to this distribution list via the Whispir Contact Portal - ByApproval: anyone can subscribe using the Whispir Contact Portal. However, they are not officially on the list until their access is approved - Restricted: the distribution list is not visible in the Whispir Contact Portal + */ + 'access': string; + /** + * Allows you to specify the type for this DL - Static: The contacts on the list don’t change unless you manually add or remove them (unlike a dynamic DL) NOTE: \"static\" is also the default value for this parameter when this field is omitted + */ + 'type': string; + /** + * The value is currently strictly limited to \"contact\" + */ + 'entityType': string; + /** + * Allows you to specify the visibility for this DL - Public: Any user or active contact in any workspace can map themselves to this DL in the Whispir Contact Portal - Private: Only users or active contacts in the current workspace can map themselves to this DL + */ + 'visibility': string; + /** + * The array that specify the rules that should be applied on the entityType values to pick the appropriate contacts at the moment of usage [not creation] Each rule is an object with 3 keys in it. At least one rule must be specified when creating a Dynamic Distribution List - ruleFilter: contains any of the contact profile elements that are available for searching. For example, division, department, role. More details on the values for this field can be found below [required] - ruleFilterActualName: Contains the matching string to be compared for the DL. More details on the the values for this field can be found below [required] - ruleContent: Contains the matching string to be compared with the contact element for being a part of the DL [required] + */ + 'rules': string; +} + +/** +* Dynamic Distribution Lists are lists that are updated based on rules to automatically determine and update the members. For this reason - unlike the Static Distribution Lists - we don\'t need to specify any members because only the rule[s] will determine the members of a Dynamic Distribution List +*/ +export class DistributionListDynamic { + /** + * Specifies the name of the distribution list. This has to be unique, and should not contain any special characters (except spaces) in it + */ + 'name': string; + /** + * Specifies a description for other users to see what this distribution list should be used for. + */ + 'description': string; + /** + * Allows you to specify the access type for this DL - Open: anyone can subscribe to this distribution list via the Whispir Contact Portal - ByApproval: anyone can subscribe using the Whispir Contact Portal. However, they are not officially on the list until their access is approved - Restricted: the distribution list is not visible in the Whispir Contact Portal + */ + 'access': string; + /** + * The value is currently strictly limited to \"contact\" + */ + 'entityType': string; + /** + * Allows you to specify the visibility for this DL - Public: Any user or active contact in any workspace can map themselves to this DL in the Whispir Contact Portal - Private: Only users or active contacts in the current workspace can map themselves to this DL + */ + 'visibility': string; + /** + * The array that specify the rules that should be applied on the entityType values to pick the appropriate contacts at the moment of usage [not creation] Each rule is an object with 3 keys in it. At least one rule must be specified when creating a Dynamic Distribution List - ruleFilter: contains any of the contact profile elements that are available for searching. For example, division, department, role. More details on the values for this field can be found below [required] - ruleFilterActualName: Contains the matching string to be compared for the DL. More details on the the values for this field can be found below [required] - ruleContent: Contains the matching string to be compared with the contact element for being a part of the DL [required] + */ + 'rules': string; + /** + * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. + */ + 'link': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "access", + "baseName": "access", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "entityType", + "baseName": "entityType", + "type": "string" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "string" + }, + { + "name": "rules", + "baseName": "rules", + "type": "string" + }, + { + "name": "link", + "baseName": "link", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return DistributionListDynamic.attributeTypeMap; + } +} + diff --git a/model/distributionListStatic.ts b/model/distributionListStatic.ts new file mode 100644 index 0000000..2e7418f --- /dev/null +++ b/model/distributionListStatic.ts @@ -0,0 +1,164 @@ + +import { RequestFile } from './models'; +import { DistributionListDetails, DistributionListDetailsWrite } from './distributionListDetails'; +import { Link, LinkWrite } from './link'; + + +export type DistributionListStaticWrite = { + /** + * Specifies the name of the distribution list. This has to be unique, and should not contain any special characters (except spaces) in it + */ + 'name': string; + /** + * Specifies a description for other users to see what this distribution list should be used for. + */ + 'description'?: string; + /** + * Total number of contacts in a Distribution List + */ + 'memberCount'?: string; + /** + * Allows you to specify the access type for this DL - Open: anyone can subscribe to this distribution list via the Whispir Contact Portal - ByApproval: anyone can subscribe using the Whispir Contact Portal. However, they are not officially on the list until their access is approved - Restricted: the distribution list is not visible in the Whispir Contact Portal + */ + 'access'?: string; + /** + * Allows you to specify the visibility for this DL - Public: Any user or active contact in any workspace can map themselves to this DL in the Whispir Contact Portal - Private: Only users or active contacts in the current workspace can map themselves to this DL + */ + 'visibility'?: string; + /** + * Comma separated list of Contacts to be associated to this DL. This information can be provided at the time of the DL creation or updated later via a PUT request + */ + 'contactIds'?: string; + /** + * Comma separated list of userIds who can manage this DL. This information can be provided at the time of the DL creation or also later updated via a PUT request + */ + 'userIds'?: string; + /** + * Comma separated list of Distribution List IDs that can be nested under this DL. This information can be provided at the time of the DL creation or later updated via a PUT request + */ + 'distListIds'?: string; + /** + * Allows you to specify the type for this DL - Static: The contacts on the list don’t change unless you manually add or remove them (unlike a dynamic DL) NOTE: \"static\" is also the default value for this parameter when this field is omitted + */ + 'type'?: string; +} + +/** +* Static Distribution Lists are manually managed and maintained. They can include Contacts, Users and other Distribution Lists +*/ +export class DistributionListStatic { + /** + * ID of the distribution list + */ + 'id': string; + /** + * Specifies the name of the distribution list. This has to be unique, and should not contain any special characters (except spaces) in it + */ + 'name': string; + /** + * Specifies the Message Resource Identifier of the Distribution List in Whispir + */ + 'mri': string; + /** + * Specifies a description for other users to see what this distribution list should be used for. + */ + 'description': string; + /** + * Total number of contacts in a Distribution List + */ + 'memberCount': string; + /** + * Allows you to specify the access type for this DL - Open: anyone can subscribe to this distribution list via the Whispir Contact Portal - ByApproval: anyone can subscribe using the Whispir Contact Portal. However, they are not officially on the list until their access is approved - Restricted: the distribution list is not visible in the Whispir Contact Portal + */ + 'access': string; + /** + * Allows you to specify the visibility for this DL - Public: Any user or active contact in any workspace can map themselves to this DL in the Whispir Contact Portal - Private: Only users or active contacts in the current workspace can map themselves to this DL + */ + 'visibility': string; + /** + * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. + */ + 'link': Array; + /** + * Comma separated list of Distribution List IDs that can be nested under this DL. This information can be provided at the time of the DL creation or later updated via a PUT request + */ + 'distListIds': string; + /** + * Details of Contacts included in the Distribution List + */ + 'distlistdetails': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "mri", + "baseName": "mri", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "memberCount", + "baseName": "memberCount", + "type": "string" + }, + { + "name": "access", + "baseName": "access", + "type": "string" + }, + { + "name": "visibility", + "baseName": "visibility", + "type": "string" + }, + { + "name": "link", + "baseName": "link", + "type": "Array" + }, + { + "name": "contactIds", + "baseName": "contactIds", + "type": "string" + }, + { + "name": "userIds", + "baseName": "userIds", + "type": "string" + }, + { + "name": "distListIds", + "baseName": "distListIds", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "distlistdetails", + "baseName": "distlistdetails", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return DistributionListStatic.attributeTypeMap; + } +} + diff --git a/model/event.ts b/model/event.ts index 8366000..dbe4808 100644 --- a/model/event.ts +++ b/model/event.ts @@ -1,7 +1,7 @@ import { RequestFile } from './models'; -import { EventEventFormListInner, EventEventFormListInnerWrite } from './eventEventFormListInner'; -import { LinkInner, LinkInnerWrite } from './linkInner'; +import { EventForm, EventFormWrite } from './eventForm'; +import { Link, LinkWrite } from './link'; export type EventWrite = { @@ -16,7 +16,7 @@ export type EventWrite = { /** * Event form list */ - 'eventFormList'?: Array; + 'eventFormList'?: Array; } /** @@ -38,11 +38,11 @@ export class Event { /** * Event form list */ - 'eventFormList': Array; + 'eventFormList': Array; /** * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. */ - 'link': Array; + 'link': Array; static discriminator: string | undefined = undefined; @@ -65,12 +65,12 @@ export class Event { { "name": "eventFormList", "baseName": "eventFormList", - "type": "Array" + "type": "Array" }, { "name": "link", "baseName": "link", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/eventCollection.ts b/model/eventCollection.ts new file mode 100644 index 0000000..6b187fc --- /dev/null +++ b/model/eventCollection.ts @@ -0,0 +1,40 @@ + +import { RequestFile } from './models'; +import { Event, EventWrite } from './event'; + + +export type EventCollectionWrite = { +} + +/** +* List of events +*/ +export class EventCollection { + /** + * Provides the total number of records fetched. This attribute may return \"No records found\" when there are no events available. + */ + 'status': string; + /** + * List of events + */ + 'events': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "events", + "baseName": "events", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return EventCollection.attributeTypeMap; + } +} + diff --git a/model/eventForm.ts b/model/eventForm.ts new file mode 100644 index 0000000..8e6c7da --- /dev/null +++ b/model/eventForm.ts @@ -0,0 +1,48 @@ + +import { RequestFile } from './models'; +import { EventFormField, EventFormFieldWrite } from './eventFormField'; + + +export type EventFormWrite = { + /** + * Specifies the name of the event form + */ + 'formName'?: string; + /** + * Contains a list of event fields, see create /POST event endpoint to learn more about the available fields + */ + 'eventFieldList'?: Array; +} + +/** +* Constitutes the name of the form and its fields +*/ +export class EventForm { + /** + * Specifies the name of the event form + */ + 'formName': string; + /** + * Contains a list of event fields, see create /POST event endpoint to learn more about the available fields + */ + 'eventFieldList': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "formName", + "baseName": "formName", + "type": "string" + }, + { + "name": "eventFieldList", + "baseName": "eventFieldList", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return EventForm.attributeTypeMap; + } +} + diff --git a/model/eventFormField.ts b/model/eventFormField.ts new file mode 100644 index 0000000..e8e86a0 --- /dev/null +++ b/model/eventFormField.ts @@ -0,0 +1,47 @@ + +import { RequestFile } from './models'; + + +export type EventFormFieldWrite = { + /** + * Specifies the name of the event field + */ + 'name'?: string; + /** + * Specifies the value of a given field + */ + 'value'?: string; +} + +/** +* A key-value pair of name and its value +*/ +export class EventFormField { + /** + * Specifies the name of the event field + */ + 'name': string; + /** + * Specifies the value of a given field + */ + 'value': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return EventFormField.attributeTypeMap; + } +} + diff --git a/model/link.ts b/model/link.ts new file mode 100644 index 0000000..9f9a30a --- /dev/null +++ b/model/link.ts @@ -0,0 +1,66 @@ + +import { RequestFile } from './models'; + + +export type LinkWrite = { +} + +/** +* The HATEOAS link object. +*/ +export class Link { + /** + * The Universal Resource Identifier for the related resource. + */ + 'uri': string; + /** + * The description of the related resource. + */ + 'rel': string; + /** + * The [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) method required to request the related resource. + */ + 'method': string; + /** + * The host of the related resource. + */ + 'host': string; + /** + * The port of the related resource. + */ + 'port': '-1'; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "uri", + "baseName": "uri", + "type": "string" + }, + { + "name": "rel", + "baseName": "rel", + "type": "string" + }, + { + "name": "method", + "baseName": "method", + "type": "string" + }, + { + "name": "host", + "baseName": "host", + "type": "string" + }, + { + "name": "port", + "baseName": "port", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return Link.attributeTypeMap; + } +} + diff --git a/model/message.ts b/model/message.ts index 3ae8406..ffe6603 100644 --- a/model/message.ts +++ b/model/message.ts @@ -1,13 +1,13 @@ import { RequestFile } from './models'; -import { Dlr, DlrWrite } from './dlr'; -import { Email, EmailWrite } from './email'; -import { Features, FeaturesWrite } from './features'; -import { LinkInner, LinkInnerWrite } from './linkInner'; +import { Link, LinkWrite } from './link'; +import { MessageDlr, MessageDlrWrite } from './messageDlr'; +import { MessageEmail, MessageEmailWrite } from './messageEmail'; +import { MessageFeatures, MessageFeaturesWrite } from './messageFeatures'; +import { MessageSocial, MessageSocialWrite } from './messageSocial'; +import { MessageVoice, MessageVoiceWrite } from './messageVoice'; +import { MessageWeb, MessageWebWrite } from './messageWeb'; import { Resource, ResourceWrite } from './resource'; -import { Social, SocialWrite } from './social'; -import { Voice, VoiceWrite } from './voice'; -import { Web, WebWrite } from './web'; export type MessageWrite = { @@ -23,15 +23,15 @@ export type MessageWrite = { * The SMS body. The maximum payload size rule applies. IMPORTANT: The total SMS length is 1570 characters for english text and 800 when UTF-8 characters are used (primarily non-english) The 1570 length is a combination of subject and body. */ 'body'?: string; - 'email'?: EmailWrite; - 'voice'?: VoiceWrite; - 'web'?: WebWrite; - 'social'?: SocialWrite; + 'email'?: MessageEmailWrite; + 'voice'?: MessageVoiceWrite; + 'web'?: MessageWebWrite; + 'social'?: MessageSocialWrite; /** * Allows the user to modify the message behaviour for replies and DLRs (delivery receipts). - `defaultNoReply`: Used to reject any replies to this message. - `noDlr`: Used to specify that DLRs should not be enabled for this message. */ 'type'?: 'default' | 'defaultNoReply' | 'noDlr'; - 'features'?: FeaturesWrite; + 'features'?: MessageFeaturesWrite; 'resource'?: ResourceWrite; /** * The identifier for the Message Template. Specification of this attribute is preferred over the `messageTemplateName`, to provide an absolute and non-changing reference to the Message Template. @@ -85,7 +85,7 @@ export type MessageWrite = { * The interval in minutes between each scheduled message repetition. */ 'repeatMin'?: number; - 'dlr'?: DlrWrite; + 'dlr'?: MessageDlrWrite; } /** @@ -104,15 +104,15 @@ export class Message { * The SMS body. The maximum payload size rule applies. IMPORTANT: The total SMS length is 1570 characters for english text and 800 when UTF-8 characters are used (primarily non-english) The 1570 length is a combination of subject and body. */ 'body': string; - 'email': Email; - 'voice': Voice; - 'web': Web; - 'social': Social; + 'email': MessageEmail; + 'voice': MessageVoice; + 'web': MessageWeb; + 'social': MessageSocial; /** * Allows the user to modify the message behaviour for replies and DLRs (delivery receipts). - `defaultNoReply`: Used to reject any replies to this message. - `noDlr`: Used to specify that DLRs should not be enabled for this message. */ 'type': 'default' | 'defaultNoReply' | 'noDlr'; - 'features': Features; + 'features': MessageFeatures; 'resource': Resource; /** * The identifier for the Message Template. Specification of this attribute is preferred over the `messageTemplateName`, to provide an absolute and non-changing reference to the Message Template. @@ -194,11 +194,11 @@ export class Message { * The validity of the message subject. */ 'validSubject': boolean; - 'dlr': Dlr; + 'dlr': MessageDlr; /** * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. */ - 'link': Array; + 'link': Array; static discriminator: string | undefined = undefined; @@ -221,22 +221,22 @@ export class Message { { "name": "email", "baseName": "email", - "type": "Email" + "type": "MessageEmail" }, { "name": "voice", "baseName": "voice", - "type": "Voice" + "type": "MessageVoice" }, { "name": "web", "baseName": "web", - "type": "Web" + "type": "MessageWeb" }, { "name": "social", "baseName": "social", - "type": "Social" + "type": "MessageSocial" }, { "name": "type", @@ -246,7 +246,7 @@ export class Message { { "name": "features", "baseName": "features", - "type": "Features" + "type": "MessageFeatures" }, { "name": "resource", @@ -356,12 +356,12 @@ export class Message { { "name": "dlr", "baseName": "dlr", - "type": "Dlr" + "type": "MessageDlr" }, { "name": "link", "baseName": "link", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/messageAttachment.ts b/model/messageAttachment.ts new file mode 100644 index 0000000..48df1ee --- /dev/null +++ b/model/messageAttachment.ts @@ -0,0 +1,60 @@ + +import { RequestFile } from './models'; + + +export type MessageAttachmentWrite = { + /** + * The name of the attachment, including the extension. + */ + 'attachmentName': string; + /** + * The Base64 encoded value for the email attachment. + */ + 'derefUri': string; + /** + * A description for the attachment. + */ + 'attachmentDesc'?: string; +} + +/** +* Attachments can be of any type [e.g. PDF, images and documents], and the maximum size of all attached files combined is 10 MB Attachments must be provided in the payload of the message. URLs can be referenced in the email but will not be added as message attachments. +*/ +export class MessageAttachment { + /** + * The name of the attachment, including the extension. + */ + 'attachmentName': string; + /** + * The Base64 encoded value for the email attachment. + */ + 'derefUri': string; + /** + * A description for the attachment. + */ + 'attachmentDesc': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "attachmentName", + "baseName": "attachmentName", + "type": "string" + }, + { + "name": "derefUri", + "baseName": "derefUri", + "type": "string" + }, + { + "name": "attachmentDesc", + "baseName": "attachmentDesc", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MessageAttachment.attributeTypeMap; + } +} + diff --git a/model/messageCollection.ts b/model/messageCollection.ts new file mode 100644 index 0000000..bb8b91d --- /dev/null +++ b/model/messageCollection.ts @@ -0,0 +1,50 @@ + +import { RequestFile } from './models'; +import { Link, LinkWrite } from './link'; +import { Message, MessageWrite } from './message'; + + +export type MessageCollectionWrite = { +} + +/** +* The list messages response object. +*/ +export class MessageCollection { + /** + * The list of retrieved messages. + */ + 'messages': Set; + /** + * The status of the list request. + */ + 'status': string; + /** + * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. + */ + 'link': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "messages", + "baseName": "messages", + "type": "Set" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "link", + "baseName": "link", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return MessageCollection.attributeTypeMap; + } +} + diff --git a/model/messageDlr.ts b/model/messageDlr.ts new file mode 100644 index 0000000..27e3c91 --- /dev/null +++ b/model/messageDlr.ts @@ -0,0 +1,138 @@ + +import { RequestFile } from './models'; + + +export type MessageDlrWrite = { + /** + * The period of the message delivery. + */ + 'period': string; + /** + * The rule of the message delivery. + */ + 'rule': string; + /** + * The type of the message delivery. + */ + 'type': string; + /** + * Specifies whether the message was published to the web. + */ + 'publishToWeb': boolean; + /** + * Specifies the number of days before the message expires. + */ + 'expiryDay': number; + /** + * Specifies the number of hours before the message expires. + */ + 'expiryHour': number; + /** + * Specifies the number of minutes before the message expires. + */ + 'expiryMin': number; + /** + * The feeds identifier for the message delivery. + */ + 'feedIds': string; + /** + * The bool field for the message delivery. + */ + 'bool': boolean; +} + +/** +* A fixed object structure used by for Whispir internally for tracking purposes. +*/ +export class MessageDlr { + /** + * The period of the message delivery. + */ + 'period': string; + /** + * The rule of the message delivery. + */ + 'rule': string; + /** + * The type of the message delivery. + */ + 'type': string; + /** + * Specifies whether the message was published to the web. + */ + 'publishToWeb': boolean; + /** + * Specifies the number of days before the message expires. + */ + 'expiryDay': number; + /** + * Specifies the number of hours before the message expires. + */ + 'expiryHour': number; + /** + * Specifies the number of minutes before the message expires. + */ + 'expiryMin': number; + /** + * The feeds identifier for the message delivery. + */ + 'feedIds': string; + /** + * The bool field for the message delivery. + */ + 'bool': boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "period", + "baseName": "period", + "type": "string" + }, + { + "name": "rule", + "baseName": "rule", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "publishToWeb", + "baseName": "publishToWeb", + "type": "boolean" + }, + { + "name": "expiryDay", + "baseName": "expiryDay", + "type": "number" + }, + { + "name": "expiryHour", + "baseName": "expiryHour", + "type": "number" + }, + { + "name": "expiryMin", + "baseName": "expiryMin", + "type": "number" + }, + { + "name": "feedIds", + "baseName": "feedIds", + "type": "string" + }, + { + "name": "bool", + "baseName": "bool", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return MessageDlr.attributeTypeMap; + } +} + diff --git a/model/messageEmail.ts b/model/messageEmail.ts new file mode 100644 index 0000000..86029d8 --- /dev/null +++ b/model/messageEmail.ts @@ -0,0 +1,68 @@ + +import { RequestFile } from './models'; +import { MessageEmailResources, MessageEmailResourcesWrite } from './messageEmailResources'; + + +export type MessageEmailWrite = { + /** + * The email message body. + */ + 'body': string; + /** + * Plain text or html displayed at the bottom of your email message. + */ + 'footer'?: string; + /** + * The email Message content type. + */ + 'type'?: 'text/plain' | 'text/html'; + 'resources'?: MessageEmailResourcesWrite; +} + +/** +* The email channel payload, used when sending an email Message. Not required when a template is provided. +*/ +export class MessageEmail { + /** + * The email message body. + */ + 'body': string; + /** + * Plain text or html displayed at the bottom of your email message. + */ + 'footer': string; + /** + * The email Message content type. + */ + 'type': 'text/plain' | 'text/html'; + 'resources': MessageEmailResources; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "body", + "baseName": "body", + "type": "string" + }, + { + "name": "footer", + "baseName": "footer", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "resources", + "baseName": "resources", + "type": "MessageEmailResources" + } ]; + + static getAttributeTypeMap() { + return MessageEmail.attributeTypeMap; + } +} + diff --git a/model/messageEmailResources.ts b/model/messageEmailResources.ts new file mode 100644 index 0000000..6082569 --- /dev/null +++ b/model/messageEmailResources.ts @@ -0,0 +1,35 @@ + +import { RequestFile } from './models'; +import { MessageAttachment, MessageAttachmentWrite } from './messageAttachment'; + + +export type MessageEmailResourcesWrite = { + /** + * A list of attachments to attach to the email Message. + */ + 'attachments'?: Array; +} + +/** +* The resources to attach to the email Message. +*/ +export class MessageEmailResources { + /** + * A list of attachments to attach to the email Message. + */ + 'attachments': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "attachments", + "baseName": "attachments", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return MessageEmailResources.attributeTypeMap; + } +} + diff --git a/model/messageFeatures.ts b/model/messageFeatures.ts new file mode 100644 index 0000000..19b0673 --- /dev/null +++ b/model/messageFeatures.ts @@ -0,0 +1,37 @@ + +import { RequestFile } from './models'; +import { MessageFeaturesAliasOption, MessageFeaturesAliasOptionWrite } from './messageFeaturesAliasOption'; +import { MessageFeaturesPushOptions, MessageFeaturesPushOptionsWrite } from './messageFeaturesPushOptions'; + + +export type MessageFeaturesWrite = { + 'pushOptions'?: MessageFeaturesPushOptionsWrite; + 'aliasOption'?: MessageFeaturesAliasOptionWrite; +} + +/** +* ### Push Messaging Whispir allows you to send push notifications to any iOS and Android-based apps Setting up the platform to handle push notifications involves some one-time steps and some periodically repeated steps (updating push tokens). See Apps to get a clear understanding of the related steps and endpoints. Whispir doesn\'t support sending push notifications to device tokens directly. Read more in Contact devices about how to register the device tokens under contacts. ### Message Aliasing The Whispir UI allows you to configure a sender alias from which messages are sent. Instructions for alias creation can be found in [Configure message aliases](https://au.whispir.com/onlinehelp/Content/Topics-whispir-ua/administration/alias-manager/config-message-aliases.htm) within Whispir documentation. The message alias can be attached to a message to template, to configure the the sender for the following channels: * SMS - a custom mobile number, e.g. +61 123 456 789 * Email - a custom email address, e.g. marketing@example.com * Voice - a custom mobile number, e.g. +61 123 456 789 +*/ +export class MessageFeatures { + 'pushOptions': MessageFeaturesPushOptions; + 'aliasOption': MessageFeaturesAliasOption; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "pushOptions", + "baseName": "pushOptions", + "type": "MessageFeaturesPushOptions" + }, + { + "name": "aliasOption", + "baseName": "aliasOption", + "type": "MessageFeaturesAliasOption" + } ]; + + static getAttributeTypeMap() { + return MessageFeatures.attributeTypeMap; + } +} + diff --git a/model/messageFeaturesAliasOption.ts b/model/messageFeaturesAliasOption.ts new file mode 100644 index 0000000..03c1d43 --- /dev/null +++ b/model/messageFeaturesAliasOption.ts @@ -0,0 +1,34 @@ + +import { RequestFile } from './models'; + + +export type MessageFeaturesAliasOptionWrite = { + /** + * The name of the alias configured to modify the message sender. + */ + 'aliasName'?: string; +} + +/** +* The object defining options for message sender aliasing. +*/ +export class MessageFeaturesAliasOption { + /** + * The name of the alias configured to modify the message sender. + */ + 'aliasName': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "aliasName", + "baseName": "aliasName", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MessageFeaturesAliasOption.attributeTypeMap; + } +} + diff --git a/model/messageFeaturesPushOptions.ts b/model/messageFeaturesPushOptions.ts new file mode 100644 index 0000000..d8d1394 --- /dev/null +++ b/model/messageFeaturesPushOptions.ts @@ -0,0 +1,102 @@ + +import { RequestFile } from './models'; +import { MessageFeaturesPushOptionsAPNS, MessageFeaturesPushOptionsAPNSWrite } from './messageFeaturesPushOptionsAPNS'; +import { MessageFeaturesPushOptionsFCM, MessageFeaturesPushOptionsFCMWrite } from './messageFeaturesPushOptionsFCM'; + + +export type MessageFeaturesPushOptionsWrite = { + /** + * A flag indicating whether notifications should be enabled for message replies. + */ + 'notifications'?: 'enabled' | 'disabled'; + /** + * The number of minutes to wait for a reply until escalating to the next contact. + */ + 'escalationMins'?: string; + /** + * The identifier for the registered application. + */ + 'appId': string; + /** + * The priority of the notification. NORMAL (the default value) will indicate to FCM/APNS to take into consideration the target device\'s battery consumption at the expense of delivering the message with a delay. The value NORMAL maps to priority *NORMAL* in FCM and priority *5* in APNS. The value HIGH maps to priority *HIGH* in FCM and *10* in APNS. + */ + 'priority'?: 'NORMAL' | 'HIGH'; + 'fcm'?: MessageFeaturesPushOptionsFCMWrite; + 'apns'?: MessageFeaturesPushOptionsAPNSWrite; + /** + * Custom key-value pairs of the notification\'s payload. These values can be used by the target app for enhanced functionality provided that it has been designed to handle them (images, videos, links etc). These attributes translate to *data* in the FCM payload. For APNS, the custom attributes of *data* are inserted as custom properties outside of the *aps* payload. + */ + 'data'?: object; +} + +/** +* The object defining options for push messages. +*/ +export class MessageFeaturesPushOptions { + /** + * A flag indicating whether notifications should be enabled for message replies. + */ + 'notifications': 'enabled' | 'disabled'; + /** + * The number of minutes to wait for a reply until escalating to the next contact. + */ + 'escalationMins': string; + /** + * The identifier for the registered application. + */ + 'appId': string; + /** + * The priority of the notification. NORMAL (the default value) will indicate to FCM/APNS to take into consideration the target device\'s battery consumption at the expense of delivering the message with a delay. The value NORMAL maps to priority *NORMAL* in FCM and priority *5* in APNS. The value HIGH maps to priority *HIGH* in FCM and *10* in APNS. + */ + 'priority': 'NORMAL' | 'HIGH'; + 'fcm': MessageFeaturesPushOptionsFCM; + 'apns': MessageFeaturesPushOptionsAPNS; + /** + * Custom key-value pairs of the notification\'s payload. These values can be used by the target app for enhanced functionality provided that it has been designed to handle them (images, videos, links etc). These attributes translate to *data* in the FCM payload. For APNS, the custom attributes of *data* are inserted as custom properties outside of the *aps* payload. + */ + 'data': object; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "notifications", + "baseName": "notifications", + "type": "string" + }, + { + "name": "escalationMins", + "baseName": "escalationMins", + "type": "string" + }, + { + "name": "appId", + "baseName": "appId", + "type": "string" + }, + { + "name": "priority", + "baseName": "priority", + "type": "string" + }, + { + "name": "fcm", + "baseName": "fcm", + "type": "MessageFeaturesPushOptionsFCM" + }, + { + "name": "apns", + "baseName": "apns", + "type": "MessageFeaturesPushOptionsAPNS" + }, + { + "name": "data", + "baseName": "data", + "type": "object" + } ]; + + static getAttributeTypeMap() { + return MessageFeaturesPushOptions.attributeTypeMap; + } +} + diff --git a/model/messageFeaturesPushOptionsAPNS.ts b/model/messageFeaturesPushOptionsAPNS.ts new file mode 100644 index 0000000..2456c04 --- /dev/null +++ b/model/messageFeaturesPushOptionsAPNS.ts @@ -0,0 +1,47 @@ + +import { RequestFile } from './models'; + + +export type MessageFeaturesPushOptionsAPNSWrite = { + /** + * The sound to play when the device receives the notification. The value *default* will play the system sound, otherwise this attribute must point to a sound resource in your app\'s main bundle or in the *Library/Sounds* folder of your app\'s container directory. + */ + 'sound'?: string; + /** + * The action linked with a user click on the notification. Translates to the *category* attribute in APNS. + */ + 'action'?: string; +} + +/** +* The apns object holds attributes specific to the contacts\' APNS-registered (Apple Push Notification Service) iOS devices +*/ +export class MessageFeaturesPushOptionsAPNS { + /** + * The sound to play when the device receives the notification. The value *default* will play the system sound, otherwise this attribute must point to a sound resource in your app\'s main bundle or in the *Library/Sounds* folder of your app\'s container directory. + */ + 'sound': string; + /** + * The action linked with a user click on the notification. Translates to the *category* attribute in APNS. + */ + 'action': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "sound", + "baseName": "sound", + "type": "string" + }, + { + "name": "action", + "baseName": "action", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MessageFeaturesPushOptionsAPNS.attributeTypeMap; + } +} + diff --git a/model/messageFeaturesPushOptionsFCM.ts b/model/messageFeaturesPushOptionsFCM.ts new file mode 100644 index 0000000..4fa2b9a --- /dev/null +++ b/model/messageFeaturesPushOptionsFCM.ts @@ -0,0 +1,73 @@ + +import { RequestFile } from './models'; + + +export type MessageFeaturesPushOptionsFCMWrite = { + /** + * Translates to the *android_channel_id* attribute in FCM. Note: use this attribute for devices running Android versions 8 or later. + */ + 'androidChannelId'?: string; + /** + * The sound to play when the device receives the notification. The value *default* will play the system sound, otherwise this attribute must point to a sound resource bundled in the app, e.g. *_/res/raw/notification_sound.wav* Note: This attribute can be used for devices running Android versions older than Android 8. For versions 8+ please use the *androidChannelId* + */ + 'sound'?: string; + /** + * The action linked with a user click on the notification. Translates to the *click_action* attribute in FCM. + */ + 'action'?: string; + /** + * The URL of an image to be downloaded and displayed in the notification. Details of the Android support for images in push notifications can be found [here](https://firebase.google.com/docs/cloud-messaging/android/send-image) + */ + 'image'?: string; +} + +/** +* The fcm object holds attributes specific to the contacts\' Firebase-registered Android devices +*/ +export class MessageFeaturesPushOptionsFCM { + /** + * Translates to the *android_channel_id* attribute in FCM. Note: use this attribute for devices running Android versions 8 or later. + */ + 'androidChannelId': string; + /** + * The sound to play when the device receives the notification. The value *default* will play the system sound, otherwise this attribute must point to a sound resource bundled in the app, e.g. *_/res/raw/notification_sound.wav* Note: This attribute can be used for devices running Android versions older than Android 8. For versions 8+ please use the *androidChannelId* + */ + 'sound': string; + /** + * The action linked with a user click on the notification. Translates to the *click_action* attribute in FCM. + */ + 'action': string; + /** + * The URL of an image to be downloaded and displayed in the notification. Details of the Android support for images in push notifications can be found [here](https://firebase.google.com/docs/cloud-messaging/android/send-image) + */ + 'image': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "androidChannelId", + "baseName": "androidChannelId", + "type": "string" + }, + { + "name": "sound", + "baseName": "sound", + "type": "string" + }, + { + "name": "action", + "baseName": "action", + "type": "string" + }, + { + "name": "image", + "baseName": "image", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MessageFeaturesPushOptionsFCM.attributeTypeMap; + } +} + diff --git a/model/messageResponse.ts b/model/messageResponse.ts new file mode 100644 index 0000000..abb9053 --- /dev/null +++ b/model/messageResponse.ts @@ -0,0 +1,52 @@ + +import { RequestFile } from './models'; +import { Link, LinkWrite } from './link'; +import { MessageResponseDetailed, MessageResponseDetailedWrite } from './messageResponseDetailed'; +import { MessageResponseSummary, MessageResponseSummaryWrite } from './messageResponseSummary'; +import { MessageResponseSummaryStatus, MessageResponseSummaryStatusWrite } from './messageResponseSummaryStatus'; + + +export type MessageResponseWrite = { +} + +/** +* The message response object. +*/ +export class MessageResponse { + /** + * The message response statuses. + */ + 'messageresponses': Set; + /** + * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. + */ + 'link': Array; + /** + * The message response pagination status. + */ + 'status': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "messageresponses", + "baseName": "messageresponses", + "type": "Set" + }, + { + "name": "link", + "baseName": "link", + "type": "Array" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MessageResponse.attributeTypeMap; + } +} + diff --git a/model/messageResponseDetailed.ts b/model/messageResponseDetailed.ts index f3e8e15..686899e 100644 --- a/model/messageResponseDetailed.ts +++ b/model/messageResponseDetailed.ts @@ -1,7 +1,7 @@ import { RequestFile } from './models'; -import { LinkInner, LinkInnerWrite } from './linkInner'; -import { MessageResponseDetailedMessageresponsesInner, MessageResponseDetailedMessageresponsesInnerWrite } from './messageResponseDetailedMessageresponsesInner'; +import { Link, LinkWrite } from './link'; +import { MessageResponseDetailedStatusFrom, MessageResponseDetailedStatusFromWrite } from './messageResponseDetailedStatusFrom'; export type MessageResponseDetailedWrite = { @@ -14,11 +14,11 @@ export class MessageResponseDetailed { /** * The message response statuses. */ - 'messageresponses': Set; + 'messageresponses': Set; /** * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. */ - 'link': Array; + 'link': Array; /** * The message response pagination status. */ @@ -30,12 +30,12 @@ export class MessageResponseDetailed { { "name": "messageresponses", "baseName": "messageresponses", - "type": "Set" + "type": "Set" }, { "name": "link", "baseName": "link", - "type": "Array" + "type": "Array" }, { "name": "status", diff --git a/model/messageResponseDetailedStatus.ts b/model/messageResponseDetailedStatus.ts new file mode 100644 index 0000000..8d54ccc --- /dev/null +++ b/model/messageResponseDetailedStatus.ts @@ -0,0 +1,66 @@ + +import { RequestFile } from './models'; + + +export type MessageResponseDetailedStatusWrite = { +} + +/** +* The message responder object. +*/ +export class MessageResponseDetailedStatus { + /** + * The message responder\'s name. + */ + 'name': string; + /** + * The message responder\'s MRI. + */ + 'mri': string; + /** + * The message responder\'s mobile number. + */ + 'mobile': string; + /** + * The message responder\'s email address. + */ + 'email': string; + /** + * The message responder\'s voice number. + */ + 'voice': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "mri", + "baseName": "mri", + "type": "string" + }, + { + "name": "mobile", + "baseName": "mobile", + "type": "string" + }, + { + "name": "email", + "baseName": "email", + "type": "string" + }, + { + "name": "voice", + "baseName": "voice", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MessageResponseDetailedStatus.attributeTypeMap; + } +} + diff --git a/model/messageResponseDetailedStatusFrom.ts b/model/messageResponseDetailedStatusFrom.ts new file mode 100644 index 0000000..4253aa2 --- /dev/null +++ b/model/messageResponseDetailedStatusFrom.ts @@ -0,0 +1,43 @@ + +import { RequestFile } from './models'; +import { MessageResponseDetailedStatus, MessageResponseDetailedStatusWrite } from './messageResponseDetailedStatus'; +import { MessageResponseDetailedStatusResponseMessage, MessageResponseDetailedStatusResponseMessageWrite } from './messageResponseDetailedStatusResponseMessage'; + + +export type MessageResponseDetailedStatusFromWrite = { + 'from': MessageResponseDetailedStatusWrite; + 'responseMessage': MessageResponseDetailedStatusResponseMessageWrite; +} + +export class MessageResponseDetailedStatusFrom { + 'from': MessageResponseDetailedStatus; + /** + * The message response category. * `noresponse` - the message was sent but was not replied to * `notmatched` - the message was replied to and the answer didn\'t match any search criteria + */ + 'responseCategory': 'noresponse' | 'notmatched'; + 'responseMessage': MessageResponseDetailedStatusResponseMessage; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "from", + "baseName": "from", + "type": "MessageResponseDetailedStatus" + }, + { + "name": "responseCategory", + "baseName": "responseCategory", + "type": "string" + }, + { + "name": "responseMessage", + "baseName": "responseMessage", + "type": "MessageResponseDetailedStatusResponseMessage" + } ]; + + static getAttributeTypeMap() { + return MessageResponseDetailedStatusFrom.attributeTypeMap; + } +} + diff --git a/model/messageResponseDetailedStatusResponseMessage.ts b/model/messageResponseDetailedStatusResponseMessage.ts new file mode 100644 index 0000000..0a1586a --- /dev/null +++ b/model/messageResponseDetailedStatusResponseMessage.ts @@ -0,0 +1,48 @@ + +import { RequestFile } from './models'; + + +export type MessageResponseDetailedStatusResponseMessageWrite = { +} + +/** +* The message response object. +*/ +export class MessageResponseDetailedStatusResponseMessage { + /** + * The message response content. + */ + 'content': string; + /** + * The message response acknowledgement status. + */ + 'acknowledged': string; + /** + * The message response channel. + */ + 'channel': 'N/A' | 'sms' | 'email' | 'voice'; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "content", + "baseName": "content", + "type": "string" + }, + { + "name": "acknowledged", + "baseName": "acknowledged", + "type": "string" + }, + { + "name": "channel", + "baseName": "channel", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MessageResponseDetailedStatusResponseMessage.attributeTypeMap; + } +} + diff --git a/model/messageResponseSummary.ts b/model/messageResponseSummary.ts index 12df1b9..2d3610c 100644 --- a/model/messageResponseSummary.ts +++ b/model/messageResponseSummary.ts @@ -1,7 +1,7 @@ import { RequestFile } from './models'; -import { LinkInner, LinkInnerWrite } from './linkInner'; -import { MessageResponseSummaryMessageresponsesInner, MessageResponseSummaryMessageresponsesInnerWrite } from './messageResponseSummaryMessageresponsesInner'; +import { Link, LinkWrite } from './link'; +import { MessageResponseSummaryStatus, MessageResponseSummaryStatusWrite } from './messageResponseSummaryStatus'; export type MessageResponseSummaryWrite = { @@ -14,11 +14,11 @@ export class MessageResponseSummary { /** * The message response statuses. */ - 'messageresponses': Set; + 'messageresponses': Set; /** * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. */ - 'link': Array; + 'link': Array; static discriminator: string | undefined = undefined; @@ -26,12 +26,12 @@ export class MessageResponseSummary { { "name": "messageresponses", "baseName": "messageresponses", - "type": "Set" + "type": "Set" }, { "name": "link", "baseName": "link", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/messageResponseSummaryStatus.ts b/model/messageResponseSummaryStatus.ts new file mode 100644 index 0000000..4d0989e --- /dev/null +++ b/model/messageResponseSummaryStatus.ts @@ -0,0 +1,58 @@ + +import { RequestFile } from './models'; +import { Link, LinkWrite } from './link'; + + +export type MessageResponseSummaryStatusWrite = { +} + +/** +* First object if `view` is `summary`, second object if `view` is `detailed`. +*/ +export class MessageResponseSummaryStatus { + /** + * Details the percentage of responses received for the sent message across all channels. + */ + 'percentageTotal': string; + /** + * Details the number of responses received for the sent message across all channels. + */ + 'responseCount': string; + /** + * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. + */ + 'link': Array; + /** + * The message response category. * `noresponse` - the message was sent but was not replied to * `notmatched` - the message was replied to and the answer didn\'t match any search criteria + */ + 'type': 'noresponse' | 'notmatched'; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "percentageTotal", + "baseName": "percentageTotal", + "type": "string" + }, + { + "name": "responseCount", + "baseName": "responseCount", + "type": "string" + }, + { + "name": "link", + "baseName": "link", + "type": "Array" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MessageResponseSummaryStatus.attributeTypeMap; + } +} + diff --git a/model/messageSocial.ts b/model/messageSocial.ts new file mode 100644 index 0000000..e4e9439 --- /dev/null +++ b/model/messageSocial.ts @@ -0,0 +1,35 @@ + +import { RequestFile } from './models'; +import { MessageSocialChannel, MessageSocialChannelWrite } from './messageSocialChannel'; + + +export type MessageSocialWrite = { + /** + * The list of social channel content. + */ + 'social'?: Array; +} + +/** +* Whispir can publish content to your Twitter and Facebook walls. Other socials can be made available upon request. +*/ +export class MessageSocial { + /** + * The list of social channel content. + */ + 'social': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "social", + "baseName": "social", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return MessageSocial.attributeTypeMap; + } +} + diff --git a/model/messageSocialChannel.ts b/model/messageSocialChannel.ts new file mode 100644 index 0000000..c268370 --- /dev/null +++ b/model/messageSocialChannel.ts @@ -0,0 +1,60 @@ + +import { RequestFile } from './models'; + + +export type MessageSocialChannelWrite = { + /** + * The identifier for the social content channel. Read the following section for information on each channel. | Channel | id | | -------------- |--------------- | | Twitter | `\"social\"` | | Facebook | `\"social_long\"` | + */ + 'id'?: 'social' | 'social_long'; + /** + * The social content body. + */ + 'body'?: string; + /** + * The social message content type. + */ + 'type'?: 'text/plain' | 'text/html'; +} + +/** +* The social channel object. +*/ +export class MessageSocialChannel { + /** + * The identifier for the social content channel. Read the following section for information on each channel. | Channel | id | | -------------- |--------------- | | Twitter | `\"social\"` | | Facebook | `\"social_long\"` | + */ + 'id': 'social' | 'social_long'; + /** + * The social content body. + */ + 'body': string; + /** + * The social message content type. + */ + 'type': 'text/plain' | 'text/html'; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "body", + "baseName": "body", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MessageSocialChannel.attributeTypeMap; + } +} + diff --git a/model/messageStatus.ts b/model/messageStatus.ts index 0f2b1c0..8e0230e 100644 --- a/model/messageStatus.ts +++ b/model/messageStatus.ts @@ -1,14 +1,14 @@ import { RequestFile } from './models'; -import { LinkInner, LinkInnerWrite } from './linkInner'; -import { MessageStatusMessageStatusesInner, MessageStatusMessageStatusesInnerWrite } from './messageStatusMessageStatusesInner'; +import { Link, LinkWrite } from './link'; +import { MessageStatusSummary, MessageStatusSummaryWrite } from './messageStatusSummary'; export type MessageStatusWrite = { /** * The object defining the message delivery status. */ - 'messageStatuses'?: Array; + 'messageStatuses'?: Array; /** * Present when `view` is `detailed`. */ @@ -22,11 +22,11 @@ export class MessageStatus { /** * The object defining the message delivery status. */ - 'messageStatuses': Set; + 'messageStatuses': Set; /** * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. */ - 'link': Array; + 'link': Array; /** * Present when `view` is `detailed`. */ @@ -38,12 +38,12 @@ export class MessageStatus { { "name": "messageStatuses", "baseName": "messageStatuses", - "type": "Set" + "type": "Set" }, { "name": "link", "baseName": "link", - "type": "Array" + "type": "Array" }, { "name": "status", diff --git a/model/messageStatusChannel.ts b/model/messageStatusChannel.ts new file mode 100644 index 0000000..a575a87 --- /dev/null +++ b/model/messageStatusChannel.ts @@ -0,0 +1,57 @@ + +import { RequestFile } from './models'; + + +export type MessageStatusChannelWrite = { + /** + * The message channel + */ + 'type'?: 'sms' | 'email' | 'voice'; + /** + * The delivery status + */ + 'status'?: string; + /** + * The message destination + */ + 'destination'?: string; +} + +export class MessageStatusChannel { + /** + * The message channel + */ + 'type': 'sms' | 'email' | 'voice'; + /** + * The delivery status + */ + 'status': string; + /** + * The message destination + */ + 'destination': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "destination", + "baseName": "destination", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MessageStatusChannel.attributeTypeMap; + } +} + diff --git a/model/messageStatusSummary.ts b/model/messageStatusSummary.ts new file mode 100644 index 0000000..b309931 --- /dev/null +++ b/model/messageStatusSummary.ts @@ -0,0 +1,82 @@ + +import { RequestFile } from './models'; +import { Link, LinkWrite } from './link'; +import { MessageStatusChannel, MessageStatusChannelWrite } from './messageStatusChannel'; +import { MessageStatusSummaryCategory, MessageStatusSummaryCategoryWrite } from './messageStatusSummaryCategory'; + + +export type MessageStatusSummaryWrite = { + /** + * Present when `view` is `summary`. + */ + 'categories'?: Array; + /** + * Present when `view` is `detailed`. + */ + 'name'?: string; + /** + * Present when `view` is `detailed`. + */ + 'info'?: string; + /** + * Present when `view` is `detailed`. + */ + 'status'?: Array; +} + +export class MessageStatusSummary { + /** + * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. + */ + 'link': Array; + /** + * Present when `view` is `summary`. + */ + 'categories': Set; + /** + * Present when `view` is `detailed`. + */ + 'name': string; + /** + * Present when `view` is `detailed`. + */ + 'info': string; + /** + * Present when `view` is `detailed`. + */ + 'status': Set; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "link", + "baseName": "link", + "type": "Array" + }, + { + "name": "categories", + "baseName": "categories", + "type": "Set" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "info", + "baseName": "info", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "Set" + } ]; + + static getAttributeTypeMap() { + return MessageStatusSummary.attributeTypeMap; + } +} + diff --git a/model/messageStatusSummaryCategory.ts b/model/messageStatusSummaryCategory.ts new file mode 100644 index 0000000..1e50176 --- /dev/null +++ b/model/messageStatusSummaryCategory.ts @@ -0,0 +1,57 @@ + +import { RequestFile } from './models'; + + +export type MessageStatusSummaryCategoryWrite = { + /** + * The delivery status of the message. + */ + 'name'?: 'Sent' | 'Pending' | 'Received' | 'Acknowledged' | 'Undeliverable'; + /** + * The number of recipients with the given `name` status. + */ + 'recipientCount'?: number; + /** + * The percentage of recipients with the given `name` status. + */ + 'percentageTotal'?: string; +} + +export class MessageStatusSummaryCategory { + /** + * The delivery status of the message. + */ + 'name': 'Sent' | 'Pending' | 'Received' | 'Acknowledged' | 'Undeliverable'; + /** + * The number of recipients with the given `name` status. + */ + 'recipientCount': number; + /** + * The percentage of recipients with the given `name` status. + */ + 'percentageTotal': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "recipientCount", + "baseName": "recipientCount", + "type": "number" + }, + { + "name": "percentageTotal", + "baseName": "percentageTotal", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MessageStatusSummaryCategory.attributeTypeMap; + } +} + diff --git a/model/messageTemplateShort.ts b/model/messageTemplateShort.ts new file mode 100644 index 0000000..260d7a9 --- /dev/null +++ b/model/messageTemplateShort.ts @@ -0,0 +1,55 @@ + +import { RequestFile } from './models'; +import { Link, LinkWrite } from './link'; + + +export type MessageTemplateShortWrite = { +} + +export class MessageTemplateShort { + /** + * Specifies the name of the message template + */ + 'messageTemplateName': string; + /** + * Specifies the description of the message template, so that anyone can understand its purpose + */ + 'messageTemplateDescription': string; + /** + * Specifies the template id needed for all the API Operations + */ + 'id': string; + /** + * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. + */ + 'link': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "messageTemplateName", + "baseName": "messageTemplateName", + "type": "string" + }, + { + "name": "messageTemplateDescription", + "baseName": "messageTemplateDescription", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "link", + "baseName": "link", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return MessageTemplateShort.attributeTypeMap; + } +} + diff --git a/model/messageVoice.ts b/model/messageVoice.ts new file mode 100644 index 0000000..56aae0a --- /dev/null +++ b/model/messageVoice.ts @@ -0,0 +1,86 @@ + +import { RequestFile } from './models'; +import { MessageVoiceResources, MessageVoiceResourcesWrite } from './messageVoiceResources'; + + +export type MessageVoiceWrite = { + /** + * Introduction text played with the subject. + */ + 'header'?: string; + /** + * Body text, read out to the recipient after the subject and header. + */ + 'body': string; + /** + * The conference call details of the voice message. Required when no conference call is being used. The minimum string to be used is specified in the example. Read the following section for information on each field. The following parameters can be set by specifying the value after the `:` in the `type` string: | Field | Description | | ------------- |------------ | | Pin | The access code required to be inserted from the recipient to hear the Voice message after the \"header\" is over. It can be left blank and then the user will be asked to proceed dialling \"1\".

For example, `7171`.

If the right code is inserted then \"subject\" and \"body\" of the Voice Message will be reproduced. The user will be able to dial \"1\" to replay the message, \"2\" to join the conference call or \"3\" to receive the details to dial in later.

In this last case the details - a Dial-In number and a PIN - will be repeated 3 times. | | ConfCall | The teleconference line that will be used in the voice call.

For example, `1800123123`.

It is possible to reference this value in other channels using the **@@teleconf_number@@** custom variable. | | ConfAccountNo | The teleconference account or room number that is used in the voice call.

For example, `098711234`.

It is possible to reference this value in other channels using the **@@teleconf_account@@** custom variable. | | ConfPinNo | The teleconference room PIN that is used in the voice call.

For example, `8181`.

It is possible to reference this value in other channels using the **@@teleconf_pin@@** custom variable. | | ConfModPinNo | The teleconference moderator PIN that is used in the voice call.

For example, `4242`.

It is possible to reference this value in other channels using the **@@teleconf_mod_pin@@** custom variable. | + */ + 'type': string; + 'resources'?: MessageVoiceResourcesWrite; +} + +/** +* The voice channel payload, used when sending a Message. Calls are charged in 30 seconds intervals (rounded up). Text max length is 5000 characters. The maximum payload size rule applies for the body, header and type usage. > #### Requirements > > In order to use this functionality your account must be enabled to use the Voice module. If you\'re unsure whether you can use Voice, please contact the Whispir Support Team. --- ### Overview Whispir’s API provides you with the ability to send a voice message to any landline phone or mobile phone around the world, both via text-to-speech and custom WAV files to be played over the phone Whispir’s Voice module can easily connect all recipients to a single bridged call, simplifying your teleconferences and ensuring your message gets through Each voice call is made up of three parts: - Message introduction: Either Text-To-Speech (TTS) or a WAV file - Message acceptance: Asks the recipient to press a button or insert a PIN to hear the message - Message content: The concatenation of the message subject and message body. The latter can be either TTS or a WAV file. At the end the recipient will be given the possibility to acknowledge the message. > #### Adding pauses > > Pauses can be added to conference call details using the `+` character. Each `+` represents 1 second. Pauses allow some wait time to ensure the conference call service is ready to accept the account number and PIN. ### WAV files requirements WAV files can be used in place of Text-To-Speech to provide a custom `header` and `body`. Before a WAV file can be used for the Voice module, it needs to conform to certain criteria: - All the WAV files combined must not exceed 10 MB in total file size - All the WAV files must be a maximum of 8 bit, 8000 Hz, 1ch, 64 kbps - If a WAV file is outside these criteria please use TTS instead +*/ +export class MessageVoice { + /** + * Introduction text played with the subject. + */ + 'header': string; + /** + * Body text, read out to the recipient after the subject and header. + */ + 'body': string; + /** + * The conference call details of the voice message. Required when no conference call is being used. The minimum string to be used is specified in the example. Read the following section for information on each field. The following parameters can be set by specifying the value after the `:` in the `type` string: | Field | Description | | ------------- |------------ | | Pin | The access code required to be inserted from the recipient to hear the Voice message after the \"header\" is over. It can be left blank and then the user will be asked to proceed dialling \"1\".

For example, `7171`.

If the right code is inserted then \"subject\" and \"body\" of the Voice Message will be reproduced. The user will be able to dial \"1\" to replay the message, \"2\" to join the conference call or \"3\" to receive the details to dial in later.

In this last case the details - a Dial-In number and a PIN - will be repeated 3 times. | | ConfCall | The teleconference line that will be used in the voice call.

For example, `1800123123`.

It is possible to reference this value in other channels using the **@@teleconf_number@@** custom variable. | | ConfAccountNo | The teleconference account or room number that is used in the voice call.

For example, `098711234`.

It is possible to reference this value in other channels using the **@@teleconf_account@@** custom variable. | | ConfPinNo | The teleconference room PIN that is used in the voice call.

For example, `8181`.

It is possible to reference this value in other channels using the **@@teleconf_pin@@** custom variable. | | ConfModPinNo | The teleconference moderator PIN that is used in the voice call.

For example, `4242`.

It is possible to reference this value in other channels using the **@@teleconf_mod_pin@@** custom variable. | + */ + 'type': string; + /** + * Read-only property returned from the Whispir Platform. This property has no meaning to the API consumer. + */ + 'footer': ''; + /** + * Read-only property returned from the Whispir Platform. This property has no meaning to the API consumer. + */ + 'other': ''; + 'resources': MessageVoiceResources; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "header", + "baseName": "header", + "type": "string" + }, + { + "name": "body", + "baseName": "body", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "footer", + "baseName": "footer", + "type": "string" + }, + { + "name": "other", + "baseName": "other", + "type": "string" + }, + { + "name": "resources", + "baseName": "resources", + "type": "MessageVoiceResources" + } ]; + + static getAttributeTypeMap() { + return MessageVoice.attributeTypeMap; + } +} + diff --git a/model/messageVoiceResources.ts b/model/messageVoiceResources.ts new file mode 100644 index 0000000..e7c5ca3 --- /dev/null +++ b/model/messageVoiceResources.ts @@ -0,0 +1,35 @@ + +import { RequestFile } from './models'; +import { MessageAttachment, MessageAttachmentWrite } from './messageAttachment'; + + +export type MessageVoiceResourcesWrite = { + /** + * The header and body attachments containing WAV files. Read the following section for configuring each voice field attachment: In addition to the parameters already specified for the TTS Voice calls, each attached WAV file must have the `attachmentDesc` named these specific values, to override the TTS voice: | Voice field | attachmentDesc | | -------------- |--------------- | | header | `\"voiceintro.wav\"` | | body | `\"voicebody.wav\"` | + */ + 'attachment'?: Array; +} + +/** +* Provides a configuration object for specifying custom audio for the voice header and body. +*/ +export class MessageVoiceResources { + /** + * The header and body attachments containing WAV files. Read the following section for configuring each voice field attachment: In addition to the parameters already specified for the TTS Voice calls, each attached WAV file must have the `attachmentDesc` named these specific values, to override the TTS voice: | Voice field | attachmentDesc | | -------------- |--------------- | | header | `\"voiceintro.wav\"` | | body | `\"voicebody.wav\"` | + */ + 'attachment': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "attachment", + "baseName": "attachment", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return MessageVoiceResources.attributeTypeMap; + } +} + diff --git a/model/messageWeb.ts b/model/messageWeb.ts new file mode 100644 index 0000000..01c42eb --- /dev/null +++ b/model/messageWeb.ts @@ -0,0 +1,47 @@ + +import { RequestFile } from './models'; + + +export type MessageWebWrite = { + /** + * The linked web content body. + */ + 'body'?: string; + /** + * The web Message content type. + */ + 'type'?: 'text/plain' | 'text/html'; +} + +/** +* The web channel payload, used when attaching web content to a Message. Not required when a template is provided. +*/ +export class MessageWeb { + /** + * The linked web content body. + */ + 'body': string; + /** + * The web Message content type. + */ + 'type': 'text/plain' | 'text/html'; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "body", + "baseName": "body", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MessageWeb.attributeTypeMap; + } +} + diff --git a/model/models.ts b/model/models.ts index 3fee57a..5226536 100644 --- a/model/models.ts +++ b/model/models.ts @@ -1,89 +1,79 @@ import localVarRequest from 'request'; export * from './activity'; -export * from './attachment'; +export * from './activityCollection'; +export * from './apiError'; +export * from './auth'; export * from './callback'; export * from './callbackAuth'; export * from './callbackCall'; -export * from './callbackCallCallback'; +export * from './callbackCallCollection'; +export * from './callbackCallEvent'; export * from './callbackCallFrom'; export * from './callbackCallResponseMessage'; -export * from './callbackCallbacks'; +export * from './callbackCollection'; +export * from './callbackEvent'; +export * from './callbackShort'; export * from './contact'; +export * from './contactCollection'; +export * from './contactLocation'; +export * from './contactMessagingOption'; export * from './customList'; -export * from './customListCustomlabellistsInner'; -export * from './distributionlist'; -export * from './distributionlistDistlistdetailsInner'; -export * from './dlr'; -export * from './dynamicdistributionlist'; -export * from './email'; -export * from './emailResources'; +export * from './customListCollection'; +export * from './customListItem'; +export * from './distributionList'; +export * from './distributionListCollection'; +export * from './distributionListDetails'; +export * from './distributionListDynamic'; +export * from './distributionListStatic'; export * from './event'; -export * from './eventEventFormListInner'; -export * from './eventEventFormListInnerEventFieldListInner'; -export * from './features'; -export * from './featuresAliasOption'; -export * from './featuresPushOptions'; -export * from './featuresPushOptionsApns'; -export * from './featuresPushOptionsFcm'; +export * from './eventCollection'; +export * from './eventForm'; +export * from './eventFormField'; export * from './fieldMapping'; -export * from './getActivities200Response'; -export * from './getCallbackCalls200Response'; -export * from './getCallbacks200Response'; -export * from './getCallbacks200ResponseCallbacksInner'; -export * from './getContacts200Response'; -export * from './getCustomLists200Response'; -export * from './getDistributionLists200Response'; -export * from './getDistributionLists200ResponseDistributionListsInner'; -export * from './getEvents200Response'; -export * from './getMessageResponsesById200Response'; -export * from './getMessages200Response'; -export * from './getMessages400Response'; -export * from './getMessages401Response'; -export * from './getMessages403Response'; -export * from './getMessages404Response'; -export * from './getMessages405Response'; -export * from './getMessages415Response'; -export * from './getMessages422Response'; -export * from './getMessages500Response'; -export * from './getMessages501Response'; -export * from './getResources200Response'; -export * from './getResponseRules200Response'; -export * from './getScenarios200Response'; -export * from './getTemplates200Response'; -export * from './getTemplates200ResponseMessagetemplatesInner'; -export * from './getUsers200Response'; -export * from './getWorkspaceActivities200Response'; -export * from './getWorkspaces200Response'; export * from './import'; -export * from './linkInner'; -export * from './listUsers'; -export * from './locationsInner'; +export * from './link'; export * from './message'; +export * from './messageAttachment'; +export * from './messageCollection'; +export * from './messageDlr'; +export * from './messageEmail'; +export * from './messageEmailResources'; +export * from './messageFeatures'; +export * from './messageFeaturesAliasOption'; +export * from './messageFeaturesPushOptions'; +export * from './messageFeaturesPushOptionsAPNS'; +export * from './messageFeaturesPushOptionsFCM'; +export * from './messageResponse'; export * from './messageResponseDetailed'; -export * from './messageResponseDetailedMessageresponsesInner'; -export * from './messageResponseDetailedMessageresponsesInnerFrom'; -export * from './messageResponseDetailedMessageresponsesInnerResponseMessage'; +export * from './messageResponseDetailedStatus'; +export * from './messageResponseDetailedStatusFrom'; +export * from './messageResponseDetailedStatusResponseMessage'; export * from './messageResponseSummary'; -export * from './messageResponseSummaryMessageresponsesInner'; +export * from './messageResponseSummaryStatus'; +export * from './messageSocial'; +export * from './messageSocialChannel'; export * from './messageStatus'; -export * from './messageStatusMessageStatusesInner'; -export * from './messageStatusMessageStatusesInnerCategoriesInner'; -export * from './messagingoptionsInner'; -export * from './postAuth200Response'; -export * from './postDistributionListsRequest'; +export * from './messageStatusChannel'; +export * from './messageStatusSummary'; +export * from './messageStatusSummaryCategory'; +export * from './messageTemplateShort'; +export * from './messageVoice'; +export * from './messageVoiceResources'; +export * from './messageWeb'; export * from './resource'; +export * from './resourceCollection'; export * from './responseRule'; +export * from './responseRuleCollection'; export * from './responseTemplatePattern'; export * from './scenario'; -export * from './social'; -export * from './socialSocialInner'; +export * from './scenarioCollection'; export * from './template'; +export * from './templateCollection'; export * from './user'; -export * from './voice'; -export * from './voiceResources'; -export * from './web'; +export * from './userCollection'; export * from './workspace'; +export * from './workspaceCollection'; import * as fs from 'fs'; @@ -99,89 +89,79 @@ export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; import { Activity } from './activity'; -import { Attachment } from './attachment'; +import { ActivityCollection } from './activityCollection'; +import { ApiError } from './apiError'; +import { Auth } from './auth'; import { Callback } from './callback'; import { CallbackAuth } from './callbackAuth'; import { CallbackCall } from './callbackCall'; -import { CallbackCallCallback } from './callbackCallCallback'; +import { CallbackCallCollection } from './callbackCallCollection'; +import { CallbackCallEvent } from './callbackCallEvent'; import { CallbackCallFrom } from './callbackCallFrom'; import { CallbackCallResponseMessage } from './callbackCallResponseMessage'; -import { CallbackCallbacks } from './callbackCallbacks'; +import { CallbackCollection } from './callbackCollection'; +import { CallbackEvent } from './callbackEvent'; +import { CallbackShort } from './callbackShort'; import { Contact } from './contact'; +import { ContactCollection } from './contactCollection'; +import { ContactLocation } from './contactLocation'; +import { ContactMessagingOption } from './contactMessagingOption'; import { CustomList } from './customList'; -import { CustomListCustomlabellistsInner } from './customListCustomlabellistsInner'; -import { Distributionlist } from './distributionlist'; -import { DistributionlistDistlistdetailsInner } from './distributionlistDistlistdetailsInner'; -import { Dlr } from './dlr'; -import { Dynamicdistributionlist } from './dynamicdistributionlist'; -import { Email } from './email'; -import { EmailResources } from './emailResources'; +import { CustomListCollection } from './customListCollection'; +import { CustomListItem } from './customListItem'; +import { DistributionList } from './distributionList'; +import { DistributionListCollection } from './distributionListCollection'; +import { DistributionListDetails } from './distributionListDetails'; +import { DistributionListDynamic } from './distributionListDynamic'; +import { DistributionListStatic } from './distributionListStatic'; import { Event } from './event'; -import { EventEventFormListInner } from './eventEventFormListInner'; -import { EventEventFormListInnerEventFieldListInner } from './eventEventFormListInnerEventFieldListInner'; -import { Features } from './features'; -import { FeaturesAliasOption } from './featuresAliasOption'; -import { FeaturesPushOptions } from './featuresPushOptions'; -import { FeaturesPushOptionsApns } from './featuresPushOptionsApns'; -import { FeaturesPushOptionsFcm } from './featuresPushOptionsFcm'; +import { EventCollection } from './eventCollection'; +import { EventForm } from './eventForm'; +import { EventFormField } from './eventFormField'; import { FieldMapping } from './fieldMapping'; -import { GetActivities200Response } from './getActivities200Response'; -import { GetCallbackCalls200Response } from './getCallbackCalls200Response'; -import { GetCallbacks200Response } from './getCallbacks200Response'; -import { GetCallbacks200ResponseCallbacksInner } from './getCallbacks200ResponseCallbacksInner'; -import { GetContacts200Response } from './getContacts200Response'; -import { GetCustomLists200Response } from './getCustomLists200Response'; -import { GetDistributionLists200Response } from './getDistributionLists200Response'; -import { GetDistributionLists200ResponseDistributionListsInner } from './getDistributionLists200ResponseDistributionListsInner'; -import { GetEvents200Response } from './getEvents200Response'; -import { GetMessageResponsesById200Response } from './getMessageResponsesById200Response'; -import { GetMessages200Response } from './getMessages200Response'; -import { GetMessages400Response } from './getMessages400Response'; -import { GetMessages401Response } from './getMessages401Response'; -import { GetMessages403Response } from './getMessages403Response'; -import { GetMessages404Response } from './getMessages404Response'; -import { GetMessages405Response } from './getMessages405Response'; -import { GetMessages415Response } from './getMessages415Response'; -import { GetMessages422Response } from './getMessages422Response'; -import { GetMessages500Response } from './getMessages500Response'; -import { GetMessages501Response } from './getMessages501Response'; -import { GetResources200Response } from './getResources200Response'; -import { GetResponseRules200Response } from './getResponseRules200Response'; -import { GetScenarios200Response } from './getScenarios200Response'; -import { GetTemplates200Response } from './getTemplates200Response'; -import { GetTemplates200ResponseMessagetemplatesInner } from './getTemplates200ResponseMessagetemplatesInner'; -import { GetUsers200Response } from './getUsers200Response'; -import { GetWorkspaceActivities200Response } from './getWorkspaceActivities200Response'; -import { GetWorkspaces200Response } from './getWorkspaces200Response'; import { Import } from './import'; -import { LinkInner } from './linkInner'; -import { ListUsers } from './listUsers'; -import { LocationsInner } from './locationsInner'; +import { Link } from './link'; import { Message } from './message'; +import { MessageAttachment } from './messageAttachment'; +import { MessageCollection } from './messageCollection'; +import { MessageDlr } from './messageDlr'; +import { MessageEmail } from './messageEmail'; +import { MessageEmailResources } from './messageEmailResources'; +import { MessageFeatures } from './messageFeatures'; +import { MessageFeaturesAliasOption } from './messageFeaturesAliasOption'; +import { MessageFeaturesPushOptions } from './messageFeaturesPushOptions'; +import { MessageFeaturesPushOptionsAPNS } from './messageFeaturesPushOptionsAPNS'; +import { MessageFeaturesPushOptionsFCM } from './messageFeaturesPushOptionsFCM'; +import { MessageResponse } from './messageResponse'; import { MessageResponseDetailed } from './messageResponseDetailed'; -import { MessageResponseDetailedMessageresponsesInner } from './messageResponseDetailedMessageresponsesInner'; -import { MessageResponseDetailedMessageresponsesInnerFrom } from './messageResponseDetailedMessageresponsesInnerFrom'; -import { MessageResponseDetailedMessageresponsesInnerResponseMessage } from './messageResponseDetailedMessageresponsesInnerResponseMessage'; +import { MessageResponseDetailedStatus } from './messageResponseDetailedStatus'; +import { MessageResponseDetailedStatusFrom } from './messageResponseDetailedStatusFrom'; +import { MessageResponseDetailedStatusResponseMessage } from './messageResponseDetailedStatusResponseMessage'; import { MessageResponseSummary } from './messageResponseSummary'; -import { MessageResponseSummaryMessageresponsesInner } from './messageResponseSummaryMessageresponsesInner'; +import { MessageResponseSummaryStatus } from './messageResponseSummaryStatus'; +import { MessageSocial } from './messageSocial'; +import { MessageSocialChannel } from './messageSocialChannel'; import { MessageStatus } from './messageStatus'; -import { MessageStatusMessageStatusesInner } from './messageStatusMessageStatusesInner'; -import { MessageStatusMessageStatusesInnerCategoriesInner } from './messageStatusMessageStatusesInnerCategoriesInner'; -import { MessagingoptionsInner } from './messagingoptionsInner'; -import { PostAuth200Response } from './postAuth200Response'; -import { PostDistributionListsRequest } from './postDistributionListsRequest'; +import { MessageStatusChannel } from './messageStatusChannel'; +import { MessageStatusSummary } from './messageStatusSummary'; +import { MessageStatusSummaryCategory } from './messageStatusSummaryCategory'; +import { MessageTemplateShort } from './messageTemplateShort'; +import { MessageVoice } from './messageVoice'; +import { MessageVoiceResources } from './messageVoiceResources'; +import { MessageWeb } from './messageWeb'; import { Resource } from './resource'; +import { ResourceCollection } from './resourceCollection'; import { ResponseRule } from './responseRule'; +import { ResponseRuleCollection } from './responseRuleCollection'; import { ResponseTemplatePattern } from './responseTemplatePattern'; import { Scenario } from './scenario'; -import { Social } from './social'; -import { SocialSocialInner } from './socialSocialInner'; +import { ScenarioCollection } from './scenarioCollection'; import { Template } from './template'; +import { TemplateCollection } from './templateCollection'; import { User } from './user'; -import { Voice } from './voice'; -import { VoiceResources } from './voiceResources'; -import { Web } from './web'; +import { UserCollection } from './userCollection'; import { Workspace } from './workspace'; +import { WorkspaceCollection } from './workspaceCollection'; /* tslint:disable:no-unused-variable */ let primitives = [ @@ -197,89 +177,79 @@ let primitives = [ let typeMap: {[index: string]: any} = { "Activity": Activity, - "Attachment": Attachment, + "ActivityCollection": ActivityCollection, + "ApiError": ApiError, + "Auth": Auth, "Callback": Callback, "CallbackAuth": CallbackAuth, "CallbackCall": CallbackCall, - "CallbackCallCallback": CallbackCallCallback, + "CallbackCallCollection": CallbackCallCollection, + "CallbackCallEvent": CallbackCallEvent, "CallbackCallFrom": CallbackCallFrom, "CallbackCallResponseMessage": CallbackCallResponseMessage, - "CallbackCallbacks": CallbackCallbacks, + "CallbackCollection": CallbackCollection, + "CallbackEvent": CallbackEvent, + "CallbackShort": CallbackShort, "Contact": Contact, + "ContactCollection": ContactCollection, + "ContactLocation": ContactLocation, + "ContactMessagingOption": ContactMessagingOption, "CustomList": CustomList, - "CustomListCustomlabellistsInner": CustomListCustomlabellistsInner, - "Distributionlist": Distributionlist, - "DistributionlistDistlistdetailsInner": DistributionlistDistlistdetailsInner, - "Dlr": Dlr, - "Dynamicdistributionlist": Dynamicdistributionlist, - "Email": Email, - "EmailResources": EmailResources, + "CustomListCollection": CustomListCollection, + "CustomListItem": CustomListItem, + "DistributionList": DistributionList, + "DistributionListCollection": DistributionListCollection, + "DistributionListDetails": DistributionListDetails, + "DistributionListDynamic": DistributionListDynamic, + "DistributionListStatic": DistributionListStatic, "Event": Event, - "EventEventFormListInner": EventEventFormListInner, - "EventEventFormListInnerEventFieldListInner": EventEventFormListInnerEventFieldListInner, - "Features": Features, - "FeaturesAliasOption": FeaturesAliasOption, - "FeaturesPushOptions": FeaturesPushOptions, - "FeaturesPushOptionsApns": FeaturesPushOptionsApns, - "FeaturesPushOptionsFcm": FeaturesPushOptionsFcm, + "EventCollection": EventCollection, + "EventForm": EventForm, + "EventFormField": EventFormField, "FieldMapping": FieldMapping, - "GetActivities200Response": GetActivities200Response, - "GetCallbackCalls200Response": GetCallbackCalls200Response, - "GetCallbacks200Response": GetCallbacks200Response, - "GetCallbacks200ResponseCallbacksInner": GetCallbacks200ResponseCallbacksInner, - "GetContacts200Response": GetContacts200Response, - "GetCustomLists200Response": GetCustomLists200Response, - "GetDistributionLists200Response": GetDistributionLists200Response, - "GetDistributionLists200ResponseDistributionListsInner": GetDistributionLists200ResponseDistributionListsInner, - "GetEvents200Response": GetEvents200Response, - "GetMessageResponsesById200Response": GetMessageResponsesById200Response, - "GetMessages200Response": GetMessages200Response, - "GetMessages400Response": GetMessages400Response, - "GetMessages401Response": GetMessages401Response, - "GetMessages403Response": GetMessages403Response, - "GetMessages404Response": GetMessages404Response, - "GetMessages405Response": GetMessages405Response, - "GetMessages415Response": GetMessages415Response, - "GetMessages422Response": GetMessages422Response, - "GetMessages500Response": GetMessages500Response, - "GetMessages501Response": GetMessages501Response, - "GetResources200Response": GetResources200Response, - "GetResponseRules200Response": GetResponseRules200Response, - "GetScenarios200Response": GetScenarios200Response, - "GetTemplates200Response": GetTemplates200Response, - "GetTemplates200ResponseMessagetemplatesInner": GetTemplates200ResponseMessagetemplatesInner, - "GetUsers200Response": GetUsers200Response, - "GetWorkspaceActivities200Response": GetWorkspaceActivities200Response, - "GetWorkspaces200Response": GetWorkspaces200Response, "Import": Import, - "LinkInner": LinkInner, - "ListUsers": ListUsers, - "LocationsInner": LocationsInner, + "Link": Link, "Message": Message, + "MessageAttachment": MessageAttachment, + "MessageCollection": MessageCollection, + "MessageDlr": MessageDlr, + "MessageEmail": MessageEmail, + "MessageEmailResources": MessageEmailResources, + "MessageFeatures": MessageFeatures, + "MessageFeaturesAliasOption": MessageFeaturesAliasOption, + "MessageFeaturesPushOptions": MessageFeaturesPushOptions, + "MessageFeaturesPushOptionsAPNS": MessageFeaturesPushOptionsAPNS, + "MessageFeaturesPushOptionsFCM": MessageFeaturesPushOptionsFCM, + "MessageResponse": MessageResponse, "MessageResponseDetailed": MessageResponseDetailed, - "MessageResponseDetailedMessageresponsesInner": MessageResponseDetailedMessageresponsesInner, - "MessageResponseDetailedMessageresponsesInnerFrom": MessageResponseDetailedMessageresponsesInnerFrom, - "MessageResponseDetailedMessageresponsesInnerResponseMessage": MessageResponseDetailedMessageresponsesInnerResponseMessage, + "MessageResponseDetailedStatus": MessageResponseDetailedStatus, + "MessageResponseDetailedStatusFrom": MessageResponseDetailedStatusFrom, + "MessageResponseDetailedStatusResponseMessage": MessageResponseDetailedStatusResponseMessage, "MessageResponseSummary": MessageResponseSummary, - "MessageResponseSummaryMessageresponsesInner": MessageResponseSummaryMessageresponsesInner, + "MessageResponseSummaryStatus": MessageResponseSummaryStatus, + "MessageSocial": MessageSocial, + "MessageSocialChannel": MessageSocialChannel, "MessageStatus": MessageStatus, - "MessageStatusMessageStatusesInner": MessageStatusMessageStatusesInner, - "MessageStatusMessageStatusesInnerCategoriesInner": MessageStatusMessageStatusesInnerCategoriesInner, - "MessagingoptionsInner": MessagingoptionsInner, - "PostAuth200Response": PostAuth200Response, - "PostDistributionListsRequest": PostDistributionListsRequest, + "MessageStatusChannel": MessageStatusChannel, + "MessageStatusSummary": MessageStatusSummary, + "MessageStatusSummaryCategory": MessageStatusSummaryCategory, + "MessageTemplateShort": MessageTemplateShort, + "MessageVoice": MessageVoice, + "MessageVoiceResources": MessageVoiceResources, + "MessageWeb": MessageWeb, "Resource": Resource, + "ResourceCollection": ResourceCollection, "ResponseRule": ResponseRule, + "ResponseRuleCollection": ResponseRuleCollection, "ResponseTemplatePattern": ResponseTemplatePattern, "Scenario": Scenario, - "Social": Social, - "SocialSocialInner": SocialSocialInner, + "ScenarioCollection": ScenarioCollection, "Template": Template, + "TemplateCollection": TemplateCollection, "User": User, - "Voice": Voice, - "VoiceResources": VoiceResources, - "Web": Web, + "UserCollection": UserCollection, "Workspace": Workspace, + "WorkspaceCollection": WorkspaceCollection, } export class ObjectSerializer { diff --git a/model/resource.ts b/model/resource.ts index a99b1e2..9b416cd 100644 --- a/model/resource.ts +++ b/model/resource.ts @@ -1,6 +1,6 @@ import { RequestFile } from './models'; -import { LinkInner, LinkInnerWrite } from './linkInner'; +import { Link, LinkWrite } from './link'; export type ResourceWrite = { @@ -45,7 +45,7 @@ export class Resource { /** * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. */ - 'link': Array; + 'link': Array; static discriminator: string | undefined = undefined; @@ -78,7 +78,7 @@ export class Resource { { "name": "link", "baseName": "link", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/resourceCollection.ts b/model/resourceCollection.ts new file mode 100644 index 0000000..4fce321 --- /dev/null +++ b/model/resourceCollection.ts @@ -0,0 +1,40 @@ + +import { RequestFile } from './models'; +import { Resource, ResourceWrite } from './resource'; + + +export type ResourceCollectionWrite = { +} + +/** +* List of resources object +*/ +export class ResourceCollection { + /** + * Provides the total number of records fetched. This attribute may return \"No records found\" when there are no callbacks available. + */ + 'status': string; + /** + * List of resources + */ + 'resources': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "resources", + "baseName": "resources", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ResourceCollection.attributeTypeMap; + } +} + diff --git a/model/responseRuleCollection.ts b/model/responseRuleCollection.ts new file mode 100644 index 0000000..7ea7c34 --- /dev/null +++ b/model/responseRuleCollection.ts @@ -0,0 +1,37 @@ + +import { RequestFile } from './models'; +import { ResponseRule, ResponseRuleWrite } from './responseRule'; + + +export type ResponseRuleCollectionWrite = { +} + +export class ResponseRuleCollection { + /** + * Provides the total number of records fetched. This attribute may return \"No records found\" when there are no response rules available. + */ + 'status': string; + /** + * The list of response rules + */ + 'responseRules': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "responseRules", + "baseName": "responseRules", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ResponseRuleCollection.attributeTypeMap; + } +} + diff --git a/model/scenario.ts b/model/scenario.ts index 0e9c523..9c89166 100644 --- a/model/scenario.ts +++ b/model/scenario.ts @@ -1,10 +1,10 @@ import { RequestFile } from './models'; -import { Email, EmailWrite } from './email'; import { Message, MessageWrite } from './message'; -import { Social, SocialWrite } from './social'; -import { Voice, VoiceWrite } from './voice'; -import { Web, WebWrite } from './web'; +import { MessageEmail, MessageEmailWrite } from './messageEmail'; +import { MessageSocial, MessageSocialWrite } from './messageSocial'; +import { MessageVoice, MessageVoiceWrite } from './messageVoice'; +import { MessageWeb, MessageWebWrite } from './messageWeb'; export type ScenarioWrite = { @@ -37,10 +37,10 @@ export type ScenarioWrite = { * Specifies the label for the message (to view during reporting) */ 'label'?: string; - 'email'?: EmailWrite; - 'voice'?: VoiceWrite; - 'web'?: WebWrite; - 'social'?: SocialWrite; + 'email'?: MessageEmailWrite; + 'voice'?: MessageVoiceWrite; + 'web'?: MessageWebWrite; + 'social'?: MessageSocialWrite; } /** @@ -76,10 +76,10 @@ export class Scenario { * Specifies the label for the message (to view during reporting) */ 'label': string; - 'email': Email; - 'voice': Voice; - 'web': Web; - 'social': Social; + 'email': MessageEmail; + 'voice': MessageVoice; + 'web': MessageWeb; + 'social': MessageSocial; static discriminator: string | undefined = undefined; @@ -127,22 +127,22 @@ export class Scenario { { "name": "email", "baseName": "email", - "type": "Email" + "type": "MessageEmail" }, { "name": "voice", "baseName": "voice", - "type": "Voice" + "type": "MessageVoice" }, { "name": "web", "baseName": "web", - "type": "Web" + "type": "MessageWeb" }, { "name": "social", "baseName": "social", - "type": "Social" + "type": "MessageSocial" } ]; static getAttributeTypeMap() { diff --git a/model/scenarioCollection.ts b/model/scenarioCollection.ts new file mode 100644 index 0000000..1efdea9 --- /dev/null +++ b/model/scenarioCollection.ts @@ -0,0 +1,35 @@ + +import { RequestFile } from './models'; +import { Scenario, ScenarioWrite } from './scenario'; + + +export type ScenarioCollectionWrite = { + /** + * Scenario object + */ + 'scenarios'?: Array; +} + +/** +* List of retrieved scenarios +*/ +export class ScenarioCollection { + /** + * Scenario object + */ + 'scenarios': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "scenarios", + "baseName": "scenarios", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ScenarioCollection.attributeTypeMap; + } +} + diff --git a/model/template.ts b/model/template.ts index e438050..3dbe153 100644 --- a/model/template.ts +++ b/model/template.ts @@ -1,12 +1,12 @@ import { RequestFile } from './models'; -import { Dlr, DlrWrite } from './dlr'; -import { Email, EmailWrite } from './email'; -import { Features, FeaturesWrite } from './features'; -import { LinkInner, LinkInnerWrite } from './linkInner'; -import { Social, SocialWrite } from './social'; -import { Voice, VoiceWrite } from './voice'; -import { Web, WebWrite } from './web'; +import { Link, LinkWrite } from './link'; +import { MessageDlr, MessageDlrWrite } from './messageDlr'; +import { MessageEmail, MessageEmailWrite } from './messageEmail'; +import { MessageFeatures, MessageFeaturesWrite } from './messageFeatures'; +import { MessageSocial, MessageSocialWrite } from './messageSocial'; +import { MessageVoice, MessageVoiceWrite } from './messageVoice'; +import { MessageWeb, MessageWebWrite } from './messageWeb'; export type TemplateWrite = { @@ -26,16 +26,16 @@ export type TemplateWrite = { * Specifies the content of the SMS message. */ 'body': string; - 'email'?: EmailWrite; - 'voice'?: VoiceWrite; - 'web'?: WebWrite; - 'social'?: SocialWrite; + 'email'?: MessageEmailWrite; + 'voice'?: MessageVoiceWrite; + 'web'?: MessageWebWrite; + 'social'?: MessageSocialWrite; /** * Allows the user to modify the message behaviour for replies and DLRs (delivery receipts) */ 'type'?: string; - 'features'?: FeaturesWrite; - 'dlr'?: DlrWrite; + 'features'?: MessageFeaturesWrite; + 'dlr'?: MessageDlrWrite; } /** @@ -62,20 +62,20 @@ export class Template { * Specifies the content of the SMS message. */ 'body': string; - 'email': Email; - 'voice': Voice; - 'web': Web; - 'social': Social; + 'email': MessageEmail; + 'voice': MessageVoice; + 'web': MessageWeb; + 'social': MessageSocial; /** * Allows the user to modify the message behaviour for replies and DLRs (delivery receipts) */ 'type': string; - 'features': Features; - 'dlr': Dlr; + 'features': MessageFeatures; + 'dlr': MessageDlr; /** * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. */ - 'link': Array; + 'link': Array; /** * Information which helps to label related message templates together */ @@ -116,22 +116,22 @@ export class Template { { "name": "email", "baseName": "email", - "type": "Email" + "type": "MessageEmail" }, { "name": "voice", "baseName": "voice", - "type": "Voice" + "type": "MessageVoice" }, { "name": "web", "baseName": "web", - "type": "Web" + "type": "MessageWeb" }, { "name": "social", "baseName": "social", - "type": "Social" + "type": "MessageSocial" }, { "name": "type", @@ -141,17 +141,17 @@ export class Template { { "name": "features", "baseName": "features", - "type": "Features" + "type": "MessageFeatures" }, { "name": "dlr", "baseName": "dlr", - "type": "Dlr" + "type": "MessageDlr" }, { "name": "link", "baseName": "link", - "type": "Array" + "type": "Array" }, { "name": "tags", diff --git a/model/templateCollection.ts b/model/templateCollection.ts new file mode 100644 index 0000000..052146d --- /dev/null +++ b/model/templateCollection.ts @@ -0,0 +1,50 @@ + +import { RequestFile } from './models'; +import { Link, LinkWrite } from './link'; +import { MessageTemplateShort, MessageTemplateShortWrite } from './messageTemplateShort'; + + +export type TemplateCollectionWrite = { +} + +/** +* Returns a list of templates +*/ +export class TemplateCollection { + /** + * Provides the total number of records fetched. This attribute may return \"No records found\" when there are no message templates available. + */ + 'status': string; + /** + * Specifies the name of the message template + */ + 'messagetemplates': Set; + /** + * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. + */ + 'link': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "messagetemplates", + "baseName": "messagetemplates", + "type": "Set" + }, + { + "name": "link", + "baseName": "link", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return TemplateCollection.attributeTypeMap; + } +} + diff --git a/model/user.ts b/model/user.ts index 2c253f1..5075d74 100644 --- a/model/user.ts +++ b/model/user.ts @@ -1,6 +1,6 @@ import { RequestFile } from './models'; -import { LinkInner, LinkInnerWrite } from './linkInner'; +import { Link, LinkWrite } from './link'; export type UserWrite = { @@ -497,7 +497,7 @@ export class User { /** * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. */ - 'link': Array; + 'link': Array; static discriminator: string | undefined = undefined; @@ -815,7 +815,7 @@ export class User { { "name": "link", "baseName": "link", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/userCollection.ts b/model/userCollection.ts new file mode 100644 index 0000000..c975b55 --- /dev/null +++ b/model/userCollection.ts @@ -0,0 +1,76 @@ + +import { RequestFile } from './models'; +import { Link, LinkWrite } from './link'; + + +export type UserCollectionWrite = { +} + +/** +* List users response object +*/ +export class UserCollection { + /** + * The ID of the user. + */ + 'id': string; + /** + * The first name of the user. + */ + 'firstName': string; + /** + * The last name of the user. + */ + 'lastName': string; + /** + * The company name of the user. + */ + 'companyName': string; + /** + * The primary work email address of the user. + */ + 'workEmailAddress1': string; + /** + * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. + */ + 'link': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "firstName", + "baseName": "firstName", + "type": "string" + }, + { + "name": "lastName", + "baseName": "lastName", + "type": "string" + }, + { + "name": "companyName", + "baseName": "companyName", + "type": "string" + }, + { + "name": "workEmailAddress1", + "baseName": "workEmailAddress1", + "type": "string" + }, + { + "name": "link", + "baseName": "link", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return UserCollection.attributeTypeMap; + } +} + diff --git a/model/workspace.ts b/model/workspace.ts index 86301d6..379132b 100644 --- a/model/workspace.ts +++ b/model/workspace.ts @@ -1,6 +1,6 @@ import { RequestFile } from './models'; -import { LinkInner, LinkInnerWrite } from './linkInner'; +import { Link, LinkWrite } from './link'; export type WorkspaceWrite = { @@ -49,7 +49,7 @@ export class Workspace { /** * A [HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) link object, describing all discoverable resources in relation to the original request. */ - 'link': Array; + 'link': Array; static discriminator: string | undefined = undefined; @@ -82,7 +82,7 @@ export class Workspace { { "name": "link", "baseName": "link", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/model/workspaceCollection.ts b/model/workspaceCollection.ts new file mode 100644 index 0000000..d533e90 --- /dev/null +++ b/model/workspaceCollection.ts @@ -0,0 +1,40 @@ + +import { RequestFile } from './models'; +import { Workspace, WorkspaceWrite } from './workspace'; + + +export type WorkspaceCollectionWrite = { +} + +/** +* List of workspaces +*/ +export class WorkspaceCollection { + /** + * List of workspaces + */ + 'workspaces': Array; + /** + * Provides the total number of records fetched. This attribute may return \"No records found\" when there are no callbacks available. + */ + 'status': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "workspaces", + "baseName": "workspaces", + "type": "Array" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return WorkspaceCollection.attributeTypeMap; + } +} +