From 14421c307c81448f3975e64f198cc11087adcfd8 Mon Sep 17 00:00:00 2001 From: Demian Dekoninck Date: Wed, 19 Aug 2020 19:36:32 +0200 Subject: [PATCH 1/3] feat: add resources for email templates and email partials --- .../__snapshots__/index.test.js.snap | 24 +++++++++++++++++++ src/resources/emailPartials.js | 5 ++++ src/resources/emailTemplates.js | 5 ++++ src/resources/index.js | 2 ++ 4 files changed, 36 insertions(+) create mode 100644 src/resources/emailPartials.js create mode 100644 src/resources/emailTemplates.js diff --git a/src/resources/__snapshots__/index.test.js.snap b/src/resources/__snapshots__/index.test.js.snap index e3d6d44c..12818e62 100644 --- a/src/resources/__snapshots__/index.test.js.snap +++ b/src/resources/__snapshots__/index.test.js.snap @@ -702,6 +702,30 @@ Object { "resource": "defined_availability", "sub_resources": Object {}, }, + "emailPartials": Object { + "allowed_includes": Array [], + "allowed_methods": Array [ + "*", + ], + "deprecated": false, + "filters": Array [], + "headers": Object {}, + "requires_domain_map": false, + "resource": "email_partials", + "sub_resources": Object {}, + }, + "emailTemplates": Object { + "allowed_includes": Array [], + "allowed_methods": Array [ + "*", + ], + "deprecated": false, + "filters": Array [], + "headers": Object {}, + "requires_domain_map": false, + "resource": "email_templates", + "sub_resources": Object {}, + }, "employeeActivations": Object { "allowed_includes": Array [ "employee", diff --git a/src/resources/emailPartials.js b/src/resources/emailPartials.js new file mode 100644 index 00000000..900f384d --- /dev/null +++ b/src/resources/emailPartials.js @@ -0,0 +1,5 @@ +import createResourceDescription from './util/createResourceDescription' + +export const emailPartials = createResourceDescription('email_partials', { + enable_pagination: false, +}) diff --git a/src/resources/emailTemplates.js b/src/resources/emailTemplates.js new file mode 100644 index 00000000..ad8e5e7a --- /dev/null +++ b/src/resources/emailTemplates.js @@ -0,0 +1,5 @@ +import createResourceDescription from './util/createResourceDescription' + +export const emailTemplates = createResourceDescription('email_templates', { + enable_pagination: false, +}) diff --git a/src/resources/index.js b/src/resources/index.js index 324b3612..ad50a108 100644 --- a/src/resources/index.js +++ b/src/resources/index.js @@ -11,6 +11,8 @@ export * from './contacts' export * from './coverageRegions' export * from './customers' export * from './definedAvailability' +export * from './emailPartials' +export * from './emailTemplates' export * from './employeeActivations' export * from './employees' export * from './enterprises' From b3771c65394e0c583d6cc6cf70e8ac95c481deb1 Mon Sep 17 00:00:00 2001 From: Demian Dekoninck Date: Tue, 25 Aug 2020 16:48:11 +0200 Subject: [PATCH 2/3] add url to the no response rejection --- test/mock.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/mock.js b/test/mock.js index f0fcf80f..db493435 100644 --- a/test/mock.js +++ b/test/mock.js @@ -48,7 +48,7 @@ function mockAdapter(config) { return reject( new Error( - 'There is no response, did you forget to call `mockResponse`? For more info please go to: https://github.com/skedify/sdk-js#testing' + `There is no response for \`${request.url}\`, did you forget to call \`mockResponse\`? For more info please go to: https://github.com/skedify/sdk-js#testing` ) ) }) From f63ce8e6a75615aa90ecf9c9ee993c60570d2017 Mon Sep 17 00:00:00 2001 From: Demian Dekoninck Date: Wed, 3 Mar 2021 19:22:35 +0100 Subject: [PATCH 3/3] feat: add email colors resource --- src/resources/__snapshots__/index.test.js.snap | 12 ++++++++++++ src/resources/emailColors.js | 5 +++++ src/resources/index.js | 1 + 3 files changed, 18 insertions(+) create mode 100644 src/resources/emailColors.js diff --git a/src/resources/__snapshots__/index.test.js.snap b/src/resources/__snapshots__/index.test.js.snap index 12818e62..d9bab011 100644 --- a/src/resources/__snapshots__/index.test.js.snap +++ b/src/resources/__snapshots__/index.test.js.snap @@ -702,6 +702,18 @@ Object { "resource": "defined_availability", "sub_resources": Object {}, }, + "emailColors": Object { + "allowed_includes": Array [], + "allowed_methods": Array [ + "*", + ], + "deprecated": false, + "filters": Array [], + "headers": Object {}, + "requires_domain_map": false, + "resource": "email_colors", + "sub_resources": Object {}, + }, "emailPartials": Object { "allowed_includes": Array [], "allowed_methods": Array [ diff --git a/src/resources/emailColors.js b/src/resources/emailColors.js new file mode 100644 index 00000000..2947666b --- /dev/null +++ b/src/resources/emailColors.js @@ -0,0 +1,5 @@ +import createResourceDescription from './util/createResourceDescription' + +export const emailColors = createResourceDescription('email_colors', { + enable_pagination: false, +}) diff --git a/src/resources/index.js b/src/resources/index.js index ad50a108..42107cea 100644 --- a/src/resources/index.js +++ b/src/resources/index.js @@ -13,6 +13,7 @@ export * from './customers' export * from './definedAvailability' export * from './emailPartials' export * from './emailTemplates' +export * from './emailColors' export * from './employeeActivations' export * from './employees' export * from './enterprises'