@webiny/api-aco 0.0.0-unstable.2af142b57e → 0.0.0-unstable.496cf268ac
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/context/folders.d.ts +2 -0
- package/context/folders.js +261 -0
- package/context/folders.js.map +1 -0
- package/context/index.d.ts +2 -0
- package/context/index.js +22 -0
- package/context/index.js.map +1 -0
- package/context/links.d.ts +2 -0
- package/context/links.js +270 -0
- package/context/links.js.map +1 -0
- package/createAcoGraphQL.js +10 -9
- package/createAcoGraphQL.js.map +1 -1
- package/folder/folder.gql.js +1 -1
- package/folder/folder.gql.js.map +1 -1
- package/folder/folder.model.d.ts +4 -2
- package/folder/folder.model.js +1 -1
- package/folder/folder.model.js.map +1 -1
- package/folder/folder.so.d.ts +1 -6
- package/folder/folder.so.js +103 -108
- package/folder/folder.so.js.map +1 -1
- package/folder/folder.types.d.ts +2 -2
- package/folder/folder.types.js.map +1 -1
- package/folder/onFolderBeforeDelete.hook.js +11 -11
- package/folder/onFolderBeforeDelete.hook.js.map +1 -1
- package/graphql/base.gql.d.ts +3 -0
- package/graphql/base.gql.js +63 -0
- package/graphql/base.gql.js.map +1 -0
- package/graphql/folders.gql.d.ts +3 -0
- package/graphql/folders.gql.js +126 -0
- package/graphql/folders.gql.js.map +1 -0
- package/graphql/index.d.ts +1 -0
- package/graphql/index.js +15 -0
- package/graphql/index.js.map +1 -0
- package/graphql/links.gql.d.ts +3 -0
- package/graphql/links.gql.js +123 -0
- package/graphql/links.gql.js.map +1 -0
- package/package.json +22 -21
- package/record/record.gql.js +2 -3
- package/record/record.gql.js.map +1 -1
- package/record/record.model.d.ts +4 -2
- package/record/record.model.js +4 -16
- package/record/record.model.js.map +1 -1
- package/record/record.so.d.ts +1 -6
- package/record/record.so.js +57 -59
- package/record/record.so.js.map +1 -1
- package/record/record.types.d.ts +3 -4
- package/record/record.types.js.map +1 -1
- package/subscriptions/afterFolderDelete.d.ts +3 -0
- package/subscriptions/afterFolderDelete.js +62 -0
- package/subscriptions/afterFolderDelete.js.map +1 -0
- package/subscriptions/index.d.ts +3 -0
- package/subscriptions/index.js +14 -0
- package/subscriptions/index.js.map +1 -0
- package/types.d.ts +5 -0
- package/types.js +8 -1
- package/types.js.map +1 -1
- package/utils/createListSort.d.ts +2 -0
- package/utils/createListSort.js +13 -0
- package/utils/createListSort.js.map +1 -0
- package/utils/createOperationsWrapper.d.ts +9 -0
- package/utils/createOperationsWrapper.js +29 -0
- package/utils/createOperationsWrapper.js.map +1 -0
- package/utils/getFieldValues.d.ts +1 -1
- package/utils/getFieldValues.js +9 -2
- package/utils/getFieldValues.js.map +1 -1
- package/utils/modelFactory.d.ts +3 -1
- package/utils/modelFactory.js.map +1 -1
- package/utils/resolve.d.ts +1 -1
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.foldersSchema = void 0;
|
|
7
|
+
|
|
8
|
+
var _responses = require("@webiny/handler-graphql/responses");
|
|
9
|
+
|
|
10
|
+
var _GraphQLSchemaPlugin = require("@webiny/handler-graphql/plugins/GraphQLSchemaPlugin");
|
|
11
|
+
|
|
12
|
+
const foldersSchema = new _GraphQLSchemaPlugin.GraphQLSchemaPlugin({
|
|
13
|
+
typeDefs:
|
|
14
|
+
/* GraphQL */
|
|
15
|
+
`
|
|
16
|
+
type Folder {
|
|
17
|
+
id: ID!
|
|
18
|
+
name: String!
|
|
19
|
+
slug: String!
|
|
20
|
+
type: String!
|
|
21
|
+
parentId: ID
|
|
22
|
+
createdOn: DateTime
|
|
23
|
+
createdBy: FolderCreatedBy
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
input FolderCreateInput {
|
|
27
|
+
name: String!
|
|
28
|
+
slug: String!
|
|
29
|
+
type: String!
|
|
30
|
+
parentId: ID
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
input FolderUpdateInput {
|
|
34
|
+
name: String
|
|
35
|
+
slug: String
|
|
36
|
+
parentId: ID
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
input FoldersListWhereInput {
|
|
40
|
+
type: String!
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
type FolderResponse {
|
|
44
|
+
data: Folder
|
|
45
|
+
error: FolderError
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
type FoldersListResponse {
|
|
49
|
+
data: [Folder]
|
|
50
|
+
error: FolderError
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
extend type FoldersQuery {
|
|
54
|
+
getFolder(id: ID!): FolderResponse
|
|
55
|
+
listFolders(where: FoldersListWhereInput!): FoldersListResponse
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
extend type FoldersMutation {
|
|
59
|
+
createFolder(data: FolderCreateInput!): FolderResponse
|
|
60
|
+
updateFolder(id: ID!, data: FolderUpdateInput!): FolderResponse
|
|
61
|
+
deleteFolder(id: ID!): FolderBooleanResponse
|
|
62
|
+
}
|
|
63
|
+
`,
|
|
64
|
+
resolvers: {
|
|
65
|
+
FoldersQuery: {
|
|
66
|
+
getFolder: async (_, {
|
|
67
|
+
id
|
|
68
|
+
}, context) => {
|
|
69
|
+
try {
|
|
70
|
+
const folder = await context.folders.getFolder({
|
|
71
|
+
id
|
|
72
|
+
});
|
|
73
|
+
return new _responses.Response(folder);
|
|
74
|
+
} catch (error) {
|
|
75
|
+
return new _responses.ErrorResponse(error);
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
listFolders: async (_, {
|
|
79
|
+
where
|
|
80
|
+
}, context) => {
|
|
81
|
+
try {
|
|
82
|
+
const folders = await context.folders.listFolders({
|
|
83
|
+
where
|
|
84
|
+
});
|
|
85
|
+
return new _responses.Response(folders);
|
|
86
|
+
} catch (error) {
|
|
87
|
+
return new _responses.ErrorResponse(error);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
FoldersMutation: {
|
|
92
|
+
createFolder: async (_, {
|
|
93
|
+
data
|
|
94
|
+
}, context) => {
|
|
95
|
+
try {
|
|
96
|
+
const folder = await context.folders.createFolder(data);
|
|
97
|
+
return new _responses.Response(folder);
|
|
98
|
+
} catch (error) {
|
|
99
|
+
return new _responses.ErrorResponse(error);
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
updateFolder: async (_, {
|
|
103
|
+
id,
|
|
104
|
+
data
|
|
105
|
+
}, context) => {
|
|
106
|
+
try {
|
|
107
|
+
const folder = await context.folders.updateFolder(id, data);
|
|
108
|
+
return new _responses.Response(folder);
|
|
109
|
+
} catch (error) {
|
|
110
|
+
return new _responses.ErrorResponse(error);
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
deleteFolder: async (_, {
|
|
114
|
+
id
|
|
115
|
+
}, context) => {
|
|
116
|
+
try {
|
|
117
|
+
await context.folders.deleteFolder(id);
|
|
118
|
+
return new _responses.Response(true);
|
|
119
|
+
} catch (error) {
|
|
120
|
+
return new _responses.ErrorResponse(error);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
exports.foldersSchema = foldersSchema;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["foldersSchema","GraphQLSchemaPlugin","typeDefs","resolvers","FoldersQuery","getFolder","_","id","context","folder","folders","Response","error","ErrorResponse","listFolders","where","FoldersMutation","createFolder","data","updateFolder","deleteFolder"],"sources":["folders.gql.ts"],"sourcesContent":["import { ErrorResponse, Response } from \"@webiny/handler-graphql/responses\";\nimport { GraphQLSchemaPlugin } from \"@webiny/handler-graphql/plugins/GraphQLSchemaPlugin\";\nimport { ACOContext } from \"~/types\";\n\nexport const foldersSchema = new GraphQLSchemaPlugin<ACOContext>({\n typeDefs: /* GraphQL */ `\n type Folder {\n id: ID!\n name: String!\n slug: String!\n type: String!\n parentId: ID\n createdOn: DateTime\n createdBy: FolderCreatedBy\n }\n\n input FolderCreateInput {\n name: String!\n slug: String!\n type: String!\n parentId: ID\n }\n\n input FolderUpdateInput {\n name: String\n slug: String\n parentId: ID\n }\n\n input FoldersListWhereInput {\n type: String!\n }\n\n type FolderResponse {\n data: Folder\n error: FolderError\n }\n\n type FoldersListResponse {\n data: [Folder]\n error: FolderError\n }\n\n extend type FoldersQuery {\n getFolder(id: ID!): FolderResponse\n listFolders(where: FoldersListWhereInput!): FoldersListResponse\n }\n\n extend type FoldersMutation {\n createFolder(data: FolderCreateInput!): FolderResponse\n updateFolder(id: ID!, data: FolderUpdateInput!): FolderResponse\n deleteFolder(id: ID!): FolderBooleanResponse\n }\n `,\n resolvers: {\n FoldersQuery: {\n getFolder: async (_, { id }, context) => {\n try {\n const folder = await context.folders.getFolder({ id });\n return new Response(folder);\n } catch (error) {\n return new ErrorResponse(error);\n }\n },\n listFolders: async (_, { where }, context) => {\n try {\n const folders = await context.folders.listFolders({ where });\n return new Response(folders);\n } catch (error) {\n return new ErrorResponse(error);\n }\n }\n },\n\n FoldersMutation: {\n createFolder: async (_, { data }, context) => {\n try {\n const folder = await context.folders.createFolder(data);\n return new Response(folder);\n } catch (error) {\n return new ErrorResponse(error);\n }\n },\n updateFolder: async (_, { id, data }, context) => {\n try {\n const folder = await context.folders.updateFolder(id, data);\n return new Response(folder);\n } catch (error) {\n return new ErrorResponse(error);\n }\n },\n deleteFolder: async (_, { id }, context) => {\n try {\n await context.folders.deleteFolder(id);\n return new Response(true);\n } catch (error) {\n return new ErrorResponse(error);\n }\n }\n }\n }\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AAGO,MAAMA,aAAa,GAAG,IAAIC,wCAAJ,CAAoC;EAC7DC,QAAQ;EAAE;EAAe;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAjDiE;EAkD7DC,SAAS,EAAE;IACPC,YAAY,EAAE;MACVC,SAAS,EAAE,OAAOC,CAAP,EAAU;QAAEC;MAAF,CAAV,EAAkBC,OAAlB,KAA8B;QACrC,IAAI;UACA,MAAMC,MAAM,GAAG,MAAMD,OAAO,CAACE,OAAR,CAAgBL,SAAhB,CAA0B;YAAEE;UAAF,CAA1B,CAArB;UACA,OAAO,IAAII,mBAAJ,CAAaF,MAAb,CAAP;QACH,CAHD,CAGE,OAAOG,KAAP,EAAc;UACZ,OAAO,IAAIC,wBAAJ,CAAkBD,KAAlB,CAAP;QACH;MACJ,CARS;MASVE,WAAW,EAAE,OAAOR,CAAP,EAAU;QAAES;MAAF,CAAV,EAAqBP,OAArB,KAAiC;QAC1C,IAAI;UACA,MAAME,OAAO,GAAG,MAAMF,OAAO,CAACE,OAAR,CAAgBI,WAAhB,CAA4B;YAAEC;UAAF,CAA5B,CAAtB;UACA,OAAO,IAAIJ,mBAAJ,CAAaD,OAAb,CAAP;QACH,CAHD,CAGE,OAAOE,KAAP,EAAc;UACZ,OAAO,IAAIC,wBAAJ,CAAkBD,KAAlB,CAAP;QACH;MACJ;IAhBS,CADP;IAoBPI,eAAe,EAAE;MACbC,YAAY,EAAE,OAAOX,CAAP,EAAU;QAAEY;MAAF,CAAV,EAAoBV,OAApB,KAAgC;QAC1C,IAAI;UACA,MAAMC,MAAM,GAAG,MAAMD,OAAO,CAACE,OAAR,CAAgBO,YAAhB,CAA6BC,IAA7B,CAArB;UACA,OAAO,IAAIP,mBAAJ,CAAaF,MAAb,CAAP;QACH,CAHD,CAGE,OAAOG,KAAP,EAAc;UACZ,OAAO,IAAIC,wBAAJ,CAAkBD,KAAlB,CAAP;QACH;MACJ,CARY;MASbO,YAAY,EAAE,OAAOb,CAAP,EAAU;QAAEC,EAAF;QAAMW;MAAN,CAAV,EAAwBV,OAAxB,KAAoC;QAC9C,IAAI;UACA,MAAMC,MAAM,GAAG,MAAMD,OAAO,CAACE,OAAR,CAAgBS,YAAhB,CAA6BZ,EAA7B,EAAiCW,IAAjC,CAArB;UACA,OAAO,IAAIP,mBAAJ,CAAaF,MAAb,CAAP;QACH,CAHD,CAGE,OAAOG,KAAP,EAAc;UACZ,OAAO,IAAIC,wBAAJ,CAAkBD,KAAlB,CAAP;QACH;MACJ,CAhBY;MAiBbQ,YAAY,EAAE,OAAOd,CAAP,EAAU;QAAEC;MAAF,CAAV,EAAkBC,OAAlB,KAA8B;QACxC,IAAI;UACA,MAAMA,OAAO,CAACE,OAAR,CAAgBU,YAAhB,CAA6Bb,EAA7B,CAAN;UACA,OAAO,IAAII,mBAAJ,CAAa,IAAb,CAAP;QACH,CAHD,CAGE,OAAOC,KAAP,EAAc;UACZ,OAAO,IAAIC,wBAAJ,CAAkBD,KAAlB,CAAP;QACH;MACJ;IAxBY;EApBV;AAlDkD,CAApC,CAAtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const graphqlPlugins: import("@webiny/handler-graphql").GraphQLSchemaPlugin<import("../types").ACOContext>[];
|
package/graphql/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.graphqlPlugins = void 0;
|
|
7
|
+
|
|
8
|
+
var _base = require("./base.gql");
|
|
9
|
+
|
|
10
|
+
var _links = require("./links.gql");
|
|
11
|
+
|
|
12
|
+
var _folders = require("./folders.gql");
|
|
13
|
+
|
|
14
|
+
const graphqlPlugins = [_base.baseSchema, _links.linksSchema, _folders.foldersSchema];
|
|
15
|
+
exports.graphqlPlugins = graphqlPlugins;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["graphqlPlugins","baseSchema","linksSchema","foldersSchema"],"sources":["index.ts"],"sourcesContent":["import { baseSchema } from \"./base.gql\";\nimport { linksSchema } from \"./links.gql\";\nimport { foldersSchema } from \"./folders.gql\";\n\nexport const graphqlPlugins = [baseSchema, linksSchema, foldersSchema];\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEO,MAAMA,cAAc,GAAG,CAACC,gBAAD,EAAaC,kBAAb,EAA0BC,sBAA1B,CAAvB"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.linksSchema = void 0;
|
|
7
|
+
|
|
8
|
+
var _responses = require("@webiny/handler-graphql/responses");
|
|
9
|
+
|
|
10
|
+
var _GraphQLSchemaPlugin = require("@webiny/handler-graphql/plugins/GraphQLSchemaPlugin");
|
|
11
|
+
|
|
12
|
+
const linksSchema = new _GraphQLSchemaPlugin.GraphQLSchemaPlugin({
|
|
13
|
+
typeDefs:
|
|
14
|
+
/* GraphQL */
|
|
15
|
+
`
|
|
16
|
+
type Link {
|
|
17
|
+
id: ID!
|
|
18
|
+
linkId: ID!
|
|
19
|
+
folderId: ID!
|
|
20
|
+
createdOn: DateTime
|
|
21
|
+
createdBy: FolderCreatedBy
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
input LinkCreateInput {
|
|
25
|
+
id: ID!
|
|
26
|
+
folderId: ID!
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
input LinkUpdateInput {
|
|
30
|
+
folderId: ID!
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
input LinksListWhereInput {
|
|
34
|
+
folderId: ID!
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
type LinkResponse {
|
|
38
|
+
data: Link
|
|
39
|
+
error: FolderError
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
type LinksListResponse {
|
|
43
|
+
data: [Link]
|
|
44
|
+
meta: ListMeta
|
|
45
|
+
error: FolderError
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
extend type FoldersQuery {
|
|
49
|
+
getLink(id: ID!): LinkResponse
|
|
50
|
+
listLinks(where: LinksListWhereInput!, limit: Int, after: String): LinksListResponse
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
extend type FoldersMutation {
|
|
54
|
+
createLink(data: LinkCreateInput!): LinkResponse
|
|
55
|
+
updateLink(id: ID!, data: LinkUpdateInput!): LinkResponse
|
|
56
|
+
deleteLink(id: ID!): FolderBooleanResponse
|
|
57
|
+
}
|
|
58
|
+
`,
|
|
59
|
+
resolvers: {
|
|
60
|
+
FoldersQuery: {
|
|
61
|
+
getLink: async (_, {
|
|
62
|
+
id
|
|
63
|
+
}, context) => {
|
|
64
|
+
try {
|
|
65
|
+
const link = await context.folders.getLink(id);
|
|
66
|
+
return new _responses.Response(link);
|
|
67
|
+
} catch (error) {
|
|
68
|
+
return new _responses.ErrorResponse(error);
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
listLinks: async (_, {
|
|
72
|
+
where,
|
|
73
|
+
limit,
|
|
74
|
+
after
|
|
75
|
+
}, context) => {
|
|
76
|
+
try {
|
|
77
|
+
const [data, meta] = await context.folders.listLinks({
|
|
78
|
+
where,
|
|
79
|
+
limit,
|
|
80
|
+
after
|
|
81
|
+
});
|
|
82
|
+
return new _responses.ListResponse(data, meta);
|
|
83
|
+
} catch (error) {
|
|
84
|
+
return new _responses.ErrorResponse(error);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
FoldersMutation: {
|
|
89
|
+
createLink: async (_, {
|
|
90
|
+
data
|
|
91
|
+
}, context) => {
|
|
92
|
+
try {
|
|
93
|
+
const link = await context.folders.createLink(data);
|
|
94
|
+
return new _responses.Response(link);
|
|
95
|
+
} catch (error) {
|
|
96
|
+
return new _responses.ErrorResponse(error);
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
updateLink: async (_, {
|
|
100
|
+
id,
|
|
101
|
+
data
|
|
102
|
+
}, context) => {
|
|
103
|
+
try {
|
|
104
|
+
const link = await context.folders.updateLink(id, data);
|
|
105
|
+
return new _responses.Response(link);
|
|
106
|
+
} catch (error) {
|
|
107
|
+
return new _responses.ErrorResponse(error);
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
deleteLink: async (_, {
|
|
111
|
+
id
|
|
112
|
+
}, context) => {
|
|
113
|
+
try {
|
|
114
|
+
await context.folders.deleteLink(id);
|
|
115
|
+
return new _responses.Response(true);
|
|
116
|
+
} catch (error) {
|
|
117
|
+
return new _responses.ErrorResponse(error);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
exports.linksSchema = linksSchema;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["linksSchema","GraphQLSchemaPlugin","typeDefs","resolvers","FoldersQuery","getLink","_","id","context","link","folders","Response","error","ErrorResponse","listLinks","where","limit","after","data","meta","ListResponse","FoldersMutation","createLink","updateLink","deleteLink"],"sources":["links.gql.ts"],"sourcesContent":["import { ErrorResponse, ListResponse, Response } from \"@webiny/handler-graphql/responses\";\nimport { GraphQLSchemaPlugin } from \"@webiny/handler-graphql/plugins/GraphQLSchemaPlugin\";\nimport { ACOContext } from \"~/types\";\n\nexport const linksSchema = new GraphQLSchemaPlugin<ACOContext>({\n typeDefs: /* GraphQL */ `\n type Link {\n id: ID!\n linkId: ID!\n folderId: ID!\n createdOn: DateTime\n createdBy: FolderCreatedBy\n }\n\n input LinkCreateInput {\n id: ID!\n folderId: ID!\n }\n\n input LinkUpdateInput {\n folderId: ID!\n }\n\n input LinksListWhereInput {\n folderId: ID!\n }\n\n type LinkResponse {\n data: Link\n error: FolderError\n }\n\n type LinksListResponse {\n data: [Link]\n meta: ListMeta\n error: FolderError\n }\n\n extend type FoldersQuery {\n getLink(id: ID!): LinkResponse\n listLinks(where: LinksListWhereInput!, limit: Int, after: String): LinksListResponse\n }\n\n extend type FoldersMutation {\n createLink(data: LinkCreateInput!): LinkResponse\n updateLink(id: ID!, data: LinkUpdateInput!): LinkResponse\n deleteLink(id: ID!): FolderBooleanResponse\n }\n `,\n resolvers: {\n FoldersQuery: {\n getLink: async (_, { id }, context) => {\n try {\n const link = await context.folders.getLink(id);\n return new Response(link);\n } catch (error) {\n return new ErrorResponse(error);\n }\n },\n listLinks: async (_, { where, limit, after }, context) => {\n try {\n const [data, meta] = await context.folders.listLinks({ where, limit, after });\n return new ListResponse(data, meta);\n } catch (error) {\n return new ErrorResponse(error);\n }\n }\n },\n\n FoldersMutation: {\n createLink: async (_, { data }, context) => {\n try {\n const link = await context.folders.createLink(data);\n return new Response(link);\n } catch (error) {\n return new ErrorResponse(error);\n }\n },\n updateLink: async (_, { id, data }, context) => {\n try {\n const link = await context.folders.updateLink(id, data);\n return new Response(link);\n } catch (error) {\n return new ErrorResponse(error);\n }\n },\n deleteLink: async (_, { id }, context) => {\n try {\n await context.folders.deleteLink(id);\n return new Response(true);\n } catch (error) {\n return new ErrorResponse(error);\n }\n }\n }\n }\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AAGO,MAAMA,WAAW,GAAG,IAAIC,wCAAJ,CAAoC;EAC3DC,QAAQ;EAAE;EAAe;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KA5C+D;EA6C3DC,SAAS,EAAE;IACPC,YAAY,EAAE;MACVC,OAAO,EAAE,OAAOC,CAAP,EAAU;QAAEC;MAAF,CAAV,EAAkBC,OAAlB,KAA8B;QACnC,IAAI;UACA,MAAMC,IAAI,GAAG,MAAMD,OAAO,CAACE,OAAR,CAAgBL,OAAhB,CAAwBE,EAAxB,CAAnB;UACA,OAAO,IAAII,mBAAJ,CAAaF,IAAb,CAAP;QACH,CAHD,CAGE,OAAOG,KAAP,EAAc;UACZ,OAAO,IAAIC,wBAAJ,CAAkBD,KAAlB,CAAP;QACH;MACJ,CARS;MASVE,SAAS,EAAE,OAAOR,CAAP,EAAU;QAAES,KAAF;QAASC,KAAT;QAAgBC;MAAhB,CAAV,EAAmCT,OAAnC,KAA+C;QACtD,IAAI;UACA,MAAM,CAACU,IAAD,EAAOC,IAAP,IAAe,MAAMX,OAAO,CAACE,OAAR,CAAgBI,SAAhB,CAA0B;YAAEC,KAAF;YAASC,KAAT;YAAgBC;UAAhB,CAA1B,CAA3B;UACA,OAAO,IAAIG,uBAAJ,CAAiBF,IAAjB,EAAuBC,IAAvB,CAAP;QACH,CAHD,CAGE,OAAOP,KAAP,EAAc;UACZ,OAAO,IAAIC,wBAAJ,CAAkBD,KAAlB,CAAP;QACH;MACJ;IAhBS,CADP;IAoBPS,eAAe,EAAE;MACbC,UAAU,EAAE,OAAOhB,CAAP,EAAU;QAAEY;MAAF,CAAV,EAAoBV,OAApB,KAAgC;QACxC,IAAI;UACA,MAAMC,IAAI,GAAG,MAAMD,OAAO,CAACE,OAAR,CAAgBY,UAAhB,CAA2BJ,IAA3B,CAAnB;UACA,OAAO,IAAIP,mBAAJ,CAAaF,IAAb,CAAP;QACH,CAHD,CAGE,OAAOG,KAAP,EAAc;UACZ,OAAO,IAAIC,wBAAJ,CAAkBD,KAAlB,CAAP;QACH;MACJ,CARY;MASbW,UAAU,EAAE,OAAOjB,CAAP,EAAU;QAAEC,EAAF;QAAMW;MAAN,CAAV,EAAwBV,OAAxB,KAAoC;QAC5C,IAAI;UACA,MAAMC,IAAI,GAAG,MAAMD,OAAO,CAACE,OAAR,CAAgBa,UAAhB,CAA2BhB,EAA3B,EAA+BW,IAA/B,CAAnB;UACA,OAAO,IAAIP,mBAAJ,CAAaF,IAAb,CAAP;QACH,CAHD,CAGE,OAAOG,KAAP,EAAc;UACZ,OAAO,IAAIC,wBAAJ,CAAkBD,KAAlB,CAAP;QACH;MACJ,CAhBY;MAiBbY,UAAU,EAAE,OAAOlB,CAAP,EAAU;QAAEC;MAAF,CAAV,EAAkBC,OAAlB,KAA8B;QACtC,IAAI;UACA,MAAMA,OAAO,CAACE,OAAR,CAAgBc,UAAhB,CAA2BjB,EAA3B,CAAN;UACA,OAAO,IAAII,mBAAJ,CAAa,IAAb,CAAP;QACH,CAHD,CAGE,OAAOC,KAAP,EAAc;UACZ,OAAO,IAAIC,wBAAJ,CAAkBD,KAAlB,CAAP;QACH;MACJ;IAxBY;EApBV;AA7CgD,CAApC,CAApB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-aco",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
3
|
+
"version": "0.0.0-unstable.496cf268ac",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aco:base"
|
|
@@ -27,31 +27,32 @@
|
|
|
27
27
|
"@babel/preset-env": "^7.19.4",
|
|
28
28
|
"@babel/preset-typescript": "^7.18.6",
|
|
29
29
|
"@babel/runtime": "^7.19.0",
|
|
30
|
-
"@webiny/api-headless-cms-ddb": "^0.0.0-unstable.
|
|
31
|
-
"@webiny/api-i18n-ddb": "^0.0.0-unstable.
|
|
32
|
-
"@webiny/api-security-so-ddb": "^0.0.0-unstable.
|
|
33
|
-
"@webiny/api-tenancy-so-ddb": "^0.0.0-unstable.
|
|
34
|
-
"@webiny/api-wcp": "^0.0.0-unstable.
|
|
35
|
-
"@webiny/cli": "^0.0.0-unstable.
|
|
36
|
-
"@webiny/handler-aws": "^0.0.0-unstable.
|
|
37
|
-
"@webiny/plugins": "^0.0.0-unstable.
|
|
38
|
-
"@webiny/project-utils": "^0.0.0-unstable.
|
|
30
|
+
"@webiny/api-headless-cms-ddb": "^0.0.0-unstable.496cf268ac",
|
|
31
|
+
"@webiny/api-i18n-ddb": "^0.0.0-unstable.496cf268ac",
|
|
32
|
+
"@webiny/api-security-so-ddb": "^0.0.0-unstable.496cf268ac",
|
|
33
|
+
"@webiny/api-tenancy-so-ddb": "^0.0.0-unstable.496cf268ac",
|
|
34
|
+
"@webiny/api-wcp": "^0.0.0-unstable.496cf268ac",
|
|
35
|
+
"@webiny/cli": "^0.0.0-unstable.496cf268ac",
|
|
36
|
+
"@webiny/handler-aws": "^0.0.0-unstable.496cf268ac",
|
|
37
|
+
"@webiny/plugins": "^0.0.0-unstable.496cf268ac",
|
|
38
|
+
"@webiny/project-utils": "^0.0.0-unstable.496cf268ac",
|
|
39
39
|
"rimraf": "^3.0.2",
|
|
40
40
|
"ttypescript": "^1.5.13",
|
|
41
41
|
"typescript": "^4.7.4"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@webiny/api": "0.0.0-unstable.
|
|
45
|
-
"@webiny/api-admin-settings": "0.0.0-unstable.
|
|
46
|
-
"@webiny/api-headless-cms": "0.0.0-unstable.
|
|
47
|
-
"@webiny/api-i18n": "0.0.0-unstable.
|
|
48
|
-
"@webiny/api-security": "0.0.0-unstable.
|
|
49
|
-
"@webiny/api-tenancy": "0.0.0-unstable.
|
|
50
|
-
"@webiny/error": "0.0.0-unstable.
|
|
51
|
-
"@webiny/handler": "0.0.0-unstable.
|
|
52
|
-
"@webiny/handler-graphql": "0.0.0-unstable.
|
|
53
|
-
"@webiny/pubsub": "0.0.0-unstable.
|
|
44
|
+
"@webiny/api": "0.0.0-unstable.496cf268ac",
|
|
45
|
+
"@webiny/api-admin-settings": "0.0.0-unstable.496cf268ac",
|
|
46
|
+
"@webiny/api-headless-cms": "0.0.0-unstable.496cf268ac",
|
|
47
|
+
"@webiny/api-i18n": "0.0.0-unstable.496cf268ac",
|
|
48
|
+
"@webiny/api-security": "0.0.0-unstable.496cf268ac",
|
|
49
|
+
"@webiny/api-tenancy": "0.0.0-unstable.496cf268ac",
|
|
50
|
+
"@webiny/error": "0.0.0-unstable.496cf268ac",
|
|
51
|
+
"@webiny/handler": "0.0.0-unstable.496cf268ac",
|
|
52
|
+
"@webiny/handler-graphql": "0.0.0-unstable.496cf268ac",
|
|
53
|
+
"@webiny/pubsub": "0.0.0-unstable.496cf268ac",
|
|
54
|
+
"@webiny/utils": "0.0.0-unstable.496cf268ac",
|
|
54
55
|
"lodash": "4.17.21"
|
|
55
56
|
},
|
|
56
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "496cf268acd5b092c860b62d75c7d765c9472043"
|
|
57
58
|
}
|
package/record/record.gql.js
CHANGED
|
@@ -11,7 +11,6 @@ const searchRecordSchema = new _GraphQLSchemaPlugin.GraphQLSchemaPlugin({
|
|
|
11
11
|
typeDefs: /* GraphQL */`
|
|
12
12
|
type SearchRecord {
|
|
13
13
|
id: ID!
|
|
14
|
-
originalId: ID!
|
|
15
14
|
type: String!
|
|
16
15
|
location: SearchLocationType!
|
|
17
16
|
title: String!
|
|
@@ -31,7 +30,7 @@ const searchRecordSchema = new _GraphQLSchemaPlugin.GraphQLSchemaPlugin({
|
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
input SearchRecordCreateInput {
|
|
34
|
-
|
|
33
|
+
id: String!
|
|
35
34
|
type: String!
|
|
36
35
|
title: String!
|
|
37
36
|
content: String
|
|
@@ -69,7 +68,7 @@ const searchRecordSchema = new _GraphQLSchemaPlugin.GraphQLSchemaPlugin({
|
|
|
69
68
|
search: String
|
|
70
69
|
limit: Int
|
|
71
70
|
after: String
|
|
72
|
-
sort:
|
|
71
|
+
sort: AcoSort
|
|
73
72
|
): SearchRecordListResponse
|
|
74
73
|
}
|
|
75
74
|
|
package/record/record.gql.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["searchRecordSchema","GraphQLSchemaPlugin","typeDefs","resolvers","SearchQuery","getRecord","_","id","context","resolve","aco","search","get","listRecords","args","entries","meta","list","ListResponse","e","ErrorResponse","SearchMutation","createRecord","data","create","updateRecord","update","deleteRecord","delete"],"sources":["record.gql.ts"],"sourcesContent":["import { ErrorResponse, ListResponse } from \"@webiny/handler-graphql/responses\";\nimport { GraphQLSchemaPlugin } from \"@webiny/handler-graphql/plugins/GraphQLSchemaPlugin\";\n\nimport { resolve } from \"~/utils/resolve\";\n\nimport { AcoContext } from \"~/types\";\n\nexport const searchRecordSchema = new GraphQLSchemaPlugin<AcoContext>({\n typeDefs: /* GraphQL */ `\n type SearchRecord {\n id: ID!\n
|
|
1
|
+
{"version":3,"names":["searchRecordSchema","GraphQLSchemaPlugin","typeDefs","resolvers","SearchQuery","getRecord","_","id","context","resolve","aco","search","get","listRecords","args","entries","meta","list","ListResponse","e","ErrorResponse","SearchMutation","createRecord","data","create","updateRecord","update","deleteRecord","delete"],"sources":["record.gql.ts"],"sourcesContent":["import { ErrorResponse, ListResponse } from \"@webiny/handler-graphql/responses\";\nimport { GraphQLSchemaPlugin } from \"@webiny/handler-graphql/plugins/GraphQLSchemaPlugin\";\n\nimport { resolve } from \"~/utils/resolve\";\n\nimport { AcoContext } from \"~/types\";\n\nexport const searchRecordSchema = new GraphQLSchemaPlugin<AcoContext>({\n typeDefs: /* GraphQL */ `\n type SearchRecord {\n id: ID!\n type: String!\n location: SearchLocationType!\n title: String!\n content: String\n data: JSON\n savedOn: DateTime\n createdOn: DateTime\n createdBy: AcoUser\n }\n\n type SearchLocationType {\n folderId: ID!\n }\n\n input SearchLocationInput {\n folderId: ID!\n }\n\n input SearchRecordCreateInput {\n id: String!\n type: String!\n title: String!\n content: String\n location: SearchLocationInput!\n data: JSON\n }\n\n input SearchRecordUpdateInput {\n title: String\n content: String\n location: SearchLocationInput\n data: JSON\n }\n\n input SearchRecordListWhereInput {\n type: String!\n location: SearchLocationInput\n }\n\n type SearchRecordResponse {\n data: SearchRecord\n error: AcoError\n }\n\n type SearchRecordListResponse {\n data: [SearchRecord]\n error: AcoError\n meta: AcoMeta\n }\n\n extend type SearchQuery {\n getRecord(id: ID!): SearchRecordResponse\n listRecords(\n where: SearchRecordListWhereInput\n search: String\n limit: Int\n after: String\n sort: AcoSort\n ): SearchRecordListResponse\n }\n\n extend type SearchMutation {\n createRecord(data: SearchRecordCreateInput!): SearchRecordResponse\n updateRecord(id: ID!, data: SearchRecordUpdateInput!): SearchRecordResponse\n deleteRecord(id: ID!): AcoBooleanResponse\n }\n `,\n resolvers: {\n SearchQuery: {\n getRecord: async (_, { id }, context) => {\n return resolve(() => context.aco.search.get(id));\n },\n listRecords: async (_, args: any, context) => {\n try {\n const [entries, meta] = await context.aco.search.list(args);\n return new ListResponse(entries, meta);\n } catch (e) {\n return new ErrorResponse(e);\n }\n }\n },\n SearchMutation: {\n createRecord: async (_, { data }, context) => {\n return resolve(() => context.aco.search.create(data));\n },\n updateRecord: async (_, { id, data }, context) => {\n return resolve(() => context.aco.search.update(id, data));\n },\n deleteRecord: async (_, { id }, context) => {\n return resolve(() => context.aco.search.delete(id));\n }\n }\n }\n});\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AAIO,MAAMA,kBAAkB,GAAG,IAAIC,wCAAmB,CAAa;EAClEC,QAAQ,EAAE,aAAe;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;EACDC,SAAS,EAAE;IACPC,WAAW,EAAE;MACTC,SAAS,EAAE,OAAOC,CAAC,EAAE;QAAEC;MAAG,CAAC,EAAEC,OAAO,KAAK;QACrC,OAAO,IAAAC,gBAAO,EAAC,MAAMD,OAAO,CAACE,GAAG,CAACC,MAAM,CAACC,GAAG,CAACL,EAAE,CAAC,CAAC;MACpD,CAAC;MACDM,WAAW,EAAE,OAAOP,CAAC,EAAEQ,IAAS,EAAEN,OAAO,KAAK;QAC1C,IAAI;UACA,MAAM,CAACO,OAAO,EAAEC,IAAI,CAAC,GAAG,MAAMR,OAAO,CAACE,GAAG,CAACC,MAAM,CAACM,IAAI,CAACH,IAAI,CAAC;UAC3D,OAAO,IAAII,uBAAY,CAACH,OAAO,EAAEC,IAAI,CAAC;QAC1C,CAAC,CAAC,OAAOG,CAAC,EAAE;UACR,OAAO,IAAIC,wBAAa,CAACD,CAAC,CAAC;QAC/B;MACJ;IACJ,CAAC;IACDE,cAAc,EAAE;MACZC,YAAY,EAAE,OAAOhB,CAAC,EAAE;QAAEiB;MAAK,CAAC,EAAEf,OAAO,KAAK;QAC1C,OAAO,IAAAC,gBAAO,EAAC,MAAMD,OAAO,CAACE,GAAG,CAACC,MAAM,CAACa,MAAM,CAACD,IAAI,CAAC,CAAC;MACzD,CAAC;MACDE,YAAY,EAAE,OAAOnB,CAAC,EAAE;QAAEC,EAAE;QAAEgB;MAAK,CAAC,EAAEf,OAAO,KAAK;QAC9C,OAAO,IAAAC,gBAAO,EAAC,MAAMD,OAAO,CAACE,GAAG,CAACC,MAAM,CAACe,MAAM,CAACnB,EAAE,EAAEgB,IAAI,CAAC,CAAC;MAC7D,CAAC;MACDI,YAAY,EAAE,OAAOrB,CAAC,EAAE;QAAEC;MAAG,CAAC,EAAEC,OAAO,KAAK;QACxC,OAAO,IAAAC,gBAAO,EAAC,MAAMD,OAAO,CAACE,GAAG,CAACC,MAAM,CAACiB,MAAM,CAACrB,EAAE,CAAC,CAAC;MACvD;IACJ;EACJ;AACJ,CAAC,CAAC;AAAC"}
|
package/record/record.model.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { CmsModel } from "@webiny/api-headless-cms/types";
|
|
2
|
-
export declare type SearchRecordModelDefinition = Pick<CmsModel, "name" | "modelId" | "layout" | "titleFieldId" | "description" | "fields" | "isPrivate"
|
|
3
|
-
|
|
2
|
+
export declare type SearchRecordModelDefinition = Pick<CmsModel, "name" | "modelId" | "layout" | "titleFieldId" | "description" | "fields" | "isPrivate"> & {
|
|
3
|
+
isPrivate: true;
|
|
4
|
+
};
|
|
5
|
+
export declare const SEARCH_RECORD_MODEL_ID = "acoSearchRecord";
|
|
4
6
|
export declare const createSearchModelDefinition: () => SearchRecordModelDefinition;
|
package/record/record.model.js
CHANGED
|
@@ -5,18 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createSearchModelDefinition = exports.SEARCH_RECORD_MODEL_ID = void 0;
|
|
7
7
|
var _createModelField = require("../utils/createModelField");
|
|
8
|
-
const originalIdField = () => (0, _createModelField.createModelField)({
|
|
9
|
-
label: "Original Id",
|
|
10
|
-
type: "text",
|
|
11
|
-
parent: "searchRecord",
|
|
12
|
-
validation: [{
|
|
13
|
-
name: "required",
|
|
14
|
-
message: "Value is required."
|
|
15
|
-
}, {
|
|
16
|
-
name: "unique",
|
|
17
|
-
message: "Value must be unique."
|
|
18
|
-
}]
|
|
19
|
-
});
|
|
20
8
|
const typeField = () => (0, _createModelField.createModelField)({
|
|
21
9
|
label: "Type",
|
|
22
10
|
type: "text",
|
|
@@ -59,15 +47,15 @@ const dataField = () => (0, _createModelField.createModelField)({
|
|
|
59
47
|
type: "wby-aco-json",
|
|
60
48
|
parent: "searchRecord"
|
|
61
49
|
});
|
|
62
|
-
const SEARCH_RECORD_MODEL_ID = "
|
|
50
|
+
const SEARCH_RECORD_MODEL_ID = "acoSearchRecord";
|
|
63
51
|
exports.SEARCH_RECORD_MODEL_ID = SEARCH_RECORD_MODEL_ID;
|
|
64
52
|
const createSearchModelDefinition = () => {
|
|
65
53
|
return {
|
|
66
54
|
name: "ACO - Search Record",
|
|
67
55
|
modelId: SEARCH_RECORD_MODEL_ID,
|
|
68
|
-
titleFieldId: "
|
|
69
|
-
layout: [["
|
|
70
|
-
fields: [
|
|
56
|
+
titleFieldId: "title",
|
|
57
|
+
layout: [["searchRecord_type"], ["searchRecord_title"], ["searchRecord_content"], ["searchRecord_location"], ["searchRecord_data"]],
|
|
58
|
+
fields: [typeField(), titleField(), contentField(), locationField([locationFolderIdField()]), dataField()],
|
|
71
59
|
description: "ACO - Search record model",
|
|
72
60
|
isPrivate: true
|
|
73
61
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["typeField","createModelField","label","type","parent","validation","name","message","titleField","contentField","locationField","fields","multipleValues","settings","locationFolderIdField","dataField","SEARCH_RECORD_MODEL_ID","createSearchModelDefinition","modelId","titleFieldId","layout","description","isPrivate"],"sources":["record.model.ts"],"sourcesContent":["import { CmsModel, CmsModelField } from \"@webiny/api-headless-cms/types\";\n\nimport { createModelField } from \"~/utils/createModelField\";\n\nexport type SearchRecordModelDefinition = Pick<\n CmsModel,\n \"name\" | \"modelId\" | \"layout\" | \"titleFieldId\" | \"description\" | \"fields\" | \"isPrivate\"\n> & { isPrivate: true };\n\nconst typeField = () =>\n createModelField({\n label: \"Type\",\n type: \"text\",\n parent: \"searchRecord\",\n validation: [\n {\n name: \"required\",\n message: \"Value is required.\"\n }\n ]\n });\n\nconst titleField = () =>\n createModelField({\n label: \"Title\",\n type: \"text\",\n parent: \"searchRecord\"\n });\n\nconst contentField = () =>\n createModelField({\n label: \"Content\",\n type: \"text\",\n parent: \"searchRecord\"\n });\n\nconst locationField = (fields: CmsModelField[]) =>\n createModelField({\n label: \"Location\",\n type: \"object\",\n parent: \"searchRecord\",\n multipleValues: false,\n settings: { fields }\n });\n\nconst locationFolderIdField = () =>\n createModelField({\n label: \"Folder Id\",\n type: \"text\",\n parent: \"searchRecord Location\",\n validation: [\n {\n name: \"required\",\n message: \"Value is required.\"\n }\n ]\n });\n\nconst dataField = () =>\n createModelField({\n label: \"Data\",\n type: \"wby-aco-json\",\n parent: \"searchRecord\"\n });\n\nexport const SEARCH_RECORD_MODEL_ID = \"acoSearchRecord\";\n\nexport const createSearchModelDefinition = (): SearchRecordModelDefinition => {\n return {\n name: \"ACO - Search Record\",\n modelId: SEARCH_RECORD_MODEL_ID,\n titleFieldId: \"title\",\n layout: [\n [\"searchRecord_type\"],\n [\"searchRecord_title\"],\n [\"searchRecord_content\"],\n [\"searchRecord_location\"],\n [\"searchRecord_data\"]\n ],\n fields: [\n typeField(),\n titleField(),\n contentField(),\n locationField([locationFolderIdField()]),\n dataField()\n ],\n description: \"ACO - Search record model\",\n isPrivate: true\n };\n};\n"],"mappings":";;;;;;AAEA;AAOA,MAAMA,SAAS,GAAG,MACd,IAAAC,kCAAgB,EAAC;EACbC,KAAK,EAAE,MAAM;EACbC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,cAAc;EACtBC,UAAU,EAAE,CACR;IACIC,IAAI,EAAE,UAAU;IAChBC,OAAO,EAAE;EACb,CAAC;AAET,CAAC,CAAC;AAEN,MAAMC,UAAU,GAAG,MACf,IAAAP,kCAAgB,EAAC;EACbC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE;AACZ,CAAC,CAAC;AAEN,MAAMK,YAAY,GAAG,MACjB,IAAAR,kCAAgB,EAAC;EACbC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE;AACZ,CAAC,CAAC;AAEN,MAAMM,aAAa,GAAIC,MAAuB,IAC1C,IAAAV,kCAAgB,EAAC;EACbC,KAAK,EAAE,UAAU;EACjBC,IAAI,EAAE,QAAQ;EACdC,MAAM,EAAE,cAAc;EACtBQ,cAAc,EAAE,KAAK;EACrBC,QAAQ,EAAE;IAAEF;EAAO;AACvB,CAAC,CAAC;AAEN,MAAMG,qBAAqB,GAAG,MAC1B,IAAAb,kCAAgB,EAAC;EACbC,KAAK,EAAE,WAAW;EAClBC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,uBAAuB;EAC/BC,UAAU,EAAE,CACR;IACIC,IAAI,EAAE,UAAU;IAChBC,OAAO,EAAE;EACb,CAAC;AAET,CAAC,CAAC;AAEN,MAAMQ,SAAS,GAAG,MACd,IAAAd,kCAAgB,EAAC;EACbC,KAAK,EAAE,MAAM;EACbC,IAAI,EAAE,cAAc;EACpBC,MAAM,EAAE;AACZ,CAAC,CAAC;AAEC,MAAMY,sBAAsB,GAAG,iBAAiB;AAAC;AAEjD,MAAMC,2BAA2B,GAAG,MAAmC;EAC1E,OAAO;IACHX,IAAI,EAAE,qBAAqB;IAC3BY,OAAO,EAAEF,sBAAsB;IAC/BG,YAAY,EAAE,OAAO;IACrBC,MAAM,EAAE,CACJ,CAAC,mBAAmB,CAAC,EACrB,CAAC,oBAAoB,CAAC,EACtB,CAAC,sBAAsB,CAAC,EACxB,CAAC,uBAAuB,CAAC,EACzB,CAAC,mBAAmB,CAAC,CACxB;IACDT,MAAM,EAAE,CACJX,SAAS,EAAE,EACXQ,UAAU,EAAE,EACZC,YAAY,EAAE,EACdC,aAAa,CAAC,CAACI,qBAAqB,EAAE,CAAC,CAAC,EACxCC,SAAS,EAAE,CACd;IACDM,WAAW,EAAE,2BAA2B;IACxCC,SAAS,EAAE;EACf,CAAC;AACL,CAAC;AAAC"}
|
package/record/record.so.d.ts
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import { CmsModel } from "@webiny/api-headless-cms/types";
|
|
2
1
|
import { CreateAcoStorageOperationsParams } from "../createAcoStorageOperations";
|
|
3
|
-
import { AcoSearchRecordStorageOperations
|
|
4
|
-
interface AcoSearchRecordStorageOperations extends BaseAcoSearchRecordStorageOperations {
|
|
5
|
-
getRecordModel(): Promise<CmsModel>;
|
|
6
|
-
}
|
|
2
|
+
import { AcoSearchRecordStorageOperations } from "./record.types";
|
|
7
3
|
export declare const createSearchRecordOperations: (params: CreateAcoStorageOperationsParams) => AcoSearchRecordStorageOperations;
|
|
8
|
-
export {};
|