workarea-api 4.5.0 → 4.5.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (238) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +103 -0
  3. data/Gemfile +1 -3
  4. data/README.md +1 -1
  5. data/Rakefile +15 -14
  6. data/admin/app/controllers/workarea/api/admin/recommendation_settings_controller.rb +1 -1
  7. data/admin/app/models/workarea/api/admin/date_filtering.rb +0 -3
  8. data/admin/lib/workarea/api/admin.rb +1 -0
  9. data/admin/lib/workarea/api/admin/date_indexes.rb +23 -0
  10. data/admin/lib/workarea/api/admin/engine.rb +2 -0
  11. data/admin/test/integration/workarea/api/admin/recommendation_settings_integration_test.rb +14 -0
  12. data/admin/workarea-api-admin.gemspec +2 -2
  13. data/doc/api/admin/categories/bulk_upserting_categories.json +5 -5
  14. data/doc/api/admin/categories/creating_a_category.json +7 -7
  15. data/doc/api/admin/categories/listing_categories.json +4 -4
  16. data/doc/api/admin/categories/removing_a_category.json +5 -5
  17. data/doc/api/admin/categories/showing_a_category.json +6 -6
  18. data/doc/api/admin/categories/updating_a_category.json +6 -6
  19. data/doc/api/admin/category_product_rules/creating_a_category_product_rule.json +7 -7
  20. data/doc/api/admin/category_product_rules/listing_category_product_rules.json +6 -6
  21. data/doc/api/admin/category_product_rules/removing_a_category_product_rule.json +5 -5
  22. data/doc/api/admin/category_product_rules/updating_a_category_product_rule.json +5 -5
  23. data/doc/api/admin/content/bulk_upserting_content.json +5 -5
  24. data/doc/api/admin/content/creating_content.json +7 -7
  25. data/doc/api/admin/content/listing_content.json +4 -4
  26. data/doc/api/admin/content/showing_content.json +6 -6
  27. data/doc/api/admin/content/updating_content.json +5 -5
  28. data/doc/api/admin/content_assets/bulk_upserting_content_assets.json +5 -5
  29. data/doc/api/admin/content_assets/creating_a_content_asset.json +7 -7
  30. data/doc/api/admin/content_assets/listing_content_assets.json +4 -4
  31. data/doc/api/admin/content_assets/removing_a_content_asset.json +5 -5
  32. data/doc/api/admin/content_assets/showing_a_content_asset.json +6 -6
  33. data/doc/api/admin/content_assets/updating_a_content_asset.json +6 -6
  34. data/doc/api/admin/discounts/creating_a_discount.json +7 -7
  35. data/doc/api/admin/discounts/listing_discounts.json +4 -4
  36. data/doc/api/admin/discounts/removing_a_discount.json +5 -5
  37. data/doc/api/admin/discounts/showing_a_discount.json +6 -6
  38. data/doc/api/admin/discounts/updating_discounts.json +5 -5
  39. data/doc/api/admin/email_signups/listing_email_signups.json +4 -4
  40. data/doc/api/admin/email_signups/showing_an_email_signup_by_email.json +47 -0
  41. data/doc/api/admin/email_signups/showing_an_email_signup_by_id.json +47 -0
  42. data/doc/api/admin/fulfillment/listing_fulfillments.json +4 -4
  43. data/doc/api/admin/fulfillment/marking_items_as_canceled.json +6 -6
  44. data/doc/api/admin/fulfillment/marking_items_as_shipped.json +6 -6
  45. data/doc/api/admin/fulfillment/showing_fulfillment.json +4 -4
  46. data/doc/api/admin/global_functionality/dealing_with_locales.json +86 -0
  47. data/doc/api/admin/global_functionality/filtering_by_created_at_time_stamp.json +56 -0
  48. data/doc/api/admin/global_functionality/filtering_by_updated_time_stamp.json +56 -0
  49. data/doc/api/admin/global_functionality/paging_results.json +51 -0
  50. data/doc/api/admin/global_functionality/retrieving_addtional_pages_of_results.json +51 -0
  51. data/doc/api/admin/global_functionality/sorting_results.json +56 -0
  52. data/doc/api/admin/inventory_skus/bulk_upserting_inventory_skus.json +5 -5
  53. data/doc/api/admin/inventory_skus/creating_an_inventory_sku.json +6 -6
  54. data/doc/api/admin/inventory_skus/listing_inventory_skus.json +4 -4
  55. data/doc/api/admin/inventory_skus/removing_an_inventory_sku.json +3 -3
  56. data/doc/api/admin/inventory_skus/showing_an_inventory_sku.json +4 -4
  57. data/doc/api/admin/inventory_skus/updating_an_inventory_sku.json +3 -3
  58. data/doc/api/admin/navigation_menus/creating_a_menu.json +7 -7
  59. data/doc/api/admin/navigation_menus/listing_menus.json +4 -4
  60. data/doc/api/admin/navigation_menus/removing_a_navigation_menu.json +5 -5
  61. data/doc/api/admin/navigation_menus/showing_a_navigation_menu.json +6 -6
  62. data/doc/api/admin/navigation_menus/updating_a_navigation_menus.json +5 -5
  63. data/doc/api/admin/navigation_taxonomy/bulk_upserting_navigation_taxons.json +5 -5
  64. data/doc/api/admin/navigation_taxonomy/creating_a_taxon.json +7 -7
  65. data/doc/api/admin/navigation_taxonomy/listing_taxons.json +4 -4
  66. data/doc/api/admin/navigation_taxonomy/removing_a_navigation_taxon.json +5 -5
  67. data/doc/api/admin/navigation_taxonomy/showing_a_navigation_taxon.json +6 -6
  68. data/doc/api/admin/navigation_taxonomy/updating_a_navigation_taxons.json +5 -5
  69. data/doc/api/admin/orders/listing_orders.json +4 -4
  70. data/doc/api/admin/orders/showing_an_order.json +5 -5
  71. data/doc/api/admin/orders/viewing_orders_by_date_range.json +76 -0
  72. data/doc/api/admin/pages/bulk_upserting_pages.json +5 -5
  73. data/doc/api/admin/pages/creating_a_page.json +7 -7
  74. data/doc/api/admin/pages/listing_pages.json +4 -4
  75. data/doc/api/admin/pages/removing_a_page.json +5 -5
  76. data/doc/api/admin/pages/showing_a_page.json +6 -6
  77. data/doc/api/admin/pages/updating_a_page.json +6 -6
  78. data/doc/api/admin/payment_profiles/bulk_upserting_payment_profiles.json +5 -5
  79. data/doc/api/admin/payment_profiles/creating_a_payment_profile.json +7 -7
  80. data/doc/api/admin/payment_profiles/listing_payment_profiles.json +4 -4
  81. data/doc/api/admin/payment_profiles/removing_a_payment_profile.json +5 -5
  82. data/doc/api/admin/payment_profiles/showing_a_payment_profile.json +6 -6
  83. data/doc/api/admin/payment_profiles/updating_a_payment_profiles.json +5 -5
  84. data/doc/api/admin/payment_transactions/listing_payment_transactions.json +4 -4
  85. data/doc/api/admin/payment_transactions/showing_a_payment_transaction.json +6 -6
  86. data/doc/api/admin/payments/listing_payments.json +4 -4
  87. data/doc/api/admin/payments/showing_an_payment.json +4 -4
  88. data/doc/api/admin/prices/creating_a_pricing_sku_price.json +4 -4
  89. data/doc/api/admin/prices/listing_pricing_sku_prices.json +4 -4
  90. data/doc/api/admin/prices/removing_a_pricing_sku_price.json +5 -5
  91. data/doc/api/admin/prices/updating_a_pricing_sku_price.json +5 -5
  92. data/doc/api/admin/pricing_skus/bulk_upserting_pricing_skus.json +5 -5
  93. data/doc/api/admin/pricing_skus/creating_an_pricing_sku.json +6 -6
  94. data/doc/api/admin/pricing_skus/listing_pricing_skus.json +4 -4
  95. data/doc/api/admin/pricing_skus/removing_an_pricing_sku.json +3 -3
  96. data/doc/api/admin/pricing_skus/showing_an_pricing_sku.json +4 -4
  97. data/doc/api/admin/pricing_skus/updating_an_pricing_sku.json +3 -3
  98. data/doc/api/admin/product_images/creating_a_product_image_from_base64.json +7 -7
  99. data/doc/api/admin/product_images/creating_a_product_image_from_url.json +7 -7
  100. data/doc/api/admin/product_images/listing_product_images.json +7 -7
  101. data/doc/api/admin/product_images/removing_a_product_image.json +5 -5
  102. data/doc/api/admin/product_images/updating_a_product_image.json +5 -5
  103. data/doc/api/admin/products/bulk_upserting_products.json +5 -5
  104. data/doc/api/admin/products/creating_a_product.json +7 -7
  105. data/doc/api/admin/products/listing_products.json +4 -4
  106. data/doc/api/admin/products/removing_a_product.json +5 -5
  107. data/doc/api/admin/products/showing_a_product.json +6 -6
  108. data/doc/api/admin/products/updating_a_product.json +6 -6
  109. data/doc/api/admin/promo_code_lists/bulk_upserting_promo_code_lists.json +5 -5
  110. data/doc/api/admin/promo_code_lists/creating_a_promo_code_list.json +7 -7
  111. data/doc/api/admin/promo_code_lists/listing_promo_code_lists.json +4 -4
  112. data/doc/api/admin/promo_code_lists/removing_a_promo_code_list.json +5 -5
  113. data/doc/api/admin/promo_code_lists/showing_a_promo_code_list.json +6 -6
  114. data/doc/api/admin/promo_code_lists/updating_a_promo_code_list.json +5 -5
  115. data/doc/api/admin/recommendation_settings/showing_recommendation_settings.json +6 -6
  116. data/doc/api/admin/recommendation_settings/updating_recommendation_settings.json +5 -5
  117. data/doc/api/admin/redirects/bulk_upserting_redirects.json +5 -5
  118. data/doc/api/admin/redirects/creating_a_redirect.json +7 -7
  119. data/doc/api/admin/redirects/listing_redirects.json +4 -4
  120. data/doc/api/admin/redirects/removing_a_redirect.json +5 -5
  121. data/doc/api/admin/redirects/showing_a_redirect.json +6 -6
  122. data/doc/api/admin/redirects/updating_a_redirects.json +5 -5
  123. data/doc/api/admin/release_changes/adding_changes_to_a_release.json +6 -6
  124. data/doc/api/admin/releases/bulk_upserting_releases.json +5 -5
  125. data/doc/api/admin/releases/creating_a_release.json +7 -7
  126. data/doc/api/admin/releases/listing_releases.json +4 -4
  127. data/doc/api/admin/releases/removing_a_release.json +5 -5
  128. data/doc/api/admin/releases/showing_a_release.json +6 -6
  129. data/doc/api/admin/releases/updating_a_release.json +6 -6
  130. data/doc/api/admin/saved_addresses/creating_a_saved_address.json +7 -7
  131. data/doc/api/admin/saved_addresses/listing_saved_address.json +6 -6
  132. data/doc/api/admin/saved_addresses/removing_a_saved_address.json +5 -5
  133. data/doc/api/admin/saved_addresses/updating_a_saved_address.json +5 -5
  134. data/doc/api/admin/saved_credit_cards/creating_a_saved_credit_card.json +8 -8
  135. data/doc/api/admin/saved_credit_cards/listing_saved_credit_cards.json +6 -6
  136. data/doc/api/admin/saved_credit_cards/removing_a_saved_credit_card.json +5 -5
  137. data/doc/api/admin/saved_credit_cards/updating_a_saved_credit_card.json +5 -5
  138. data/doc/api/admin/shipping/listing_shipments.json +4 -4
  139. data/doc/api/admin/shipping/showing_a_shipment.json +6 -6
  140. data/doc/api/admin/shipping_rates/creating_a_shipping_rate.json +7 -7
  141. data/doc/api/admin/shipping_rates/listing_shipping_rates.json +6 -6
  142. data/doc/api/admin/shipping_rates/removing_a_shipping_rate.json +5 -5
  143. data/doc/api/admin/shipping_rates/updating_a_shipping_rate.json +5 -5
  144. data/doc/api/admin/shipping_services/bulk_upserting_shipping_services.json +5 -5
  145. data/doc/api/admin/shipping_services/creating_a_shipping_service.json +7 -7
  146. data/doc/api/admin/shipping_services/listing_shipping_services.json +4 -4
  147. data/doc/api/admin/shipping_services/removing_a_shipping_service.json +5 -5
  148. data/doc/api/admin/shipping_services/showing_a_shipping_service.json +7 -7
  149. data/doc/api/admin/shipping_services/updating_a_shipping_service.json +6 -6
  150. data/doc/api/admin/tax_categories/bulk_upserting_tax_categories.json +5 -5
  151. data/doc/api/admin/tax_categories/creating_a_tax_category.json +7 -7
  152. data/doc/api/admin/tax_categories/listing_tax_categories.json +5 -5
  153. data/doc/api/admin/tax_categories/removing_a_tax_category.json +5 -5
  154. data/doc/api/admin/tax_categories/showing_a_tax_category.json +7 -7
  155. data/doc/api/admin/tax_categories/updating_a_tax_categories.json +5 -5
  156. data/doc/api/admin/tax_rates/creating_a_tax_rate.json +8 -8
  157. data/doc/api/admin/tax_rates/listing_tax_rates.json +6 -6
  158. data/doc/api/admin/tax_rates/removing_a_tax_rate.json +5 -5
  159. data/doc/api/admin/tax_rates/updating_a_tax_rate.json +5 -5
  160. data/doc/api/admin/users/bulk_upserting_users.json +5 -5
  161. data/doc/api/admin/users/creating_a_user.json +7 -7
  162. data/doc/api/admin/users/listing_users.json +4 -4
  163. data/doc/api/admin/users/removing_a_user.json +5 -5
  164. data/doc/api/admin/users/showing_a_user_by_email.json +47 -0
  165. data/doc/api/admin/users/showing_a_user_by_id.json +47 -0
  166. data/doc/api/admin/users/updating_a_user.json +6 -6
  167. data/doc/api/admin/variants/creating_a_product_variant.json +6 -6
  168. data/doc/api/admin/variants/listing_product_variants.json +7 -7
  169. data/doc/api/admin/variants/removing_a_product_variant.json +5 -5
  170. data/doc/api/admin/variants/updating_a_product_variant.json +5 -5
  171. data/doc/api/storefront/accounts/creating_an_account.json +4 -4
  172. data/doc/api/storefront/accounts/getting_account_details.json +7 -7
  173. data/doc/api/storefront/accounts/updating_an_account.json +7 -7
  174. data/doc/api/storefront/analytics/saving_a_category_view.json +3 -3
  175. data/doc/api/storefront/analytics/saving_a_product_view.json +3 -3
  176. data/doc/api/storefront/analytics/saving_a_search.json +3 -3
  177. data/doc/api/storefront/assets/showing_an_asset.json +6 -6
  178. data/doc/api/storefront/authentication/creating_an_authentication_token.json +6 -6
  179. data/doc/api/storefront/authentication/refreshing_an_authentication_token.json +6 -6
  180. data/doc/api/storefront/authentication/using_an_authentication_token.json +6 -6
  181. data/doc/api/storefront/cart/adding_a_promo_code.json +7 -7
  182. data/doc/api/storefront/cart/adding_an_item.json +7 -7
  183. data/doc/api/storefront/cart/creating_a_new_cart_for_a_user.json +6 -6
  184. data/doc/api/storefront/cart/creating_a_new_guest_cart.json +4 -4
  185. data/doc/api/storefront/cart/delete_an_item.json +7 -7
  186. data/doc/api/storefront/cart/listing_user_s_carts.json +6 -6
  187. data/doc/api/storefront/cart/showing_cart.json +7 -7
  188. data/doc/api/storefront/cart/updating_an_item.json +7 -7
  189. data/doc/api/storefront/categories/showing_a_category.json +5 -5
  190. data/doc/api/storefront/categories/showing_a_listing_of_categories.json +5 -5
  191. data/doc/api/storefront/checkout/completing_a_checkout.json +7 -7
  192. data/doc/api/storefront/checkout/failure_to_update_a_checkout.json +52 -0
  193. data/doc/api/storefront/checkout/showing_a_checkout.json +6 -6
  194. data/doc/api/storefront/checkout/updating_a_checkout.json +6 -6
  195. data/doc/api/storefront/contacts/creating_a_contact.json +4 -4
  196. data/doc/api/storefront/email_signups/creating_an_email_signup.json +4 -4
  197. data/doc/api/storefront/email_signups/showing_an_email_signup_content.json +4 -4
  198. data/doc/api/storefront/index.json +7 -0
  199. data/doc/api/storefront/menus/listing_menus.json +5 -5
  200. data/doc/api/storefront/menus/showing_a_menu.json +7 -7
  201. data/doc/api/storefront/orders/listing_the_user_s_orders.json +6 -6
  202. data/doc/api/storefront/orders/showing_an_order.json +7 -7
  203. data/doc/api/storefront/pages/showing_a_page.json +5 -5
  204. data/doc/api/storefront/password_resets/sending_a_forgot_password_email.json +5 -5
  205. data/doc/api/storefront/personalized_recommendations/showing_recommendations_with_a_session_id.json +8 -8
  206. data/doc/api/storefront/personalized_recommendations/showing_recommendations_with_authentication.json +6 -6
  207. data/doc/api/storefront/products/showing_a_product.json +5 -5
  208. data/doc/api/storefront/products/showing_a_product_with_a_specific_sku_selected.json +5 -5
  209. data/doc/api/storefront/recent_views/showing_recent_views_from_authentication.json +6 -6
  210. data/doc/api/storefront/recent_views/showing_recent_views_with_a_session_id.json +7 -7
  211. data/doc/api/storefront/recent_views/updating_recent_views_with_a_session_id.json +3 -3
  212. data/doc/api/storefront/recent_views/updating_recent_views_with_authentication.json +5 -5
  213. data/doc/api/storefront/saved_addresses/creating_a_saved_address.json +6 -6
  214. data/doc/api/storefront/saved_addresses/deleting_a_saved_address.json +6 -6
  215. data/doc/api/storefront/saved_addresses/listing_the_user_s_saved_addresses.json +6 -6
  216. data/doc/api/storefront/saved_addresses/showing_a_saved_address.json +7 -7
  217. data/doc/api/storefront/saved_addresses/updating_a_saved_address.json +7 -7
  218. data/doc/api/storefront/saved_credit_cards/creating_a_saved_credit_card.json +7 -7
  219. data/doc/api/storefront/saved_credit_cards/deleting_a_saved_credit_card.json +6 -6
  220. data/doc/api/storefront/saved_credit_cards/listing_the_user_s_saved_credit_cards.json +6 -6
  221. data/doc/api/storefront/saved_credit_cards/showing_a_saved_credit_card.json +7 -7
  222. data/doc/api/storefront/saved_credit_cards/updating_a_saved_credit_card.json +8 -8
  223. data/doc/api/storefront/searches/showing_search_autocomplete_suggestions.json +4 -4
  224. data/doc/api/storefront/searches/showing_search_results.json +5 -5
  225. data/doc/api/storefront/segmentation/specifying_session_count_for_segmentation.json +10 -10
  226. data/doc/api/storefront/segmentation/using_session_ids_for_segmenting_non_authenticated_users.json +10 -10
  227. data/doc/api/storefront/system_content/showing_system_content.json +5 -5
  228. data/doc/api/storefront/system_content/showing_the_home_page.json +5 -5
  229. data/doc/api/storefront/taxons/showing_a_taxon.json +7 -7
  230. data/doc/api/storefront/validation_errors/checkout_validation_errors.json +8 -8
  231. data/doc/api/storefront/validation_errors/general_validation_errors.json +2 -2
  232. data/lib/tasks/docs.rake +20 -0
  233. data/lib/workarea/api/version.rb +1 -1
  234. data/storefront/test/documentation/workarea/api/storefront/checkouts_documentation_test.rb +21 -0
  235. data/storefront/test/documentation/workarea/api/storefront/validation_documentation_test.rb +1 -1
  236. data/storefront/workarea-api-storefront.gemspec +2 -2
  237. data/workarea-api.gemspec +1 -1
  238. metadata +23 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5584353b8ca153718a79703b771bb98357ce80ed97ad9f19cbac97e2f8a52b34
