-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update resources method names and missing d types
- Loading branch information
1 parent
0a90d88
commit e477fe9
Showing
36 changed files
with
1,177 additions
and
347 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.0.0-alpha.3 | ||
2.0.0-alpha.4 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,6 +1,12 @@ | ||
import TelnyxResource from '../TelnyxResource'; | ||
const telnyxMethod = TelnyxResource.method; | ||
|
||
export const Connections = TelnyxResource.extend({ | ||
path: 'connections', | ||
includeBasic: ['list', 'retrieve'], | ||
|
||
listActiveCalls: telnyxMethod({ | ||
method: 'GET', | ||
path: '/{connection_id}/active_calls', | ||
}), | ||
}); |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,53 +1,21 @@ | ||
import TelnyxResource from '../TelnyxResource'; | ||
import * as utils from '../utils'; | ||
const telnyxMethod = TelnyxResource.method; | ||
|
||
import {ResponsePayload, TelnyxObject} from '../Types'; | ||
|
||
function transformResponseData( | ||
response: ResponsePayload, | ||
telnyx: TelnyxObject, | ||
) { | ||
return utils.addResourceToResponseData(response, telnyx, 'documents', {}); | ||
} | ||
const telnyxMethod = TelnyxResource.method; | ||
|
||
export const Documents = TelnyxResource.extend({ | ||
path: 'documents', | ||
list: telnyxMethod({ | ||
method: 'GET', | ||
transformResponseData: transformResponseData, | ||
}), | ||
update: telnyxMethod({ | ||
method: 'PATCH', | ||
path: '/{id}', | ||
urlParams: ['id'], | ||
transformResponseData: transformResponseData, | ||
}), | ||
del: telnyxMethod({ | ||
method: 'DELETE', | ||
path: '{id}', | ||
urlParams: ['id'], | ||
transformResponseData: transformResponseData, | ||
}), | ||
includeBasic: ['list', 'update', 'del', 'create', 'retrieve'], | ||
|
||
upload: telnyxMethod({ | ||
method: 'POST', | ||
transformResponseData: transformResponseData, | ||
}), | ||
retrieveDocumentId: telnyxMethod({ | ||
method: 'GET', | ||
path: '/{id}', | ||
urlParams: ['id'], | ||
|
||
transformResponseData: transformResponseData, | ||
}), | ||
retrieveDownloadDocument: telnyxMethod({ | ||
download: telnyxMethod({ | ||
method: 'GET', | ||
path: '/{id}/download', | ||
urlParams: ['id'], | ||
headers: { | ||
'Content-Type': '*', | ||
}, | ||
|
||
transformResponseData: transformResponseData, | ||
}), | ||
}); |
Oops, something went wrong.