-
Notifications
You must be signed in to change notification settings - Fork 517
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Added previewMessaging folder (#974)
* chore: added PreviewMessaging directory * chore: added PreviewMessaging directory * [Librarian] Regenerated @ 5eb406c4977c9f6976e6053cb5b581056f541a59 * Release 4.19.1 * Update PreviewMessagingBase.ts * chore: removed LTS version * chore: executed prettier --------- Co-authored-by: Twilio <[email protected]>
- Loading branch information
1 parent
b20eda1
commit 47ac32f
Showing
15 changed files
with
1,211 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import PreviewMessagingBase from "./PreviewMessagingBase"; | ||
import { MessageListInstance } from "./previewMessaging/v1/message"; | ||
|
||
class PreviewMessaging extends PreviewMessagingBase { | ||
/** | ||
* @deprecated - Use v1.messages; instead | ||
*/ | ||
get messages(): MessageListInstance { | ||
console.warn("messages is deprecated. Use v1.messages; instead."); | ||
return this.v1.messages; | ||
} | ||
} | ||
export = PreviewMessaging; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* This code was generated by | ||
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ | ||
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ | ||
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator. | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
import Domain from "../base/Domain"; | ||
import V1 from "./previewMessaging/V1"; | ||
|
||
class PreviewMessagingBase extends Domain { | ||
_v1?: V1; | ||
|
||
/** | ||
* Initialize accounts domain | ||
* | ||
* @param twilio - The twilio client | ||
*/ | ||
constructor(twilio: any) { | ||
super(twilio, "https://preview.messaging.twilio.com"); | ||
} | ||
|
||
get v1(): V1 { | ||
this._v1 = this._v1 || new V1(this); | ||
return this._v1; | ||
} | ||
} | ||
|
||
export = PreviewMessagingBase; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,196 @@ | ||
/* | ||
* This code was generated by | ||
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ | ||
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ | ||
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ | ||
* | ||
* Twilio - Flex | ||
* This is the public Twilio REST API. | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator. | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
import { inspect, InspectOptions } from "util"; | ||
import V1 from "../V1"; | ||
const deserialize = require("../../../base/deserialize"); | ||
const serialize = require("../../../base/serialize"); | ||
import { isValidPathParam } from "../../../base/utility"; | ||
|
||
export type ProvisioningStatusStatus = | ||
| "active" | ||
| "in-progress" | ||
| "not-configured" | ||
| "failed"; | ||
|
||
export interface ProvisioningStatusContext { | ||
/** | ||
* Fetch a ProvisioningStatusInstance | ||
* | ||
* @param callback - Callback to handle processed record | ||
* | ||
* @returns Resolves to processed ProvisioningStatusInstance | ||
*/ | ||
fetch( | ||
callback?: (error: Error | null, item?: ProvisioningStatusInstance) => any | ||
): Promise<ProvisioningStatusInstance>; | ||
|
||
/** | ||
* Provide a user-friendly representation | ||
*/ | ||
toJSON(): any; | ||
[inspect.custom](_depth: any, options: InspectOptions): any; | ||
} | ||
|
||
export interface ProvisioningStatusContextSolution {} | ||
|
||
export class ProvisioningStatusContextImpl | ||
implements ProvisioningStatusContext | ||
{ | ||
protected _solution: ProvisioningStatusContextSolution; | ||
protected _uri: string; | ||
|
||
constructor(protected _version: V1) { | ||
this._solution = {}; | ||
this._uri = `/account/provision/status`; | ||
} | ||
|
||
fetch( | ||
callback?: (error: Error | null, item?: ProvisioningStatusInstance) => any | ||
): Promise<ProvisioningStatusInstance> { | ||
const instance = this; | ||
let operationVersion = instance._version, | ||
operationPromise = operationVersion.fetch({ | ||
uri: instance._uri, | ||
method: "get", | ||
}); | ||
|
||
operationPromise = operationPromise.then( | ||
(payload) => new ProvisioningStatusInstance(operationVersion, payload) | ||
); | ||
|
||
operationPromise = instance._version.setPromiseCallback( | ||
operationPromise, | ||
callback | ||
); | ||
return operationPromise; | ||
} | ||
|
||
/** | ||
* Provide a user-friendly representation | ||
* | ||
* @returns Object | ||
*/ | ||
toJSON() { | ||
return this._solution; | ||
} | ||
|
||
[inspect.custom](_depth: any, options: InspectOptions) { | ||
return inspect(this.toJSON(), options); | ||
} | ||
} | ||
|
||
interface ProvisioningStatusPayload extends ProvisioningStatusResource {} | ||
|
||
interface ProvisioningStatusResource { | ||
status: ProvisioningStatusStatus; | ||
url: string; | ||
} | ||
|
||
export class ProvisioningStatusInstance { | ||
protected _solution: ProvisioningStatusContextSolution; | ||
protected _context?: ProvisioningStatusContext; | ||
|
||
constructor(protected _version: V1, payload: ProvisioningStatusResource) { | ||
this.status = payload.status; | ||
this.url = payload.url; | ||
|
||
this._solution = {}; | ||
} | ||
|
||
status: ProvisioningStatusStatus; | ||
/** | ||
* The absolute URL of the resource. | ||
*/ | ||
url: string; | ||
|
||
private get _proxy(): ProvisioningStatusContext { | ||
this._context = | ||
this._context || new ProvisioningStatusContextImpl(this._version); | ||
return this._context; | ||
} | ||
|
||
/** | ||
* Fetch a ProvisioningStatusInstance | ||
* | ||
* @param callback - Callback to handle processed record | ||
* | ||
* @returns Resolves to processed ProvisioningStatusInstance | ||
*/ | ||
fetch( | ||
callback?: (error: Error | null, item?: ProvisioningStatusInstance) => any | ||
): Promise<ProvisioningStatusInstance> { | ||
return this._proxy.fetch(callback); | ||
} | ||
|
||
/** | ||
* Provide a user-friendly representation | ||
* | ||
* @returns Object | ||
*/ | ||
toJSON() { | ||
return { | ||
status: this.status, | ||
url: this.url, | ||
}; | ||
} | ||
|
||
[inspect.custom](_depth: any, options: InspectOptions) { | ||
return inspect(this.toJSON(), options); | ||
} | ||
} | ||
|
||
export interface ProvisioningStatusSolution {} | ||
|
||
export interface ProvisioningStatusListInstance { | ||
_version: V1; | ||
_solution: ProvisioningStatusSolution; | ||
_uri: string; | ||
|
||
(): ProvisioningStatusContext; | ||
get(): ProvisioningStatusContext; | ||
|
||
/** | ||
* Provide a user-friendly representation | ||
*/ | ||
toJSON(): any; | ||
[inspect.custom](_depth: any, options: InspectOptions): any; | ||
} | ||
|
||
export function ProvisioningStatusListInstance( | ||
version: V1 | ||
): ProvisioningStatusListInstance { | ||
const instance = (() => instance.get()) as ProvisioningStatusListInstance; | ||
|
||
instance.get = function get(): ProvisioningStatusContext { | ||
return new ProvisioningStatusContextImpl(version); | ||
}; | ||
|
||
instance._version = version; | ||
instance._solution = {}; | ||
instance._uri = ``; | ||
|
||
instance.toJSON = function toJSON() { | ||
return instance._solution; | ||
}; | ||
|
||
instance[inspect.custom] = function inspectImpl( | ||
_depth: any, | ||
options: InspectOptions | ||
) { | ||
return inspect(instance.toJSON(), options); | ||
}; | ||
|
||
return instance; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.