4
- data.tar.gz: a2407e362c05759fcdffb851a9ddfaddbb4ca82a0050b0570d787a0d33b92d1a
3
+ metadata.gz: 23e26db12c8a362c10c2566b015167cceccbf9b7dcac7e4c5c955b6773debb45
4
+ data.tar.gz: '0248a4920c9998e5c05b56b2f071308a09b6ff62419dd4e735af6bd2e276fb00'
5
5
  SHA512:
6
- metadata.gz: ac7d25b8c4a440778558f0771f01c0654d43b0c6f6603731508714f210696c9ea8d9b2d167e8035c1d040c0c91d3c5467f4c686ee69bc96c71e0449fb2f65bf2
7
- data.tar.gz: cde57b9ea75e2d16e856fb8734006b216e02e1b26320a7b4e30a8316d7f6e4cbd269c7c63120f01f33ad1e9b7f8d6c8c13b6bcb4cd2b2532287bccc239f12b14
6
+ metadata.gz: c50f9e9991f07a91fd46d5f81be4fd846264960bd06c942fa190d9959f4559d41c3d5ab76520da0a4c897c600af29afa03a2f4ead5efbb1e496b53d7f7db0a19
7
+ data.tar.gz: bb7316920e34082949eadbd5b9c629d71a019ea9a9271c4226db8bbbef4284c7dc8e395b1d5385230c946cf6b6b251ca258da0cf339adf6c496ab541d1dcd475
@@ -1,3 +1,106 @@
1
+ Workarea Api 4.5.6 (2020-12-02)
2
+ --------------------------------------------------------------------------------
3
+
4
+ * Move creation of date filtering indexes to after initialize
5
+
6
+ The DateFiltering module that the admin API adds to ApplicationDocument
7
+ could cause some indexes on created_at or updated_at to be ignored
8
+ unexpectedly since DateFiltering had already added indexes for those
9
+ fields. Moving the creation of those indexes to after initialization
10
+ ensures the model can define its own indexes first.
11
+
12
+ API-17
13
+
14
+ Matt Duffy
15
+
16
+
17
+
18
+ Workarea Api 4.5.5 (2020-08-19)
19
+ --------------------------------------------------------------------------------
20
+
21
+ * Update documentation
22
+
23
+
24
+ Ben Crouse
25
+
26
+
27
+
28
+ Workarea Api 4.5.4 (2020-08-19)
29
+ --------------------------------------------------------------------------------
30
+
31
+ * Handle non-persisted recommendation settings
32
+
33
+ This uses `find_or_initialize` to match our usage of
34
+ `Recommendation::Settings` elsewhere in the platform.
35
+
36
+ Fixes #19
37
+ Ben Crouse
38
+
39
+ * Add Documentation Test for Failed Checkout Update
40
+
41
+ This documents the scenario in which a checkout update fails to persist,
42
+ and thus the API returns a `422` error to signify its failure. It
43
+ depends on the code changes in workarea-commerce/workarea#481, and thus
44
+ we will need to bump the Workarea version to restrict its upgrade to
45
+ users of v3.5.17 and beyond.
46
+
47
+ API-14
48
+ Tom Scott
49
+
50
+
51
+
52
+ Workarea Api 4.5.3 (2020-03-26)
53
+ --------------------------------------------------------------------------------
54
+
55
+ * Update workarea gem dependencies to reflect reality
56
+
57
+ Ben Crouse
58
+
59
+ * Fix typo
60
+
61
+ Tom Scott
62
+
63
+ * Remove use of #many? on embedded relationship for Rails 6 upgrade
64
+
65
+ Matt Duffy
66
+
67
+ * Bump responders dependecy to 3.0.0
68
+
69
+ Matt Duffy
70
+
71
+
72
+
73
+ Workarea Api 4.5.2 (2020-01-07)
74
+ --------------------------------------------------------------------------------
75
+
76
+ * Fix Docs Generator Task Name
77
+
78
+ The task name `workarea:api:generate_docs` wasn't able to load the
79
+ environment like the rest of the `workarea:test` tasks because it wasn't
80
+ in the correct Rake namespace. This is due to a hack in core that
81
+ configures the Rake environment such that custom Rake tasks for testing
82
+ are possible. Change the task name to `workarea:test:api_docs` to take
83
+ advantage of this hack so the tests will run properly.
84
+
85
+ API-4
86
+ Tom Scott
87
+
88
+ * Add Rake Task For Generating API Documentation
89
+
90
+ The `workarea:api:docs` task will generate all API documentation for all
91
+ plugins without the need to set environment variables. Developers should
92
+ run this task and commit the results in `doc/api` in order to deploy API
93
+ documentation changes to a server.
94
+
95
+ API-4
96
+ Tom Scott
97
+
98
+ * Fix rakefile
99
+
100
+ Curt Howard
101
+
102
+
103
+
1
104
  Workarea Api 4.5.0 (2019-11-26)
