@tolinax/ayoune-cli 2026.3.1 → 2026.4.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/data/contextSlots.js +189 -0
- package/data/defaultActions.js +9 -0
- package/data/modelsAndRights.js +3245 -0
- package/data/modules.js +127 -0
- package/data/operations.js +5 -0
- package/data/services.js +139 -0
- package/index.js +11 -0
- package/lib/api/apiCallHandler.js +72 -0
- package/lib/api/apiClient.js +108 -0
- package/lib/api/auditCallHandler.js +21 -0
- package/lib/api/decodeToken.js +4 -0
- package/lib/api/handleAPIError.js +61 -0
- package/lib/api/login.js +45 -0
- package/lib/api/searchClient.js +119 -0
- package/lib/commands/createAccessCommand.js +126 -0
- package/lib/commands/createActionsCommand.js +140 -0
- package/lib/commands/createAiCommand.js +188 -0
- package/lib/commands/createAliasCommand.js +104 -0
- package/lib/commands/createAuditCommand.js +45 -0
- package/lib/commands/createBatchCommand.js +291 -0
- package/lib/commands/createCompletionsCommand.js +172 -0
- package/lib/commands/createConfigCommand.js +202 -0
- package/lib/commands/createContextCommand.js +163 -0
- package/lib/commands/createCopyCommand.js +36 -0
- package/lib/commands/createCreateCommand.js +47 -0
- package/lib/commands/createDeleteCommand.js +96 -0
- package/lib/commands/createDeployCommand.js +642 -0
- package/lib/commands/createDescribeCommand.js +44 -0
- package/lib/commands/createEditCommand.js +48 -0
- package/lib/commands/createEventsCommand.js +60 -0
- package/lib/commands/createExecCommand.js +212 -0
- package/lib/commands/createExportCommand.js +216 -0
- package/lib/commands/createGetCommand.js +46 -0
- package/lib/commands/createJobsCommand.js +163 -0
- package/lib/commands/createListCommand.js +48 -0
- package/lib/commands/createLoginCommand.js +30 -0
- package/lib/commands/createLogoutCommand.js +21 -0
- package/lib/commands/createModulesCommand.js +147 -0
- package/lib/commands/createMonitorCommand.js +276 -0
- package/lib/commands/createPermissionsCommand.js +233 -0
- package/lib/commands/createProgram.js +211 -0
- package/lib/commands/createSearchCommand.js +251 -0
- package/lib/commands/createSelfHostUpdateCommand.js +166 -0
- package/lib/commands/createServicesCommand.js +225 -0
- package/lib/commands/createSetupCommand.js +305 -0
- package/lib/commands/createStatusCommand.js +147 -0
- package/lib/commands/createStorageCommand.js +53 -0
- package/lib/commands/createStreamCommand.js +50 -0
- package/lib/commands/createSyncCommand.js +174 -0
- package/lib/commands/createTemplateCommand.js +231 -0
- package/lib/commands/createUpdateCommand.js +112 -0
- package/lib/commands/createUsersCommand.js +275 -0
- package/lib/commands/createWebhooksCommand.js +149 -0
- package/lib/commands/createWhoAmICommand.js +90 -0
- package/lib/exitCodes.js +6 -0
- package/lib/helpers/addSpacesToCamelCase.js +5 -0
- package/lib/helpers/cliError.js +24 -0
- package/lib/helpers/config.js +7 -0
- package/lib/helpers/configLoader.js +66 -0
- package/lib/helpers/contextInjector.js +65 -0
- package/lib/helpers/contextResolver.js +70 -0
- package/lib/helpers/contextStore.js +46 -0
- package/lib/helpers/formatDocument.js +176 -0
- package/lib/helpers/handleResponseFormatOptions.js +134 -0
- package/lib/helpers/initializeSettings.js +14 -0
- package/lib/helpers/localStorage.js +4 -0
- package/lib/helpers/logo.js +48 -0
- package/lib/helpers/makeRandomToken.js +27 -0
- package/lib/helpers/parseInt.js +7 -0
- package/lib/helpers/requireArg.js +9 -0
- package/lib/helpers/resolveCollectionArgs.js +36 -0
- package/lib/helpers/sanitizeFields.js +18 -0
- package/lib/helpers/saveFile.js +39 -0
- package/lib/helpers/secureStorage.js +72 -0
- package/lib/helpers/tokenPayload.js +21 -0
- package/lib/helpers/updateNotifier.js +49 -0
- package/lib/models/getCollections.js +15 -0
- package/lib/models/getModelsInModules.js +13 -0
- package/lib/models/getModuleFromCollection.js +10 -0
- package/lib/operations/handleAuditOperation.js +22 -0
- package/lib/operations/handleCollectionOperation.js +91 -0
- package/lib/operations/handleCopySingleOperation.js +30 -0
- package/lib/operations/handleCreateSingleOperation.js +38 -0
- package/lib/operations/handleDeleteSingleOperation.js +14 -0
- package/lib/operations/handleDescribeSingleOperation.js +45 -0
- package/lib/operations/handleEditOperation.js +51 -0
- package/lib/operations/handleEditRawOperation.js +35 -0
- package/lib/operations/handleGetOperation.js +35 -0
- package/lib/operations/handleGetSingleOperation.js +20 -0
- package/lib/operations/handleListOperation.js +67 -0
- package/lib/operations/handleSingleAuditOperation.js +27 -0
- package/lib/prompts/promptAudits.js +15 -0
- package/lib/prompts/promptCollection.js +13 -0
- package/lib/prompts/promptCollectionInModule.js +13 -0
- package/lib/prompts/promptCollectionWithModule.js +15 -0
- package/lib/prompts/promptConfirm.js +12 -0
- package/lib/prompts/promptDefaultAction.js +13 -0
- package/lib/prompts/promptEntry.js +19 -0
- package/lib/prompts/promptFileName.js +12 -0
- package/lib/prompts/promptFilePath.js +18 -0
- package/lib/prompts/promptModule.js +22 -0
- package/lib/prompts/promptName.js +11 -0
- package/lib/prompts/promptOperation.js +13 -0
- package/lib/socket/customerSocketClient.js +13 -0
- package/lib/socket/socketClient.js +12 -0
- package/lib/types.js +1 -0
- package/package.json +13 -10
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
export const contextSlots = [
|
|
2
|
+
// Tier 1 — Core
|
|
3
|
+
{
|
|
4
|
+
slot: "project",
|
|
5
|
+
collection: "projects",
|
|
6
|
+
module: "pm",
|
|
7
|
+
nameField: "subject",
|
|
8
|
+
injectAsCreateField: {
|
|
9
|
+
tasks: "project",
|
|
10
|
+
sprints: "_project",
|
|
11
|
+
milestones: "_project",
|
|
12
|
+
epics: "_project",
|
|
13
|
+
},
|
|
14
|
+
injectAsFilterField: {
|
|
15
|
+
tasks: "project",
|
|
16
|
+
sprints: "_project",
|
|
17
|
+
milestones: "_project",
|
|
18
|
+
epics: "_project",
|
|
19
|
+
},
|
|
20
|
+
tier: 1,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
slot: "consumer",
|
|
24
|
+
collection: "consumers",
|
|
25
|
+
module: "crm",
|
|
26
|
+
nameField: "name",
|
|
27
|
+
injectAsCreateField: {
|
|
28
|
+
tasks: "_consumerID",
|
|
29
|
+
opportunities: "_consumerID",
|
|
30
|
+
offers: "_consumerID",
|
|
31
|
+
invoices: "_consumerID",
|
|
32
|
+
orders: "_consumerID",
|
|
33
|
+
},
|
|
34
|
+
injectAsFilterField: {
|
|
35
|
+
tasks: "_consumerID",
|
|
36
|
+
opportunities: "_consumerID",
|
|
37
|
+
offers: "_consumerID",
|
|
38
|
+
invoices: "_consumerID",
|
|
39
|
+
orders: "_consumerID",
|
|
40
|
+
},
|
|
41
|
+
tier: 1,
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
slot: "sprint",
|
|
45
|
+
collection: "sprints",
|
|
46
|
+
module: "pm",
|
|
47
|
+
nameField: "subject",
|
|
48
|
+
injectAsCreateField: {
|
|
49
|
+
tasks: "sprint",
|
|
50
|
+
},
|
|
51
|
+
injectAsFilterField: {
|
|
52
|
+
tasks: "sprint",
|
|
53
|
+
},
|
|
54
|
+
parent: "project",
|
|
55
|
+
tier: 1,
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
slot: "milestone",
|
|
59
|
+
collection: "milestones",
|
|
60
|
+
module: "pm",
|
|
61
|
+
nameField: "subject",
|
|
62
|
+
injectAsCreateField: {
|
|
63
|
+
tasks: "milestone",
|
|
64
|
+
sprints: "_milestone",
|
|
65
|
+
epics: "_milestone",
|
|
66
|
+
},
|
|
67
|
+
injectAsFilterField: {
|
|
68
|
+
tasks: "milestone",
|
|
69
|
+
sprints: "_milestone",
|
|
70
|
+
epics: "_milestone",
|
|
71
|
+
},
|
|
72
|
+
parent: "project",
|
|
73
|
+
tier: 1,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
slot: "epic",
|
|
77
|
+
collection: "epics",
|
|
78
|
+
module: "pm",
|
|
79
|
+
nameField: "subject",
|
|
80
|
+
injectAsCreateField: {
|
|
81
|
+
tasks: "epic",
|
|
82
|
+
sprints: "_epic",
|
|
83
|
+
},
|
|
84
|
+
injectAsFilterField: {
|
|
85
|
+
tasks: "epic",
|
|
86
|
+
sprints: "_epic",
|
|
87
|
+
},
|
|
88
|
+
parent: "project",
|
|
89
|
+
tier: 1,
|
|
90
|
+
},
|
|
91
|
+
// Tier 2 — Domain
|
|
92
|
+
{
|
|
93
|
+
slot: "campaign",
|
|
94
|
+
collection: "campaigns",
|
|
95
|
+
module: "marketing",
|
|
96
|
+
nameField: "name",
|
|
97
|
+
injectAsCreateField: {
|
|
98
|
+
mailinglists: "_campaign",
|
|
99
|
+
},
|
|
100
|
+
injectAsFilterField: {
|
|
101
|
+
mailinglists: "_campaign",
|
|
102
|
+
},
|
|
103
|
+
tier: 2,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
slot: "opportunity",
|
|
107
|
+
collection: "opportunities",
|
|
108
|
+
module: "crm",
|
|
109
|
+
nameField: "name",
|
|
110
|
+
injectAsCreateField: {},
|
|
111
|
+
injectAsFilterField: {},
|
|
112
|
+
tier: 2,
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
slot: "team",
|
|
116
|
+
collection: "teams",
|
|
117
|
+
module: "hr",
|
|
118
|
+
nameField: "name",
|
|
119
|
+
injectAsCreateField: {},
|
|
120
|
+
injectAsFilterField: {},
|
|
121
|
+
tier: 2,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
slot: "department",
|
|
125
|
+
collection: "departments",
|
|
126
|
+
module: "hr",
|
|
127
|
+
nameField: "name",
|
|
128
|
+
injectAsCreateField: {
|
|
129
|
+
teams: "_department",
|
|
130
|
+
},
|
|
131
|
+
injectAsFilterField: {
|
|
132
|
+
teams: "_department",
|
|
133
|
+
},
|
|
134
|
+
tier: 2,
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
slot: "kanbanboard",
|
|
138
|
+
collection: "kanbanboards",
|
|
139
|
+
module: "pm",
|
|
140
|
+
nameField: "name",
|
|
141
|
+
injectAsCreateField: {},
|
|
142
|
+
injectAsFilterField: {},
|
|
143
|
+
tier: 2,
|
|
144
|
+
},
|
|
145
|
+
// Tier 3 — AI/Auto
|
|
146
|
+
{
|
|
147
|
+
slot: "agent",
|
|
148
|
+
collection: "aiagents",
|
|
149
|
+
module: "ai",
|
|
150
|
+
nameField: "name",
|
|
151
|
+
injectAsCreateField: {
|
|
152
|
+
aiconversations: "_agent",
|
|
153
|
+
},
|
|
154
|
+
injectAsFilterField: {
|
|
155
|
+
aiconversations: "_agent",
|
|
156
|
+
},
|
|
157
|
+
tier: 3,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
slot: "workflow",
|
|
161
|
+
collection: "automationworkflows",
|
|
162
|
+
module: "automation",
|
|
163
|
+
nameField: "name",
|
|
164
|
+
injectAsCreateField: {},
|
|
165
|
+
injectAsFilterField: {},
|
|
166
|
+
tier: 3,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
slot: "repository",
|
|
170
|
+
collection: "repositories",
|
|
171
|
+
module: "devops",
|
|
172
|
+
nameField: "name",
|
|
173
|
+
injectAsCreateField: {},
|
|
174
|
+
injectAsFilterField: {},
|
|
175
|
+
tier: 3,
|
|
176
|
+
},
|
|
177
|
+
];
|
|
178
|
+
export function getSlot(slotName) {
|
|
179
|
+
return contextSlots.find((s) => s.slot === slotName);
|
|
180
|
+
}
|
|
181
|
+
export function getSlotByCollection(collection) {
|
|
182
|
+
return contextSlots.find((s) => s.collection === collection.toLowerCase());
|
|
183
|
+
}
|
|
184
|
+
export function getChildSlots(parentSlot) {
|
|
185
|
+
return contextSlots.filter((s) => s.parent === parentSlot);
|
|
186
|
+
}
|
|
187
|
+
export function getSlotsByTier(tier) {
|
|
188
|
+
return contextSlots.filter((s) => s.tier === tier);
|
|
189
|
+
}
|