-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db3c5db
commit 93dc4e7
Showing
44 changed files
with
168 additions
and
121 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
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
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
13 changes: 13 additions & 0 deletions
13
packages/fax/src/models/v3/errors/call-error/call-error.ts
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 @@ | ||
/** | ||
* There was a problem with the phone line. The call could not be placed. Many times you can just try again | ||
*/ | ||
export interface CallError { | ||
/** Type of error for the Call */ | ||
errorType?: 'CALL_ERROR'; | ||
/** A developer-facing error message */ | ||
errorMessage?: string; | ||
/** The error code returned describing the error of the call */ | ||
errorCode?: CallErrorCodeEnum; | ||
} | ||
|
||
export type CallErrorCodeEnum = '11' | '15' | '16' | '17' | '19' | '30' | '32' | '34' | '43' | '49' | string; |
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 @@ | ||
export type { CallError, CallErrorCodeEnum } from './call-error'; |
14 changes: 14 additions & 0 deletions
14
packages/fax/src/models/v3/errors/document-conversion-error/document-conversion-error.ts
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,14 @@ | ||
/** | ||
* Conversion errors usually occur when there is a problem with one of the files you posted. | ||
*/ | ||
export interface DocumentConversionError { | ||
/** Type of error for the Document conversion */ | ||
errorType?: 'DOCUMENT_CONVERSION_ERROR'; | ||
/** The error message */ | ||
errorMessage?: string; | ||
/** The error code returned during document conversion. */ | ||
errorCode?: DocumentConversionErrorCodeEnum; | ||
} | ||
|
||
export type DocumentConversionErrorCodeEnum = '4' | '54' | '55' | '57' | '69' | '122' | ||
| '128' | '129' | '130' | '133 | string'; |
1 change: 1 addition & 0 deletions
1
packages/fax/src/models/v3/errors/document-conversion-error/index.ts
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 @@ | ||
export type { DocumentConversionError, DocumentConversionErrorCodeEnum } from './document-conversion-error'; |
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,16 @@ | ||
/** | ||
* A problem occurred during the fax communication process. | ||
*/ | ||
export interface FaxError { | ||
/** Type of error for the fax */ | ||
errorType?: 'FAX_ERROR'; | ||
/** A developer-facing error message */ | ||
errorMessage?: string; | ||
/** The error code returned describing the error of the call */ | ||
errorCode?: FaxErrorCodeEnum; | ||
} | ||
|
||
export type FaxErrorCodeEnum = '6' | '7' | '8' | '10' | '12' | '13' | '14' | '18' | ||
| '20' | '21' | '22' | '25' | '26' | '28' | '29' | '31' | '38' | '40' | '41' | ||
| '44' | '46' | '48' | '53' | '60' | '63' | '68' | '75' | '76' | '77' | '79' | ||
| '80' | '82' | '84' | '113' | '117' | '119' | '131' | '132' | string; |
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 @@ | ||
export type { FaxError, FaxErrorCodeEnum } from './fax-error'; |
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,3 @@ | ||
export * from './call-error'; | ||
export * from './document-conversion-error'; | ||
export * from './fax-error'; |
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,8 +1,12 @@ | ||
import { FaxBase64FileType, validBase64FileTypes } from './enums'; | ||
|
||
export const convertToSupportedFileType = (fileType: string | undefined): FaxBase64FileType | undefined => { | ||
if (!fileType || !validBase64FileTypes.includes(fileType.toUpperCase() as FaxBase64FileType)) { | ||
if (!fileType) { | ||
console.warn('No file extension has been defined.'); | ||
return undefined; | ||
} | ||
if (!validBase64FileTypes.includes(fileType.toUpperCase() as FaxBase64FileType)) { | ||
console.warn(`The file extension "${fileType.toUpperCase()}" is not supported.`); | ||
} | ||
return fileType.toUpperCase() as FaxBase64FileType; | ||
}; |
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
File renamed without changes.
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,3 +1,3 @@ | ||
export * from './emails/emails-request-data'; | ||
export * from './fax-to-email/fax-to-email-request-data'; | ||
export * from './faxes/faxes-request-data'; | ||
export * from './services/services-request-data'; |
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
packages/fax/src/models/v3/service-email-settings/service-email-settings.ts
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
packages/fax/src/models/v3/service-phone-number/service-phone-number.ts
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.