2
105
  --------------------------------------------------------------------------------
3
106
 
data/Gemfile CHANGED
@@ -1,5 +1,4 @@
1
1
  source 'https://rubygems.org'
2
- git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
2
 
4
3
  # Declare your gem's dependencies in api.gemspec.
5
4
  # Bundler will treat runtime dependencies like base dependencies, and
@@ -18,5 +17,4 @@ gemspec
18
17
  gem 'workarea-api-admin', path: 'admin'
19
18
  gem 'workarea-api-storefront', path: 'storefront'
20
19
 
21
- #gem 'workarea', '>= 3.4.0'
22
- gem 'workarea', github: 'workarea-commerce/workarea'
20
+ gem 'workarea', git: 'https://github.com/workarea-commerce/workarea.git', branch: 'v3.5-stable'
data/README.md CHANGED
@@ -22,7 +22,7 @@ separate APIs for different purposes:
22
22
  To begin using the Workarea API, add the following to your **Gemfile**:
23
23
 
24
24
  ```ruby
25
- gem 'weblinc-api'
25
+ gem 'workarea-api'
26
26
  ```
27
27
 
28
28
  Next, mount the API engines into **config/routes.rb**.
data/Rakefile CHANGED
@@ -6,6 +6,8 @@ rescue LoadError
6
6
  end
