@iblai/data-layer 1.5.3 → 1.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -41030,6 +41030,15 @@ const monetizationApiSlice = react.createApi({
41030
41030
  }),
41031
41031
  invalidatesTags: ['paywallConfig', 'paywalls'],
41032
41032
  }),
41033
+ updatePaywall: builder.mutation({
41034
+ query: ({ platform_key, item_type, item_id, ...body }) => ({
41035
+ url: MONETIZATION_ENDPOINTS.PAYWALL_CONFIG.path(platform_key, item_type, item_id),
41036
+ service: MONETIZATION_ENDPOINTS.PAYWALL_CONFIG.service,
41037
+ method: 'PUT',
41038
+ body: JSON.stringify(body),
41039
+ }),
41040
+ invalidatesTags: ['paywallConfig', 'paywalls'],
41041
+ }),
41033
41042
  disablePaywall: builder.mutation({
41034
41043
  query: ({ platform_key, item_type, item_id }) => ({
41035
41044
  url: MONETIZATION_ENDPOINTS.PAYWALL_CONFIG.path(platform_key, item_type, item_id),
@@ -41089,6 +41098,9 @@ const monetizationApiSlice = react.createApi({
41089
41098
  url: MONETIZATION_ENDPOINTS.ACCESS_CHECK.path(platform_key, item_type, item_id),
41090
41099
  service: MONETIZATION_ENDPOINTS.ACCESS_CHECK.service,
41091
41100
  method: 'GET',
41101
+ // Treat paywall-related 4xx (e.g. 402 Payment Required) as success so the
41102
+ // response body (has_access, pricing, reason, …) reaches the caller as `data`.
41103
+ validateStatus: (response) => response.ok || [402].includes(response.status),
41092
41104
  }),
41093
41105
  providesTags: ['accessCheck'],
41094
41106
  }),
@@ -41190,7 +41202,7 @@ const {
41190
41202
  // Flow 1: Stripe Connect
41191
41203
  useGetStripeConnectStatusQuery, useLazyGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useGetStripeConnectDashboardQuery, useLazyGetStripeConnectDashboardQuery,
41192
41204
  // Flow 2: Paywall Config
41193
- useGetPaywallConfigQuery, useLazyGetPaywallConfigQuery, useEnablePaywallMutation, useDisablePaywallMutation,
41205
+ useGetPaywallConfigQuery, useLazyGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useDisablePaywallMutation,
41194
41206
  // Flow 3: Prices
41195
41207
  useListPricesQuery, useLazyListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation,
41196
41208
  // Flow 4: Public Pricing
@@ -45501,6 +45513,7 @@ exports.useUpdateMemsearchConfigMutation = useUpdateMemsearchConfigMutation;
45501
45513
  exports.useUpdateMentorMemoryMutation = useUpdateMentorMemoryMutation;
45502
45514
  exports.useUpdateMentorSkillAssignmentMutation = useUpdateMentorSkillAssignmentMutation;
45503
45515
  exports.useUpdateMessageFeedbackMutation = useUpdateMessageFeedbackMutation;
45516
+ exports.useUpdatePaywallMutation = useUpdatePaywallMutation;
45504
45517
  exports.useUpdatePlatformImageAssetMutation = useUpdatePlatformImageAssetMutation;
45505
45518
  exports.useUpdatePlatformInfoMutation = useUpdatePlatformInfoMutation;
45506
45519
  exports.useUpdatePlatformMembershipMutation = useUpdatePlatformMembershipMutation;