@lasterp/shared 1.0.0-beta.11 → 1.0.0-beta.12
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.d.cts +46 -34
- package/dist/index.d.ts +46 -34
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,28 +1,40 @@
|
|
|
1
1
|
interface Item {
|
|
2
2
|
item_code: string;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
item_name: string;
|
|
4
|
+
item_group: string;
|
|
5
|
+
brand: string;
|
|
6
|
+
os: string;
|
|
7
|
+
release_year: string;
|
|
8
|
+
description: string;
|
|
9
|
+
attributes: string[];
|
|
10
|
+
storages: string[];
|
|
11
|
+
memories: string[];
|
|
12
|
+
colors: Colour[];
|
|
13
|
+
screens: ScreenSpec[];
|
|
14
|
+
images: Image[];
|
|
15
|
+
height: number;
|
|
16
|
+
width: number;
|
|
17
|
+
weight: number;
|
|
13
18
|
}
|
|
14
|
-
interface
|
|
15
|
-
|
|
19
|
+
interface Colour {
|
|
20
|
+
color: string;
|
|
21
|
+
hex: string;
|
|
22
|
+
color_system: string;
|
|
16
23
|
}
|
|
17
24
|
interface Model {
|
|
18
25
|
model_number: string;
|
|
19
26
|
sim_card_type: string;
|
|
20
27
|
connectivity: string;
|
|
21
28
|
}
|
|
22
|
-
interface
|
|
29
|
+
interface ScreenSpec {
|
|
30
|
+
screen: string;
|
|
31
|
+
height: number;
|
|
32
|
+
width: number;
|
|
33
|
+
weight: number;
|
|
34
|
+
}
|
|
35
|
+
interface Image {
|
|
36
|
+
image: string;
|
|
23
37
|
color: string;
|
|
24
|
-
hex: string;
|
|
25
|
-
color_system: string;
|
|
26
38
|
}
|
|
27
39
|
interface Globals {
|
|
28
40
|
header: Header;
|
|
@@ -140,6 +152,22 @@ interface TokenParams {
|
|
|
140
152
|
/** Type of token to be used for authentication */
|
|
141
153
|
type: "Bearer" | "token";
|
|
142
154
|
}
|
|
155
|
+
interface FrappeMeta {
|
|
156
|
+
fields: FrappeMetaField[];
|
|
157
|
+
permissions: {
|
|
158
|
+
can_select: boolean;
|
|
159
|
+
can_read: boolean;
|
|
160
|
+
can_write: boolean;
|
|
161
|
+
can_create: boolean;
|
|
162
|
+
can_delete: boolean;
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
interface FrappeMetaField {
|
|
166
|
+
label: string;
|
|
167
|
+
fieldname: string;
|
|
168
|
+
read_only: boolean;
|
|
169
|
+
set_only_once: boolean;
|
|
170
|
+
}
|
|
143
171
|
import { PropsWithChildren } from "react";
|
|
144
172
|
type FrappeProviderProps = PropsWithChildren<{
|
|
145
173
|
/** URL of the Frappe server
|
|
@@ -595,23 +623,7 @@ declare const useFrappeUpdateDoc: <T = any>() => {
|
|
|
595
623
|
isCompleted: boolean;
|
|
596
624
|
reset: () => void;
|
|
597
625
|
};
|
|
598
|
-
|
|
599
|
-
fields: FrappeMetaField[];
|
|
600
|
-
permissions: {
|
|
601
|
-
can_select: boolean;
|
|
602
|
-
can_read: boolean;
|
|
603
|
-
can_write: boolean;
|
|
604
|
-
can_create: boolean;
|
|
605
|
-
can_delete: boolean;
|
|
606
|
-
};
|
|
607
|
-
}
|
|
608
|
-
interface FrappeMetaField {
|
|
609
|
-
label: string;
|
|
610
|
-
fieldname: string;
|
|
611
|
-
read_only: boolean;
|
|
612
|
-
set_only_once: boolean;
|
|
613
|
-
}
|
|
614
|
-
declare const useFrappeGetMeta: <FrappeMeta>(doctype: string, options?: {
|
|
626
|
+
declare const useFrappeGetMeta: (doctype: string, options?: {
|
|
615
627
|
staleTime?: number;
|
|
616
628
|
retry?: boolean | number;
|
|
617
629
|
}) => {
|
|
@@ -668,7 +680,7 @@ interface Product {
|
|
|
668
680
|
item_code: string;
|
|
669
681
|
description: string;
|
|
670
682
|
}
|
|
671
|
-
interface ProductVariant
|
|
683
|
+
interface ProductVariant {
|
|
672
684
|
name: string;
|
|
673
685
|
currency: string;
|
|
674
686
|
rate: number;
|
|
@@ -692,4 +704,4 @@ interface ProductContext {
|
|
|
692
704
|
}
|
|
693
705
|
import { camelize, decamelize, camelizeKeys, decamelizeKeys } from "humps";
|
|
694
706
|
declare function equalsIgnoreCase(str1: string, str2: string): boolean;
|
|
695
|
-
export { useVariantSelector, useSearch, useLocale, useFrappeUpdateDoc, useFrappePutCall, useFrappePrefetchDoc, useFrappePostCall, useFrappeGetMeta, useFrappeGetDocList, useFrappeGetDocCount, useFrappeGetDoc, useFrappeGetCall, useFrappeFileUpload, useFrappeEventListener, useFrappeDocumentEventListener, useFrappeDocTypeEventListener, useFrappeDeleteDoc, useFrappeDeleteCall, useFrappeCreateDoc, useFrappeAuth, equalsIgnoreCase, decamelizeKeys, decamelize, camelizeKeys, camelize, WorkspaceSidebarItem, WorkspaceSidebar, ViewerEventData, VariantSelectorResult, VariantSelectorProps, VariantSelectorOption, UseFrappeFileUploadReturnType, TopbarItem, Topbar, TokenParams, ShopContext, SearchResult, ProductVariant, ProductContext, Product, Page, NavbarSubItemGroup, NavbarSubItem, NavbarItem, Model, LocaleProvider,
|
|
707
|
+
export { useVariantSelector, useSearch, useLocale, useFrappeUpdateDoc, useFrappePutCall, useFrappePrefetchDoc, useFrappePostCall, useFrappeGetMeta, useFrappeGetDocList, useFrappeGetDocCount, useFrappeGetDoc, useFrappeGetCall, useFrappeFileUpload, useFrappeEventListener, useFrappeDocumentEventListener, useFrappeDocTypeEventListener, useFrappeDeleteDoc, useFrappeDeleteCall, useFrappeCreateDoc, useFrappeAuth, equalsIgnoreCase, decamelizeKeys, decamelize, camelizeKeys, camelize, WorkspaceSidebarItem, WorkspaceSidebar, ViewerEventData, VariantSelectorResult, VariantSelectorProps, VariantSelectorOption, UseFrappeFileUploadReturnType, TopbarItem, Topbar, TokenParams, ShopContext, SearchResult, ScreenSpec, ProductVariant, ProductContext, Product, Page, NavbarSubItemGroup, NavbarSubItem, NavbarItem, Model, LocaleProvider, Item, Image, Hero, Header, Globals, FrappeProviderProps, FrappeProvider, FrappeMutationResult, FrappeMetaField, FrappeMeta, FrappeFileUploadResponse, FrappeError, FrappeContext, FrappeConfig, FooterItemGroup, FooterItem, Footer, DocumentUpdateEventData, DocTypeListUpdateEventData, Colour, Category, Brand, Block };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,28 +1,40 @@
|
|
|
1
1
|
interface Item {
|
|
2
2
|
item_code: string;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
item_name: string;
|
|
4
|
+
item_group: string;
|
|
5
|
+
brand: string;
|
|
6
|
+
os: string;
|
|
7
|
+
release_year: string;
|
|
8
|
+
description: string;
|
|
9
|
+
attributes: string[];
|
|
10
|
+
storages: string[];
|
|
11
|
+
memories: string[];
|
|
12
|
+
colors: Colour[];
|
|
13
|
+
screens: ScreenSpec[];
|
|
14
|
+
images: Image[];
|
|
15
|
+
height: number;
|
|
16
|
+
width: number;
|
|
17
|
+
weight: number;
|
|
13
18
|
}
|
|
14
|
-
interface
|
|
15
|
-
|
|
19
|
+
interface Colour {
|
|
20
|
+
color: string;
|
|
21
|
+
hex: string;
|
|
22
|
+
color_system: string;
|
|
16
23
|
}
|
|
17
24
|
interface Model {
|
|
18
25
|
model_number: string;
|
|
19
26
|
sim_card_type: string;
|
|
20
27
|
connectivity: string;
|
|
21
28
|
}
|
|
22
|
-
interface
|
|
29
|
+
interface ScreenSpec {
|
|
30
|
+
screen: string;
|
|
31
|
+
height: number;
|
|
32
|
+
width: number;
|
|
33
|
+
weight: number;
|
|
34
|
+
}
|
|
35
|
+
interface Image {
|
|
36
|
+
image: string;
|
|
23
37
|
color: string;
|
|
24
|
-
hex: string;
|
|
25
|
-
color_system: string;
|
|
26
38
|
}
|
|
27
39
|
interface Globals {
|
|
28
40
|
header: Header;
|
|
@@ -140,6 +152,22 @@ interface TokenParams {
|
|
|
140
152
|
/** Type of token to be used for authentication */
|
|
141
153
|
type: "Bearer" | "token";
|
|
142
154
|
}
|
|
155
|
+
interface FrappeMeta {
|
|
156
|
+
fields: FrappeMetaField[];
|
|
157
|
+
permissions: {
|
|
158
|
+
can_select: boolean;
|
|
159
|
+
can_read: boolean;
|
|
160
|
+
can_write: boolean;
|
|
161
|
+
can_create: boolean;
|
|
162
|
+
can_delete: boolean;
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
interface FrappeMetaField {
|
|
166
|
+
label: string;
|
|
167
|
+
fieldname: string;
|
|
168
|
+
read_only: boolean;
|
|
169
|
+
set_only_once: boolean;
|
|
170
|
+
}
|
|
143
171
|
import { PropsWithChildren } from "react";
|
|
144
172
|
type FrappeProviderProps = PropsWithChildren<{
|
|
145
173
|
/** URL of the Frappe server
|
|
@@ -595,23 +623,7 @@ declare const useFrappeUpdateDoc: <T = any>() => {
|
|
|
595
623
|
isCompleted: boolean;
|
|
596
624
|
reset: () => void;
|
|
597
625
|
};
|
|
598
|
-
|
|
599
|
-
fields: FrappeMetaField[];
|
|
600
|
-
permissions: {
|
|
601
|
-
can_select: boolean;
|
|
602
|
-
can_read: boolean;
|
|
603
|
-
can_write: boolean;
|
|
604
|
-
can_create: boolean;
|
|
605
|
-
can_delete: boolean;
|
|
606
|
-
};
|
|
607
|
-
}
|
|
608
|
-
interface FrappeMetaField {
|
|
609
|
-
label: string;
|
|
610
|
-
fieldname: string;
|
|
611
|
-
read_only: boolean;
|
|
612
|
-
set_only_once: boolean;
|
|
613
|
-
}
|
|
614
|
-
declare const useFrappeGetMeta: <FrappeMeta>(doctype: string, options?: {
|
|
626
|
+
declare const useFrappeGetMeta: (doctype: string, options?: {
|
|
615
627
|
staleTime?: number;
|
|
616
628
|
retry?: boolean | number;
|
|
617
629
|
}) => {
|
|
@@ -668,7 +680,7 @@ interface Product {
|
|
|
668
680
|
item_code: string;
|
|
669
681
|
description: string;
|
|
670
682
|
}
|
|
671
|
-
interface ProductVariant
|
|
683
|
+
interface ProductVariant {
|
|
672
684
|
name: string;
|
|
673
685
|
currency: string;
|
|
674
686
|
rate: number;
|
|
@@ -692,4 +704,4 @@ interface ProductContext {
|
|
|
692
704
|
}
|
|
693
705
|
import { camelize, decamelize, camelizeKeys, decamelizeKeys } from "humps";
|
|
694
706
|
declare function equalsIgnoreCase(str1: string, str2: string): boolean;
|
|
695
|
-
export { useVariantSelector, useSearch, useLocale, useFrappeUpdateDoc, useFrappePutCall, useFrappePrefetchDoc, useFrappePostCall, useFrappeGetMeta, useFrappeGetDocList, useFrappeGetDocCount, useFrappeGetDoc, useFrappeGetCall, useFrappeFileUpload, useFrappeEventListener, useFrappeDocumentEventListener, useFrappeDocTypeEventListener, useFrappeDeleteDoc, useFrappeDeleteCall, useFrappeCreateDoc, useFrappeAuth, equalsIgnoreCase, decamelizeKeys, decamelize, camelizeKeys, camelize, WorkspaceSidebarItem, WorkspaceSidebar, ViewerEventData, VariantSelectorResult, VariantSelectorProps, VariantSelectorOption, UseFrappeFileUploadReturnType, TopbarItem, Topbar, TokenParams, ShopContext, SearchResult, ProductVariant, ProductContext, Product, Page, NavbarSubItemGroup, NavbarSubItem, NavbarItem, Model, LocaleProvider,
|
|
707
|
+
export { useVariantSelector, useSearch, useLocale, useFrappeUpdateDoc, useFrappePutCall, useFrappePrefetchDoc, useFrappePostCall, useFrappeGetMeta, useFrappeGetDocList, useFrappeGetDocCount, useFrappeGetDoc, useFrappeGetCall, useFrappeFileUpload, useFrappeEventListener, useFrappeDocumentEventListener, useFrappeDocTypeEventListener, useFrappeDeleteDoc, useFrappeDeleteCall, useFrappeCreateDoc, useFrappeAuth, equalsIgnoreCase, decamelizeKeys, decamelize, camelizeKeys, camelize, WorkspaceSidebarItem, WorkspaceSidebar, ViewerEventData, VariantSelectorResult, VariantSelectorProps, VariantSelectorOption, UseFrappeFileUploadReturnType, TopbarItem, Topbar, TokenParams, ShopContext, SearchResult, ScreenSpec, ProductVariant, ProductContext, Product, Page, NavbarSubItemGroup, NavbarSubItem, NavbarItem, Model, LocaleProvider, Item, Image, Hero, Header, Globals, FrappeProviderProps, FrappeProvider, FrappeMutationResult, FrappeMetaField, FrappeMeta, FrappeFileUploadResponse, FrappeError, FrappeContext, FrappeConfig, FooterItemGroup, FooterItem, Footer, DocumentUpdateEventData, DocTypeListUpdateEventData, Colour, Category, Brand, Block };
|