7
7
 
8
8
  require 'rails'
9
+ require "action_view/railtie"
10
+
9
11
  require 'workarea/core'
10
12
  require 'rake/testtask'
11
13
  require 'date'
@@ -71,25 +73,24 @@ task :release do
71
73
  host = "https://#{ENV['BUNDLE_GEMS__WEBLINC__COM']}@gems.weblinc.com"
72
74
 
73
75
  #
74
- # Updating changelog
76
+ # Build documentation
75
77
  #
76
78
  #
77
- Rake::Task['workarea:changelog'].execute
78
- system 'git add CHANGELOG.md'
79
- system 'git commit -m "Update CHANGELOG"'
80
- system 'git push origin HEAD'
79
+ #system <<~COMMAND
80
+ #(cd admin && GENERATE_API_DOCS=true bin/rails test) &&
81
+ #(cd storefront && GENERATE_API_DOCS=true bin/rails test) &&
82
+ #git add doc/ &&
83
+ #git commit -am "Update documentation" &&
84
+ #git push origin HEAD
85
+ #COMMAND
81
86
 
82
87
  #
83
- # Build documentation
88
+ # Updating changelog
84
89
  #
85
90
  #
86
- system <<~COMMAND
87
- (cd admin && GENERATE_API_DOCS=true bin/rails test) &&
88
- (cd storefront && GENERATE_API_DOCS=true bin/rails test) &&
89
- git add docs/ &&
90
- git commit -am "Update documentation" &&
91
- git push origin HEAD
92
- COMMAND
91
+ Rake::Task['workarea:changelog'].execute
92
+ system 'git add CHANGELOG.md'
93
+ system 'git commit -m "Update CHANGELOG"'
93
94
 
