@raketa-cloud/admin 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/package.json +3 -2
  2. package/src/Adapter.js +1 -4
  3. package/src/cloud/ChangePageURL.js +24 -0
  4. package/src/cloud/ClonesPage.js +14 -0
  5. package/src/cloud/DeletePage.js +35 -0
  6. package/src/cloud/PageChanges.js +15 -0
  7. package/src/cloud/PageRevisions.js +135 -0
  8. package/src/cloud/PageTranslations.js +22 -0
  9. package/src/cloud/Pages.js +63 -0
  10. package/src/cloud/RaketaClient.js +118 -0
  11. package/src/cloud/Redirects.js +81 -0
  12. package/src/cloud/RevertPageRevision.js +18 -0
  13. package/src/cloud/Settings.js +30 -0
  14. package/src/cloud/Tags.js +80 -0
  15. package/src/cloud/documents/articlesDocuments.js +608 -0
  16. package/src/cloud/documents/categoryDocuments.js +64 -0
  17. package/src/cloud/documents/common.js +84 -0
  18. package/src/cloud/documents/pagesDocuments.js +245 -0
  19. package/src/cloud/documents/redirectsDocuments.js +82 -0
  20. package/src/cloud/documents/settingsDocuments.js +23 -0
  21. package/src/cloud/documents/tagsDocuments.js +63 -0
  22. package/src/handlers/PageCloneHandler.js +17 -0
  23. package/src/handlers/PageCloneHandler.test/create.test.js +55 -0
  24. package/src/handlers/PageDeleteHandler.js +68 -0
  25. package/src/handlers/PageDeleteHandler.test/create.test.js +112 -0
  26. package/src/handlers/PageDeleteHandler.test/create_form.test.js +54 -0
  27. package/src/handlers/PageRevisionsCodesHandler.js +83 -0
  28. package/src/handlers/PageRevisionsCodesHandler.test/edit_form.test.js +56 -0
  29. package/src/handlers/PageRevisionsCodesHandler.test/update.test.js +137 -0
  30. package/src/handlers/PageRevisionsGeneralHandler.js +86 -0
  31. package/src/handlers/PageRevisionsGeneralHandler.test/edit_form.test.js +62 -0
  32. package/src/handlers/PageRevisionsGeneralHandler.test/update.test.js +147 -0
  33. package/src/handlers/PageRevisionsHandler.js +47 -0
  34. package/src/handlers/PageRevisionsHandler.test/create.test.js +67 -0
  35. package/src/handlers/PageRevisionsHandler.test/destroy.test.js +54 -0
  36. package/src/handlers/PageRevisionsLockHandler.js +54 -0
  37. package/src/handlers/PageRevisionsMetaHandler.js +83 -0
  38. package/src/handlers/PageRevisionsMetaHandler.test/edit_form.test.js +57 -0
  39. package/src/handlers/PageRevisionsMetaHandler.test/update.test.js +141 -0
  40. package/src/handlers/PageRevisionsTagsHandler.js +80 -0
  41. package/src/handlers/PageRevisionsTagsHandler.test/edit_form.test.js +69 -0
  42. package/src/handlers/PageRevisionsTagsHandler.test/update.test.js +141 -0
  43. package/src/handlers/PageRevisionsUnlockHandler.js +22 -0
  44. package/src/handlers/PageRevisionsVisualsHandler.js +77 -0
  45. package/src/handlers/PageRevisionsVisualsHandler.test/edit_form.test.js +55 -0
  46. package/src/handlers/PageRevisionsVisualsHandler.test/update.test.js +129 -0
  47. package/src/handlers/PageRevisionsWidgetsHandler.js +41 -0
  48. package/src/handlers/PageRevisionsWidgetsHandler.test/show.test.js +47 -0
  49. package/src/handlers/PageRevisionsWidgetsHandler.test/update.test.js +104 -0
  50. package/src/handlers/PageTranslationsHandler.js +91 -0
  51. package/src/handlers/PageURLsHandler.js +69 -0
  52. package/src/handlers/PageURLsHandler.test/create.test.js +157 -0
  53. package/src/handlers/PageURLsHandler.test/create_form.test.js +51 -0
  54. package/src/handlers/PagesHandler.js +114 -0
  55. package/src/handlers/PagesHandler.test/create.test.js +140 -0
  56. package/src/handlers/PagesHandler.test/create_form.test.js +41 -0
  57. package/src/handlers/PagesHandler.test/index.test.js +49 -0
  58. package/src/handlers/PagesHandler.test/show.test.js +103 -0
  59. package/src/handlers/PublishPageRevisionHandler.js +84 -0
  60. package/src/handlers/PublishPageRevisionHandler.test/create.test.js +136 -0
  61. package/src/handlers/PublishPageRevisionHandler.test/create_form.test.js +47 -0
  62. package/src/handlers/RedirectsHandler.js +124 -0
  63. package/src/handlers/RedirectsHandler.test/create.test.js +84 -0
  64. package/src/handlers/RedirectsHandler.test/create_form.test.js +29 -0
  65. package/src/handlers/RedirectsHandler.test/destroy.test.js +54 -0
  66. package/src/handlers/RedirectsHandler.test/edit_form.test.js +38 -0
  67. package/src/handlers/RedirectsHandler.test/index.test.js +42 -0
  68. package/src/handlers/RedirectsHandler.test/show.test.js +41 -0
  69. package/src/handlers/RedirectsHandler.test/update.test.js +89 -0
  70. package/src/handlers/RevertPageRevisionHandler.js +26 -0
  71. package/src/handlers/RevertPageRevisionHandler.test/create.test.js +80 -0
  72. package/src/handlers/SettingsGeneralHandler.js +13 -0
  73. package/src/handlers/SettingsLayoutHandler.js +51 -0
  74. package/src/handlers/SettingsMetaHandler.js +52 -0
  75. package/src/handlers/TagsHandler.js +113 -0
  76. package/src/helpers/FormBuilder.js +12 -4
  77. package/src/index.js +33 -0
  78. package/src/setupAuthentication.js +1 -1
  79. package/src/styles/application.css +55 -19
  80. package/src/views/layouts/application.ejs +30 -31
  81. package/src/views/layouts/header.ejs +5 -6
  82. package/src/views/page_deletes/create_form.ejs +55 -0
  83. package/src/views/page_lock/create_form.ejs +35 -0
  84. package/src/views/page_publish/_form.ejs +57 -0
  85. package/src/views/page_publish/create_form.ejs +11 -0
  86. package/src/views/page_revisions/_nav.ejs +40 -0
  87. package/src/views/page_revisions/codes/edit_form.ejs +39 -0
  88. package/src/views/page_revisions/general/edit_form.ejs +69 -0
  89. package/src/views/page_revisions/meta/edit_form.ejs +41 -0
  90. package/src/views/page_revisions/tags/edit_form.ejs +64 -0
  91. package/src/views/page_revisions/visuals/edit_form.ejs +42 -0
  92. package/src/views/page_translations/_form.ejs +76 -0
  93. package/src/views/page_translations/create_form.ejs +11 -0
  94. package/src/views/page_urls/create_form.ejs +31 -0
  95. package/src/views/pages/_form.ejs +84 -0
  96. package/src/views/pages/create_form.ejs +9 -0
  97. package/src/views/pages/edit_form.ejs +3 -0
  98. package/src/views/pages/index.ejs +161 -0
  99. package/src/views/pages/show.ejs +281 -0
  100. package/src/views/redirects/_form.ejs +40 -0
  101. package/src/views/redirects/create_form.ejs +9 -0
  102. package/src/views/redirects/edit_form.ejs +9 -0
  103. package/src/views/redirects/index.ejs +75 -1
  104. package/src/views/redirects/show.ejs +60 -0
  105. package/src/views/settings/_nav.ejs +28 -0
  106. package/src/views/settings/general/edit_form.ejs +26 -0
  107. package/src/views/settings/layout/edit_form.ejs +22 -0
  108. package/src/views/settings/meta/edit_form.ejs +38 -0
  109. package/src/views/tags/_form.ejs +39 -0
  110. package/src/views/tags/create_form.ejs +9 -0
  111. package/src/views/tags/edit_form.ejs +9 -0
  112. package/src/views/tags/index.ejs +43 -0
  113. package/test/factory.js +91 -0
  114. package/test/handlersHelper.js +9 -0
