woodsportal-client-sdk 1.1.4-dev.2 → 1.1.4-dev.21

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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/adapters/shared/bindStoreWithActions.ts"],"names":[],"mappings":";AAKO,SAAS,oBAAA,CAIZ,OACA,OAAA,EACF;AACE,EAAA,MAAM,WAAA,GAAc,OAAO,EAAE,GAAG,MAAM,QAAA,EAAS,EAAG,GAAG,OAAA,EAAQ,CAAA;AAE7D,EAAA,MAAM,YAAY,CAAC,aAAA,KACf,MAAM,SAAA,CAAU,MAAM,eAAe,CAAA;AAEzC,EAAA,OAAO,EAAE,aAAa,SAAA,EAAU;AACpC","file":"chunk-Y5MRAAGK.js","sourcesContent":["export interface SubscribableStore<TState> {\n getState(): TState;\n subscribe(listener: (state: TState) => void): () => void;\n}\n\nexport function bindStoreWithActions<\n TState extends object,\n TActions extends object,\n>(\n store: SubscribableStore<TState>,\n actions: TActions,\n) {\n const getSnapshot = () => ({ ...store.getState(), ...actions }) as TState & TActions;\n\n const subscribe = (onStoreChange: () => void) =>\n store.subscribe(() => onStoreChange());\n\n return { getSnapshot, subscribe };\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  interface Config {
2
2
  hubId: string;
3
3
  devPortalId: string;
4
+ portalId: string;
5
+ devApiUrl: string;
4
6
  }
5
7
  interface MutationOptions<TSuccess, TError = unknown> {
6
8
  onSuccess?: (data: TSuccess, payload: any) => void | Promise<void>;
@@ -133,6 +135,11 @@ declare function list$3(options?: MutationOptions<any, any>): {
133
135
  getObjects: (payload?: any) => Promise<any>;
134
136
  isLoading: () => boolean;
135
137
  };
138
+ declare function sideBarList(options?: MutationOptions<any, any>): {
139
+ mutate: (payload?: any) => Promise<any>;
140
+ getSideBarObjects: (payload?: any) => Promise<any>;
141
+ isLoading: () => boolean;
142
+ };
136
143
  declare function form(options?: MutationOptions<any, any>): {
137
144
  mutate: (payload?: any) => Promise<any>;
138
145
  getObjectsForm: (payload?: any) => Promise<any>;
@@ -233,6 +240,17 @@ declare function addFile(options?: MutationOptions<any, any>): {
233
240
  isLoading: () => boolean;
234
241
  };
235
242
 
243
+ declare function purge(options?: MutationOptions<unknown, unknown>): {
244
+ mutate: (payload?: Record<string, unknown> | undefined) => Promise<unknown>;
245
+ purgeCache: (payload?: Record<string, unknown> | undefined) => Promise<unknown>;
246
+ isLoading: () => boolean;
247
+ };
248
+ declare function purgeStatus(purgeJobId: string, options?: MutationOptions<unknown, unknown>): {
249
+ mutate: (payload?: string | undefined) => Promise<unknown>;
250
+ getPurgeStatus: () => Promise<unknown>;
251
+ isLoading: () => boolean;
252
+ };
253
+
236
254
  declare function getRefreshToken(): string | null;
237
255
 
238
256
  interface HttpClientConfig {
@@ -262,6 +280,77 @@ declare function isAuthenticateApp(): boolean;
262
280
 
263
281
  declare function useTable(): any;
264
282
 
283
+ declare const Client: {
284
+ authentication: {
285
+ preLogin: (data: PreLoginPayload) => Promise<unknown>;
286
+ login: (data: LoginPayload) => Promise<unknown>;
287
+ verifyEmail: (data: VerifyEmailPayload) => Promise<unknown>;
288
+ resetPasswordVerifyToken: (data: ResetPasswordVerifyTokenPayload) => Promise<unknown>;
289
+ resetPassword: (data: ResetPasswordPayload) => Promise<unknown>;
290
+ forgetPassword: (data: ForgetPasswordPayload) => Promise<unknown>;
291
+ registerExistingUser: (data: any) => Promise<unknown>;
292
+ verifyEmailResend: (data: any) => Promise<unknown>;
293
+ resendEmail: (data: any) => Promise<unknown>;
294
+ logout: () => Promise<unknown>;
295
+ };
296
+ sso: {
297
+ getSsoDetails: () => Promise<unknown>;
298
+ generateSsoUrl: (payload: any) => Promise<unknown>;
299
+ ssoCallback: (payload: any) => Promise<unknown>;
300
+ };
301
+ user: {
302
+ me: () => Promise<unknown>;
303
+ profile: (payload: any) => Promise<unknown>;
304
+ changePassword: (data: ChangePasswordPayload) => Promise<unknown>;
305
+ };
306
+ pipeline: {
307
+ list: (payload?: any, param?: any) => Promise<unknown>;
308
+ };
309
+ stage: {
310
+ list: (props?: any) => Promise<unknown>;
311
+ };
312
+ object: {
313
+ list: (payload?: any, param?: any) => Promise<unknown>;
314
+ sideBarList: (payload?: any) => Promise<unknown>;
315
+ form: (payload?: any) => Promise<unknown>;
316
+ objectFormOptions: (payload?: any) => Promise<unknown>;
317
+ create: (props?: any) => Promise<unknown>;
318
+ createExisting: (props?: any) => Promise<unknown>;
319
+ removeExisting: (props?: any) => Promise<unknown>;
320
+ details: (props?: any) => Promise<unknown>;
321
+ update: (props?: any) => Promise<unknown>;
322
+ };
323
+ note: {
324
+ list: (props?: any) => Promise<unknown>;
325
+ create: (props?: any) => Promise<unknown>;
326
+ update: (props?: any) => Promise<unknown>;
327
+ image: (props?: any) => Promise<unknown>;
328
+ attachment: (props?: any) => Promise<unknown>;
329
+ };
330
+ email: {
331
+ list: (props?: any) => Promise<unknown>;
332
+ create: (props?: any) => Promise<unknown>;
333
+ update: (props?: any) => Promise<unknown>;
334
+ image: (props?: any) => Promise<unknown>;
335
+ attachment: (props?: any) => Promise<unknown>;
336
+ };
337
+ cache: {
338
+ purge: (body: Record<string, unknown>, headers?: Record<string, string>) => Promise<unknown>;
339
+ purgeStatus: (purgeJobId: string) => Promise<unknown>;
340
+ };
341
+ file: {
342
+ list: (props?: any) => Promise<unknown>;
343
+ details: (props?: any) => Promise<unknown>;
344
+ addFolder: (props?: any) => Promise<unknown>;
345
+ addFile: (props?: any) => Promise<unknown>;
346
+ };
347
+ };
348
+
349
+ declare const index_Client: typeof Client;
350
+ declare namespace index {
351
+ export { index_Client as Client };
352
+ }
353
+
265
354
  declare const api: {
266
355
  preLogin: typeof preLogin;
267
356
  login: typeof login;
@@ -282,6 +371,7 @@ declare const api: {
282
371
  pipelines: typeof list$5;
283
372
  stages: typeof list$4;
284
373
  objects: typeof list$3;
374
+ sideBarObjects: typeof sideBarList;
285
375
  objectsForm: typeof form;
286
376
  createObject: typeof create$2;
287
377
  createExistingObject: typeof createExisting;
@@ -301,6 +391,8 @@ declare const api: {
301
391
  file: typeof details;
302
392
  addFolder: typeof addFolder;
303
393
  addFile: typeof addFile;
394
+ purgeCache: typeof purge;
395
+ cachePurgeStatus: typeof purgeStatus;
304
396
  getRefreshToken: typeof getRefreshToken;
305
397
  getAuthRefreshToken: typeof getAuthRefreshToken;
306
398
  isCookieExpired: (key: string) => boolean;
@@ -310,7 +402,7 @@ declare const api: {
310
402
  };
311
403
  declare const store: {
312
404
  storage: {
313
- set: (key: string, value: any) => void;
405
+ set: (key: string, value: unknown) => void;
314
406
  get: <T>(key: string) => T | null;
315
407
  remove: (key: string) => void;
316
408
  };
@@ -334,7 +426,7 @@ declare const url: {
334
426
  makeLink: (props: any) => string;
335
427
  };
336
428
  useUpdateLink: () => {
337
- updateLink: (props: any, displayName?: string) => void;
429
+ updateLink: (props: any, displayName?: string) => Promise<void>;
338
430
  getLinkParams: (displayName?: string) => {
339
431
  [k: string]: any;
340
432
  } | null;
@@ -355,4 +447,4 @@ declare const routeParam: {
355
447
  };
356
448
  };
357
449
 
358
- export { type ChangePasswordPayload, type Config, type ForgetPasswordPayload, type HttpClientConfig, type LoginPayload, type MutationOptions, type PreLoginPayload, type ResetPasswordPayload, type ResetPasswordVerifyTokenPayload, type VerifyEmailPayload, api, breadcrumbsDetails, getFieldErrors, getFormErrors, initializeHttpClient, routeParam, store, url };
450
+ export { type ChangePasswordPayload, type Config, type ForgetPasswordPayload, type HttpClientConfig, type LoginPayload, type MutationOptions, type PreLoginPayload, type ResetPasswordPayload, type ResetPasswordVerifyTokenPayload, type VerifyEmailPayload, api, breadcrumbsDetails, index as clint, getFieldErrors, getFormErrors, initializeHttpClient, routeParam, store, url };