94
95
  #
95
96
  # Build gem files
@@ -116,7 +117,7 @@ task :release do
116
117
  system "gem push workarea-api-#{Workarea::Api::VERSION}.gem --host #{host}"
117
118
  system 'Tagging git...'
118
119
  system "git tag -a v#{Workarea::Api::VERSION} -m 'Tagging #{Workarea::Api::VERSION}'"
119
- system 'git push --tags'
120
+ system 'git push origin HEAD --follow-tags'
120
121
 
121
122
  #
122
123
  # Clean up
@@ -114,7 +114,7 @@ module Workarea
114
114
  private
115
115
 
116
116
  def find_recommendation_settings
117
- @recommendation_settings = Recommendation::Settings.find(params[:product_id])
117
+ @recommendation_settings = Recommendation::Settings.find_or_initialize_by(id: params[:product_id])
118
118
  end
119
119
  end
120
120
  end
@@ -4,9 +4,6 @@ module Workarea
4
4
  module DateFiltering
5
5
  extend ActiveSupport::Concern
6
6
  included do
7
- index({ updated_at: 1 })
8
- index({ created_at: 1 })
9
-
10
7
  scope :by_updated_at, ->(starts_at:, ends_at:) do
11
8
  query = criteria
12
9
  query = query.where(:updated_at.gte => starts_at) unless starts_at.nil?
@@ -19,3 +19,4 @@ end
19
19
  require 'workarea/api/version'
20
20
  require 'workarea/api/admin/engine'
21
21
  require 'workarea/api/admin/swagger'
22
+ require 'workarea/api/admin/date_indexes'
@@ -0,0 +1,23 @@
1
+
2
+ module Workarea
3
+ module Api
4
+ module Admin
5
+ module DateIndexes
6
+ extend self
7
+
8
+ # We do this separately from the DateFiltering module to ensure
9
+ # this happens after a model has defined all of its normal indexes. This
10
+ # prevents the date filtering indexes from applying before explicity
11
+ # defined indexes for models that could include options like a TTL.
12
+ def load
13
+ ::Mongoid.models.each do |model|
14
+ if model < ApplicationDocument
15
+ model.index({ updated_at: 1 })
16
+ model.index({ created_at: 1 })
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -14,10 +14,12 @@ module Workarea
14
14
 
15
15
  config.after_initialize do
16
16
  Workarea::Api::Admin::Swagger.generate!
17
+ Workarea::Api::Admin::DateIndexes.load
17
18
  end
18
19
 
19
20
  config.to_prepare do
20
21
  ApplicationDocument.include(DateFiltering)
22
+ Workarea::Api::Admin::DateIndexes.load
21
23
  end
22
24
  end
23
25
  end
@@ -35,6 +35,20 @@ module Workarea
35
35
 
36
36
  assert_equal(['foo'], recommendation_settings.reload.product_ids)
37
37
  end
38
+
39
+ def test_unpersisted_recommendation_settings
40
+ get admin_api.product_recommendation_settings_path(@product.id)
41
+ result = JSON.parse(response.body)['recommendation_settings']
42
+ assert_equal(@product.id, result['_id'])
43
+ assert_equal(0, Recommendation::Settings.count)
44
+
45
+ patch admin_api.product_recommendation_settings_path(@product.id),
46
+ params: { recommendation_settings: { product_ids: ['foo'] } }
47
+
48
+ assert_equal(1, Recommendation::Settings.count)
49
+ assert_equal(@product.id, Recommendation::Settings.first.id)
50
+ assert_equal(['foo'], Recommendation::Settings.first.product_ids)
51
+ end
38
52
  end
39
53
  end
40
54
  end
@@ -14,6 +14,6 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.required_ruby_version = '>= 2.3.0'
16
16
 
17
- s.add_dependency 'workarea', '~> 3.x', '>= 3.4.x'
18
- s.add_dependency 'responders', '~> 2.4.0'
17
+ s.add_dependency 'workarea', '~> 3.x', '>= 3.5.x'
18
+ s.add_dependency 'responders', '~> 3.0.0'
19
19
  end
@@ -21,22 +21,22 @@
21
21
  "Referrer-Policy": "strict-origin-when-cross-origin",
22
22
  "X-Requested-With": "",
23
23
  "Vary": "X-Requested-With, X-Workarea-Segments",
