@tolinax/ayoune-cli 2026.3.1 → 2026.5.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 (107) hide show
  1. package/data/contextSlots.js +189 -0
  2. package/data/defaultActions.js +9 -0
  3. package/data/modelsAndRights.js +3245 -0
  4. package/data/modules.js +127 -0
  5. package/data/operations.js +5 -0
  6. package/data/services.js +139 -0
  7. package/index.js +11 -0
  8. package/lib/api/apiCallHandler.js +72 -0
  9. package/lib/api/apiClient.js +108 -0
  10. package/lib/api/auditCallHandler.js +21 -0
  11. package/lib/api/decodeToken.js +4 -0
  12. package/lib/api/handleAPIError.js +61 -0
  13. package/lib/api/login.js +45 -0
  14. package/lib/api/searchClient.js +119 -0
  15. package/lib/commands/createAccessCommand.js +126 -0
  16. package/lib/commands/createActionsCommand.js +140 -0
  17. package/lib/commands/createAiCommand.js +188 -0
  18. package/lib/commands/createAliasCommand.js +104 -0
  19. package/lib/commands/createAuditCommand.js +45 -0
  20. package/lib/commands/createBatchCommand.js +291 -0
  21. package/lib/commands/createCompletionsCommand.js +172 -0
  22. package/lib/commands/createConfigCommand.js +202 -0
  23. package/lib/commands/createContextCommand.js +163 -0
  24. package/lib/commands/createCopyCommand.js +36 -0
  25. package/lib/commands/createCreateCommand.js +47 -0
  26. package/lib/commands/createDeleteCommand.js +96 -0
  27. package/lib/commands/createDeployCommand.js +642 -0
  28. package/lib/commands/createDescribeCommand.js +44 -0
  29. package/lib/commands/createEditCommand.js +48 -0
  30. package/lib/commands/createEventsCommand.js +60 -0
  31. package/lib/commands/createExecCommand.js +212 -0
  32. package/lib/commands/createExportCommand.js +216 -0
  33. package/lib/commands/createGetCommand.js +46 -0
  34. package/lib/commands/createJobsCommand.js +163 -0
  35. package/lib/commands/createListCommand.js +48 -0
  36. package/lib/commands/createLoginCommand.js +30 -0
  37. package/lib/commands/createLogoutCommand.js +21 -0
  38. package/lib/commands/createModulesCommand.js +147 -0
  39. package/lib/commands/createMonitorCommand.js +276 -0
  40. package/lib/commands/createPermissionsCommand.js +233 -0
  41. package/lib/commands/createProgram.js +217 -0
  42. package/lib/commands/createSearchCommand.js +251 -0
  43. package/lib/commands/createSelfHostUpdateCommand.js +166 -0
  44. package/lib/commands/createServicesCommand.js +225 -0
  45. package/lib/commands/createSetupCommand.js +305 -0
  46. package/lib/commands/createStatusCommand.js +160 -0
  47. package/lib/commands/createStorageCommand.js +53 -0
  48. package/lib/commands/createStreamCommand.js +50 -0
  49. package/lib/commands/createSyncCommand.js +174 -0
  50. package/lib/commands/createTemplateCommand.js +231 -0
  51. package/lib/commands/createUpdateCommand.js +112 -0
  52. package/lib/commands/createUsersCommand.js +275 -0
  53. package/lib/commands/createWebhooksCommand.js +149 -0
  54. package/lib/commands/createWhoAmICommand.js +90 -0
  55. package/lib/exitCodes.js +6 -0
  56. package/lib/helpers/addSpacesToCamelCase.js +5 -0
  57. package/lib/helpers/cliError.js +24 -0
  58. package/lib/helpers/config.js +7 -0
  59. package/lib/helpers/configLoader.js +66 -0
  60. package/lib/helpers/contextInjector.js +65 -0
  61. package/lib/helpers/contextResolver.js +70 -0
  62. package/lib/helpers/contextStore.js +46 -0
  63. package/lib/helpers/formatDocument.js +176 -0
  64. package/lib/helpers/handleResponseFormatOptions.js +134 -0
  65. package/lib/helpers/initializeSettings.js +14 -0
  66. package/lib/helpers/localStorage.js +4 -0
  67. package/lib/helpers/logo.js +48 -0
  68. package/lib/helpers/makeRandomToken.js +27 -0
  69. package/lib/helpers/parseInt.js +7 -0
  70. package/lib/helpers/requireArg.js +9 -0
  71. package/lib/helpers/resolveCollectionArgs.js +36 -0
  72. package/lib/helpers/sanitizeFields.js +18 -0
  73. package/lib/helpers/saveFile.js +39 -0
  74. package/lib/helpers/secureStorage.js +72 -0
  75. package/lib/helpers/tokenPayload.js +21 -0
  76. package/lib/helpers/updateNotifier.js +50 -0
  77. package/lib/models/getCollections.js +15 -0
  78. package/lib/models/getModelsInModules.js +13 -0
  79. package/lib/models/getModuleFromCollection.js +10 -0
  80. package/lib/operations/handleAuditOperation.js +22 -0
  81. package/lib/operations/handleCollectionOperation.js +91 -0
  82. package/lib/operations/handleCopySingleOperation.js +30 -0
  83. package/lib/operations/handleCreateSingleOperation.js +38 -0
  84. package/lib/operations/handleDeleteSingleOperation.js +14 -0
  85. package/lib/operations/handleDescribeSingleOperation.js +45 -0
  86. package/lib/operations/handleEditOperation.js +51 -0
  87. package/lib/operations/handleEditRawOperation.js +35 -0
  88. package/lib/operations/handleGetOperation.js +35 -0
  89. package/lib/operations/handleGetSingleOperation.js +20 -0
  90. package/lib/operations/handleListOperation.js +67 -0
  91. package/lib/operations/handleSingleAuditOperation.js +27 -0
  92. package/lib/prompts/promptAudits.js +15 -0
  93. package/lib/prompts/promptCollection.js +13 -0
  94. package/lib/prompts/promptCollectionInModule.js +13 -0
  95. package/lib/prompts/promptCollectionWithModule.js +15 -0
  96. package/lib/prompts/promptConfirm.js +12 -0
  97. package/lib/prompts/promptDefaultAction.js +13 -0
  98. package/lib/prompts/promptEntry.js +19 -0
  99. package/lib/prompts/promptFileName.js +12 -0
  100. package/lib/prompts/promptFilePath.js +18 -0
  101. package/lib/prompts/promptModule.js +22 -0
  102. package/lib/prompts/promptName.js +11 -0
  103. package/lib/prompts/promptOperation.js +13 -0
  104. package/lib/socket/customerSocketClient.js +13 -0
  105. package/lib/socket/socketClient.js +12 -0
  106. package/lib/types.js +1 -0
  107. 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
+ }
@@ -0,0 +1,9 @@
1
+ const defaultActions = [
2
+ "describe",
3
+ "edit",
4
+ "edit raw",
5
+ "download",
6
+ "copy",
7
+ "delete",
8
+ ];
9
+ export { defaultActions };