@wellesley/instanceinfo 1.0.489 → 1.0.490

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +1 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1 +1 @@
1
- import{createAction as f,createSelector as o,createSlice as g}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";import{api as I,handleBasicResponse as p}from"https://cdn.jsdelivr.net/npm/@wellesley/openapi@1.0.616";const d=t=>{if("object"!=typeof t||null===t)return!1;let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||null===Object.getPrototypeOf(t)},P=t=>d(t)&&"type"in t&&"string"==typeof t.type,t=t=>{const e=e=>({type:t,payload:e});return e.toString=()=>`${t}`,e.type=t,e.match=e=>P(e)&&e.type===t,e};t("remoteReady"),t("askLogin"),t("reselectUser"),t("requestLogout"),t("setConfirmLeavePage"),t("requestChangePath"),t("wsSubscribe"),t("wsUnSubscribe"),t("hostStoreConnect"),t("remoteLogin"),t("remoteLogout"),t("wsOnMessage"),t("setRouterPath"),t("setDeviceType"),t("setUserError"),t("setUserIsError"),t("setUserPending"),t("setUserSuccess"),t("setUserData"),t("updateAccountData"),t("updateUser"),t("addNotification"),t("markNotification"),t("setNotificationsError"),t("setNotificationsList"),t("setNotificationsPending"),t("setNotificationsTotalCount"),t("setNotificationsUnreadCount"),t("resetNotificationsState"),t("undoNotification");const l=t("setInstanceInfo"),i=t("setInstanceInfoPending"),u=t("setInstanceInfoError");t("setPlatformSettings"),t("setProfileSettings"),t("setGroupData"),t("setGroupLoading"),f("requestMicroFrontendFetch"),f("sendMicroFrontendFetchResponse");const a=t=>t,c=o(a,(t=>t.data)),S=o(a,(t=>t.error)),y=o(a,(t=>t.isPending)),m=o(c,(t=>null==t?void 0:t.rules)),C=o(c,(t=>null==t?void 0:t.contact_account)),O=o(c,(t=>null==t?void 0:t.stats)),N={data:null,isPending:!1},E=g({name:"instanceInfo",initialState:N,reducers:{},extraReducers:t=>{t.addCase(l,((t,{payload:e})=>{t.data=e})).addCase(i,((t,{payload:e})=>{t.isPending=e})).addCase(u,((t,{payload:e})=>{t.error=e}))},selectors:{selectInstanceInfo:c,selectInstanceInfoError:S,selectInstanceInfoPending:y,selectPlatformRules:m,selectInstanceContacts:C,selectInstanceStats:O,selectRegistrations:t=>{var e;return null==(e=t.data)?void 0:e.configuration.registrations}}}),U=I.enhanceEndpoints({endpoints:{getApiV1Instance:{async onQueryStarted(t,{dispatch:e,queryFulfilled:n}){e(i(!0));try{const t=await p(n);t&&e(l(t.data))}catch(t){e(u(t))}finally{e(i(!1))}}}}}),{useGetApiV1InstanceQuery:L}=U;export{U as instanceInfoApi,E as instanceInfoSlice,L as useGetApiV1InstanceQuery};
1
+ import{createAction as f,createSelector as o,createSlice as g}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";import{api as I,handleBasicResponse as p}from"https://cdn.jsdelivr.net/npm/@wellesley/openapi@1.0.617";const d=t=>{if("object"!=typeof t||null===t)return!1;let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||null===Object.getPrototypeOf(t)},P=t=>d(t)&&"type"in t&&"string"==typeof t.type,t=t=>{const e=e=>({type:t,payload:e});return e.toString=()=>`${t}`,e.type=t,e.match=e=>P(e)&&e.type===t,e};t("remoteReady"),t("askLogin"),t("reselectUser"),t("requestLogout"),t("setConfirmLeavePage"),t("requestChangePath"),t("wsSubscribe"),t("wsUnSubscribe"),t("hostStoreConnect"),t("remoteLogin"),t("remoteLogout"),t("wsOnMessage"),t("setRouterPath"),t("setDeviceType"),t("setUserError"),t("setUserIsError"),t("setUserPending"),t("setUserSuccess"),t("setUserData"),t("updateAccountData"),t("updateUser"),t("addNotification"),t("markNotification"),t("setNotificationsError"),t("setNotificationsList"),t("setNotificationsPending"),t("setNotificationsTotalCount"),t("setNotificationsUnreadCount"),t("resetNotificationsState"),t("undoNotification");const l=t("setInstanceInfo"),i=t("setInstanceInfoPending"),u=t("setInstanceInfoError");t("setPlatformSettings"),t("setProfileSettings"),t("setGroupData"),t("setGroupLoading"),f("requestMicroFrontendFetch"),f("sendMicroFrontendFetchResponse");const a=t=>t,c=o(a,(t=>t.data)),m=o(a,(t=>t.error)),S=o(a,(t=>t.isPending)),y=o(c,(t=>null==t?void 0:t.rules)),O=o(c,(t=>null==t?void 0:t.contact_account)),C=o(c,(t=>(null==t?void 0:t.stats)&&Object.fromEntries(Object.entries(t.stats).map((([t,e])=>[t,e??0]))))),N={data:null,isPending:!1},A=g({name:"instanceInfo",initialState:N,reducers:{},extraReducers:t=>{t.addCase(l,((t,{payload:e})=>{t.data=e})).addCase(i,((t,{payload:e})=>{t.isPending=e})).addCase(u,((t,{payload:e})=>{t.error=e}))},selectors:{selectInstanceInfo:c,selectInstanceInfoError:m,selectInstanceInfoPending:S,selectPlatformRules:y,selectInstanceContacts:O,selectInstanceStats:C,selectRegistrations:t=>{var e;return null==(e=t.data)?void 0:e.configuration.registrations}}}),U=I.enhanceEndpoints({endpoints:{getApiV1Instance:{async onQueryStarted(t,{dispatch:e,queryFulfilled:n}){e(i(!0));try{const t=await p(n);t&&e(l(t.data))}catch(t){e(u(t))}finally{e(i(!1))}}}}}),{useGetApiV1InstanceQuery:E}=U;export{U as instanceInfoApi,A as instanceInfoSlice,E as useGetApiV1InstanceQuery};
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@wellesley/instanceinfo",
3
3
  "license": "UNLICENSED",
4
4
  "main": "index.mjs",
5
- "version": "1.0.489",
5
+ "version": "1.0.490",
6
6
  "files": [
7
7
  "*",
8
8
  "!.*",