-
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.
DEVEXP-642: Update types and refactor transformers
- Loading branch information
1 parent
37bd4a1
commit bdae0d0
Showing
31 changed files
with
467 additions
and
494 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export type YesNoEnum = boolean | 'yes' | 'no'; | ||
|
||
export type YesNoHtmlonlyEnum = YesNoEnum | 'htmlonly'; |
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 FormData = require('form-data'); | ||
|
||
export const appendFilteredPropertiesToFormData = ( | ||
obj: Record<string, any>, | ||
prefix: string, | ||
formData: FormData, | ||
) => { | ||
for (const [key, value] of Object.entries(obj)) { | ||
if (key.startsWith(prefix) && value != null) { | ||
formData.append(key, String(value)); | ||
} | ||
} | ||
}; |
1 change: 1 addition & 0 deletions
1
packages/mailgun/src/models/v1/emails/request/override-properties/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 |
---|---|---|
@@ -1 +1,2 @@ | ||
export type { OverrideProperties } from './override-properties'; | ||
export { appendOverridePropertiesToFormData } from './override-properties'; |
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
1 change: 1 addition & 0 deletions
1
packages/mailgun/src/models/v1/emails/request/send-email-request/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 |
---|---|---|
@@ -1 +1,2 @@ | ||
export type { SendEmailRequest } from './send-email-request'; | ||
export { transformSendEmailRequestIntoApiRequestBody } from './send-email-request'; |
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
1 change: 1 addition & 0 deletions
1
packages/mailgun/src/models/v1/emails/request/send-mime-email-request/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 |
---|---|---|
@@ -1 +1,2 @@ | ||
export type { SendMimeEmailRequest } from './send-mime-email-request'; | ||
export { transformSendMimeEmailRequestIntoApiRequestBody } from './send-mime-email-request'; |
Oops, something went wrong.