@webiny/app-headless-cms-common 5.40.5-beta.0 → 5.41.0-dbt.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/entries.graphql.d.ts +23 -0
- package/entries.graphql.js +11 -2
- package/entries.graphql.js.map +1 -1
- package/package.json +9 -9
- package/types/index.d.ts +8 -8
- package/types/model.d.ts +5 -5
package/entries.graphql.d.ts
CHANGED
|
@@ -164,3 +164,26 @@ export interface CmsEntryUnpublishMutationVariables {
|
|
|
164
164
|
revision: string;
|
|
165
165
|
}
|
|
166
166
|
export declare const createUnpublishMutation: (model: CmsEditorContentModel) => import("graphql").DocumentNode;
|
|
167
|
+
/**
|
|
168
|
+
* ############################################
|
|
169
|
+
* Bulk Action Mutation
|
|
170
|
+
*/
|
|
171
|
+
export interface CmsEntryBulkActionMutationResponse {
|
|
172
|
+
content: {
|
|
173
|
+
data?: {
|
|
174
|
+
id: string;
|
|
175
|
+
};
|
|
176
|
+
error?: CmsErrorResponse;
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
export interface CmsEntryBulkActionMutationVariables {
|
|
180
|
+
action: string;
|
|
181
|
+
where?: {
|
|
182
|
+
[key: string]: any;
|
|
183
|
+
};
|
|
184
|
+
search?: string;
|
|
185
|
+
data?: {
|
|
186
|
+
[key: string]: any;
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
export declare const createBulkActionMutation: (model: CmsEditorContentModel) => import("graphql").DocumentNode;
|
package/entries.graphql.js
CHANGED
|
@@ -4,12 +4,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.createUpdateMutation = exports.createUnpublishMutation = exports.createRevisionsQuery = exports.createRestoreFromBinMutation = exports.createReadQuery = exports.createPublishMutation = exports.createListQueryDataSelection = exports.createListQuery = exports.createDeleteMutation = exports.createCreateMutation = exports.createCreateFromMutation = void 0;
|
|
7
|
+
exports.createUpdateMutation = exports.createUnpublishMutation = exports.createRevisionsQuery = exports.createRestoreFromBinMutation = exports.createReadQuery = exports.createPublishMutation = exports.createListQueryDataSelection = exports.createListQuery = exports.createDeleteMutation = exports.createCreateMutation = exports.createCreateFromMutation = exports.createBulkActionMutation = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _graphqlTag = _interopRequireDefault(require("graphql-tag"));
|
|
10
10
|
var _createFieldsList = require("./createFieldsList");
|
|
11
11
|
var _getModelTitleFieldId = require("./getModelTitleFieldId");
|
|
12
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
12
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
|
13
13
|
var CONTENT_META_FIELDS = /* GraphQL */"\n meta {\n title\n description\n image\n version\n locked\n status\n }\n";
|
|
14
14
|
var CONTENT_ENTRY_SYSTEM_FIELDS = /* GraphQL */"\n id\n entryId\n createdOn\n savedOn\n modifiedOn,\n deletedOn\n firstPublishedOn\n lastPublishedOn\n createdBy {\n id\n type\n displayName\n }\n savedBy {\n id\n type\n displayName\n }\n modifiedBy {\n id\n type\n displayName\n }\n deletedBy {\n id\n type\n displayName\n }\n firstPublishedBy {\n id\n type\n displayName\n }\n lastPublishedBy {\n id\n type\n displayName\n }\n revisionCreatedOn\n revisionSavedOn\n revisionModifiedOn\n revisionDeletedOn\n revisionFirstPublishedOn\n revisionLastPublishedOn\n revisionCreatedBy {\n id\n type\n displayName\n }\n revisionSavedBy {\n id\n type\n displayName\n }\n revisionModifiedBy {\n id\n type\n displayName\n }\n revisionDeletedBy {\n id\n type\n displayName\n }\n revisionFirstPublishedBy {\n id\n type\n displayName\n }\n revisionLastPublishedBy {\n id\n type\n displayName\n }\n revisionCreatedOn\n revisionSavedOn\n revisionModifiedOn\n revisionFirstPublishedOn\n revisionLastPublishedOn\n revisionCreatedBy {\n id\n type\n displayName\n }\n revisionSavedBy {\n id\n type\n displayName\n }\n revisionModifiedBy {\n id\n type\n displayName\n }\n revisionFirstPublishedBy {\n id\n type\n displayName\n }\n revisionLastPublishedBy {\n id\n type\n displayName\n }\n wbyAco_location {\n folderId\n }\n ".concat(CONTENT_META_FIELDS, "\n");
|
|
15
15
|
var ERROR_FIELD = /* GraphQL */"\n {\n message\n code\n data\n }\n";
|
|
@@ -136,4 +136,13 @@ var createUnpublishMutation = exports.createUnpublishMutation = function createU
|
|
|
136
136
|
}), ERROR_FIELD);
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
+
/**
|
|
140
|
+
* ############################################
|
|
141
|
+
* Bulk Action Mutation
|
|
142
|
+
*/
|
|
143
|
+
|
|
144
|
+
var createBulkActionMutation = exports.createBulkActionMutation = function createBulkActionMutation(model) {
|
|
145
|
+
return (0, _graphqlTag.default)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n mutation CmsBulkAction", "($action: BulkAction", "Name!, $where: ", "ListWhereInput, $search: String, $data: JSON) {\n content: bulkAction", "(action: $action, where: $where, search: $search, data: $data) {\n data {\n id\n }\n error ", "\n }\n }"])), model.singularApiName, model.singularApiName, model.singularApiName, model.singularApiName, ERROR_FIELD);
|
|
146
|
+
};
|
|
147
|
+
|
|
139
148
|
//# sourceMappingURL=entries.graphql.js.map
|
package/entries.graphql.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_graphqlTag","_interopRequireDefault","require","_createFieldsList","_getModelTitleFieldId","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_templateObject10","CONTENT_META_FIELDS","CONTENT_ENTRY_SYSTEM_FIELDS","concat","ERROR_FIELD","createReadQuery","exports","model","gql","_taggedTemplateLiteral2","default","singularApiName","createFieldsList","fields","createRevisionsQuery","createListQueryDataSelection","getModelTitleFieldId","createListQuery","deleted","queryName","pluralApiName","createDeleteMutation","createRestoreFromBinMutation","createCreateMutation","createFields","createCreateFromMutation","createUpdateMutation","createPublishMutation","createUnpublishMutation"],"sources":["entries.graphql.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport {\n CmsContentEntryRevision,\n CmsContentEntry,\n CmsEditorContentModel,\n CmsErrorResponse,\n CmsMetaResponse,\n CmsModelField\n} from \"~/types\";\nimport { createFieldsList } from \"./createFieldsList\";\nimport { getModelTitleFieldId } from \"./getModelTitleFieldId\";\nimport { FormValidationOptions } from \"@webiny/form\";\n\nconst CONTENT_META_FIELDS = /* GraphQL */ `\n meta {\n title\n description\n image\n version\n locked\n status\n }\n`;\n\nconst CONTENT_ENTRY_SYSTEM_FIELDS = /* GraphQL */ `\n id\n entryId\n createdOn\n savedOn\n modifiedOn,\n deletedOn\n firstPublishedOn\n lastPublishedOn\n createdBy {\n id\n type\n displayName\n }\n savedBy {\n id\n type\n displayName\n }\n modifiedBy {\n id\n type\n displayName\n }\n deletedBy {\n id\n type\n displayName\n }\n firstPublishedBy {\n id\n type\n displayName\n }\n lastPublishedBy {\n id\n type\n displayName\n }\n revisionCreatedOn\n revisionSavedOn\n revisionModifiedOn\n revisionDeletedOn\n revisionFirstPublishedOn\n revisionLastPublishedOn\n revisionCreatedBy {\n id\n type\n displayName\n }\n revisionSavedBy {\n id\n type\n displayName\n }\n revisionModifiedBy {\n id\n type\n displayName\n }\n revisionDeletedBy {\n id\n type\n displayName\n }\n revisionFirstPublishedBy {\n id\n type\n displayName\n }\n revisionLastPublishedBy {\n id\n type\n displayName\n }\n revisionCreatedOn\n revisionSavedOn\n revisionModifiedOn\n revisionFirstPublishedOn\n revisionLastPublishedOn\n revisionCreatedBy {\n id\n type\n displayName\n }\n revisionSavedBy {\n id\n type\n displayName\n }\n revisionModifiedBy {\n id\n type\n displayName\n }\n revisionFirstPublishedBy {\n id\n type\n displayName\n }\n revisionLastPublishedBy {\n id\n type\n displayName\n }\n wbyAco_location {\n folderId\n }\n ${CONTENT_META_FIELDS}\n`;\n\nconst ERROR_FIELD = /* GraphQL */ `\n {\n message\n code\n data\n }\n`;\n\n/**\n * ############################################\n * Get CMS Entry Query\n */\nexport interface CmsEntryGetQueryResponse {\n content: {\n data: CmsContentEntry;\n error: CmsErrorResponse | null;\n };\n}\n\nexport interface CmsEntryGetQueryVariables {\n revision?: string;\n entryId?: string;\n}\n\nexport const createReadQuery = (model: CmsEditorContentModel) => {\n /**\n * This query now accepts both revision or entryId as we can load exact revision or latest (if entryId was sent).\n */\n return gql`\n query CmsEntriesGet${model.singularApiName}($revision: ID, $entryId: ID) {\n content: get${model.singularApiName}(revision: $revision, entryId: $entryId) {\n data {\n ${CONTENT_ENTRY_SYSTEM_FIELDS}\n ${createFieldsList({ model, fields: model.fields })}\n }\n error ${ERROR_FIELD}\n }\n }\n `;\n};\n\n/**\n * ############################################\n * List CMS Entry Revisions Query\n */\nexport interface CmsEntriesListRevisionsQueryResponse {\n revisions: {\n data: CmsContentEntryRevision[];\n error: CmsErrorResponse | null;\n meta: CmsMetaResponse;\n };\n}\n\nexport interface CmsEntriesListRevisionsQueryVariables {\n id: string;\n}\n\nexport const createRevisionsQuery = (model: CmsEditorContentModel) => {\n return gql`\n query CmsEntriesGet${model.singularApiName}Revisions($id: ID!) {\n revisions: get${model.singularApiName}Revisions(id: $id) {\n data {\n ${CONTENT_ENTRY_SYSTEM_FIELDS}\n }\n error ${ERROR_FIELD}\n }\n }\n `;\n};\n\n/**\n * ############################################\n * List CMS Entries Query\n */\nexport interface CmsEntriesListQueryResponse {\n content: {\n data: CmsContentEntry[];\n error: CmsErrorResponse | null;\n meta: CmsMetaResponse;\n };\n}\n\nexport interface CmsEntriesListQueryVariables {\n // TODO @ts-refactor better list types\n where?: {\n [key: string]: any;\n };\n sort?: string[];\n limit?: number;\n after?: string;\n}\n\nexport const createListQueryDataSelection = (\n model: CmsEditorContentModel,\n fields?: CmsModelField[]\n) => {\n return `\n ${CONTENT_ENTRY_SYSTEM_FIELDS}\n ${fields ? createFieldsList({ model, fields }) : \"\"}\n ${!fields ? getModelTitleFieldId(model) : \"\"}\n `;\n};\n\nexport const createListQuery = (\n model: CmsEditorContentModel,\n fields?: CmsModelField[],\n deleted?: boolean\n) => {\n const queryName = deleted ? `Deleted${model.pluralApiName}` : model.pluralApiName;\n\n return gql`\n query CmsEntriesList${queryName}($where: ${model.singularApiName}ListWhereInput, $sort: [${\n model.singularApiName\n }ListSorter], $limit: Int, $after: String, $search: String) {\n content: list${queryName}(\n where: $where\n sort: $sort\n limit: $limit\n after: $after\n search: $search\n ) {\n data {\n ${createListQueryDataSelection(model, fields)}\n }\n meta {\n cursor\n hasMoreItems\n totalCount\n }\n error ${ERROR_FIELD}\n }\n }\n `;\n};\n\n/**\n * ############################################\n * Delete Mutation\n */\nexport interface CmsEntryDeleteMutationResponse {\n content: {\n data: CmsContentEntry | null;\n error: CmsErrorResponse | null;\n };\n}\n\nexport interface CmsEntryDeleteMutationVariables {\n revision: string;\n permanently?: boolean;\n}\n\nexport const createDeleteMutation = (model: CmsEditorContentModel) => {\n return gql`\n mutation CmsEntriesDelete${model.singularApiName}($revision: ID!, $permanently: Boolean) {\n content: delete${model.singularApiName}(revision: $revision, options: {permanently: $permanently}) {\n data\n error ${ERROR_FIELD}\n }\n }\n `;\n};\n\n/**\n * ############################################\n * Restore from bin Mutation\n */\nexport interface CmsEntryRestoreFromBinMutationResponse {\n content: {\n data: CmsContentEntry | null;\n error: CmsErrorResponse | null;\n };\n}\n\nexport interface CmsEntryRestoreFromBinMutationVariables {\n revision: string;\n}\n\nexport const createRestoreFromBinMutation = (model: CmsEditorContentModel) => {\n return gql`\n mutation CmsEntriesRestore${model.singularApiName}FromBin($revision: ID!) {\n content: restore${model.singularApiName}FromBin(revision: $revision) {\n data {\n ${CONTENT_ENTRY_SYSTEM_FIELDS}\n ${createFieldsList({ model, fields: model.fields })}\n }\n error ${ERROR_FIELD}\n }\n }\n `;\n};\n\n/**\n * ############################################\n * Create Mutation\n */\nexport interface CmsEntryCreateMutationResponse {\n content: {\n data: CmsContentEntry | null;\n error: CmsErrorResponse | null;\n };\n}\n\nexport interface CmsEntryCreateMutationVariables {\n /**\n * We have any here because we do not know which fields does entry have\n */\n data: Record<string, any>;\n options?: FormValidationOptions;\n}\n\nexport const createCreateMutation = (model: CmsEditorContentModel) => {\n const createFields = createFieldsList({ model, fields: model.fields });\n\n return gql`\n mutation CmsEntriesCreate${model.singularApiName}($data: ${model.singularApiName}Input!, $options: CreateCmsEntryOptionsInput) {\n content: create${model.singularApiName}(data: $data, options: $options) {\n data {\n ${CONTENT_ENTRY_SYSTEM_FIELDS}\n ${createFields}\n }\n error ${ERROR_FIELD}\n }\n }\n `;\n};\n\n/**\n * ############################################\n * Create From Mutation\n */\nexport interface CmsEntryCreateFromMutationResponse {\n content: {\n data?: CmsContentEntry;\n error?: CmsErrorResponse;\n };\n}\n\nexport interface CmsEntryCreateFromMutationVariables {\n revision: string;\n /**\n * We have any here because we do not know which fields does entry have\n */\n data?: Record<string, any>;\n options?: FormValidationOptions;\n}\n\nexport const createCreateFromMutation = (model: CmsEditorContentModel) => {\n return gql`\n mutation CmsCreate${model.singularApiName}From($revision: ID!, $data: ${\n model.singularApiName\n }Input, $options: CreateRevisionCmsEntryOptionsInput) {\n content: create${\n model.singularApiName\n }From(revision: $revision, data: $data, options: $options) {\n data {\n ${CONTENT_ENTRY_SYSTEM_FIELDS}\n ${createFieldsList({ model, fields: model.fields })}\n }\n error ${ERROR_FIELD}\n }\n }`;\n};\n\n/**\n * ############################################\n * Update Mutation\n */\nexport interface CmsEntryUpdateMutationResponse {\n content: {\n data?: CmsContentEntry;\n error?: CmsErrorResponse;\n };\n}\n\nexport interface CmsEntryUpdateMutationVariables {\n revision: string;\n /**\n * We have any here because we do not know which fields does entry have\n */\n data: Record<string, any>;\n options?: FormValidationOptions;\n}\n\nexport const createUpdateMutation = (model: CmsEditorContentModel) => {\n return gql`\n mutation CmsUpdate${model.singularApiName}($revision: ID!, $data: ${\n model.singularApiName\n }Input!, $options: UpdateCmsEntryOptionsInput) {\n content: update${\n model.singularApiName\n }(revision: $revision, data: $data, options: $options) {\n data {\n ${CONTENT_ENTRY_SYSTEM_FIELDS}\n ${createFieldsList({ model, fields: model.fields })}\n }\n error ${ERROR_FIELD}\n }\n }\n `;\n};\n\n/**\n * ############################################\n * Publish Mutation\n */\nexport interface CmsEntryPublishMutationResponse {\n content: {\n data?: CmsContentEntry;\n error?: CmsErrorResponse;\n };\n}\n\nexport interface CmsEntryPublishMutationVariables {\n revision: string;\n}\n\nexport const createPublishMutation = (model: CmsEditorContentModel) => {\n return gql`\n mutation CmsPublish${model.singularApiName}($revision: ID!) {\n content: publish${model.singularApiName}(revision: $revision) {\n data {\n ${CONTENT_ENTRY_SYSTEM_FIELDS}\n ${createFieldsList({ model, fields: model.fields })}\n }\n error ${ERROR_FIELD}\n }\n }`;\n};\n\n/**\n * ############################################\n * Unpublish Mutation\n */\nexport interface CmsEntryUnpublishMutationResponse {\n content: {\n data?: CmsContentEntry;\n error?: CmsErrorResponse;\n };\n}\n\nexport interface CmsEntryUnpublishMutationVariables {\n revision: string;\n}\n\nexport const createUnpublishMutation = (model: CmsEditorContentModel) => {\n return gql`\n mutation CmsUnpublish${model.singularApiName}($revision: ID!) {\n content: unpublish${model.singularApiName}(revision: $revision) {\n data {\n ${CONTENT_ENTRY_SYSTEM_FIELDS}\n ${createFieldsList({ model, fields: model.fields })}\n }\n error ${ERROR_FIELD}\n }\n }`;\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AASA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,qBAAA,GAAAF,OAAA;AAA8D,IAAAG,eAAA,EAAAC,gBAAA,EAAAC,gBA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MAAM,EAAEN,KAAK,CAACM;EAAO,CAAC,CAAC,EAE/CT,WAAW;AAInC,CAAC;;AAED;AACA;AACA;AACA;;AAYO,IAAMuB,qBAAqB,GAAArB,OAAA,CAAAqB,qBAAA,GAAG,SAAxBA,qBAAqBA,CAAIpB,KAA4B,EAAK;EACnE,WAAOC,mBAAG,EAAAT,gBAAA,KAAAA,gBAAA,OAAAU,uBAAA,CAAAC,OAAA,2QACeH,KAAK,CAACI,eAAe,EACpBJ,KAAK,CAACI,eAAe,EAE7BT,2BAA2B,EAC3B,IAAAU,kCAAgB,EAAC;IAAEL,KAAK,EAALA,KAAK;IAAEM,MAAM,EAAEN,KAAK,CAACM;EAAO,CAAC,CAAC,EAE/CT,WAAW;AAGnC,CAAC;;AAED;AACA;AACA;AACA;;AAYO,IAAMwB,uBAAuB,GAAAtB,OAAA,CAAAsB,uBAAA,GAAG,SAA1BA,uBAAuBA,CAAIrB,KAA4B,EAAK;EACrE,WAAOC,mBAAG,EAAAR,iBAAA,KAAAA,iBAAA,OAAAS,uBAAA,CAAAC,OAAA,gRACiBH,KAAK,CAACI,eAAe,EACpBJ,KAAK,CAACI,eAAe,EAE/BT,2BAA2B,EAC3B,IAAAU,kCAAgB,EAAC;IAAEL,KAAK,EAALA,KAAK;IAAEM,MAAM,EAAEN,KAAK,CAACM;EAAO,CAAC,CAAC,EAE/CT,WAAW;AAGnC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_graphqlTag","_interopRequireDefault","require","_createFieldsList","_getModelTitleFieldId","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_templateObject10","_templateObject11","CONTENT_META_FIELDS","CONTENT_ENTRY_SYSTEM_FIELDS","concat","ERROR_FIELD","createReadQuery","exports","model","gql","_taggedTemplateLiteral2","default","singularApiName","createFieldsList","fields","createRevisionsQuery","createListQueryDataSelection","getModelTitleFieldId","createListQuery","deleted","queryName","pluralApiName","createDeleteMutation","createRestoreFromBinMutation","createCreateMutation","createFields","createCreateFromMutation","createUpdateMutation","createPublishMutation","createUnpublishMutation","createBulkActionMutation"],"sources":["entries.graphql.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport {\n CmsContentEntryRevision,\n CmsContentEntry,\n CmsEditorContentModel,\n CmsErrorResponse,\n CmsMetaResponse,\n CmsModelField\n} from \"~/types\";\nimport { createFieldsList } from \"./createFieldsList\";\nimport { getModelTitleFieldId } from \"./getModelTitleFieldId\";\nimport { FormValidationOptions } from \"@webiny/form\";\n\nconst CONTENT_META_FIELDS = /* GraphQL */ `\n meta {\n title\n description\n image\n version\n locked\n status\n }\n`;\n\nconst CONTENT_ENTRY_SYSTEM_FIELDS = /* GraphQL */ `\n id\n entryId\n createdOn\n savedOn\n modifiedOn,\n deletedOn\n firstPublishedOn\n lastPublishedOn\n createdBy {\n id\n type\n displayName\n }\n savedBy {\n id\n type\n displayName\n }\n modifiedBy {\n id\n type\n displayName\n }\n deletedBy {\n id\n type\n displayName\n }\n firstPublishedBy {\n id\n type\n displayName\n }\n lastPublishedBy {\n id\n type\n displayName\n }\n revisionCreatedOn\n revisionSavedOn\n revisionModifiedOn\n revisionDeletedOn\n revisionFirstPublishedOn\n revisionLastPublishedOn\n revisionCreatedBy {\n id\n type\n displayName\n }\n revisionSavedBy {\n id\n type\n displayName\n }\n revisionModifiedBy {\n id\n type\n displayName\n }\n revisionDeletedBy {\n id\n type\n displayName\n }\n revisionFirstPublishedBy {\n id\n type\n displayName\n }\n revisionLastPublishedBy {\n id\n type\n displayName\n }\n revisionCreatedOn\n revisionSavedOn\n revisionModifiedOn\n revisionFirstPublishedOn\n revisionLastPublishedOn\n revisionCreatedBy {\n id\n type\n displayName\n }\n revisionSavedBy {\n id\n type\n displayName\n }\n revisionModifiedBy {\n id\n type\n displayName\n }\n revisionFirstPublishedBy {\n id\n type\n displayName\n }\n revisionLastPublishedBy {\n id\n type\n displayName\n }\n wbyAco_location {\n folderId\n }\n ${CONTENT_META_FIELDS}\n`;\n\nconst ERROR_FIELD = /* GraphQL */ `\n {\n message\n code\n data\n }\n`;\n\n/**\n * ############################################\n * Get CMS Entry Query\n */\nexport interface CmsEntryGetQueryResponse {\n content: {\n data: CmsContentEntry;\n error: CmsErrorResponse | null;\n };\n}\n\nexport interface CmsEntryGetQueryVariables {\n revision?: string;\n entryId?: string;\n}\n\nexport const createReadQuery = (model: CmsEditorContentModel) => {\n /**\n * This query now accepts both revision or entryId as we can load exact revision or latest (if entryId was sent).\n */\n return gql`\n query CmsEntriesGet${model.singularApiName}($revision: ID, $entryId: ID) {\n content: get${model.singularApiName}(revision: $revision, entryId: $entryId) {\n data {\n ${CONTENT_ENTRY_SYSTEM_FIELDS}\n ${createFieldsList({ model, fields: model.fields })}\n }\n error ${ERROR_FIELD}\n }\n }\n `;\n};\n\n/**\n * ############################################\n * List CMS Entry Revisions Query\n */\nexport interface CmsEntriesListRevisionsQueryResponse {\n revisions: {\n data: CmsContentEntryRevision[];\n error: CmsErrorResponse | null;\n meta: CmsMetaResponse;\n };\n}\n\nexport interface CmsEntriesListRevisionsQueryVariables {\n id: string;\n}\n\nexport const createRevisionsQuery = (model: CmsEditorContentModel) => {\n return gql`\n query CmsEntriesGet${model.singularApiName}Revisions($id: ID!) {\n revisions: get${model.singularApiName}Revisions(id: $id) {\n data {\n ${CONTENT_ENTRY_SYSTEM_FIELDS}\n }\n error ${ERROR_FIELD}\n }\n }\n `;\n};\n\n/**\n * ############################################\n * List CMS Entries Query\n */\nexport interface CmsEntriesListQueryResponse {\n content: {\n data: CmsContentEntry[];\n error: CmsErrorResponse | null;\n meta: CmsMetaResponse;\n };\n}\n\nexport interface CmsEntriesListQueryVariables {\n // TODO @ts-refactor better list types\n where?: {\n [key: string]: any;\n };\n sort?: string[];\n limit?: number;\n after?: string;\n}\n\nexport const createListQueryDataSelection = (\n model: CmsEditorContentModel,\n fields?: CmsModelField[]\n) => {\n return `\n ${CONTENT_ENTRY_SYSTEM_FIELDS}\n ${fields ? createFieldsList({ model, fields }) : \"\"}\n ${!fields ? getModelTitleFieldId(model) : \"\"}\n `;\n};\n\nexport const createListQuery = (\n model: CmsEditorContentModel,\n fields?: CmsModelField[],\n deleted?: boolean\n) => {\n const queryName = deleted ? `Deleted${model.pluralApiName}` : model.pluralApiName;\n\n return gql`\n query CmsEntriesList${queryName}($where: ${model.singularApiName}ListWhereInput, $sort: [${\n model.singularApiName\n }ListSorter], $limit: Int, $after: String, $search: String) {\n content: list${queryName}(\n where: $where\n sort: $sort\n limit: $limit\n after: $after\n search: $search\n ) {\n data {\n ${createListQueryDataSelection(model, fields)}\n }\n meta {\n cursor\n hasMoreItems\n totalCount\n }\n error ${ERROR_FIELD}\n }\n }\n `;\n};\n\n/**\n * ############################################\n * Delete Mutation\n */\nexport interface CmsEntryDeleteMutationResponse {\n content: {\n data: CmsContentEntry | null;\n error: CmsErrorResponse | null;\n };\n}\n\nexport interface CmsEntryDeleteMutationVariables {\n revision: string;\n permanently?: boolean;\n}\n\nexport const createDeleteMutation = (model: CmsEditorContentModel) => {\n return gql`\n mutation CmsEntriesDelete${model.singularApiName}($revision: ID!, $permanently: Boolean) {\n content: delete${model.singularApiName}(revision: $revision, options: {permanently: $permanently}) {\n data\n error ${ERROR_FIELD}\n }\n }\n `;\n};\n\n/**\n * ############################################\n * Restore from bin Mutation\n */\nexport interface CmsEntryRestoreFromBinMutationResponse {\n content: {\n data: CmsContentEntry | null;\n error: CmsErrorResponse | null;\n };\n}\n\nexport interface CmsEntryRestoreFromBinMutationVariables {\n revision: string;\n}\n\nexport const createRestoreFromBinMutation = (model: CmsEditorContentModel) => {\n return gql`\n mutation CmsEntriesRestore${model.singularApiName}FromBin($revision: ID!) {\n content: restore${model.singularApiName}FromBin(revision: $revision) {\n data {\n ${CONTENT_ENTRY_SYSTEM_FIELDS}\n ${createFieldsList({ model, fields: model.fields })}\n }\n error ${ERROR_FIELD}\n }\n }\n `;\n};\n\n/**\n * ############################################\n * Create Mutation\n */\nexport interface CmsEntryCreateMutationResponse {\n content: {\n data: CmsContentEntry | null;\n error: CmsErrorResponse | null;\n };\n}\n\nexport interface CmsEntryCreateMutationVariables {\n /**\n * We have any here because we do not know which fields does entry have\n */\n data: Record<string, any>;\n options?: FormValidationOptions;\n}\n\nexport const createCreateMutation = (model: CmsEditorContentModel) => {\n const createFields = createFieldsList({ model, fields: model.fields });\n\n return gql`\n mutation CmsEntriesCreate${model.singularApiName}($data: ${model.singularApiName}Input!, $options: CreateCmsEntryOptionsInput) {\n content: create${model.singularApiName}(data: $data, options: $options) {\n data {\n ${CONTENT_ENTRY_SYSTEM_FIELDS}\n ${createFields}\n }\n error ${ERROR_FIELD}\n }\n }\n `;\n};\n\n/**\n * ############################################\n * Create From Mutation\n */\nexport interface CmsEntryCreateFromMutationResponse {\n content: {\n data?: CmsContentEntry;\n error?: CmsErrorResponse;\n };\n}\n\nexport interface CmsEntryCreateFromMutationVariables {\n revision: string;\n /**\n * We have any here because we do not know which fields does entry have\n */\n data?: Record<string, any>;\n options?: FormValidationOptions;\n}\n\nexport const createCreateFromMutation = (model: CmsEditorContentModel) => {\n return gql`\n mutation CmsCreate${model.singularApiName}From($revision: ID!, $data: ${\n model.singularApiName\n }Input, $options: CreateRevisionCmsEntryOptionsInput) {\n content: create${\n model.singularApiName\n }From(revision: $revision, data: $data, options: $options) {\n data {\n ${CONTENT_ENTRY_SYSTEM_FIELDS}\n ${createFieldsList({ model, fields: model.fields })}\n }\n error ${ERROR_FIELD}\n }\n }`;\n};\n\n/**\n * ############################################\n * Update Mutation\n */\nexport interface CmsEntryUpdateMutationResponse {\n content: {\n data?: CmsContentEntry;\n error?: CmsErrorResponse;\n };\n}\n\nexport interface CmsEntryUpdateMutationVariables {\n revision: string;\n /**\n * We have any here because we do not know which fields does entry have\n */\n data: Record<string, any>;\n options?: FormValidationOptions;\n}\n\nexport const createUpdateMutation = (model: CmsEditorContentModel) => {\n return gql`\n mutation CmsUpdate${model.singularApiName}($revision: ID!, $data: ${\n model.singularApiName\n }Input!, $options: UpdateCmsEntryOptionsInput) {\n content: update${\n model.singularApiName\n }(revision: $revision, data: $data, options: $options) {\n data {\n ${CONTENT_ENTRY_SYSTEM_FIELDS}\n ${createFieldsList({ model, fields: model.fields })}\n }\n error ${ERROR_FIELD}\n }\n }\n `;\n};\n\n/**\n * ############################################\n * Publish Mutation\n */\nexport interface CmsEntryPublishMutationResponse {\n content: {\n data?: CmsContentEntry;\n error?: CmsErrorResponse;\n };\n}\n\nexport interface CmsEntryPublishMutationVariables {\n revision: string;\n}\n\nexport const createPublishMutation = (model: CmsEditorContentModel) => {\n return gql`\n mutation CmsPublish${model.singularApiName}($revision: ID!) {\n content: publish${model.singularApiName}(revision: $revision) {\n data {\n ${CONTENT_ENTRY_SYSTEM_FIELDS}\n ${createFieldsList({ model, fields: model.fields })}\n }\n error ${ERROR_FIELD}\n }\n }`;\n};\n\n/**\n * ############################################\n * Unpublish Mutation\n */\nexport interface CmsEntryUnpublishMutationResponse {\n content: {\n data?: CmsContentEntry;\n error?: CmsErrorResponse;\n };\n}\n\nexport interface CmsEntryUnpublishMutationVariables {\n revision: string;\n}\n\nexport const createUnpublishMutation = (model: CmsEditorContentModel) => {\n return gql`\n mutation CmsUnpublish${model.singularApiName}($revision: ID!) {\n content: unpublish${model.singularApiName}(revision: $revision) {\n data {\n ${CONTENT_ENTRY_SYSTEM_FIELDS}\n ${createFieldsList({ model, fields: model.fields })}\n }\n error ${ERROR_FIELD}\n }\n }`;\n};\n\n/**\n * ############################################\n * Bulk Action Mutation\n */\nexport interface CmsEntryBulkActionMutationResponse {\n content: {\n data?: {\n id: string;\n };\n error?: CmsErrorResponse;\n };\n}\n\nexport interface CmsEntryBulkActionMutationVariables {\n action: string;\n where?: {\n [key: string]: any;\n };\n search?: string;\n data?: {\n [key: string]: any;\n };\n}\n\nexport const createBulkActionMutation = (model: CmsEditorContentModel) => {\n return gql`\n mutation CmsBulkAction${model.singularApiName}($action: BulkAction${model.singularApiName}Name!, $where: ${model.singularApiName}ListWhereInput, $search: String, $data: JSON) {\n content: bulkAction${model.singularApiName}(action: $action, where: $where, search: $search, data: $data) {\n data {\n id\n }\n error ${ERROR_FIELD}\n }\n }`;\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AASA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,qBAAA,GAAAF,OAAA;AAA8D,IAAAG,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,iBAAA,EAAAC,iBAAA;AAG9D,IAAMC,mBAAmB,GAAG,wIAS3B;AAED,IAAMC,2BAA2B,GAAG,0wDAAAC,MAAA,CA4G9BF,mBAAmB,OACxB;AAED,IAAMG,WAAW,GAAG,4EAMnB;;AAED;AACA;AACA;AACA;;AAaO,IAAMC,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG,SAAlBA,eAAeA,CAAIE,KAA4B,EAAK;EAC7D;AACJ;AACA;EACI,WAAOC,mBAAG,EAAAlB,eAAA,KAAAA,eAAA,OAAAmB,uBAAA,CAAAC,OAAA,6SACeH,KAAK,CAACI,eAAe,EACxBJ,KAAK,CAACI,eAAe,EAEzBT,2BAA2B,EAC3B,IAAAU,kCAAgB,EAAC;IAAEL,KAAK,EAALA,KAAK;IAAEM,MAAM,EAAEN,KAAK,CAACM;EAAO,CAAC,CAAC,EAE/CT,WAAW;AAInC,CAAC;;AAED;AACA;AACA;AACA;;AAaO,IAAMU,oBAAoB,GAAAR,OAAA,CAAAQ,oBAAA,GAAG,SAAvBA,oBAAoBA,CAAIP,KAA4B,EAAK;EAClE,WAAOC,mBAAG,EAAAjB,gBAAA,KAAAA,gBAAA,OAAAkB,uBAAA,CAAAC,OAAA,qPACeH,KAAK,CAACI,eAAe,EACtBJ,KAAK,CAACI,eAAe,EAE3BT,2BAA2B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BAAwB,GAAAvB,OAAA,CAAAuB,wBAAA,GAAG,SAA3BA,wBAAwBA,CAAItB,KAA4B,EAAK;EACtE,WAAOC,mBAAG,EAAAR,iBAAA,KAAAA,iBAAA,OAAAS,uBAAA,CAAAC,OAAA,uWACkBH,KAAK,CAACI,eAAe,EAAuBJ,KAAK,CAACI,eAAe,EAAkBJ,KAAK,CAACI,eAAe,EACvGJ,KAAK,CAACI,eAAe,EAI9BP,WAAW;AAGnC,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-headless-cms-common",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.41.0-dbt.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"@babel/runtime": "7.24.1",
|
|
17
17
|
"@fortawesome/fontawesome-svg-core": "1.3.0",
|
|
18
18
|
"@types/react": "18.2.79",
|
|
19
|
-
"@webiny/app-security": "5.
|
|
20
|
-
"@webiny/form": "5.
|
|
21
|
-
"@webiny/plugins": "5.
|
|
22
|
-
"@webiny/validation": "5.
|
|
19
|
+
"@webiny/app-security": "5.41.0-dbt.0",
|
|
20
|
+
"@webiny/form": "5.41.0-dbt.0",
|
|
21
|
+
"@webiny/plugins": "5.41.0-dbt.0",
|
|
22
|
+
"@webiny/validation": "5.41.0-dbt.0",
|
|
23
23
|
"dnd-core": "16.0.1",
|
|
24
24
|
"graphql": "15.8.0",
|
|
25
25
|
"graphql-tag": "2.12.6",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"@babel/preset-react": "7.24.1",
|
|
34
34
|
"@babel/preset-typescript": "7.24.1",
|
|
35
35
|
"@emotion/babel-plugin": "11.11.0",
|
|
36
|
-
"@webiny/cli": "5.
|
|
37
|
-
"@webiny/project-utils": "5.
|
|
36
|
+
"@webiny/cli": "5.41.0-dbt.0",
|
|
37
|
+
"@webiny/project-utils": "5.41.0-dbt.0",
|
|
38
38
|
"babel-plugin-module-resolver": "5.0.0",
|
|
39
39
|
"rimraf": "5.0.5",
|
|
40
40
|
"ttypescript": "1.5.15",
|
|
41
|
-
"typescript": "4.
|
|
41
|
+
"typescript": "4.9.5"
|
|
42
42
|
},
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"build": "yarn webiny run build",
|
|
49
49
|
"watch": "yarn webiny run watch"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "bbaec4dd1685579548c08bbde386aee5d96b80f8"
|
|
52
52
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { CmsModelFieldValidator, CmsModelFieldValidatorsFactory, CmsModelFieldVa
|
|
|
8
8
|
import { CmsModel, CmsModelField } from "./model";
|
|
9
9
|
import { CmsIdentity } from "./shared";
|
|
10
10
|
import type { SourceType } from "dnd-core";
|
|
11
|
-
export
|
|
11
|
+
export type DragObjectWithType = {
|
|
12
12
|
type: SourceType;
|
|
13
13
|
};
|
|
14
14
|
export * from "./validation";
|
|
@@ -37,7 +37,7 @@ export interface DragSource extends DragObjectWithType {
|
|
|
37
37
|
/**
|
|
38
38
|
* @deprecated Use `CmsModelFieldTypePlugin`.
|
|
39
39
|
*/
|
|
40
|
-
export
|
|
40
|
+
export type CmsEditorFieldTypePlugin = CmsModelFieldTypePlugin;
|
|
41
41
|
export interface CmsModelFieldTypePlugin extends Plugin {
|
|
42
42
|
/**
|
|
43
43
|
* a plugin type
|
|
@@ -224,11 +224,11 @@ export interface CmsModelFieldRendererProps {
|
|
|
224
224
|
/**
|
|
225
225
|
* @deprecated Use `CmsModelFieldRendererProps`.
|
|
226
226
|
*/
|
|
227
|
-
export
|
|
227
|
+
export type CmsEditorFieldRendererProps = CmsModelFieldRendererProps;
|
|
228
228
|
/**
|
|
229
229
|
* @deprecated Use `CmsModelFieldRendererPlugin`.
|
|
230
230
|
*/
|
|
231
|
-
export
|
|
231
|
+
export type CmsEditorFieldRendererPlugin = CmsModelFieldRendererPlugin;
|
|
232
232
|
export interface CmsModelFieldRendererPlugin extends Plugin {
|
|
233
233
|
/**
|
|
234
234
|
* a plugin type
|
|
@@ -324,11 +324,11 @@ export interface CmsDynamicZoneTemplate {
|
|
|
324
324
|
export interface CmsDynamicZoneTemplateWithTypename extends CmsDynamicZoneTemplate {
|
|
325
325
|
__typename: string;
|
|
326
326
|
}
|
|
327
|
-
export
|
|
327
|
+
export type CmsContentEntryStatusType = "draft" | "published" | "unpublished";
|
|
328
328
|
/**
|
|
329
329
|
* @deprecated Use `CmsContentEntry`.
|
|
330
330
|
*/
|
|
331
|
-
export
|
|
331
|
+
export type CmsEditorContentEntry = CmsContentEntry;
|
|
332
332
|
export interface CmsContentEntry {
|
|
333
333
|
id: string;
|
|
334
334
|
entryId: string;
|
|
@@ -397,7 +397,7 @@ export interface CmsContentEntryRevision {
|
|
|
397
397
|
version: number;
|
|
398
398
|
};
|
|
399
399
|
}
|
|
400
|
-
export
|
|
400
|
+
export type CmsEditorContentTab = React.ComponentType<{
|
|
401
401
|
activeTab: boolean;
|
|
402
402
|
}>;
|
|
403
403
|
export interface CmsEditorFieldOptionPlugin extends Plugin {
|
|
@@ -545,7 +545,7 @@ interface BindComponentProps<T = any> extends Omit<BaseBindComponentProps, "chil
|
|
|
545
545
|
name?: string;
|
|
546
546
|
children?: ((props: BindComponentRenderProp<T>) => React.ReactElement) | React.ReactElement;
|
|
547
547
|
}
|
|
548
|
-
export
|
|
548
|
+
export type BindComponent<T = any> = React.ComponentType<BindComponentProps<T>> & {
|
|
549
549
|
parentName: string;
|
|
550
550
|
};
|
|
551
551
|
/**
|
package/types/model.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { CmsIdentity } from "./shared";
|
|
|
5
5
|
/**
|
|
6
6
|
* @deprecated Use `CmsModelField` instead.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type CmsEditorField<T = unknown> = CmsModelField<T>;
|
|
9
9
|
export interface CmsModelFieldSettings<T = unknown> {
|
|
10
10
|
defaultValue?: string | boolean | number | null | undefined;
|
|
11
11
|
defaultSetValue?: string;
|
|
@@ -17,7 +17,7 @@ export interface CmsModelFieldSettings<T = unknown> {
|
|
|
17
17
|
imagesOnly?: boolean;
|
|
18
18
|
[key: string]: any;
|
|
19
19
|
}
|
|
20
|
-
export
|
|
20
|
+
export type CmsModelField<T = unknown> = T & {
|
|
21
21
|
id: string;
|
|
22
22
|
type: string;
|
|
23
23
|
fieldId: CmsEditorFieldId;
|
|
@@ -41,13 +41,13 @@ export declare type CmsModelField<T = unknown> = T & {
|
|
|
41
41
|
| CmsModelFieldRendererPlugin["renderer"]["render"];
|
|
42
42
|
tags?: string[];
|
|
43
43
|
};
|
|
44
|
-
export
|
|
45
|
-
export
|
|
44
|
+
export type CmsEditorFieldId = string;
|
|
45
|
+
export type CmsEditorFieldsLayout = CmsEditorFieldId[][];
|
|
46
46
|
/**
|
|
47
47
|
* @category GraphQL
|
|
48
48
|
* @category Model
|
|
49
49
|
*/
|
|
50
|
-
export
|
|
50
|
+
export type CmsEditorContentModel = CmsModel;
|
|
51
51
|
/**
|
|
52
52
|
* @category GraphQL
|
|
53
53
|
* @category Group
|