24
- "Last-Modified": "Wed, 27 Nov 2019 00:45:07 GMT",
24
+ "Last-Modified": "Wed, 19 Aug 2020 13:52:49 GMT",
25
25
  "Cache-Control": "no-cache, no-store, must-revalidate",
26
- "X-Request-Id": "f9d1e5ae-c353-469d-86d1-36b84dda958d",
27
- "X-Runtime": "0.381500",
26
+ "X-Request-Id": "8c849968-b4fd-432b-8946-d5cd421386eb",
27
+ "X-Runtime": "0.528618",
28
28
  "X-Workarea-Segments": "",
29
29
  "Expires": "0"
30
30
  },
31
31
  "request_method": "PATCH",
32
32
  "request_path": "/api/admin/categories/bulk",
33
- "request_body": "{\"categories\":[{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2019-11-27T00:45:06.789Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5dddc712124159425407641d\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2019-11-27T00:45:06.789Z\"},{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2019-11-27T00:45:06.789Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5dddc712124159425407641d\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2019-11-27T00:45:06.789Z\"},{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2019-11-27T00:45:06.789Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5dddc712124159425407641d\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2019-11-27T00:45:06.789Z\"}]}",
33
+ "request_body": "{\"categories\":[{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2020-08-19T13:52:48.375Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5f3d2eb00218236de151fb6c\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2020-08-19T13:52:48.375Z\"},{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2020-08-19T13:52:48.375Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5f3d2eb00218236de151fb6c\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2020-08-19T13:52:48.375Z\"},{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2020-08-19T13:52:48.375Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5f3d2eb00218236de151fb6c\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2020-08-19T13:52:48.375Z\"}]}",
34
34
  "request_content_type": "application/json",
35
35
  "response_status": 204,
36
36
  "response_status_text": "No Content",
37
37
  "response_body": null,
38
38
  "response_content_type": null,
39
- "curl": "curl \"https://www.example.com/api/admin/categories/bulk\" -d '{\"categories\":[{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2019-11-27T00:45:06.789Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5dddc712124159425407641d\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2019-11-27T00:45:06.789Z\"},{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2019-11-27T00:45:06.789Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5dddc712124159425407641d\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2019-11-27T00:45:06.789Z\"},{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2019-11-27T00:45:06.789Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5dddc712124159425407641d\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2019-11-27T00:45:06.789Z\"}]}' -X PATCH \\\n\t-H \"Content-Type: application/json\""
39
+ "curl": "curl \"https://www.example.com/api/admin/categories/bulk\" -d '{\"categories\":[{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2020-08-19T13:52:48.375Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5f3d2eb00218236de151fb6c\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2020-08-19T13:52:48.375Z\"},{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2020-08-19T13:52:48.375Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5f3d2eb00218236de151fb6c\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2020-08-19T13:52:48.375Z\"},{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2020-08-19T13:52:48.375Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5f3d2eb00218236de151fb6c\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2020-08-19T13:52:48.375Z\"}]}' -X PATCH \\\n\t-H \"Content-Type: application/json\""
40
40
  }
41
41
  ],
42
42
  "resource": "Categories",
@@ -19,27 +19,27 @@
19
19
  "X-Download-Options": "noopen",
20
20
  "X-Permitted-Cross-Domain-Policies": "none",
21
21
  "Referrer-Policy": "strict-origin-when-cross-origin",
22
- "Location": "/api/admin/categories/5dddc70c1241594254076400",
22
+ "Location": "/api/admin/categories/5f3d2eb70218236de151fbb5",
23
23
  "Content-Type": "application/json; charset=utf-8",
24
24
  "X-Requested-With": "",
25
25
  "Vary": "X-Requested-With, X-Workarea-Segments",
26
- "Last-Modified": "Wed, 27 Nov 2019 00:45:00 GMT",
26
+ "Last-Modified": "Wed, 19 Aug 2020 13:52:56 GMT",
27
27
  "Cache-Control": "no-cache, no-store, must-revalidate",
28
- "X-Request-Id": "c5f8ab73-1c0b-4ee3-aa0a-f2d5bc052503",
29
- "X-Runtime": "0.131567",
28
+ "X-Request-Id": "5779362a-62e5-42a2-a350-c045c5f10d04",
29
+ "X-Runtime": "0.143814",
30
30
  "X-Workarea-Segments": "",
31
31
  "Expires": "0",
32
32
  "Content-Length": "545"
33
33
  },
34
34
  "request_method": "POST",
35
35
  "request_path": "/api/admin/categories",
36
- "request_body": "{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2019-11-27T00:45:00.201Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5dddc70c12415942540763fb\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2019-11-27T00:45:00.201Z\"}",
36
+ "request_body": "{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2020-08-19T13:52:55.686Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5f3d2eb70218236de151fbb0\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2020-08-19T13:52:55.686Z\"}",
37
37
  "request_content_type": "application/json",
38
38
  "response_status": 201,
39
39
  "response_status_text": "Created",
40
- "response_body": "{\n \"category\": {\n \"_id\": \"5dddc70c1241594254076400\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"client_id\": null,\n \"created_at\": \"2019-11-27T00:45:00.201Z\",\n \"default_sort\": \"top_sellers\",\n \"name\": \"Test Category\",\n \"product_ids\": [\n\n ],\n \"product_rules\": [\n {\n \"_id\": \"5dddc70c12415942540763fb\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"created_at\": null,\n \"name\": \"search\",\n \"operator\": \"equals\",\n \"updated_at\": null,\n \"value\": \"*\"\n }\n ],\n \"range_facets\": {\n },\n \"show_navigation\": true,\n \"slug\": \"test-category-1\",\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"terms_facets\": [\n\n ],\n \"updated_at\": \"2019-11-27T00:45:00.201Z\"\n }\n}",
40
+ "response_body": "{\n \"category\": {\n \"_id\": \"5f3d2eb70218236de151fbb5\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"client_id\": null,\n \"created_at\": \"2020-08-19T13:52:55.686Z\",\n \"default_sort\": \"top_sellers\",\n \"name\": \"Test Category\",\n \"product_ids\": [\n\n ],\n \"product_rules\": [\n {\n \"_id\": \"5f3d2eb70218236de151fbb0\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"created_at\": null,\n \"name\": \"search\",\n \"operator\": \"equals\",\n \"updated_at\": null,\n \"value\": \"*\"\n }\n ],\n \"range_facets\": {\n },\n \"show_navigation\": true,\n \"slug\": \"test-category-1\",\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"terms_facets\": [\n\n ],\n \"updated_at\": \"2020-08-19T13:52:55.686Z\"\n }\n}",
41
41
  "response_content_type": "application/json",
