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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +103 -0
- data/Gemfile +1 -3
- data/README.md +1 -1
- data/Rakefile +15 -14
- data/admin/app/controllers/workarea/api/admin/recommendation_settings_controller.rb +1 -1
- data/admin/app/models/workarea/api/admin/date_filtering.rb +0 -3
- data/admin/lib/workarea/api/admin.rb +1 -0
- data/admin/lib/workarea/api/admin/date_indexes.rb +23 -0
- data/admin/lib/workarea/api/admin/engine.rb +2 -0
- data/admin/test/integration/workarea/api/admin/recommendation_settings_integration_test.rb +14 -0
- data/admin/workarea-api-admin.gemspec +2 -2
- data/doc/api/admin/categories/bulk_upserting_categories.json +5 -5
- data/doc/api/admin/categories/creating_a_category.json +7 -7
- data/doc/api/admin/categories/listing_categories.json +4 -4
- data/doc/api/admin/categories/removing_a_category.json +5 -5
- data/doc/api/admin/categories/showing_a_category.json +6 -6
- data/doc/api/admin/categories/updating_a_category.json +6 -6
- data/doc/api/admin/category_product_rules/creating_a_category_product_rule.json +7 -7
- data/doc/api/admin/category_product_rules/listing_category_product_rules.json +6 -6
- data/doc/api/admin/category_product_rules/removing_a_category_product_rule.json +5 -5
- data/doc/api/admin/category_product_rules/updating_a_category_product_rule.json +5 -5
- data/doc/api/admin/content/bulk_upserting_content.json +5 -5
- data/doc/api/admin/content/creating_content.json +7 -7
- data/doc/api/admin/content/listing_content.json +4 -4
- data/doc/api/admin/content/showing_content.json +6 -6
- data/doc/api/admin/content/updating_content.json +5 -5
- data/doc/api/admin/content_assets/bulk_upserting_content_assets.json +5 -5
- data/doc/api/admin/content_assets/creating_a_content_asset.json +7 -7
- data/doc/api/admin/content_assets/listing_content_assets.json +4 -4
- data/doc/api/admin/content_assets/removing_a_content_asset.json +5 -5
- data/doc/api/admin/content_assets/showing_a_content_asset.json +6 -6
- data/doc/api/admin/content_assets/updating_a_content_asset.json +6 -6
- data/doc/api/admin/discounts/creating_a_discount.json +7 -7
- data/doc/api/admin/discounts/listing_discounts.json +4 -4
- data/doc/api/admin/discounts/removing_a_discount.json +5 -5
- data/doc/api/admin/discounts/showing_a_discount.json +6 -6
- data/doc/api/admin/discounts/updating_discounts.json +5 -5
- data/doc/api/admin/email_signups/listing_email_signups.json +4 -4
- data/doc/api/admin/email_signups/showing_an_email_signup_by_email.json +47 -0
- data/doc/api/admin/email_signups/showing_an_email_signup_by_id.json +47 -0
- data/doc/api/admin/fulfillment/listing_fulfillments.json +4 -4
- data/doc/api/admin/fulfillment/marking_items_as_canceled.json +6 -6
- data/doc/api/admin/fulfillment/marking_items_as_shipped.json +6 -6
- data/doc/api/admin/fulfillment/showing_fulfillment.json +4 -4
- data/doc/api/admin/global_functionality/dealing_with_locales.json +86 -0
- data/doc/api/admin/global_functionality/filtering_by_created_at_time_stamp.json +56 -0
- data/doc/api/admin/global_functionality/filtering_by_updated_time_stamp.json +56 -0
- data/doc/api/admin/global_functionality/paging_results.json +51 -0
- data/doc/api/admin/global_functionality/retrieving_addtional_pages_of_results.json +51 -0
- data/doc/api/admin/global_functionality/sorting_results.json +56 -0
- data/doc/api/admin/inventory_skus/bulk_upserting_inventory_skus.json +5 -5
- data/doc/api/admin/inventory_skus/creating_an_inventory_sku.json +6 -6
- data/doc/api/admin/inventory_skus/listing_inventory_skus.json +4 -4
- data/doc/api/admin/inventory_skus/removing_an_inventory_sku.json +3 -3
- data/doc/api/admin/inventory_skus/showing_an_inventory_sku.json +4 -4
- data/doc/api/admin/inventory_skus/updating_an_inventory_sku.json +3 -3
- data/doc/api/admin/navigation_menus/creating_a_menu.json +7 -7
- data/doc/api/admin/navigation_menus/listing_menus.json +4 -4
- data/doc/api/admin/navigation_menus/removing_a_navigation_menu.json +5 -5
- data/doc/api/admin/navigation_menus/showing_a_navigation_menu.json +6 -6
- data/doc/api/admin/navigation_menus/updating_a_navigation_menus.json +5 -5
- data/doc/api/admin/navigation_taxonomy/bulk_upserting_navigation_taxons.json +5 -5
- data/doc/api/admin/navigation_taxonomy/creating_a_taxon.json +7 -7
- data/doc/api/admin/navigation_taxonomy/listing_taxons.json +4 -4
- data/doc/api/admin/navigation_taxonomy/removing_a_navigation_taxon.json +5 -5
- data/doc/api/admin/navigation_taxonomy/showing_a_navigation_taxon.json +6 -6
- data/doc/api/admin/navigation_taxonomy/updating_a_navigation_taxons.json +5 -5
- data/doc/api/admin/orders/listing_orders.json +4 -4
- data/doc/api/admin/orders/showing_an_order.json +5 -5
- data/doc/api/admin/orders/viewing_orders_by_date_range.json +76 -0
- data/doc/api/admin/pages/bulk_upserting_pages.json +5 -5
- data/doc/api/admin/pages/creating_a_page.json +7 -7
- data/doc/api/admin/pages/listing_pages.json +4 -4
- data/doc/api/admin/pages/removing_a_page.json +5 -5
- data/doc/api/admin/pages/showing_a_page.json +6 -6
- data/doc/api/admin/pages/updating_a_page.json +6 -6
- data/doc/api/admin/payment_profiles/bulk_upserting_payment_profiles.json +5 -5
- data/doc/api/admin/payment_profiles/creating_a_payment_profile.json +7 -7
- data/doc/api/admin/payment_profiles/listing_payment_profiles.json +4 -4
- data/doc/api/admin/payment_profiles/removing_a_payment_profile.json +5 -5
- data/doc/api/admin/payment_profiles/showing_a_payment_profile.json +6 -6
- data/doc/api/admin/payment_profiles/updating_a_payment_profiles.json +5 -5
- data/doc/api/admin/payment_transactions/listing_payment_transactions.json +4 -4
- data/doc/api/admin/payment_transactions/showing_a_payment_transaction.json +6 -6
- data/doc/api/admin/payments/listing_payments.json +4 -4
- data/doc/api/admin/payments/showing_an_payment.json +4 -4
- data/doc/api/admin/prices/creating_a_pricing_sku_price.json +4 -4
- data/doc/api/admin/prices/listing_pricing_sku_prices.json +4 -4
- data/doc/api/admin/prices/removing_a_pricing_sku_price.json +5 -5
- data/doc/api/admin/prices/updating_a_pricing_sku_price.json +5 -5
- data/doc/api/admin/pricing_skus/bulk_upserting_pricing_skus.json +5 -5
- data/doc/api/admin/pricing_skus/creating_an_pricing_sku.json +6 -6
- data/doc/api/admin/pricing_skus/listing_pricing_skus.json +4 -4
- data/doc/api/admin/pricing_skus/removing_an_pricing_sku.json +3 -3
- data/doc/api/admin/pricing_skus/showing_an_pricing_sku.json +4 -4
- data/doc/api/admin/pricing_skus/updating_an_pricing_sku.json +3 -3
- data/doc/api/admin/product_images/creating_a_product_image_from_base64.json +7 -7
- data/doc/api/admin/product_images/creating_a_product_image_from_url.json +7 -7
- data/doc/api/admin/product_images/listing_product_images.json +7 -7
- data/doc/api/admin/product_images/removing_a_product_image.json +5 -5
- data/doc/api/admin/product_images/updating_a_product_image.json +5 -5
- data/doc/api/admin/products/bulk_upserting_products.json +5 -5
- data/doc/api/admin/products/creating_a_product.json +7 -7
- data/doc/api/admin/products/listing_products.json +4 -4
- data/doc/api/admin/products/removing_a_product.json +5 -5
- data/doc/api/admin/products/showing_a_product.json +6 -6
- data/doc/api/admin/products/updating_a_product.json +6 -6
- data/doc/api/admin/promo_code_lists/bulk_upserting_promo_code_lists.json +5 -5
- data/doc/api/admin/promo_code_lists/creating_a_promo_code_list.json +7 -7
- data/doc/api/admin/promo_code_lists/listing_promo_code_lists.json +4 -4
- data/doc/api/admin/promo_code_lists/removing_a_promo_code_list.json +5 -5
- data/doc/api/admin/promo_code_lists/showing_a_promo_code_list.json +6 -6
- data/doc/api/admin/promo_code_lists/updating_a_promo_code_list.json +5 -5
- data/doc/api/admin/recommendation_settings/showing_recommendation_settings.json +6 -6
- data/doc/api/admin/recommendation_settings/updating_recommendation_settings.json +5 -5
- data/doc/api/admin/redirects/bulk_upserting_redirects.json +5 -5
- data/doc/api/admin/redirects/creating_a_redirect.json +7 -7
- data/doc/api/admin/redirects/listing_redirects.json +4 -4
- data/doc/api/admin/redirects/removing_a_redirect.json +5 -5
- data/doc/api/admin/redirects/showing_a_redirect.json +6 -6
- data/doc/api/admin/redirects/updating_a_redirects.json +5 -5
- data/doc/api/admin/release_changes/adding_changes_to_a_release.json +6 -6
- data/doc/api/admin/releases/bulk_upserting_releases.json +5 -5
- data/doc/api/admin/releases/creating_a_release.json +7 -7
- data/doc/api/admin/releases/listing_releases.json +4 -4
- data/doc/api/admin/releases/removing_a_release.json +5 -5
- data/doc/api/admin/releases/showing_a_release.json +6 -6
- data/doc/api/admin/releases/updating_a_release.json +6 -6
- data/doc/api/admin/saved_addresses/creating_a_saved_address.json +7 -7
- data/doc/api/admin/saved_addresses/listing_saved_address.json +6 -6
- data/doc/api/admin/saved_addresses/removing_a_saved_address.json +5 -5
- data/doc/api/admin/saved_addresses/updating_a_saved_address.json +5 -5
- data/doc/api/admin/saved_credit_cards/creating_a_saved_credit_card.json +8 -8
- data/doc/api/admin/saved_credit_cards/listing_saved_credit_cards.json +6 -6
- data/doc/api/admin/saved_credit_cards/removing_a_saved_credit_card.json +5 -5
- data/doc/api/admin/saved_credit_cards/updating_a_saved_credit_card.json +5 -5
- data/doc/api/admin/shipping/listing_shipments.json +4 -4
- data/doc/api/admin/shipping/showing_a_shipment.json +6 -6
- data/doc/api/admin/shipping_rates/creating_a_shipping_rate.json +7 -7
- data/doc/api/admin/shipping_rates/listing_shipping_rates.json +6 -6
- data/doc/api/admin/shipping_rates/removing_a_shipping_rate.json +5 -5
- data/doc/api/admin/shipping_rates/updating_a_shipping_rate.json +5 -5
- data/doc/api/admin/shipping_services/bulk_upserting_shipping_services.json +5 -5
- data/doc/api/admin/shipping_services/creating_a_shipping_service.json +7 -7
- data/doc/api/admin/shipping_services/listing_shipping_services.json +4 -4
- data/doc/api/admin/shipping_services/removing_a_shipping_service.json +5 -5
- data/doc/api/admin/shipping_services/showing_a_shipping_service.json +7 -7
- data/doc/api/admin/shipping_services/updating_a_shipping_service.json +6 -6
- data/doc/api/admin/tax_categories/bulk_upserting_tax_categories.json +5 -5
- data/doc/api/admin/tax_categories/creating_a_tax_category.json +7 -7
- data/doc/api/admin/tax_categories/listing_tax_categories.json +5 -5
- data/doc/api/admin/tax_categories/removing_a_tax_category.json +5 -5
- data/doc/api/admin/tax_categories/showing_a_tax_category.json +7 -7
- data/doc/api/admin/tax_categories/updating_a_tax_categories.json +5 -5
- data/doc/api/admin/tax_rates/creating_a_tax_rate.json +8 -8
- data/doc/api/admin/tax_rates/listing_tax_rates.json +6 -6
- data/doc/api/admin/tax_rates/removing_a_tax_rate.json +5 -5
- data/doc/api/admin/tax_rates/updating_a_tax_rate.json +5 -5
- data/doc/api/admin/users/bulk_upserting_users.json +5 -5
- data/doc/api/admin/users/creating_a_user.json +7 -7
- data/doc/api/admin/users/listing_users.json +4 -4
- data/doc/api/admin/users/removing_a_user.json +5 -5
- data/doc/api/admin/users/showing_a_user_by_email.json +47 -0
- data/doc/api/admin/users/showing_a_user_by_id.json +47 -0
- data/doc/api/admin/users/updating_a_user.json +6 -6
- data/doc/api/admin/variants/creating_a_product_variant.json +6 -6
- data/doc/api/admin/variants/listing_product_variants.json +7 -7
- data/doc/api/admin/variants/removing_a_product_variant.json +5 -5
- data/doc/api/admin/variants/updating_a_product_variant.json +5 -5
- data/doc/api/storefront/accounts/creating_an_account.json +4 -4
- data/doc/api/storefront/accounts/getting_account_details.json +7 -7
- data/doc/api/storefront/accounts/updating_an_account.json +7 -7
- data/doc/api/storefront/analytics/saving_a_category_view.json +3 -3
- data/doc/api/storefront/analytics/saving_a_product_view.json +3 -3
- data/doc/api/storefront/analytics/saving_a_search.json +3 -3
- data/doc/api/storefront/assets/showing_an_asset.json +6 -6
- data/doc/api/storefront/authentication/creating_an_authentication_token.json +6 -6
- data/doc/api/storefront/authentication/refreshing_an_authentication_token.json +6 -6
- data/doc/api/storefront/authentication/using_an_authentication_token.json +6 -6
- data/doc/api/storefront/cart/adding_a_promo_code.json +7 -7
- data/doc/api/storefront/cart/adding_an_item.json +7 -7
- data/doc/api/storefront/cart/creating_a_new_cart_for_a_user.json +6 -6
- data/doc/api/storefront/cart/creating_a_new_guest_cart.json +4 -4
- data/doc/api/storefront/cart/delete_an_item.json +7 -7
- data/doc/api/storefront/cart/listing_user_s_carts.json +6 -6
- data/doc/api/storefront/cart/showing_cart.json +7 -7
- data/doc/api/storefront/cart/updating_an_item.json +7 -7
- data/doc/api/storefront/categories/showing_a_category.json +5 -5
- data/doc/api/storefront/categories/showing_a_listing_of_categories.json +5 -5
- data/doc/api/storefront/checkout/completing_a_checkout.json +7 -7
- data/doc/api/storefront/checkout/failure_to_update_a_checkout.json +52 -0
- data/doc/api/storefront/checkout/showing_a_checkout.json +6 -6
- data/doc/api/storefront/checkout/updating_a_checkout.json +6 -6
- data/doc/api/storefront/contacts/creating_a_contact.json +4 -4
- data/doc/api/storefront/email_signups/creating_an_email_signup.json +4 -4
- data/doc/api/storefront/email_signups/showing_an_email_signup_content.json +4 -4
- data/doc/api/storefront/index.json +7 -0
- data/doc/api/storefront/menus/listing_menus.json +5 -5
- data/doc/api/storefront/menus/showing_a_menu.json +7 -7
- data/doc/api/storefront/orders/listing_the_user_s_orders.json +6 -6
- data/doc/api/storefront/orders/showing_an_order.json +7 -7
- data/doc/api/storefront/pages/showing_a_page.json +5 -5
- data/doc/api/storefront/password_resets/sending_a_forgot_password_email.json +5 -5
- data/doc/api/storefront/personalized_recommendations/showing_recommendations_with_a_session_id.json +8 -8
- data/doc/api/storefront/personalized_recommendations/showing_recommendations_with_authentication.json +6 -6
- data/doc/api/storefront/products/showing_a_product.json +5 -5
- data/doc/api/storefront/products/showing_a_product_with_a_specific_sku_selected.json +5 -5
- data/doc/api/storefront/recent_views/showing_recent_views_from_authentication.json +6 -6
- data/doc/api/storefront/recent_views/showing_recent_views_with_a_session_id.json +7 -7
- data/doc/api/storefront/recent_views/updating_recent_views_with_a_session_id.json +3 -3
- data/doc/api/storefront/recent_views/updating_recent_views_with_authentication.json +5 -5
- data/doc/api/storefront/saved_addresses/creating_a_saved_address.json +6 -6
- data/doc/api/storefront/saved_addresses/deleting_a_saved_address.json +6 -6
- data/doc/api/storefront/saved_addresses/listing_the_user_s_saved_addresses.json +6 -6
- data/doc/api/storefront/saved_addresses/showing_a_saved_address.json +7 -7
- data/doc/api/storefront/saved_addresses/updating_a_saved_address.json +7 -7
- data/doc/api/storefront/saved_credit_cards/creating_a_saved_credit_card.json +7 -7
- data/doc/api/storefront/saved_credit_cards/deleting_a_saved_credit_card.json +6 -6
- data/doc/api/storefront/saved_credit_cards/listing_the_user_s_saved_credit_cards.json +6 -6
- data/doc/api/storefront/saved_credit_cards/showing_a_saved_credit_card.json +7 -7
- data/doc/api/storefront/saved_credit_cards/updating_a_saved_credit_card.json +8 -8
- data/doc/api/storefront/searches/showing_search_autocomplete_suggestions.json +4 -4
- data/doc/api/storefront/searches/showing_search_results.json +5 -5
- data/doc/api/storefront/segmentation/specifying_session_count_for_segmentation.json +10 -10
- data/doc/api/storefront/segmentation/using_session_ids_for_segmenting_non_authenticated_users.json +10 -10
- data/doc/api/storefront/system_content/showing_system_content.json +5 -5
- data/doc/api/storefront/system_content/showing_the_home_page.json +5 -5
- data/doc/api/storefront/taxons/showing_a_taxon.json +7 -7
- data/doc/api/storefront/validation_errors/checkout_validation_errors.json +8 -8
- data/doc/api/storefront/validation_errors/general_validation_errors.json +2 -2
- data/lib/tasks/docs.rake +20 -0
- data/lib/workarea/api/version.rb +1 -1
- data/storefront/test/documentation/workarea/api/storefront/checkouts_documentation_test.rb +21 -0
- data/storefront/test/documentation/workarea/api/storefront/validation_documentation_test.rb +1 -1
- data/storefront/workarea-api-storefront.gemspec +2 -2
- data/workarea-api.gemspec +1 -1
- metadata +23 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23e26db12c8a362c10c2566b015167cceccbf9b7dcac7e4c5c955b6773debb45
|
4
|
+
data.tar.gz: '0248a4920c9998e5c05b56b2f071308a09b6ff62419dd4e735af6bd2e276fb00'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c50f9e9991f07a91fd46d5f81be4fd846264960bd06c942fa190d9959f4559d41c3d5ab76520da0a4c897c600af29afa03a2f4ead5efbb1e496b53d7f7db0a19
|
7
|
+
data.tar.gz: bb7316920e34082949eadbd5b9c629d71a019ea9a9271c4226db8bbbef4284c7dc8e395b1d5385230c946cf6b6b251ca258da0cf339adf6c496ab541d1dcd475
|
data/CHANGELOG.md
CHANGED
@@ -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
|
-
|
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
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
|
-
#
|
76
|
+
# Build documentation
|
75
77
|
#
|
76
78
|
#
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
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
|
-
#
|
88
|
+
# Updating changelog
|
84
89
|
#
|
85
90
|
#
|
86
|
-
|
87
|
-
|
88
|
-
|
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.
|
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?
|
@@ -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.
|
18
|
-
s.add_dependency 'responders', '~>
|
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,
|
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": "
|
27
|
-
"X-Runtime": "0.
|
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\":\"
|
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\":\"
|
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/
|
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,
|
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": "
|
29
|
-
"X-Runtime": "0.
|
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\":\"
|
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\": \"
|
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\":\"
|
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,
|
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": "
|
41
|
-
"X-Runtime": "0.
|
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\": \"
|
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,
|
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": "
|
27
|
-
"X-Runtime": "0.
|
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/
|
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/
|
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,
|
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": "
|
27
|
-
"X-Runtime": "0.
|
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/
|
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\": \"
|
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/
|
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,
|
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": "
|
27
|
-
"X-Runtime": "0.
|
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/
|
33
|
-
"request_body": "{\"active\":true,\"active_segment_ids\":[],\"client_id\":null,\"created_at\":\"
|
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/
|
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",
|