@griddo/core 10.6.8 → 10.6.11

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.
@@ -8,10 +8,10 @@ export type RelatedContentTypeNames<T> = T extends {
8
8
  } ? T["__relatedContentTypeNames"][number] : string;
9
9
  export type FieldsDivider = string;
10
10
  export type ArrayFieldGroup<Fields> = Array<Fields>;
11
- export type AsyncSelect<Relations, FromList, RelatedContentType, FromDistributor> = FromList extends true ? Relations extends true ? {
11
+ export type AsyncSelect<Relations, FromList, RelatedContentType, FromDistributor> = FromList extends true ? Relations extends true | "simple" ? {
12
12
  id?: number;
13
13
  label?: string;
14
- } : number : FromDistributor extends true ? Relations extends true ? {
14
+ } : Relations extends "full" ? RelatedContentType : number : FromDistributor extends true ? Relations extends true ? {
15
15
  id?: number;
16
16
  } & QueriedDataItem<RelatedContentType> : {
17
17
  id?: number;
@@ -146,23 +146,32 @@ type MultiCheckSelectWithNoRelations<FromDistributor> = FromDistributor extends
146
146
  id?: number;
147
147
  label?: string;
148
148
  } : number;
149
- export type MultiCheckSelect<Relations = false, FromList = false, RelatedContentType = unknown, FromDistributor = false> = FromList extends true ? Array<Relations extends true | "simple" ? {
149
+ export type MultiCheckSelect<Relations = false, FromList = false, RelatedContentType extends {
150
+ __contentTypeKind: string;
151
+ } = {
152
+ __contentTypeKind: string;
153
+ }, FromDistributor = false> = FromList extends true ? Array<Relations extends true | "simple" ? {
150
154
  id?: number;
151
155
  label?: string;
152
156
  } : Relations extends "full" ? {
153
157
  id?: number;
154
- content?: {
155
- title?: string;
156
- code?: string;
157
- };
158
+ content?: RelatedContentType;
158
159
  } : number> : FromDistributor extends true ? Array<Relations extends true ? MultiCheckSelectWithRelations<FromDistributor, RelatedContentType> : MultiCheckSelectWithNoRelations<FromDistributor>> : Array<{
159
160
  name?: number;
160
161
  value?: number;
161
162
  title?: string;
162
163
  }>;
163
- export type AsyncCheckGroup<Relations = false, FromList = false, RelatedContentType = unknown, FromDistributor = false> = MultiCheckSelect<Relations, FromList, RelatedContentType, FromDistributor>;
164
- export type MultiCheckSelectGroup<T extends string, Relations = unknown, RelatedContentType = unknown, FromDistributor = false> = {
165
- [K in T]: MultiCheckSelect<Relations, RelatedContentType, FromDistributor>;
164
+ export type AsyncCheckGroup<Relations = false, FromList = false, RelatedContentType extends {
165
+ __contentTypeKind: string;
166
+ } = {
167
+ __contentTypeKind: string;
168
+ }, FromDistributor = false> = MultiCheckSelect<Relations, FromList, RelatedContentType, FromDistributor>;
169
+ export type MultiCheckSelectGroup<T extends string, Relations = unknown, RelatedContentType extends {
170
+ __contentTypeKind: string;
171
+ } = {
172
+ __contentTypeKind: string;
173
+ }, FromDistributor = false> = {
174
+ [K in T]: MultiCheckSelect<Relations, unknown, RelatedContentType, FromDistributor>;
166
175
  };
167
176
  export type Note = string;
168
177
  export type Number = number | null | "";
@@ -6,6 +6,7 @@ import locales from "../constants/locales";
6
6
  import timezone from "../constants/timezone";
7
7
  import { Replace } from "../utilities";
8
8
  export type Renderers = "gatsby" | "editor" | "preview";
9
+ export type ContentTypeRelations = "off" | "full" | "simple" | boolean;
9
10
  export type SocialName = "instagram" | "linkedIn" | "facebook" | "twitter" | "youTube" | "flickr" | "tiktok" | "snapchat" | "newsletter";
10
11
  export type Breadcrumb = Array<{
11
12
  path?: string;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@griddo/core",
3
3
  "description": "Reload version of Griddo Core",
4
4
  "license": "UNLICENSED",
5
- "version": "10.6.8",
5
+ "version": "10.6.11",
6
6
  "authors": [
7
7
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
8
8
  "Diego M. Béjar <diego.bejar@secuoyas.com>",
@@ -75,5 +75,5 @@
75
75
  "publishConfig": {
76
76
  "access": "public"
77
77
  },
78
- "gitHead": "a622dc1b913fd26805bbbeea654314a0438630c5"
78
+ "gitHead": "18bf6b513f974ad898ecc8a13b73d4285a1025dc"
79
79
  }