@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.
Files changed (45) hide show
  1. package/codegen.ts +49 -0
  2. package/dist/api-client/index.d.ts +23 -0
  3. package/dist/cms/contentArea.d.ts +50 -0
  4. package/dist/cms/index.d.ts +2 -0
  5. package/dist/cms/menu.d.ts +10 -0
  6. package/dist/common/channel.d.ts +4 -0
  7. package/dist/common/event.d.ts +39 -0
  8. package/dist/common/index.d.ts +21 -0
  9. package/dist/crm/auth.d.ts +152 -0
  10. package/dist/crm/index.d.ts +1 -0
  11. package/dist/generated/graphql.d.ts +3832 -0
  12. package/dist/generated/index.d.ts +1 -0
  13. package/dist/index.cjs +1257 -0
  14. package/dist/index.d.ts +7 -0
  15. package/dist/index.esm.js +1257 -0
  16. package/dist/pim/brand.d.ts +19 -0
  17. package/dist/pim/filter.d.ts +31 -0
  18. package/dist/pim/index.d.ts +3 -0
  19. package/dist/pim/list.d.ts +31 -0
  20. package/dist/search/index.d.ts +1 -0
  21. package/dist/search/product.d.ts +11 -0
  22. package/package.json +28 -0
  23. package/rollup.config.js +18 -0
  24. package/src/api-client/index.ts +25 -0
  25. package/src/cms/contentArea.ts +59 -0
  26. package/src/cms/index.ts +2 -0
  27. package/src/cms/menu.ts +28 -0
  28. package/src/common/channel.ts +46 -0
  29. package/src/common/event.ts +43 -0
  30. package/src/common/index.ts +27 -0
  31. package/src/crm/auth.ts +177 -0
  32. package/src/crm/index.ts +2 -0
  33. package/src/crm/userOrders.ts +55 -0
  34. package/src/generated/graphql.ts +4103 -0
  35. package/src/generated/index.ts +1 -0
  36. package/src/index.ts +7 -0
  37. package/src/pim/brand.ts +21 -0
  38. package/src/pim/filter.ts +34 -0
  39. package/src/pim/index.ts +3 -0
  40. package/src/pim/list.ts +38 -0
  41. package/src/pim/product.ts +0 -0
  42. package/src/pim/shared.ts +14 -0
  43. package/src/search/index.ts +1 -0
  44. package/src/search/product.ts +12 -0
  45. package/tsconfig.json +18 -0
@@ -0,0 +1 @@
1
+ export * from './graphql';
package/src/index.ts ADDED
@@ -0,0 +1,7 @@
1
+ export * from './api-client';
2
+ export * from './cms';
3
+ export * from './common';
4
+ export * from './crm';
5
+ export * from './pim';
6
+ export * from './search';
7
+ export * from './generated';
@@ -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
+ };
@@ -0,0 +1,3 @@
1
+ export * from './list';
2
+ export * from './filter';
3
+ export * from './brand';
@@ -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,14 @@
1
+ /* export type MetadataType = {
2
+ title: string;
3
+ description?: string;
4
+ keywords?: string;
5
+ };
6
+
7
+ export type AlternativeUrlType = {
8
+ url: string;
9
+ culture: string;
10
+ language: string;
11
+ country?: string;
12
+ channelId: string;
13
+ };
14
+ */
@@ -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
+ }