42
- "curl": "curl \"https://www.example.com/api/admin/categories\" -d '{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2019-11-27T00:45:00.201Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5dddc70c12415942540763fb\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2019-11-27T00:45:00.201Z\"}' -X POST \\\n\t-H \"Content-Type: application/json\""
42
+ "curl": "curl \"https://www.example.com/api/admin/categories\" -d '{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2020-08-19T13:52:55.686Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5f3d2eb70218236de151fbb0\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2020-08-19T13:52:55.686Z\"}' -X POST \\\n\t-H \"Content-Type: application/json\""
43
43
  }
44
44
  ],
45
45
  "resource": "Categories",
@@ -35,10 +35,10 @@
35
35
  "Content-Type": "application/json; charset=utf-8",
36
36
  "X-Requested-With": "",
37
37
  "Vary": "X-Requested-With, X-Workarea-Segments",
38
- "Last-Modified": "Wed, 27 Nov 2019 00:45:05 GMT",
38
+ "Last-Modified": "Wed, 19 Aug 2020 13:52:50 GMT",
39
39
  "Cache-Control": "no-cache, no-store, must-revalidate",
40
- "X-Request-Id": "f3adc2dd-dbc6-492a-8861-617ee60e659a",
41
- "X-Runtime": "0.009349",
40
+ "X-Request-Id": "961fb991-10e9-4c0e-8b35-4e453266db67",
41
+ "X-Runtime": "0.007664",
42
42
  "X-Workarea-Segments": "",
43
43
  "Expires": "0",
44
44
  "Content-Length": "1080"
@@ -49,7 +49,7 @@
49
49
  "request_content_type": null,
50
50
  "response_status": 200,
51
51
  "response_status_text": "OK",
52
- "response_body": "{\n \"categories\": [\n {\n \"_id\": \"5dddc7111241594254076416\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"client_id\": null,\n \"created_at\": \"2019-11-27T00:45:05.821Z\",\n \"default_sort\": \"top_sellers\",\n \"name\": \"Test Category\",\n \"product_ids\": [\n\n ],\n \"product_rules\": [\n {\n \"_id\": \"5dddc7111241594254076417\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"created_at\": null,\n \"name\": \"search\",\n \"operator\": \"equals\",\n \"updated_at\": null,\n \"value\": \"*\"\n }\n ],\n \"range_facets\": {\n },\n \"show_navigation\": true,\n \"slug\": \"test-category-1\",\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"terms_facets\": [\n\n ],\n \"updated_at\": \"2019-11-27T00:45:05.821Z\"\n },\n {\n \"_id\": \"5dddc7101241594254076412\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"client_id\": null,\n \"created_at\": \"2019-11-27T00:45:04.937Z\",\n \"default_sort\": \"top_sellers\",\n \"name\": \"Test Category\",\n \"product_ids\": [\n\n ],\n \"product_rules\": [\n {\n \"_id\": \"5dddc7101241594254076413\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"created_at\": null,\n \"name\": \"search\",\n \"operator\": \"equals\",\n \"updated_at\": null,\n \"value\": \"*\"\n }\n ],\n \"range_facets\": {\n },\n \"show_navigation\": true,\n \"slug\": \"test-category\",\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"terms_facets\": [\n\n ],\n \"updated_at\": \"2019-11-27T00:45:04.937Z\"\n }\n ]\n}",
52
+ "response_body": "{\n \"categories\": [\n {\n \"_id\": \"5f3d2eb20218236de151fb8f\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"client_id\": null,\n \"created_at\": \"2020-08-19T13:52:50.383Z\",\n \"default_sort\": \"top_sellers\",\n \"name\": \"Test Category\",\n \"product_ids\": [\n\n ],\n \"product_rules\": [\n {\n \"_id\": \"5f3d2eb20218236de151fb90\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"created_at\": null,\n \"name\": \"search\",\n \"operator\": \"equals\",\n \"updated_at\": null,\n \"value\": \"*\"\n }\n ],\n \"range_facets\": {\n },\n \"show_navigation\": true,\n \"slug\": \"test-category-1\",\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"terms_facets\": [\n\n ],\n \"updated_at\": \"2020-08-19T13:52:50.383Z\"\n },\n {\n \"_id\": \"5f3d2eb20218236de151fb8b\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"client_id\": null,\n \"created_at\": \"2020-08-19T13:52:50.156Z\",\n \"default_sort\": \"top_sellers\",\n \"name\": \"Test Category\",\n \"product_ids\": [\n\n ],\n \"product_rules\": [\n {\n \"_id\": \"5f3d2eb20218236de151fb8c\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"created_at\": null,\n \"name\": \"search\",\n \"operator\": \"equals\",\n \"updated_at\": null,\n \"value\": \"*\"\n }\n ],\n \"range_facets\": {\n },\n \"show_navigation\": true,\n \"slug\": \"test-category\",\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"terms_facets\": [\n\n ],\n \"updated_at\": \"2020-08-19T13:52:50.156Z\"\n }\n ]\n}",
53
53
  "response_content_type": "application/json",
54
54
  "curl": "curl -g \"https://www.example.com/api/admin/categories?page=1&sort_by=created_at&sort_direction=desc\" -X GET "
55
55
  }
@@ -21,22 +21,22 @@
21
21
  "Referrer-Policy": "strict-origin-when-cross-origin",
22
22
  "X-Requested-With": "",
23
23
  "Vary": "X-Requested-With, X-Workarea-Segments",
24
- "Last-Modified": "Wed, 27 Nov 2019 00:44:58 GMT",
24
+ "Last-Modified": "Wed, 19 Aug 2020 13:52:53 GMT",
25
25
  "Cache-Control": "no-cache, no-store, must-revalidate",
26
- "X-Request-Id": "fe8b398d-186f-4f6a-82d5-8193d81c4b34",
27
- "X-Runtime": "0.034989",
26
+ "X-Request-Id": "f743f3ef-53b4-4742-9529-8c2f953867bf",
27
+ "X-Runtime": "0.040166",
28
28
  "X-Workarea-Segments": "",
29
29
  "Expires": "0"
30
30
  },
31
31
  "request_method": "DELETE",
32
- "request_path": "/api/admin/categories/5dddc70a12415942540763f3",
32
+ "request_path": "/api/admin/categories/5f3d2eb50218236de151fba1",
33
33
  "request_body": null,
34
34
  "request_content_type": "application/json",
35
35
  "response_status": 204,
36
36
  "response_status_text": "No Content",
37
37
  "response_body": null,
38
38
  "response_content_type": null,
