Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: reorg docs and add migration guide #1073

Merged
merged 1 commit into from
Mar 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ test/config.js
*.log
.vscode/
prism_darwin_amd64
docs/
prism/
package-lock.json
yarn.lock
*.bak
.idea/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ This library is broken up into several packages as a monorepo so that you only n

<a name="announcements"></a>
# Announcements
**NEW:** If you're a software engineer who is passionate about #DeveloperExperience and/or #OpenSource, [this is an incredible opportunity to join our #DX team](https://sendgrid.com/careers/role/1421152/?gh_jid=1421152) as a Developer Experience Engineer and work with [@thinkingserious](https://github.com/thinkingserious) and [@aroach](https://github.com/aroach)! Tell your friends :)
**NEW:** **BREAKING CHANGE:** Please see the [Twilio SendGrid Node.js Migration Guide 6.X.X -> 7.X.X](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/migration-guides/migrating-from-version-6-to-7.md) for details.

All updates to this library are documented in our [CHANGELOG](https://github.com/sendgrid/sendgrid-nodejs/blob/master/CHANGELOG.md) and [releases](https://github.com/sendgrid/sendgrid-nodejs/releases). You may also subscribe to email [release notifications](https://dx.sendgrid.com/newsletter/nodejs) for releases and breaking changes.

Expand Down
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions docs/migration-guides/migrating-from-version-6-to-7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
This guide relates to changes implemented in [PR 1058](https://github.com/sendgrid/sendgrid-nodejs/pull/1058).

The [request](https://github.com/request/request#deprecated) HTTP client was deprecated as of Feb 11th 2020. We have updated this helper library with the [axios](https://www.npmjs.com/package/axios) HTTP client.

In version 6.X.X, our `ClientRequest` and `ClientResponse` types exposed the raw interfaces from the `request` module directly. In version 7.X.X, the [`ClientRequest`](https://github.com/sendgrid/sendgrid-nodejs/blob/master/packages/helpers/classes/request.d.ts) and [`ClientResponse`](https://github.com/sendgrid/sendgrid-nodejs/blob/master/packages/helpers/classes/response.d.ts) objects untethers from a specific HTTP client implementation. We have maintained the core request and response interfaces exposed in test cases and usage examples, but mask everything else.

If you are passing in request options, outside of what’s documented, to the HTTP request client, this may be a breaking change for you. Please check the [`RequestOptions` interface](https://github.com/sendgrid/sendgrid-nodejs/blob/master/packages/helpers/classes/request.d.ts) to inspect the updated options. If you rely on HTTP response data [previously available](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/request/index.d.ts#L319), this may also be a breaking change for you. Please see the [`ClientResponse`](https://github.com/sendgrid/sendgrid-nodejs/blob/master/packages/helpers/classes/response.d.ts) object for details about what data is now exposed.

## Action steps:

1. Locate any areas in your code that utilizes request and response properties that are no longer exposed in the new interfaces.
1. Update the response values to use the new [`Response`](https://github.com/sendgrid/sendgrid-nodejs/blob/master/packages/helpers/classes/response.d.ts) object.
1. Update the request values to use the new options exposed in the [`RequestOptions`](https://github.com/sendgrid/sendgrid-nodejs/blob/master/packages/helpers/classes/request.d.ts) object.
44 changes: 22 additions & 22 deletions use-cases/README.md → docs/use-cases/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
This documentation provides examples for specific Twilio SendGrid v3 API use cases. Please [open an issue](https://github.com/sendgrid/sendgrid-nodejs/issues) or make a pull request for any email use cases you would like us to document here. Thank you!

# Email Use Cases
* [Send a Single Email to a Single Recipient](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/single-email-single-recipient.md)
* [Send a Single Email to Multiple Recipients](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/single-email-multiple-recipients.md)
* [Send Multiple Emails to Multiple Recipients](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/multiple-emails-multiple-recipients.md)
* [CC, BCC and Reply To](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/cc-bcc-reply-to.md)
* [Flexible Email Address Fields](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/flexible-address-fields.md)
* [Handling Success/Failure/Errors](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/success-failure-errors.md)
* [Show Email Activity](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/email-activity.md)
* [Advanced Usage](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/advanced.md)
* [Transactional Templates](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/transactional-templates.md)
* [Legacy Transactional Templates](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/transactional-legacy-templates.md)
* [Hide Warnings](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/hide-warnings.md)
* [Attachments](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/attachments.md)
* [Customization Per Recipient](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/customization.md)
* [Manually Providing Content](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/manual-content.md)
* [Specifying Time to Send At](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/time-to-send.md)
* [Specifying Custom Headers](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/custom-headers.md)
* [Specifying Categories](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/categories.md)
* [Timeout](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/timeout.md)
* [Kitchen Sink - an example with all settings used](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/kitchen-sink.md)
* [Send a Single Email to a Single Recipient](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/single-email-single-recipient.md)
* [Send a Single Email to Multiple Recipients](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/single-email-multiple-recipients.md)
* [Send Multiple Emails to Multiple Recipients](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/multiple-emails-multiple-recipients.md)
* [CC, BCC and Reply To](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/cc-bcc-reply-to.md)
* [Flexible Email Address Fields](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/flexible-address-fields.md)
* [Handling Success/Failure/Errors](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/success-failure-errors.md)
* [Show Email Activity](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/email-activity.md)
* [Advanced Usage](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/advanced.md)
* [Transactional Templates](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/transactional-templates.md)
* [Legacy Transactional Templates](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/transactional-legacy-templates.md)
* [Hide Warnings](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/hide-warnings.md)
* [Attachments](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/attachments.md)
* [Customization Per Recipient](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/customization.md)
* [Manually Providing Content](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/manual-content.md)
* [Specifying Time to Send At](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/time-to-send.md)
* [Specifying Custom Headers](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/custom-headers.md)
* [Specifying Categories](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/categories.md)
* [Timeout](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/timeout.md)
* [Kitchen Sink - an example with all settings used](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/kitchen-sink.md)

# Non-Email Use Cases
* [Send a SMS Message](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/sms.md)
* [How to Setup a Domain Whitelabel](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/domain-white-label.md)
* [How to View Email Statistics](https://github.com/sendgrid/sendgrid-nodejs/blob/master/use-cases/email-stats.md)
* [Send a SMS Message](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/sms.md)
* [How to Setup a Domain Whitelabel](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/domain-white-label.md)
* [How to View Email Statistics](https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/email-stats.md)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading