Skip to content

Commit

Permalink
Merge pull request #174 from skedify/develop
Browse files Browse the repository at this point in the history
release/next
  • Loading branch information
gevalo1 authored Jun 5, 2020
2 parents a5c5ca6 + 96635ae commit 56cd56e
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 13 deletions.
35 changes: 28 additions & 7 deletions src/__snapshots__/Skedify.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ exports[`API API/Resources should throw an error when include is used before the

exports[`API API/Resources should throw an error when including a value but there are no includes defined on the resource 1`] = `"[RESOURCE]: You tried to call \`.include(\\"invalid\\")\` but there are no includes defined for timetable."`;

exports[`API API/Resources should throw an error when including a value that is not defined on the resource 1`] = `"[RESOURCE]: You tried to call \`.include(\\"invalid\\")\` but the only valid includes for subjects are \`questions\`, \`subject_category\`, \`languages\`, \`languages.translations\`, \`lead_segments\`, \`availability_settings\`, \`outcome_list\`, \`outcome_list.outcomes\` and \`outcome_list.outcome_outcome_lists\`."`;
exports[`API API/Resources should throw an error when including a value that is not defined on the resource 1`] = `"[RESOURCE]: You tried to call \`.include(\\"invalid\\")\` but the only valid includes for subjects are \`questions\`, \`subject_category\`, \`languages\`, \`languages.translations\`, \`lead_segments\`, \`availability_settings\`, \`completion_outcome_list\`, \`completion_outcome_list.outcomes\`, \`completion_outcome_list.outcome_outcome_lists\`, \`customer_cancellation_outcome_list\`, \`customer_cancellation_outcome_list.outcomes\`, \`customer_cancellation_outcome_list.outcome_outcome_lists\`, \`contact_cancellation_outcome_list\`, \`contact_cancellation_outcome_list.outcomes\` and \`contact_cancellation_outcome_list.outcome_outcome_lists\`."`;

exports[`API API/Response should normalize the response when the call fails 1`] = `
Object {
Expand Down Expand Up @@ -1036,6 +1036,15 @@ Object {
"availability_settings": Object {
"toString": [Function],
},
"completion_outcome_list": Object {
"outcome_outcome_lists": Object {
"toString": [Function],
},
"outcomes": Object {
"toString": [Function],
},
"toString": [Function],
},
"contact": Object {
"employee": Object {
"toString": [Function],
Expand All @@ -1045,6 +1054,15 @@ Object {
"toString": [Function],
},
},
"contact_cancellation_outcome_list": Object {
"outcome_outcome_lists": Object {
"toString": [Function],
},
"outcomes": Object {
"toString": [Function],
},
"toString": [Function],
},
"contact_office": Object {
"contact": Object {
"toString": [Function],
Expand Down Expand Up @@ -1111,6 +1129,15 @@ Object {
"customer": Object {
"toString": [Function],
},
"customer_cancellation_outcome_list": Object {
"outcome_outcome_lists": Object {
"toString": [Function],
},
"outcomes": Object {
"toString": [Function],
},
"toString": [Function],
},
"day_template": Object {
"day_time_slots": Object {
"toString": [Function],
Expand Down Expand Up @@ -1202,12 +1229,6 @@ Object {
"toString": [Function],
},
"outcome_list": Object {
"outcome_outcome_lists": Object {
"toString": [Function],
},
"outcomes": Object {
"toString": [Function],
},
"toString": [Function],
},
"outcome_lists": Object {
Expand Down
12 changes: 9 additions & 3 deletions src/resources/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1254,9 +1254,15 @@ Object {
"languages.translations",
"lead_segments",
"availability_settings",
"outcome_list",
"outcome_list.outcomes",
"outcome_list.outcome_outcome_lists",
"completion_outcome_list",
"completion_outcome_list.outcomes",
"completion_outcome_list.outcome_outcome_lists",
"customer_cancellation_outcome_list",
"customer_cancellation_outcome_list.outcomes",
"customer_cancellation_outcome_list.outcome_outcome_lists",
"contact_cancellation_outcome_list",
"contact_cancellation_outcome_list.outcomes",
"contact_cancellation_outcome_list.outcome_outcome_lists",
],
"allowed_methods": Array [
"*",
Expand Down
15 changes: 12 additions & 3 deletions src/resources/subjects.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,18 @@ export const subjects = createResourceDescription(
'languages.translations',
'lead_segments',
'availability_settings',
'outcome_list',
'outcome_list.outcomes',
'outcome_list.outcome_outcome_lists',

'completion_outcome_list',
'completion_outcome_list.outcomes',
'completion_outcome_list.outcome_outcome_lists',

'customer_cancellation_outcome_list',
'customer_cancellation_outcome_list.outcomes',
'customer_cancellation_outcome_list.outcome_outcome_lists',

'contact_cancellation_outcome_list',
'contact_cancellation_outcome_list.outcomes',
'contact_cancellation_outcome_list.outcome_outcome_lists',
],
filters: [
'category_id',
Expand Down

0 comments on commit 56cd56e

Please sign in to comment.