spree_api 4.3.2 → 4.4.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (203) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/spree/api/v2/caching.rb +7 -3
  3. data/app/controllers/concerns/spree/api/v2/coupon_codes_helper.rb +29 -0
  4. data/app/controllers/concerns/spree/api/v2/number_resource.rb +11 -0
  5. data/app/controllers/concerns/spree/api/v2/platform/nested_set_reposition_concern.rb +37 -0
  6. data/app/controllers/concerns/spree/api/v2/platform/promotion_calculator_params.rb +17 -0
  7. data/app/controllers/concerns/spree/api/v2/platform/promotion_rule_params.rb +16 -0
  8. data/app/controllers/concerns/spree/api/v2/storefront/metadata_controller_concern.rb +18 -0
  9. data/app/controllers/spree/api/v1/checkouts_controller.rb +1 -1
  10. data/app/controllers/spree/api/v2/base_controller.rb +6 -5
  11. data/app/controllers/spree/api/v2/platform/adjustments_controller.rb +19 -0
  12. data/app/controllers/spree/api/v2/platform/classifications_controller.rb +1 -22
  13. data/app/controllers/spree/api/v2/platform/cms_pages_controller.rb +4 -0
  14. data/app/controllers/spree/api/v2/platform/cms_sections_controller.rb +13 -18
  15. data/app/controllers/spree/api/v2/platform/digital_links_controller.rb +25 -0
  16. data/app/controllers/spree/api/v2/platform/digitals_controller.rb +19 -0
  17. data/app/controllers/spree/api/v2/platform/line_items_controller.rb +59 -0
  18. data/app/controllers/spree/api/v2/platform/menu_items_controller.rb +5 -19
  19. data/app/controllers/spree/api/v2/platform/menus_controller.rb +0 -4
  20. data/app/controllers/spree/api/v2/platform/orders_controller.rb +163 -0
  21. data/app/controllers/spree/api/v2/platform/payment_methods_controller.rb +27 -0
  22. data/app/controllers/spree/api/v2/platform/payments_controller.rb +17 -0
  23. data/app/controllers/spree/api/v2/platform/promotion_actions_controller.rb +30 -0
  24. data/app/controllers/spree/api/v2/platform/promotion_categories_controller.rb +19 -0
  25. data/app/controllers/spree/api/v2/platform/promotion_rules_controller.rb +25 -0
  26. data/app/controllers/spree/api/v2/platform/promotions_controller.rb +31 -0
  27. data/app/controllers/spree/api/v2/platform/resource_controller.rb +47 -16
  28. data/app/controllers/spree/api/v2/platform/roles_controller.rb +15 -0
  29. data/app/controllers/spree/api/v2/platform/shipments_controller.rb +143 -0
  30. data/app/controllers/spree/api/v2/platform/shipping_categories_controller.rb +15 -0
  31. data/app/controllers/spree/api/v2/platform/shipping_methods_controller.rb +24 -0
  32. data/app/controllers/spree/api/v2/platform/states_controller.rb +19 -0
  33. data/app/controllers/spree/api/v2/platform/stock_items_controller.rb +19 -0
  34. data/app/controllers/spree/api/v2/platform/stock_locations_controller.rb +19 -0
  35. data/app/controllers/spree/api/v2/platform/store_credit_categories_controller.rb +15 -0
  36. data/app/controllers/spree/api/v2/platform/store_credit_types_controller.rb +15 -0
  37. data/app/controllers/spree/api/v2/platform/store_credits_controller.rb +19 -0
  38. data/app/controllers/spree/api/v2/platform/tax_categories_controller.rb +19 -0
  39. data/app/controllers/spree/api/v2/platform/tax_rates_controller.rb +23 -0
  40. data/app/controllers/spree/api/v2/platform/taxonomies_controller.rb +19 -0
  41. data/app/controllers/spree/api/v2/platform/taxons_controller.rb +25 -0
  42. data/app/controllers/spree/api/v2/platform/users_controller.rb +4 -0
  43. data/app/controllers/spree/api/v2/platform/variants_controller.rb +19 -0
  44. data/app/controllers/spree/api/v2/platform/webhooks/events_controller.rb +21 -0
  45. data/app/controllers/spree/api/v2/platform/webhooks/subscribers_controller.rb +21 -0
  46. data/app/controllers/spree/api/v2/platform/wished_items_controller.rb +19 -0
  47. data/app/controllers/spree/api/v2/platform/wishlists_controller.rb +19 -0
  48. data/app/controllers/spree/api/v2/platform/zones_controller.rb +19 -0
  49. data/app/controllers/spree/api/v2/resource_controller.rb +3 -3
  50. data/app/controllers/spree/api/v2/storefront/account/addresses_controller.rb +2 -2
  51. data/app/controllers/spree/api/v2/storefront/account/credit_cards_controller.rb +4 -1
  52. data/app/controllers/spree/api/v2/storefront/cart_controller.rb +18 -28
  53. data/app/controllers/spree/api/v2/storefront/checkout_controller.rb +24 -0
  54. data/app/controllers/spree/api/v2/storefront/digitals_controller.rb +54 -0
  55. data/app/controllers/spree/api/v2/storefront/wishlists_controller.rb +171 -0
  56. data/app/helpers/spree/api/v2/collection_options_helpers.rb +1 -1
  57. data/app/jobs/spree/webhooks/subscribers/make_request_job.rb +17 -0
  58. data/app/models/concerns/spree/webhooks/has_webhooks.rb +58 -0
  59. data/app/models/spree/api/webhooks/order_decorator.rb +43 -0
  60. data/app/models/spree/api/webhooks/payment_decorator.rb +26 -0
  61. data/app/models/spree/api/webhooks/product_decorator.rb +27 -0
  62. data/app/models/spree/api/webhooks/shipment_decorator.rb +21 -0
  63. data/app/models/spree/api/webhooks/stock_item_decorator.rb +43 -0
  64. data/app/models/spree/api/webhooks/stock_movement_decorator.rb +52 -0
  65. data/app/models/spree/api/webhooks/variant_decorator.rb +26 -0
  66. data/app/models/spree/oauth_access_grant.rb +7 -0
  67. data/app/models/spree/oauth_access_token.rb +7 -0
  68. data/app/models/spree/oauth_application.rb +15 -0
  69. data/app/models/spree/webhooks/base.rb +11 -0
  70. data/app/models/spree/webhooks/event.rb +12 -0
  71. data/app/models/spree/webhooks/subscriber.rb +57 -0
  72. data/app/serializers/concerns/spree/api/v2/resource_serializer_concern.rb +19 -1
  73. data/app/serializers/spree/api/v2/base_serializer.rb +11 -4
  74. data/app/serializers/spree/api/v2/platform/address_serializer.rb +1 -1
  75. data/app/serializers/spree/api/v2/platform/adjustment_serializer.rb +20 -0
  76. data/app/serializers/spree/api/v2/platform/asset_serializer.rb +13 -0
  77. data/app/serializers/spree/api/v2/platform/calculator_serializer.rb +17 -0
  78. data/app/serializers/spree/api/v2/platform/classification_serializer.rb +1 -1
  79. data/app/serializers/spree/api/v2/platform/cms_page_serializer.rb +1 -1
  80. data/app/serializers/spree/api/v2/platform/cms_section_serializer.rb +8 -1
  81. data/app/serializers/spree/api/v2/platform/country_serializer.rb +1 -1
  82. data/app/serializers/spree/api/v2/platform/credit_card_serializer.rb +14 -0
  83. data/app/serializers/spree/api/v2/platform/customer_return_serializer.rb +17 -0
  84. data/app/serializers/spree/api/v2/platform/digital_link_serializer.rb +16 -0
  85. data/app/serializers/spree/api/v2/platform/digital_serializer.rb +30 -0
  86. data/app/serializers/spree/api/v2/platform/feature_page_serializer.rb +11 -0
  87. data/app/serializers/spree/api/v2/platform/homepage_serializer.rb +11 -0
  88. data/app/serializers/spree/api/v2/platform/inventory_unit_serializer.rb +19 -0
  89. data/app/serializers/spree/api/v2/platform/line_item_serializer.rb +19 -0
  90. data/app/serializers/spree/api/v2/platform/log_entry_serializer.rb +13 -0
  91. data/app/serializers/spree/api/v2/platform/menu_item_serializer.rb +1 -1
  92. data/app/serializers/spree/api/v2/platform/menu_serializer.rb +1 -1
  93. data/app/serializers/spree/api/v2/platform/option_type_serializer.rb +1 -1
  94. data/app/serializers/spree/api/v2/platform/option_value_serializer.rb +1 -1
  95. data/app/serializers/spree/api/v2/platform/order_promotion_serializer.rb +14 -0
  96. data/app/serializers/spree/api/v2/platform/order_serializer.rb +31 -0
  97. data/app/serializers/spree/api/v2/platform/payment_capture_event_serializer.rb +13 -0
  98. data/app/serializers/spree/api/v2/platform/payment_method_serializer.rb +18 -0
  99. data/app/serializers/spree/api/v2/platform/payment_serializer.rb +21 -0
  100. data/app/serializers/spree/api/v2/platform/price_serializer.rb +19 -0
  101. data/app/serializers/spree/api/v2/platform/product_property_serializer.rb +1 -1
  102. data/app/serializers/spree/api/v2/platform/product_serializer.rb +7 -3
  103. data/app/serializers/spree/api/v2/platform/promotion_action_line_item_serializer.rb +14 -0
  104. data/app/serializers/spree/api/v2/platform/promotion_action_serializer.rb +19 -0
  105. data/app/serializers/spree/api/v2/platform/promotion_category_serializer.rb +13 -0
  106. data/app/serializers/spree/api/v2/platform/promotion_rule_serializer.rb +21 -0
  107. data/app/serializers/spree/api/v2/platform/promotion_serializer.rb +17 -0
  108. data/app/serializers/spree/api/v2/platform/property_serializer.rb +11 -0
  109. data/app/serializers/spree/api/v2/platform/prototype_serializer.rb +15 -0
  110. data/app/serializers/spree/api/v2/platform/refund_reason_serializer.rb +11 -0
  111. data/app/serializers/spree/api/v2/platform/refund_serializer.rb +16 -0
  112. data/app/serializers/spree/api/v2/platform/reimbursement_credit_serializer.rb +10 -0
  113. data/app/serializers/spree/api/v2/platform/reimbursement_serializer.rb +18 -0
  114. data/app/serializers/spree/api/v2/platform/reimbursement_type_serializer.rb +11 -0
  115. data/app/serializers/spree/api/v2/platform/return_authorization_reason_serializer.rb +11 -0
  116. data/app/serializers/spree/api/v2/platform/return_authorization_serializer.rb +17 -0
  117. data/app/serializers/spree/api/v2/platform/return_item_serializer.rb +16 -0
  118. data/app/serializers/spree/api/v2/platform/role_serializer.rb +11 -0
  119. data/app/serializers/spree/api/v2/platform/shipment_serializer.rb +22 -0
  120. data/app/serializers/spree/api/v2/platform/shipping_category_serializer.rb +11 -0
  121. data/app/serializers/spree/api/v2/platform/shipping_method_serializer.rb +16 -0
  122. data/app/serializers/spree/api/v2/platform/shipping_rate_serializer.rb +15 -0
  123. data/app/serializers/spree/api/v2/platform/standard_page_serializer.rb +11 -0
  124. data/app/serializers/spree/api/v2/platform/state_change_serializer.rb +13 -0
  125. data/app/serializers/spree/api/v2/platform/state_serializer.rb +1 -1
  126. data/app/serializers/spree/api/v2/platform/stock_item_serializer.rb +1 -3
  127. data/app/serializers/spree/api/v2/platform/stock_location_serializer.rb +2 -4
  128. data/app/serializers/spree/api/v2/platform/stock_movement_serializer.rb +11 -0
  129. data/app/serializers/spree/api/v2/platform/stock_transfer_serializer.rb +15 -0
  130. data/app/serializers/spree/api/v2/platform/store_credit_category_serializer.rb +12 -0
  131. data/app/serializers/spree/api/v2/platform/store_credit_event_serializer.rb +14 -0
  132. data/app/serializers/spree/api/v2/platform/store_credit_serializer.rb +18 -0
  133. data/app/serializers/spree/api/v2/platform/store_credit_type_serializer.rb +12 -0
  134. data/app/serializers/spree/api/v2/platform/store_serializer.rb +1 -1
  135. data/app/serializers/spree/api/v2/platform/tax_category_serializer.rb +2 -2
  136. data/app/serializers/spree/api/v2/platform/tax_rate_serializer.rb +14 -0
  137. data/app/serializers/spree/api/v2/platform/taxon_serializer.rb +1 -1
  138. data/app/serializers/spree/api/v2/platform/taxonomy_serializer.rb +1 -1
  139. data/app/serializers/spree/api/v2/platform/user_serializer.rb +1 -1
  140. data/app/serializers/spree/api/v2/platform/variant_serializer.rb +3 -2
  141. data/app/serializers/spree/api/v2/platform/webhooks/event_serializer.rb +15 -0
  142. data/app/serializers/spree/api/v2/platform/webhooks/subscriber_serializer.rb +13 -0
  143. data/app/serializers/spree/api/v2/platform/wished_item_serializer.rb +29 -0
  144. data/app/serializers/spree/api/v2/platform/wishlist_serializer.rb +19 -0
  145. data/app/serializers/spree/api/v2/platform/zone_member_serializer.rb +13 -0
  146. data/app/serializers/spree/api/v2/platform/zone_serializer.rb +13 -0
  147. data/app/serializers/spree/v2/storefront/address_serializer.rb +1 -1
  148. data/app/serializers/spree/v2/storefront/cart_serializer.rb +1 -1
  149. data/app/serializers/spree/v2/storefront/cms_section_serializer.rb +5 -1
  150. data/app/serializers/spree/v2/storefront/credit_card_serializer.rb +1 -1
  151. data/app/serializers/spree/v2/storefront/digital_link_serializer.rb +11 -0
  152. data/app/serializers/spree/v2/storefront/estimated_shipping_rate_serializer.rb +2 -2
  153. data/app/serializers/spree/v2/storefront/line_item_serializer.rb +2 -1
  154. data/app/serializers/spree/v2/storefront/option_type_serializer.rb +1 -1
  155. data/app/serializers/spree/v2/storefront/option_value_serializer.rb +1 -1
  156. data/app/serializers/spree/v2/storefront/payment_method_serializer.rb +1 -1
  157. data/app/serializers/spree/v2/storefront/payment_serializer.rb +1 -1
  158. data/app/serializers/spree/v2/storefront/product_serializer.rb +2 -2
  159. data/app/serializers/spree/v2/storefront/promotion_serializer.rb +1 -1
  160. data/app/serializers/spree/v2/storefront/shipment_serializer.rb +2 -1
  161. data/app/serializers/spree/v2/storefront/store_credit_serializer.rb +1 -1
  162. data/app/serializers/spree/v2/storefront/store_serializer.rb +1 -1
  163. data/app/serializers/spree/v2/storefront/taxon_serializer.rb +1 -1
  164. data/app/serializers/spree/v2/storefront/taxonomy_serializer.rb +1 -1
  165. data/app/serializers/spree/v2/storefront/user_serializer.rb +1 -1
  166. data/app/serializers/spree/v2/storefront/variant_serializer.rb +1 -1
  167. data/app/serializers/spree/v2/storefront/wished_item_serializer.rb +29 -0
  168. data/app/serializers/spree/v2/storefront/wishlist_serializer.rb +17 -0
  169. data/app/services/spree/webhooks/subscribers/handle_request.rb +73 -0
  170. data/app/services/spree/webhooks/subscribers/make_request.rb +82 -0
  171. data/app/services/spree/webhooks/subscribers/queue_requests.rb +17 -0
  172. data/app/services/spree/webhooks.rb +13 -0
  173. data/config/i18n-tasks.yml +40 -0
  174. data/config/initializers/doorkeeper.rb +12 -12
  175. data/config/initializers/rabl.rb +2 -2
  176. data/config/locales/en.yml +29 -27
  177. data/config/routes.rb +83 -59
  178. data/db/migrate/20210902162826_create_spree_webhooks_tables.rb +16 -0
  179. data/db/migrate/20210919183228_enable_polymorphic_resource_owner.rb +21 -0
  180. data/db/migrate/20211025162826_create_spree_webhooks_events.rb +14 -0
  181. data/docs/oauth/index.yml +126 -33
  182. data/docs/v2/platform/index.yaml +19100 -1736
  183. data/docs/v2/storefront/index.yaml +14797 -14609
  184. data/{app/models/spree → lib/spree/api}/api_dependencies.rb +56 -4
  185. data/lib/spree/api/engine.rb +24 -1
  186. data/lib/spree/api/testing_support/factories/oauth_application_factory.rb +6 -0
  187. data/lib/spree/api/testing_support/factories/webhook_event_factory.rb +27 -0
  188. data/lib/spree/api/testing_support/factories/webhook_subscriber_factory.rb +13 -0
  189. data/lib/spree/api/testing_support/factories.rb +3 -0
  190. data/lib/spree/api/testing_support/helpers.rb +1 -1
  191. data/lib/spree/api/testing_support/jobs.rb +18 -0
  192. data/lib/spree/api/testing_support/matchers/webhooks.rb +67 -0
  193. data/lib/spree/api/testing_support/serializers.rb +25 -0
  194. data/lib/spree/api/testing_support/spree_webhooks.rb +9 -0
  195. data/lib/spree/api/testing_support/v2/base.rb +1 -1
  196. data/lib/spree/api/testing_support/v2/current_order.rb +34 -1
  197. data/lib/spree/api/testing_support/v2/platform_contexts.rb +101 -52
  198. data/lib/spree/api/testing_support/v2/serializers_params.rb +3 -1
  199. data/lib/spree/api.rb +1 -0
  200. data/spec/fixtures/files/icon_256x256.jpg +0 -0
  201. data/spree_api.gemspec +16 -15
  202. metadata +177 -30
  203. data/app/controllers/spree/api/errors_controller.rb +0 -9
