@retailcrm/embed-ui-v1-types 0.9.12 → 0.9.14

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/host.d.ts +24 -1
  2. package/package.json +1 -1
package/host.d.ts CHANGED
@@ -1,4 +1,21 @@
1
- import type { Pojo } from './scaffolding'
1
+ import type { Pojo, Scalar } from './scaffolding'
2
+
3
+ export type HostQueryInputValue = Scalar | Scalar[]
4
+ export type HostQueryInput = Record<string, HostQueryInputValue>
5
+
6
+ export type HostQueryValue = string | string[]
7
+ export type HostQuery = Record<string, HostQueryValue>
8
+
9
+ export type HostLocation = {
10
+ pathname: string;
11
+ search: string;
12
+ hash: string;
13
+ query: HostQuery;
14
+ }
15
+
16
+ export type HostQueryOptions = {
17
+ preserveExisting?: boolean;
18
+ }
2
19
 
3
20
  export type HostApi = {
4
21
  goTo (route: string, params?: Record<string, unknown>): void;
@@ -7,4 +24,10 @@ export type HostApi = {
7
24
  action: string,
8
25
  payload?: string | Pojo
9
26
  ): Promise<{ body: string; status: number }>;
27
+
28
+ getLocation (): HostLocation;
29
+
30
+ replaceQuery (query: HostQueryInput, options?: HostQueryOptions): void;
31
+
32
+ pushQuery (query: HostQueryInput, options?: HostQueryOptions): void;
10
33
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@retailcrm/embed-ui-v1-types",
3
3
  "description": "Basic types declarations for RetailCRM JS API",
4
4
  "type": "module",
5
- "version": "0.9.12",
5
+ "version": "0.9.14",
6
6
  "license": "MIT",
7
7
  "author": "RetailDriverLLC <integration@retailcrm.ru>",
8
8
  "repository": "git@github.com:retailcrm/embed-ui.git",