@@ -0,0 +1,60 @@
1
+ <div class="page-wrapper">
2
+ <div class="page-title">
3
+ <h1 class="heading-1">Redirect details</h1>
4
+
5
+ <div class="actions-toolbar">
6
+ <a href="<%= `/${_context.locale}/redirects` %>" class="btn-secondary">Back to list</a>
7
+ </div>
8
+ </div>
9
+
10
+ <h2 class="heading-2 mb-4">Details</h2>
11
+
12
+ <table class="data-grid w-[500px] mb-4">
13
+ <tbody>
14
+ <tr>
15
+ <th class="w-1 whitespace-nowrap">Original URL</th>
16
+ <td><%= item.url %></td>
17
+ </tr>
18
+ <tr>
19
+ <th class="w-1 whitespace-nowrap">DestinationL</th>
20
+ <td><%= item.destination %> </td>
21
+ </tr>
22
+ <tr>
23
+ <th class="w-1 whitespace-nowrap">HTTP response code</th>
24
+ <td><%= item.httpResponseCode %></td>
25
+ </tr>
26
+ <tr>
27
+ <th class="w-1 whitespace-nowrap">Note</th>
28
+ <td><%= item.note %></td>
29
+ </tr>
30
+ <tr>
31
+ <th class="w-1 whitespace-nowrap">Updated at</th>
32
+ <td><%= new Date(item.updatedAt).toLocaleString('en-GB', { dateStyle: "short", timeStyle: "short" }) %></td>
33
+ </tr>
34
+ </tbody>
35
+ </table>
36
+
37
+ <h2 class="heading-2 mb-4">History</h2>
38
+
39
+ <table class="data-grid mb-4">
40
+ <thead>
41
+ <tr>
42
+ <th>Version</th>
43
+ <th>Title</th>
44
+ <th>Operator</th>
45
+ <th>Created at</th>
46
+ </tr>
47
+ </thead>
48
+
49
+ <tbody>
50
+ <% history.list.forEach((item) => {%>
51
+ <tr>
52
+ <td><%= item.version %></td>
53
+ <td><%= item.title %></td>
54
+ <td><%= item.operatorMeta.name %></td>
55
+ <td><%= new Date(item.insertedAt).toLocaleString('en-GB', { dateStyle: "short", timeStyle: "short" }) %></td>
56
+ </tr>
57
+ <% }) %>
58
+ </tbody>
59
+ </table>
60
+ </div>
@@ -0,0 +1,28 @@
1
+ <%
2
+ const activeClass = "relative top-0.5 px-4 border-b-2 border-raketa-primary pb-4";
3
+ const inactiveClass = "relative top-0.5 px-4 border-b-2 border-transparent pb-4";
4
+ %>
5
+
6
+ <div class="flex w-full pb-4">
7
+ <div class="flex items-center justify-between mb-4">
8
+ <div class="flex items-center border-b-2">
9
+ <div class=" <%= active === 'general' ? activeClass : inactiveClass %>">
10
+ <a href="<%= `/${_context.locale}/settings/general/edit` %>" class="text-raketa-primary font-semibold">
11
+ General
12
+ </a>
13
+ </div>
14
+
15
+ <div class="<%= active === 'meta' ? activeClass : inactiveClass %>">
16
+ <a href="<%= `/${_context.locale}/settings/meta/edit` %>" class="text-raketa-primary font-semibold">
17
+ Meta and OpenGraph
18
+ </a>
19
+ </div>
20
+
21
+ <div class="<%= active === 'layout' ? activeClass : inactiveClass %>">
22
+ <a href="<%= `/${_context.locale}/settings/layout/edit` %>" class="text-raketa-primary font-semibold">
23
+ Layout and Navigation
24
+ </a>
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </div>
@@ -0,0 +1,26 @@
1
+ <div class="page-wrapper">
2
+ <div class="page-title">
3
+ <h1 class="heading-1">General</h1>
4
+ </div>
5
+
6
+ <%- include('../_nav.ejs', { active: 'general' }) %>
7
+
8
+ <div class="grid gap-4 md:grid-cols-3">
9
+ <div></div>
10
+
11
+ <div>
12
+ <div class="help">
13
+ <div class="mb-2 flex items-center gap-1">
14
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
15
+ <path stroke-linecap="round" stroke-linejoin="round" d="m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z" />
16
+ </svg>
17
+
18
+ <h3 class="heading-3">Contextual help</h3>
19
+ </div>
20
+
21
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore nostrum fugit sint sunt distinctio ut cum, corrupti ad error, quo labore minima. Reprehenderit quasi maxime repudiandae voluptatum commodi saepe molestiae?</p>
22
+ </div>
23
+ </div>
24
+ </div>
25
+
26
+ </div>
@@ -0,0 +1,22 @@
1
+ <div class="page-wrapper">
2
+ <div class="page-title">
3
+ <h1 class="heading-1">Layout and Navigation Settings</h1>
4
+ </div>
5
+
6
+ <%- include('../_nav.ejs', { active: 'layout' }) %>
7
+
8
+ <div>
9
+ <% form_for({ layout_settings }, errors, (f) => { %>
10
+ <form action="<%= `/${_context.locale}/settings/layout` %>" method="post" class="form">
11
+ <%- f.field('layout_settings.header', {as: "textarea"}) %>
12
+ <%- f.field('layout_settings.footer', {as: "textarea"}) %>
13
+
14
+ <div class="form-actions">
15
+ <div class="btn-toolbar">
16
+ <%- f.submit('Save', { class: 'btn-primary' }) %>
17
+ </div>
18
+ </div>
19
+ </form>
20
+ <% }) %>
21
+ </div>
22
+ </div>
@@ -0,0 +1,38 @@
1
+ <div class="page-wrapper">
2
+ <div class="page-title">
3
+ <h1 class="heading-1">Meta and OpenGraph</h1>
4
+ </div>
5
+
6
+ <%- include('../_nav.ejs', { active: 'meta' }) %>
7
+
8
+ <div class="grid gap-4 md:grid-cols-3">
9
+ <% form_for({ meta_settings }, errors, (f) => { %>
10
+ <form action="<%= `/${_context.locale}/settings/meta` %>" method="post" class="form">
11
+ <%- f.field('meta_settings.title') %>
12
+ <%- f.field('meta_settings.description', {as: "textarea"}) %>
13
+
14
+ <raketa-image-picker name="meta_settings[image]" value="<%= JSON.stringify(meta_settings.image) %>"></raketa-image-picker>
15
+
16
+ <div class="form-actions">
17
+ <div class="btn-toolbar">
18
+ <%- f.submit('Save', { class: 'btn-primary' }) %>
19
+ </div>
20
+ </div>
21
+ </form>
22
+ <% }) %>
23
+
24
+ <div>
25
+ <div class="help">
26
+ <div class="mb-2 flex items-center gap-1">
27
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
28
+ <path stroke-linecap="round" stroke-linejoin="round" d="m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z" />
29
+ </svg>
30
+
31
+ <h3 class="heading-3">Contextual help</h3>
32
+ </div>
33
+
34
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore nostrum fugit sint sunt distinctio ut cum, corrupti ad error, quo labore minima. Reprehenderit quasi maxime repudiandae voluptatum commodi saepe molestiae?</p>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ </div>
@@ -0,0 +1,39 @@
1
+ <% form_for({ tag }, errors, (f) => { %>
2
+
3
+ <form action="<%= tag?.id ? `/${_context.locale}/tags/${tag.id}` : `/${_context.locale}/tags` %>" method="post" class="form">
4
+ <%- f.field('tag.name') %>
5
+ <%- f.field('tag.slug') %>
6
+
7
+ <div class="form-actions">
8
+ <div class="btn-toolbar">
9
+ <%- f.submit('Save', { class: 'btn-primary' }) %>
10
+
11
+ <a href="<%= `/${_context.locale}/tags` %>" class="btn-secondary">Cancel</a>
12
+ </div>
13
+
14
+ <% if (tag?.id) {%>
15
+ <button hx-delete="<%= `/${_context.locale}/tags/${tag.id}` %>" hx-confirm="Are you sure?" class="btn-danger has-icon">
16
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
17
+ <path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
18
+ </svg>
19
+
20
+ Delete
21
+ </button>
22
+ <% } %>
23
+ </div>
24
+ </form>
25
+ <% }) %>
26
+
27
+ <div>
28
+ <div class="help">
29
+ <div class="flex items-center gap-1 mb-2">
30
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
31
+ <path stroke-linecap="round" stroke-linejoin="round" d="m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z" />
32
+ </svg>
33
+
34
+ <h3 class="heading-3">Contextual help</h3>
35
+ </div>
36
+
37
+ <p>Tags form</p>
38
+ </div>
39
+ </div>
@@ -0,0 +1,9 @@
1
+ <div class="page-wrapper">
2
+ <div class="page-title">
3
+ <h1 class="heading-1">Create new</h1>
4
+ </div>
5
+
6
+ <div class="grid gap-4 md:grid-cols-3">
7
+ <%- include('_form.ejs') %>
8
+ </div>
9
+ </div>
@@ -0,0 +1,9 @@
1
+ <div class="page-wrapper">
2
+ <div class="page-title">
3
+ <h1 class="heading-1">Edit</h1>
4
+ </div>
5
+
6
+ <div class="grid gap-4 md:grid-cols-3">
7
+ <%- include('_form.ejs') %>
8
+ </div>
9
+ </div>
@@ -0,0 +1,43 @@
1
+ <div class="page-wrapper">
2
+ <div class="page-title">
3
+ <h1 class="heading-1">Tags</h1>
4
+
5
+ <div class="actions-toolbar">
6
+ <form action="<%= `/${_context.locale}/tags` %>" method="GET" class="inline-form">
7
+ <button type="submit">
8
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="size-4">
9
+ <path fill-rule="evenodd" d="M9 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM2 9a7 7 0 1 1 12.452 4.391l3.328 3.329a.75.75 0 1 1-1.06 1.06l-3.329-3.328A7 7 0 0 1 2 9Z" clip-rule="evenodd" />
10
+ </svg>
11
+
12
+ </button>
13
+ <input type="search" placeholder="Search by name..." name="f:name" value="<%= _context.query["f:name"] %>" />
14
+ <input type="hidden" name="order_direction" value="<%= _context.query.order_direction %>" />
15
+ <input type="hidden" name="order_by" value="<%= _context.query.order_by %>" />
16
+ </form>
17
+
18
+ <a href="<%= `/${_context.locale}/tags/new` %>" class="btn-primary">
19
+ Create new
20
+ </a>
21
+ </div>
22
+ </div>
23
+
24
+ <table class="data-grid">
25
+ <thead>
26
+ <th><%- sort_button("Name", "name", _context) %></th>
27
+ <th><%- sort_button("slug", "slug", _context) %></th>
28
+ </thead>
29
+
30
+ <tbody>
31
+ <% items.list.forEach((item, idx)=> { %>
32
+ <tr>
33
+ <td>
34
+ <a href="<%= `/${_context.locale}/tags/${item.id}/edit` %>" class="btn-text"><%= item.name %></a>
35
+ </td>
36
+ <td><%= item.slug %></td>
37
+ </tr>
38
+ <% }); %>
39
+ </tbody>
40
+ </table>
41
+
42
+ <%- pagination(items.pagination, _context) %>
43
+ </div>
@@ -0,0 +1,91 @@
1
+ const REVISION_META = {
2
+ id: "1",
3
+ title: "New revision",
4
+ description: "Some revision meta description",
5
+ operator: "7a456cdd-7278-4610-8b82-5b93cfcae396",
6
+ operatorMeta: {
7
+ name: "Jane Doe",
8
+ roles: [],
9
+ active: true,
10
+ avatar: "",
11
+ user_pool: "Raketa",
12
+ user_pool_id: "some-user-pool-slug",
13
+ },
14
+ };
15
+
16
+ const PAGE = {
17
+ id: "2",
18
+ slug: "page-revision",
19
+ title: "Page Revision",
20
+ widgets: [],
21
+ settings: {
22
+ meta: {
23
+ title: "Open graph",
24
+ description: "Open graph???",
25
+ image: {},
26
+ },
27
+ },
28
+ visibility: "public",
29
+ originalId: null,
30
+ insertedAt: "2024-08-30T19:05:00Z",
31
+ tags: [],
32
+ pageType: {},
33
+ categories: [],
34
+ };
35
+
36
+ const PAGE_CHANGE = {
37
+ version: "1",
38
+ title: "A cool page change",
39
+ operator: "some-operator-id",
40
+ operatorMeta: {
41
+ id: "some-operator-id",
42
+ email: "john@example.com",
43
+ name: "John DOe",
44
+ },
45
+ description: "A cool page change description",
46
+ insertedAt: "2024-08-30T19:05:00Z",
47
+ };
48
+
49
+ const Tag = {
50
+ id: "42",
51
+ slug: "tag",
52
+ name: "Tag",
53
+ };
54
+
55
+ const FIXTURES = {
56
+ redirect: {
57
+ id: "1",
58
+ url: "/test",
59
+ destination: "/test-2",
60
+ httpResponseCode: 302,
61
+ note: "Note",
62
+ updatedAt: "2024-08-30T19:05:00Z",
63
+ createdAt: "2024-08-30T19:00:00Z",
64
+ },
65
+ revision_meta: { ...REVISION_META },
66
+ page: { ...PAGE },
67
+ page_revision: { ...PAGE, meta: { ...REVISION_META }, originalId: "1" },
68
+ page_change: { ...PAGE_CHANGE },
69
+ settings: { value: {} },
70
+ tag: Tag,
71
+ pagination: {
72
+ currentPage: 1,
73
+ pagesCount: 1,
74
+ entriesCount: 1,
75
+ pageSize: 25,
76
+ },
77
+ };
78
+
79
+ function build(type, params = {}) {
80
+ const entity = FIXTURES[type];
81
+
82
+ if (!entity) {
83
+ throw new Error(`No fixture for entity of type ${type}`);
84
+ }
85
+
86
+ return { ...entity, ...params };
87
+ }
88
+
89
+ export default {
90
+ build: build,
91
+ };
@@ -0,0 +1,9 @@
1
+ function testConfig() {
2
+ return {
3
+ instanceURL: "https://example.com/dispatch",
4
+ project: "1-test-project",
5
+ service: "1-test-dxp-private",
6
+ };
7
+ }
8
+
9
+ export { testConfig };