Constructor
new AliasesClient(optionsopt)
Construct an instance of AliasesClient.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
The configuration object. See the subsequent parameters for more details. Properties
|
Members
apiEndpoint
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
port
The port for this API service.
scopes
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
The DNS address for this API service.
Methods
aliasPath(project, sip_domain, alias) → {string}
Return a fully-qualified alias resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
string | |
sip_domain |
string | |
alias |
string |
Returns:
Type | Description |
---|---|
string |
Resource name string. |
callPath(project, call) → {string}
Return a fully-qualified call resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
string | |
call |
string |
Returns:
Type | Description |
---|---|
string |
Resource name string. |
close()
Terminate the GRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
createAlias(request, optionsopt) → {Promise}
Creates a alias.
The caller must have voice.aliases.create
permission on the project.
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
Type | Description |
---|---|
Promise |
|
deleteAlias(request, optionsopt) → {Promise}
Deletes the specified alias.
The caller must have voice.aliases.delete
permission on the project.
Parameters:
Name | Type | Attributes | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
Type | Description |
---|---|
Promise |
|
getAlias(request, optionsopt) → {Promise}
Retrieves a alias identified by the supplied resource name.
The caller must have voice.aliases.get
permission on the project.
Parameters:
Name | Type | Attributes | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
Type | Description |
---|---|
Promise |
|
getProjectId(callback)
Return the project ID used by this class.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function |
the callback to be called with the current project Id. |
initialize() → {Promise}
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns:
Type | Description |
---|---|
Promise |
A promise that resolves to an authenticated service stub. |
listAliases(request, optionsopt) → {Promise}
Lists all Aliases. List returns alias sorted by create_time descending.
The caller must have voice.aliases.list
permission on the project.
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
Type | Description |
---|---|
Promise |
|
listAliasesAsync(request, optionsopt) → {Object}
Equivalent to listAliases, but returns an iterable object.
for-await-of syntax is used with the iterable to recursively get response element on-demand.
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
Type | Description |
---|---|
Object |
An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. |
listAliasesStream(request, optionsopt) → {Stream}
Equivalent to listAliases, but returns a NodeJS Stream object.
This fetches the paged responses for listAliases continuously and invokes the callback registered for 'data' event for each element in the responses.
The returned object has 'end' method when no more elements are required.
autoPaginate option will be ignored.
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
Type | Description |
---|---|
Stream |
An object stream which emits an object representing Alias on 'data' event. |
matchAliasFromAliasName(aliasName) → {string}
Parse the alias from Alias resource.
Parameters:
Name | Type | Description |
---|---|---|
aliasName |
string |
A fully-qualified path representing Alias resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the alias. |
matchCallFromCallName(callName) → {string}
Parse the call from Call resource.
Parameters:
Name | Type | Description |
---|---|---|
callName |
string |
A fully-qualified path representing Call resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the call. |
matchCallFromRecordingName(recordingName) → {string}
Parse the call from Recording resource.
Parameters:
Name | Type | Description |
---|---|---|
recordingName |
string |
A fully-qualified path representing Recording resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the call. |
matchCallFromSipInfoName(sipInfoName) → {string}
Parse the call from SipInfo resource.
Parameters:
Name | Type | Description |
---|---|---|
sipInfoName |
string |
A fully-qualified path representing SipInfo resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the call. |
matchCallFromTranscriptionName(transcriptionName) → {string}
Parse the call from Transcription resource.
Parameters:
Name | Type | Description |
---|---|---|
transcriptionName |
string |
A fully-qualified path representing Transcription resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the call. |
matchProjectFromAliasName(aliasName) → {string}
Parse the project from Alias resource.
Parameters:
Name | Type | Description |
---|---|---|
aliasName |
string |
A fully-qualified path representing Alias resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the project. |
matchProjectFromCallName(callName) → {string}
Parse the project from Call resource.
Parameters:
Name | Type | Description |
---|---|---|
callName |
string |
A fully-qualified path representing Call resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the project. |
matchProjectFromRecordingName(recordingName) → {string}
Parse the project from Recording resource.
Parameters:
Name | Type | Description |
---|---|---|
recordingName |
string |
A fully-qualified path representing Recording resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the project. |
matchProjectFromSipDomainName(sipDomainName) → {string}
Parse the project from SipDomain resource.
Parameters:
Name | Type | Description |
---|---|---|
sipDomainName |
string |
A fully-qualified path representing SipDomain resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the project. |
matchProjectFromSipInfoName(sipInfoName) → {string}
Parse the project from SipInfo resource.
Parameters:
Name | Type | Description |
---|---|---|
sipInfoName |
string |
A fully-qualified path representing SipInfo resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the project. |
matchProjectFromTranscriptionName(transcriptionName) → {string}
Parse the project from Transcription resource.
Parameters:
Name | Type | Description |
---|---|---|
transcriptionName |
string |
A fully-qualified path representing Transcription resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the project. |
matchRecordingFromRecordingName(recordingName) → {string}
Parse the recording from Recording resource.
Parameters:
Name | Type | Description |
---|---|---|
recordingName |
string |
A fully-qualified path representing Recording resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the recording. |
matchSipDomainFromAliasName(aliasName) → {string}
Parse the sip_domain from Alias resource.
Parameters:
Name | Type | Description |
---|---|---|
aliasName |
string |
A fully-qualified path representing Alias resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the sip_domain. |
matchSipDomainFromSipDomainName(sipDomainName) → {string}
Parse the sip_domain from SipDomain resource.
Parameters:
Name | Type | Description |
---|---|---|
sipDomainName |
string |
A fully-qualified path representing SipDomain resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the sip_domain. |
matchTranscriptionFromTranscriptionName(transcriptionName) → {string}
Parse the transcription from Transcription resource.
Parameters:
Name | Type | Description |
---|---|---|
transcriptionName |
string |
A fully-qualified path representing Transcription resource. |
Returns:
Type | Description |
---|---|
string |
A string representing the transcription. |
recordingPath(project, call, recording) → {string}
Return a fully-qualified recording resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
string | |
call |
string | |
recording |
string |
Returns:
Type | Description |
---|---|
string |
Resource name string. |
sipDomainPath(project, sip_domain) → {string}
Return a fully-qualified sipDomain resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
string | |
sip_domain |
string |
Returns:
Type | Description |
---|---|
string |
Resource name string. |
sipInfoPath(project, call) → {string}
Return a fully-qualified sipInfo resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
string | |
call |
string |
Returns:
Type | Description |
---|---|
string |
Resource name string. |
transcriptionPath(project, call, transcription) → {string}
Return a fully-qualified transcription resource name string.
Parameters:
Name | Type | Description |
---|---|---|
project |
string | |
call |
string | |
transcription |
string |
Returns:
Type | Description |
---|---|
string |
Resource name string. |
updateAlias(request, optionsopt) → {Promise}
Updates a alias.
The caller must have voice.aliases.update
permission on the project.
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
Type | Description |
---|---|
Promise |
|