@geins/types 0.1.0
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/codegen.ts +49 -0
- package/dist/api-client/index.d.ts +23 -0
- package/dist/cms/contentArea.d.ts +50 -0
- package/dist/cms/index.d.ts +2 -0
- package/dist/cms/menu.d.ts +10 -0
- package/dist/common/channel.d.ts +4 -0
- package/dist/common/event.d.ts +39 -0
- package/dist/common/index.d.ts +21 -0
- package/dist/crm/auth.d.ts +152 -0
- package/dist/crm/index.d.ts +1 -0
- package/dist/generated/graphql.d.ts +3832 -0
- package/dist/generated/index.d.ts +1 -0
- package/dist/index.cjs +1257 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.esm.js +1257 -0
- package/dist/pim/brand.d.ts +19 -0
- package/dist/pim/filter.d.ts +31 -0
- package/dist/pim/index.d.ts +3 -0
- package/dist/pim/list.d.ts +31 -0
- package/dist/search/index.d.ts +1 -0
- package/dist/search/product.d.ts +11 -0
- package/package.json +28 -0
- package/rollup.config.js +18 -0
- package/src/api-client/index.ts +25 -0
- package/src/cms/contentArea.ts +59 -0
- package/src/cms/index.ts +2 -0
- package/src/cms/menu.ts +28 -0
- package/src/common/channel.ts +46 -0
- package/src/common/event.ts +43 -0
- package/src/common/index.ts +27 -0
- package/src/crm/auth.ts +177 -0
- package/src/crm/index.ts +2 -0
- package/src/crm/userOrders.ts +55 -0
- package/src/generated/graphql.ts +4103 -0
- package/src/generated/index.ts +1 -0
- package/src/index.ts +7 -0
- package/src/pim/brand.ts +21 -0
- package/src/pim/filter.ts +34 -0
- package/src/pim/index.ts +3 -0
- package/src/pim/list.ts +38 -0
- package/src/pim/product.ts +0 -0
- package/src/pim/shared.ts +14 -0
- package/src/search/index.ts +1 -0
- package/src/search/product.ts +12 -0
- package/tsconfig.json +18 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './graphql';
|
package/src/index.ts
ADDED
package/src/pim/brand.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { GeinsAlternativeUrlTypeType } from '../generated';
|
|
2
|
+
|
|
3
|
+
export type BrandsQueryVariables = {
|
|
4
|
+
marketId?: string;
|
|
5
|
+
languageId?: string;
|
|
6
|
+
channelId?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export interface GeinsBrandType {
|
|
10
|
+
brandId: number;
|
|
11
|
+
alias?: string;
|
|
12
|
+
slug?: string;
|
|
13
|
+
name: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
secondaryDescription?: string;
|
|
16
|
+
primaryImage?: string;
|
|
17
|
+
backgroundImage?: string;
|
|
18
|
+
logo?: string;
|
|
19
|
+
canonicalUrl: string;
|
|
20
|
+
alternativeUrls?: GeinsAlternativeUrlTypeType[];
|
|
21
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export enum ProductFilterModeType {
|
|
2
|
+
BY_GROUP = 'BY_GROUP',
|
|
3
|
+
CURRENT = 'CURRENT',
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export enum FilterSystemEntityTypes {
|
|
7
|
+
Brand = 'Brand',
|
|
8
|
+
Category = 'Category',
|
|
9
|
+
Price = 'Price',
|
|
10
|
+
Sku = 'Sku',
|
|
11
|
+
StockStatus = 'StockStatus',
|
|
12
|
+
DiscountCampaign = 'DiscountCampaign',
|
|
13
|
+
DiscountCampaignNumber = 'DiscountCampaignNumber',
|
|
14
|
+
Discount = 'Discount',
|
|
15
|
+
ReducedPrice = 'ReducedPrice',
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type FilterFacetType = {
|
|
19
|
+
filterId: string;
|
|
20
|
+
label: string;
|
|
21
|
+
group: string;
|
|
22
|
+
type: string;
|
|
23
|
+
isSystem: boolean;
|
|
24
|
+
values: FilterFacetValueType[];
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type FilterFacetValueType = {
|
|
28
|
+
facetId: string;
|
|
29
|
+
parentId: string;
|
|
30
|
+
label?: string;
|
|
31
|
+
count?: number;
|
|
32
|
+
order?: number;
|
|
33
|
+
hidden?: boolean;
|
|
34
|
+
};
|
package/src/pim/index.ts
ADDED
package/src/pim/list.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ProductFilterModeType } from './filter';
|
|
2
|
+
import type { GeinsPriceFilterTypeType } from '../generated';
|
|
3
|
+
|
|
4
|
+
export enum ProductListSortType {
|
|
5
|
+
NONE = 'NONE',
|
|
6
|
+
PRICE = 'PRICE',
|
|
7
|
+
PRICE_DESC = 'PRICE_DESC',
|
|
8
|
+
MOST_SOLD = 'MOST_SOLD',
|
|
9
|
+
VOTES = 'VOTES',
|
|
10
|
+
BRAND = 'BRAND',
|
|
11
|
+
LATEST = 'LATEST',
|
|
12
|
+
RELEVANCE = 'RELEVANCE',
|
|
13
|
+
FACET_ORDER = 'FACET_ORDER',
|
|
14
|
+
ALPHABETICAL = 'ALPHABETICAL',
|
|
15
|
+
ALPHABETICAL_DESC = 'ALPHABETICAL_DESC',
|
|
16
|
+
AVAILABLE_STOCK = 'AVAILABLE_STOCK',
|
|
17
|
+
AVAILABLE_STOCK_DESC = 'AVAILABLE_STOCK_DESC',
|
|
18
|
+
TOTAL_STOCK = 'TOTAL_STOCK',
|
|
19
|
+
TOTAL_STOCK_DESC = 'TOTAL_STOCK_DESC',
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* export type PriceFilterType = {
|
|
23
|
+
lowest: number;
|
|
24
|
+
highest: number;
|
|
25
|
+
};
|
|
26
|
+
*/
|
|
27
|
+
export type ProductListFilterType = {
|
|
28
|
+
searchText: string;
|
|
29
|
+
facets: string[];
|
|
30
|
+
excludeFacets: string[];
|
|
31
|
+
include: string[];
|
|
32
|
+
exclude: string[];
|
|
33
|
+
sort: ProductListSortType;
|
|
34
|
+
price: GeinsPriceFilterTypeType;
|
|
35
|
+
filterMode: ProductFilterModeType;
|
|
36
|
+
productIds: number[];
|
|
37
|
+
includeCollapsed: Boolean;
|
|
38
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './product';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { GeinsBaseApiVars } from '../api-client';
|
|
2
|
+
import type { ProductListSortType } from '../pim/list';
|
|
3
|
+
import type { ProductFilterModeType } from '../pim/filter';
|
|
4
|
+
|
|
5
|
+
export interface ProductSearchVars extends GeinsBaseApiVars {
|
|
6
|
+
searchText: string;
|
|
7
|
+
sort?: ProductListSortType;
|
|
8
|
+
filterMode?: ProductFilterModeType;
|
|
9
|
+
facets?: string[];
|
|
10
|
+
skip?: number;
|
|
11
|
+
take?: number;
|
|
12
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES5",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"outDir": "./dist",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"resolveJsonModule": true
|
|
13
|
+
},
|
|
14
|
+
"include": [
|
|
15
|
+
"src/**/*.ts",
|
|
16
|
+
"src/**/*.gql"
|
|
17
|
+
]
|
|
18
|
+
}
|