39
- "curl": "curl \"https://www.example.com/api/admin/categories/5dddc70a12415942540763f3\" -d '' -X DELETE \\\n\t-H \"Content-Type: application/json\""
39
+ "curl": "curl \"https://www.example.com/api/admin/categories/5f3d2eb50218236de151fba1\" -d '' -X DELETE \\\n\t-H \"Content-Type: application/json\""
40
40
  }
41
41
  ],
42
42
  "resource": "Categories",
@@ -21,23 +21,23 @@
21
21
  "Content-Type": "application/json; charset=utf-8",
22
22
  "X-Requested-With": "",
23
23
  "Vary": "X-Requested-With, X-Workarea-Segments",
24
- "Last-Modified": "Wed, 27 Nov 2019 00:45:09 GMT",
24
+ "Last-Modified": "Wed, 19 Aug 2020 13:52:54 GMT",
25
25
  "Cache-Control": "no-cache, no-store, must-revalidate",
26
- "X-Request-Id": "fbf350c7-c29b-4f66-b8e9-bed7658a39c6",
27
- "X-Runtime": "0.006373",
26
+ "X-Request-Id": "f5d3c1b1-ee89-4b29-8e00-e01104dedf4a",
27
+ "X-Runtime": "0.007344",
28
28
  "X-Workarea-Segments": "",
29
29
  "Expires": "0",
30
30
  "Content-Length": "543"
31
31
  },
32
32
  "request_method": "GET",
33
- "request_path": "/api/admin/categories/5dddc715124159425407643c",
33
+ "request_path": "/api/admin/categories/5f3d2eb60218236de151fba8",
34
34
  "request_body": null,
35
35
  "request_content_type": null,
36
36
  "response_status": 200,
37
37
  "response_status_text": "OK",
38
- "response_body": "{\n \"category\": {\n \"_id\": \"5dddc715124159425407643c\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"client_id\": null,\n \"created_at\": \"2019-11-27T00:45:09.298Z\",\n \"default_sort\": \"top_sellers\",\n \"name\": \"Test Category\",\n \"product_ids\": [\n\n ],\n \"product_rules\": [\n {\n \"_id\": \"5dddc715124159425407643d\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"created_at\": null,\n \"name\": \"search\",\n \"operator\": \"equals\",\n \"updated_at\": null,\n \"value\": \"*\"\n }\n ],\n \"range_facets\": {\n },\n \"show_navigation\": true,\n \"slug\": \"test-category\",\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"terms_facets\": [\n\n ],\n \"updated_at\": \"2019-11-27T00:45:09.298Z\"\n }\n}",
38
+ "response_body": "{\n \"category\": {\n \"_id\": \"5f3d2eb60218236de151fba8\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"client_id\": null,\n \"created_at\": \"2020-08-19T13:52:54.435Z\",\n \"default_sort\": \"top_sellers\",\n \"name\": \"Test Category\",\n \"product_ids\": [\n\n ],\n \"product_rules\": [\n {\n \"_id\": \"5f3d2eb60218236de151fba9\",\n \"active\": true,\n \"active_segment_ids\": [\n\n ],\n \"created_at\": null,\n \"name\": \"search\",\n \"operator\": \"equals\",\n \"updated_at\": null,\n \"value\": \"*\"\n }\n ],\n \"range_facets\": {\n },\n \"show_navigation\": true,\n \"slug\": \"test-category\",\n \"subscribed_user_ids\": [\n\n ],\n \"tags\": [\n\n ],\n \"terms_facets\": [\n\n ],\n \"updated_at\": \"2020-08-19T13:52:54.435Z\"\n }\n}",
39
39
  "response_content_type": "application/json",
40
- "curl": "curl -g \"https://www.example.com/api/admin/categories/5dddc715124159425407643c\" -X GET "
40
+ "curl": "curl -g \"https://www.example.com/api/admin/categories/5f3d2eb60218236de151fba8\" -X GET "
41
41
  }
42
42
  ],
43
43
  "resource": "Categories",
@@ -21,22 +21,22 @@
21
21
  "Referrer-Policy": "strict-origin-when-cross-origin",
22
22
  "X-Requested-With": "",
23
23
  "Vary": "X-Requested-With, X-Workarea-Segments",
24
- "Last-Modified": "Wed, 27 Nov 2019 00:45:01 GMT",
24
+ "Last-Modified": "Wed, 19 Aug 2020 13:52:52 GMT",
25
25
  "Cache-Control": "no-cache, no-store, must-revalidate",
26
- "X-Request-Id": "25dd3cb5-3843-4f34-a71c-54dd5765bb13",
27
- "X-Runtime": "0.097402",
26
+ "X-Request-Id": "853eecc1-39aa-433d-bf1a-28ab9bcd510b",
27
+ "X-Runtime": "0.134100",
28
28
  "X-Workarea-Segments": "",
29
29
  "Expires": "0"
30
30
  },
31
31
  "request_method": "PATCH",
32
- "request_path": "/api/admin/categories/5dddc70d1241594254076406",
33
- "request_body": "{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2019-11-27T00:45:01.471Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5dddc70d124159425407640b\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2019-11-27T00:45:01.471Z\"}",
32
+ "request_path": "/api/admin/categories/5f3d2eb30218236de151fb95",
33
+ "request_body": "{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2020-08-19T13:52:51.833Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5f3d2eb30218236de151fb9a\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2020-08-19T13:52:51.833Z\"}",
34
34
  "request_content_type": "application/json",
35
35
  "response_status": 204,
36
36
  "response_status_text": "No Content",
37
37
  "response_body": null,
38
38
  "response_content_type": null,
39
- "curl": "curl \"https://www.example.com/api/admin/categories/5dddc70d1241594254076406\" -d '{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2019-11-27T00:45:01.471Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5dddc70d124159425407640b\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2019-11-27T00:45:01.471Z\"}' -X PATCH \\\n\t-H \"Content-Type: application/json\""
39
+ "curl": "curl \"https://www.example.com/api/admin/categories/5f3d2eb30218236de151fb95\" -d '{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"2020-08-19T13:52:51.833Z\",\"default_sort\":\"top_sellers\",\"name\":\"Test Category\",\"product_ids\":[],\"product_rules\":[{\"_id\":\"5f3d2eb30218236de151fb9a\",\"active\":true,\"active_segment_ids\":[],\"created_at\":null,\"name\":\"search\",\"operator\":\"equals\",\"updated_at\":null,\"value\":\"*\"}],\"range_facets\":{},\"show_navigation\":true,\"subscribed_user_ids\":[],\"tags\":[],\"terms_facets\":[],\"updated_at\":\"2020-08-19T13:52:51.833Z\"}' -X PATCH \\\n\t-H \"Content-Type: application/json\""
40
40
  }
41
41
  ],
42
42
  "resource": "Categories",