@@ -2,13 +2,15 @@ shared_context 'API v2 serializers params' do
2
2
  let(:store) { Spree::Store.default || create(:store, default: true) }
3
3
  let(:currency) { store.default_currency }
4
4
  let(:locale) { store.default_locale }
5
+ let(:zone) { Spree::Zone.default_tax || create(:zone, default_tax: true) }
5
6
 
6
7
  let(:serializer_params) do
7
8
  {
8
9
  store: store,
9
10
  currency: currency,
10
11
  user: nil,
11
- locale: locale
12
+ locale: locale,
13
+ price_options: { tax_zone: zone }
12
14
  }
13
15
  end
14
16
  end
data/lib/spree/api.rb CHANGED
@@ -8,4 +8,5 @@ module Spree
8
8
  end
9
9
  end
10
10
 
11
+ require 'spree/api/api_dependencies'
11
12
  require 'spree/api/engine'
data/spree_api.gemspec CHANGED
@@ -1,36 +1,37 @@
1
- # -*- encoding: utf-8 -*-
2
- require_relative '../core/lib/spree/core/version.rb'
1
+ require_relative '../core/lib/spree/core/version'
3
2
 
4
3
  Gem::Specification.new do |s|
5
- s.name = "spree_api"
4
+ s.name = 'spree_api'
6
5
  s.version = Spree.version
7
- s.authors = ["Ryan Bigg"]
8
- s.email = ["ryan@spreecommerce.com"]
6
+ s.authors = ['Ryan Bigg']
7
+ s.email = ['ryan@spreecommerce.com']
9
8
  s.summary = %q{Spree's API}
10
9
  s.description = %q{Spree's API}
11
10
  s.homepage = 'https://spreecommerce.org'
12
11
  s.license = 'BSD-3-Clause'
13
12
 
14
13
  s.metadata = {
15
- "bug_tracker_uri" => "https://github.com/spree/spree/issues",
16
- "changelog_uri" => "https://github.com/spree/spree/releases/tag/v#{s.version}",
17
- "documentation_uri" => "https://dev-docs.spreecommerce.org/",
18
- "source_code_uri" => "https://github.com/spree/spree/tree/v#{s.version}",
14
+ 'bug_tracker_uri' => 'https://github.com/spree/spree/issues',
15
+ 'changelog_uri' => "https://github.com/spree/spree/releases/tag/v#{s.version}",
16
+ 'documentation_uri' => 'https://dev-docs.spreecommerce.org/',
17
+ 'source_code_uri' => "https://github.com/spree/spree/tree/v#{s.version}",
19
18
  }
20
19
 
21
20
  s.required_ruby_version = '>= 2.5'
22
21
 
23
22
  s.files = `git ls-files`.split($\).reject { |f| f.match(/^spec/) && !f.match(/^spec\/fixtures/) }
24
- s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
25
- s.require_paths = ["lib"]
23
+ s.executables = s.files.grep(%r{^bin/}).map { |f| File.basename(f) }
24
+ s.require_paths = ['lib']
26
25
 
26
+ s.add_development_dependency 'i18n-tasks'
27
27
  s.add_development_dependency 'jsonapi-rspec'
28
- s.add_development_dependency 'rswag-specs'
29
28
  s.add_development_dependency 'multi_json'
29
+ s.add_development_dependency 'rswag-specs'
30
30
 
31
- s.add_dependency 'spree_core', s.version
32
- s.add_dependency 'rabl', '~> 0.14', '>= 0.14.2'
31
+ s.add_dependency 'bcrypt', '~> 3.1'
32
+ s.add_dependency 'doorkeeper', '~> 5.3'
33
33
  s.add_dependency 'jsonapi-serializer', '~> 2.1'
34
- s.add_dependency 'doorkeeper', '~> 5.2', '>= 5.2.1'
34
+ s.add_dependency 'rabl', '~> 0.14', '>= 0.14.2'
35
35
  s.add_dependency 'responders'
36
+ s.add_dependency 'spree_core', s.version
36
37
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.2
4
+ version: 4.4.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Bigg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-01 00:00:00.000000000 Z
11
+ date: 2021-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: jsonapi-rspec
14
+ name: i18n-tasks
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rswag-specs
28
+ name: jsonapi-rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -53,39 +53,47 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: spree_core
56
+ name: rswag-specs
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 4.3.2
62
- type: :runtime
61
+ version: '0'
62
+ type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 4.3.2
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rabl
70
+ name: bcrypt
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.14'
76
- - - ">="
77
- - !ruby/object:Gem::Version
78
- version: 0.14.2
75
+ version: '3.1'
79
76
  type: :runtime
80
77
  prerelease: false
81
78
  version_requirements: !ruby/object:Gem::Requirement
82
79
  requirements:
83
80
  - - "~>"
84
81
  - !ruby/object:Gem::Version
85
- version: '0.14'
86
- - - ">="
82
+ version: '3.1'
83
+ - !ruby/object:Gem::Dependency
84
+ name: doorkeeper
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
87
88
  - !ruby/object:Gem::Version
88
- version: 0.14.2
89
+ version: '5.3'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '5.3'
89
97
  - !ruby/object:Gem::Dependency
90
98
  name: jsonapi-serializer
91
99
  requirement: !ruby/object:Gem::Requirement
@@ -101,25 +109,25 @@ dependencies:
101
109
  - !ruby/object:Gem::Version
102
110
  version: '2.1'
103
111
  - !ruby/object:Gem::Dependency
104
- name: doorkeeper
112
+ name: rabl
105
113
  requirement: !ruby/object:Gem::Requirement
106
114
  requirements:
107
115
  - - "~>"
108
116
  - !ruby/object:Gem::Version
109
- version: '5.2'
117
+ version: '0.14'
110
118
  - - ">="
111
119
  - !ruby/object:Gem::Version
112
- version: 5.2.1
120
+ version: 0.14.2
113
121
  type: :runtime
114
122
  prerelease: false
115
123
  version_requirements: !ruby/object:Gem::Requirement
116
124
  requirements:
117
125
  - - "~>"
118
126
  - !ruby/object:Gem::Version
119
- version: '5.2'
127
+ version: '0.14'
120
128
  - - ">="
121
129
  - !ruby/object:Gem::Version
122
- version: 5.2.1
130
+ version: 0.14.2
123
131
  - !ruby/object:Gem::Dependency
124
132
  name: responders
125
133
  requirement: !ruby/object:Gem::Requirement
@@ -134,6 +142,20 @@ dependencies:
134
142
  - - ">="
135
143
  - !ruby/object:Gem::Version
136
144
  version: '0'
145
+ - !ruby/object:Gem::Dependency
146
+ name: spree_core
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - '='
150
+ - !ruby/object:Gem::Version
151
+ version: 4.4.0.rc1
152
+ type: :runtime
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - '='
157
+ - !ruby/object:Gem::Version
158
+ version: 4.4.0.rc1
137
159
  description: Spree's API
138
160
  email:
139
161
  - ryan@spreecommerce.com
@@ -146,10 +168,15 @@ files:
146
168
  - LICENSE
147
169
  - Rakefile
148
170
  - app/controllers/concerns/spree/api/v2/caching.rb
171
+ - app/controllers/concerns/spree/api/v2/coupon_codes_helper.rb
172
+ - app/controllers/concerns/spree/api/v2/number_resource.rb
173
+ - app/controllers/concerns/spree/api/v2/platform/nested_set_reposition_concern.rb
174
+ - app/controllers/concerns/spree/api/v2/platform/promotion_calculator_params.rb
175
+ - app/controllers/concerns/spree/api/v2/platform/promotion_rule_params.rb
149
176
  - app/controllers/concerns/spree/api/v2/product_list_includes.rb
177
+ - app/controllers/concerns/spree/api/v2/storefront/metadata_controller_concern.rb
150
178
  - app/controllers/concerns/spree/api/v2/storefront/order_concern.rb
151
179
  - app/controllers/spree/api/base_controller.rb
152
- - app/controllers/spree/api/errors_controller.rb
153
180
  - app/controllers/spree/api/v1/addresses_controller.rb
154
181
  - app/controllers/spree/api/v1/checkouts_controller.rb
155
182
  - app/controllers/spree/api/v1/classifications_controller.rb
@@ -182,18 +209,48 @@ files:
182
209
  - app/controllers/spree/api/v1/zones_controller.rb
183
210
  - app/controllers/spree/api/v2/base_controller.rb
184
211
  - app/controllers/spree/api/v2/platform/addresses_controller.rb
212
+ - app/controllers/spree/api/v2/platform/adjustments_controller.rb
185
213
  - app/controllers/spree/api/v2/platform/classifications_controller.rb
186
214
  - app/controllers/spree/api/v2/platform/cms_pages_controller.rb
187
215
  - app/controllers/spree/api/v2/platform/cms_sections_controller.rb
188
216
  - app/controllers/spree/api/v2/platform/countries_controller.rb
217
+ - app/controllers/spree/api/v2/platform/digital_links_controller.rb
218
+ - app/controllers/spree/api/v2/platform/digitals_controller.rb
219
+ - app/controllers/spree/api/v2/platform/line_items_controller.rb
189
220
  - app/controllers/spree/api/v2/platform/menu_items_controller.rb
190
221
  - app/controllers/spree/api/v2/platform/menus_controller.rb
191
222
  - app/controllers/spree/api/v2/platform/option_types_controller.rb
192
223
  - app/controllers/spree/api/v2/platform/option_values_controller.rb
224
+ - app/controllers/spree/api/v2/platform/orders_controller.rb
225
+ - app/controllers/spree/api/v2/platform/payment_methods_controller.rb
226
+ - app/controllers/spree/api/v2/platform/payments_controller.rb
193
227
  - app/controllers/spree/api/v2/platform/products_controller.rb
228
+ - app/controllers/spree/api/v2/platform/promotion_actions_controller.rb
229
+ - app/controllers/spree/api/v2/platform/promotion_categories_controller.rb
230
+ - app/controllers/spree/api/v2/platform/promotion_rules_controller.rb
231
+ - app/controllers/spree/api/v2/platform/promotions_controller.rb
194
232
  - app/controllers/spree/api/v2/platform/resource_controller.rb
233
+ - app/controllers/spree/api/v2/platform/roles_controller.rb
234
+ - app/controllers/spree/api/v2/platform/shipments_controller.rb
235
+ - app/controllers/spree/api/v2/platform/shipping_categories_controller.rb
236
+ - app/controllers/spree/api/v2/platform/shipping_methods_controller.rb
237
+ - app/controllers/spree/api/v2/platform/states_controller.rb
238
+ - app/controllers/spree/api/v2/platform/stock_items_controller.rb
239
+ - app/controllers/spree/api/v2/platform/stock_locations_controller.rb
240
+ - app/controllers/spree/api/v2/platform/store_credit_categories_controller.rb
241
+ - app/controllers/spree/api/v2/platform/store_credit_types_controller.rb
242
+ - app/controllers/spree/api/v2/platform/store_credits_controller.rb
243
+ - app/controllers/spree/api/v2/platform/tax_categories_controller.rb
244
+ - app/controllers/spree/api/v2/platform/tax_rates_controller.rb
245
+ - app/controllers/spree/api/v2/platform/taxonomies_controller.rb
195
246
  - app/controllers/spree/api/v2/platform/taxons_controller.rb
196
247
  - app/controllers/spree/api/v2/platform/users_controller.rb
248
+ - app/controllers/spree/api/v2/platform/variants_controller.rb
249
+ - app/controllers/spree/api/v2/platform/webhooks/events_controller.rb
250
+ - app/controllers/spree/api/v2/platform/webhooks/subscribers_controller.rb
251
+ - app/controllers/spree/api/v2/platform/wished_items_controller.rb
252
+ - app/controllers/spree/api/v2/platform/wishlists_controller.rb
253
+ - app/controllers/spree/api/v2/platform/zones_controller.rb
197
254
  - app/controllers/spree/api/v2/resource_controller.rb
198
255
  - app/controllers/spree/api/v2/storefront/account/addresses_controller.rb
199
256
  - app/controllers/spree/api/v2/storefront/account/credit_cards_controller.rb
@@ -203,47 +260,116 @@ files:
203
260
  - app/controllers/spree/api/v2/storefront/checkout_controller.rb
204
261
  - app/controllers/spree/api/v2/storefront/cms_pages_controller.rb
205
262
  - app/controllers/spree/api/v2/storefront/countries_controller.rb
263
+ - app/controllers/spree/api/v2/storefront/digitals_controller.rb
206
264
  - app/controllers/spree/api/v2/storefront/menus_controller.rb
207
265
  - app/controllers/spree/api/v2/storefront/order_status_controller.rb
208
266
  - app/controllers/spree/api/v2/storefront/products_controller.rb
209
267
  - app/controllers/spree/api/v2/storefront/stores_controller.rb
210
268
  - app/controllers/spree/api/v2/storefront/taxons_controller.rb
269
+ - app/controllers/spree/api/v2/storefront/wishlists_controller.rb
211
270
  - app/helpers/spree/api/api_helpers.rb
212
271
  - app/helpers/spree/api/v2/collection_options_helpers.rb
213
272
  - app/helpers/spree/api/v2/display_money_helper.rb
273
+ - app/jobs/spree/webhooks/subscribers/make_request_job.rb
214
274
  - app/models/concerns/spree/user_api_authentication.rb
215
275
  - app/models/concerns/spree/user_api_methods.rb
276
+ - app/models/concerns/spree/webhooks/has_webhooks.rb
277
+ - app/models/spree/api/webhooks/order_decorator.rb
278
+ - app/models/spree/api/webhooks/payment_decorator.rb
279
+ - app/models/spree/api/webhooks/product_decorator.rb
280
+ - app/models/spree/api/webhooks/shipment_decorator.rb
281
+ - app/models/spree/api/webhooks/stock_item_decorator.rb
282
+ - app/models/spree/api/webhooks/stock_movement_decorator.rb
283
+ - app/models/spree/api/webhooks/variant_decorator.rb
216
284
  - app/models/spree/api_configuration.rb
217
- - app/models/spree/api_dependencies.rb
285
+ - app/models/spree/oauth_access_grant.rb
286
+ - app/models/spree/oauth_access_token.rb
287
+ - app/models/spree/oauth_application.rb
288
+ - app/models/spree/webhooks/base.rb
289
+ - app/models/spree/webhooks/event.rb
290
+ - app/models/spree/webhooks/subscriber.rb
218
291
  - app/presenters/spree/api/products/filters_presenter.rb
219
292
  - app/serializers/concerns/spree/api/v2/image_transformation_concern.rb
220
293
  - app/serializers/concerns/spree/api/v2/resource_serializer_concern.rb
221
294
  - app/serializers/concerns/spree/api/v2/taxon_image_transformation_concern.rb
222
295
  - app/serializers/spree/api/v2/base_serializer.rb
223
296
  - app/serializers/spree/api/v2/platform/address_serializer.rb
297
+ - app/serializers/spree/api/v2/platform/adjustment_serializer.rb
298
+ - app/serializers/spree/api/v2/platform/asset_serializer.rb
224
299
  - app/serializers/spree/api/v2/platform/base_serializer.rb
300
+ - app/serializers/spree/api/v2/platform/calculator_serializer.rb
225
301
  - app/serializers/spree/api/v2/platform/classification_serializer.rb
226
302
  - app/serializers/spree/api/v2/platform/cms_page_serializer.rb
227
303
  - app/serializers/spree/api/v2/platform/cms_section_serializer.rb
228
304
  - app/serializers/spree/api/v2/platform/country_serializer.rb
305
+ - app/serializers/spree/api/v2/platform/credit_card_serializer.rb
306
+ - app/serializers/spree/api/v2/platform/customer_return_serializer.rb
307
+ - app/serializers/spree/api/v2/platform/digital_link_serializer.rb
308
+ - app/serializers/spree/api/v2/platform/digital_serializer.rb
309
+ - app/serializers/spree/api/v2/platform/feature_page_serializer.rb
310
+ - app/serializers/spree/api/v2/platform/homepage_serializer.rb
229
311
  - app/serializers/spree/api/v2/platform/icon_serializer.rb
230
312
  - app/serializers/spree/api/v2/platform/image_serializer.rb
313
+ - app/serializers/spree/api/v2/platform/inventory_unit_serializer.rb
314
+ - app/serializers/spree/api/v2/platform/line_item_serializer.rb
315
+ - app/serializers/spree/api/v2/platform/log_entry_serializer.rb
231
316
  - app/serializers/spree/api/v2/platform/menu_item_serializer.rb
232
317
  - app/serializers/spree/api/v2/platform/menu_serializer.rb
233
318
  - app/serializers/spree/api/v2/platform/option_type_serializer.rb
234
319
  - app/serializers/spree/api/v2/platform/option_value_serializer.rb
320
+ - app/serializers/spree/api/v2/platform/order_promotion_serializer.rb
321
+ - app/serializers/spree/api/v2/platform/order_serializer.rb
322
+ - app/serializers/spree/api/v2/platform/payment_capture_event_serializer.rb
323
+ - app/serializers/spree/api/v2/platform/payment_method_serializer.rb
324
+ - app/serializers/spree/api/v2/platform/payment_serializer.rb
325
+ - app/serializers/spree/api/v2/platform/price_serializer.rb
235
326
  - app/serializers/spree/api/v2/platform/product_property_serializer.rb
236
327
  - app/serializers/spree/api/v2/platform/product_serializer.rb
328
+ - app/serializers/spree/api/v2/platform/promotion_action_line_item_serializer.rb
329
+ - app/serializers/spree/api/v2/platform/promotion_action_serializer.rb
330
+ - app/serializers/spree/api/v2/platform/promotion_category_serializer.rb
331
+ - app/serializers/spree/api/v2/platform/promotion_rule_serializer.rb
332
+ - app/serializers/spree/api/v2/platform/promotion_serializer.rb
333
+ - app/serializers/spree/api/v2/platform/property_serializer.rb
334
+ - app/serializers/spree/api/v2/platform/prototype_serializer.rb
335
+ - app/serializers/spree/api/v2/platform/refund_reason_serializer.rb
336
+ - app/serializers/spree/api/v2/platform/refund_serializer.rb
337
+ - app/serializers/spree/api/v2/platform/reimbursement_credit_serializer.rb
338
+ - app/serializers/spree/api/v2/platform/reimbursement_serializer.rb
339
+ - app/serializers/spree/api/v2/platform/reimbursement_type_serializer.rb
340
+ - app/serializers/spree/api/v2/platform/return_authorization_reason_serializer.rb
341
+ - app/serializers/spree/api/v2/platform/return_authorization_serializer.rb
342
+ - app/serializers/spree/api/v2/platform/return_item_serializer.rb
343
+ - app/serializers/spree/api/v2/platform/role_serializer.rb
344
+ - app/serializers/spree/api/v2/platform/shipment_serializer.rb
345
+ - app/serializers/spree/api/v2/platform/shipping_category_serializer.rb
346
+ - app/serializers/spree/api/v2/platform/shipping_method_serializer.rb
347
+ - app/serializers/spree/api/v2/platform/shipping_rate_serializer.rb
348
+ - app/serializers/spree/api/v2/platform/standard_page_serializer.rb
349
+ - app/serializers/spree/api/v2/platform/state_change_serializer.rb
237
350
  - app/serializers/spree/api/v2/platform/state_serializer.rb
238
351
  - app/serializers/spree/api/v2/platform/stock_item_serializer.rb
239
352
  - app/serializers/spree/api/v2/platform/stock_location_serializer.rb
353
+ - app/serializers/spree/api/v2/platform/stock_movement_serializer.rb
354
+ - app/serializers/spree/api/v2/platform/stock_transfer_serializer.rb
355
+ - app/serializers/spree/api/v2/platform/store_credit_category_serializer.rb
356
+ - app/serializers/spree/api/v2/platform/store_credit_event_serializer.rb
357
+ - app/serializers/spree/api/v2/platform/store_credit_serializer.rb
358
+ - app/serializers/spree/api/v2/platform/store_credit_type_serializer.rb
240
359
  - app/serializers/spree/api/v2/platform/store_serializer.rb
241
360
  - app/serializers/spree/api/v2/platform/tax_category_serializer.rb
361
+ - app/serializers/spree/api/v2/platform/tax_rate_serializer.rb
242
362
  - app/serializers/spree/api/v2/platform/taxon_image_serializer.rb
243
363
  - app/serializers/spree/api/v2/platform/taxon_serializer.rb
244
364
  - app/serializers/spree/api/v2/platform/taxonomy_serializer.rb
245
365
  - app/serializers/spree/api/v2/platform/user_serializer.rb
246
366
  - app/serializers/spree/api/v2/platform/variant_serializer.rb
367
+ - app/serializers/spree/api/v2/platform/webhooks/event_serializer.rb
368
+ - app/serializers/spree/api/v2/platform/webhooks/subscriber_serializer.rb
369
+ - app/serializers/spree/api/v2/platform/wished_item_serializer.rb
370
+ - app/serializers/spree/api/v2/platform/wishlist_serializer.rb
371
+ - app/serializers/spree/api/v2/platform/zone_member_serializer.rb
372
+ - app/serializers/spree/api/v2/platform/zone_serializer.rb
247
373
  - app/serializers/spree/v2/storefront/address_serializer.rb
248
374
  - app/serializers/spree/v2/storefront/base_serializer.rb
249
375
  - app/serializers/spree/v2/storefront/cart_serializer.rb
@@ -251,6 +377,7 @@ files:
251
377
  - app/serializers/spree/v2/storefront/cms_section_serializer.rb
252
378
  - app/serializers/spree/v2/storefront/country_serializer.rb
253
379
  - app/serializers/spree/v2/storefront/credit_card_serializer.rb
380
+ - app/serializers/spree/v2/storefront/digital_link_serializer.rb
254
381
  - app/serializers/spree/v2/storefront/estimated_shipping_rate_serializer.rb
255
382
  - app/serializers/spree/v2/storefront/icon_serializer.rb
256
383
  - app/serializers/spree/v2/storefront/image_serializer.rb
@@ -278,7 +405,13 @@ files:
278
405
  - app/serializers/spree/v2/storefront/taxonomy_serializer.rb
279
406
  - app/serializers/spree/v2/storefront/user_serializer.rb
280
407
  - app/serializers/spree/v2/storefront/variant_serializer.rb
408
+ - app/serializers/spree/v2/storefront/wished_item_serializer.rb
409
+ - app/serializers/spree/v2/storefront/wishlist_serializer.rb
281
410
  - app/services/spree/api/error_handler.rb
411
+ - app/services/spree/webhooks.rb
412
+ - app/services/spree/webhooks/subscribers/handle_request.rb
413
+ - app/services/spree/webhooks/subscribers/make_request.rb
414
+ - app/services/spree/webhooks/subscribers/queue_requests.rb
282
415
  - app/views/spree/api/errors/gateway_error.rabl
283
416
  - app/views/spree/api/errors/invalid_api_key.rabl
284
417
  - app/views/spree/api/errors/invalid_resource.rabl
@@ -376,6 +509,7 @@ files:
376
509
  - app/views/spree/api/v1/variants/small.rabl
377
510
  - app/views/spree/api/v1/zones/index.rabl
378
511
  - app/views/spree/api/v1/zones/show.rabl
512
+ - config/i18n-tasks.yml
379
513
  - config/initializers/doorkeeper.rb
380
514
  - config/initializers/json_api_mime_types.rb
381
515
  - config/initializers/rabl.rb
@@ -388,23 +522,36 @@ files:
388
522
  - db/migrate/20131017162334_add_index_to_user_spree_api_key.rb
389
523
  - db/migrate/20180320110726_create_doorkeeper_tables.rb
390
524
  - db/migrate/20210727102516_change_integer_id_columns_type.rb
525
+ - db/migrate/20210902162826_create_spree_webhooks_tables.rb
526
+ - db/migrate/20210919183228_enable_polymorphic_resource_owner.rb
527
+ - db/migrate/20211025162826_create_spree_webhooks_events.rb
391
528
  - docs/oauth/index.yml
392
529
  - docs/v2/platform/index.yaml
393
530
  - docs/v2/storefront/index.yaml
394
531
  - lib/spree/api.rb
532
+ - lib/spree/api/api_dependencies.rb
395
533
  - lib/spree/api/controller_setup.rb
396
534
  - lib/spree/api/engine.rb
397
535
  - lib/spree/api/responders.rb
398
536
  - lib/spree/api/responders/rabl_template.rb
399
537
  - lib/spree/api/testing_support/caching.rb
538
+ - lib/spree/api/testing_support/factories.rb
539
+ - lib/spree/api/testing_support/factories/oauth_application_factory.rb
540
+ - lib/spree/api/testing_support/factories/webhook_event_factory.rb
541
+ - lib/spree/api/testing_support/factories/webhook_subscriber_factory.rb
400
542
  - lib/spree/api/testing_support/helpers.rb
543
+ - lib/spree/api/testing_support/jobs.rb
544
+ - lib/spree/api/testing_support/matchers/webhooks.rb
545
+ - lib/spree/api/testing_support/serializers.rb
401
546
  - lib/spree/api/testing_support/setup.rb
547
+ - lib/spree/api/testing_support/spree_webhooks.rb
402
548
  - lib/spree/api/testing_support/v2/base.rb
403
549
  - lib/spree/api/testing_support/v2/current_order.rb
404
550
  - lib/spree/api/testing_support/v2/platform_contexts.rb
405
551
  - lib/spree/api/testing_support/v2/serializers_params.rb
406
552
  - lib/spree_api.rb
407
553
  - script/rails
554
+ - spec/fixtures/files/icon_256x256.jpg
408
555
  - spec/fixtures/thinking-cat.jpg
409
556
  - spree_api.gemspec
410
557
  homepage: https://spreecommerce.org
@@ -412,9 +559,9 @@ licenses:
412
559
  - BSD-3-Clause
413
560
  metadata:
414
561
  bug_tracker_uri: https://github.com/spree/spree/issues
415
- changelog_uri: https://github.com/spree/spree/releases/tag/v4.3.2
562
+ changelog_uri: https://github.com/spree/spree/releases/tag/v4.4.0.rc1
416
563
  documentation_uri: https://dev-docs.spreecommerce.org/
417
- source_code_uri: https://github.com/spree/spree/tree/v4.3.2
564
+ source_code_uri: https://github.com/spree/spree/tree/v4.4.0.rc1
418
565
  post_install_message:
419
566
  rdoc_options: []
420
567
  require_paths:
@@ -426,11 +573,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
426
573
  version: '2.5'
427
574
  required_rubygems_version: !ruby/object:Gem::Requirement
428
575
  requirements:
429
- - - ">="
576
+ - - ">"
430
577
  - !ruby/object:Gem::Version
431
- version: '0'
578
+ version: 1.3.1
432
579
  requirements: []
433
- rubygems_version: 3.0.9
580
+ rubygems_version: 3.2.22
434
581
  signing_key:
435
582
  specification_version: 4
436
583
  summary: Spree's API
@@ -1,9 +0,0 @@
1
- module Spree
2
- module Api
3
- class ErrorsController < ActionController::API
4
- def render_404
5
- render 'spree/api/errors/not_found', status: 404
6
- end
7
- end
8
- end
9
- end