@burdenoff/microfe-vibecontrols 2026.601.21 → 2026.601.23
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/dist/components/actions/ActionCard.js +77 -66
- package/dist/components/actions/ActionCard.js.map +1 -1
- package/dist/components/ai/AIContextsTab.js +186 -173
- package/dist/components/ai/AIContextsTab.js.map +1 -1
- package/dist/components/ai/AITemplatesTab.js +135 -125
- package/dist/components/ai/AITemplatesTab.js.map +1 -1
- package/dist/components/ai/InstructionFilesManager.js +151 -137
- package/dist/components/ai/InstructionFilesManager.js.map +1 -1
- package/dist/components/docs/DocsEditPanel.js +17 -16
- package/dist/components/docs/DocsEditPanel.js.map +1 -1
- package/dist/components/docs/DocsPreviewPanel.js +25 -24
- package/dist/components/docs/DocsPreviewPanel.js.map +1 -1
- package/dist/components/docs/DocsTabPanel.js +110 -94
- package/dist/components/docs/DocsTabPanel.js.map +1 -1
- package/dist/components/notes/NotesTabPanel.js +8 -8
- package/dist/components/scorecard/ScorecardPanel.js +271 -257
- package/dist/components/scorecard/ScorecardPanel.js.map +1 -1
- package/dist/components/sharing/EntityShareButton.js +58 -0
- package/dist/components/sharing/EntityShareButton.js.map +1 -0
- package/dist/components/sharing/entityShareOps.js +603 -0
- package/dist/components/sharing/entityShareOps.js.map +1 -0
- package/dist/components/sharing/index.js +3 -0
- package/dist/components/sharing/shareRegistry.js +37 -12
- package/dist/components/sharing/shareRegistry.js.map +1 -1
- package/dist/components/sharing/useEntityShareController.js +88 -0
- package/dist/components/sharing/useEntityShareController.js.map +1 -0
- package/dist/constants/permissions.js +11 -0
- package/dist/constants/permissions.js.map +1 -1
- package/dist/pages/ActionsPage.js +162 -162
- package/dist/pages/ActionsPage.js.map +1 -1
- package/dist/pages/CatalogDetailPage.js +264 -250
- package/dist/pages/CatalogDetailPage.js.map +1 -1
- package/dist/pages/ComponentDetailPage.js +124 -113
- package/dist/pages/ComponentDetailPage.js.map +1 -1
- package/dist/pages/TargetDetailsPage.js +139 -126
- package/dist/pages/TargetDetailsPage.js.map +1 -1
- package/dist/pages/TemplateDetailPage.js +78 -67
- package/dist/pages/TemplateDetailPage.js.map +1 -1
- package/dist/pages/VibeDeckPage.js +1 -1
- package/dist/pages/VibeDetailsPage.js +484 -484
- package/dist/pages/VibeDetailsPage.js.map +1 -1
- package/dist/pages/tunnels/TunnelDetailsPage.js +91 -77
- package/dist/pages/tunnels/TunnelDetailsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,603 @@
|
|
|
1
|
+
import { SHARE_GRANT_FIELDS as e } from "./shareControllerTypes.js";
|
|
2
|
+
import { gql as t } from "@apollo/client";
|
|
3
|
+
var n = {
|
|
4
|
+
aiprompt: {
|
|
5
|
+
readField: "aiPrompt",
|
|
6
|
+
createLinkField: "createAiPromptShareLink",
|
|
7
|
+
sharesQuery: t`
|
|
8
|
+
query AiPromptShares($id: ID!) {
|
|
9
|
+
aiPrompt(id: $id) {
|
|
10
|
+
id
|
|
11
|
+
name
|
|
12
|
+
vibeId
|
|
13
|
+
myRole
|
|
14
|
+
shares {
|
|
15
|
+
${e}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
`,
|
|
20
|
+
share: t`
|
|
21
|
+
mutation ShareAiPrompt($input: ShareEntityInput!) {
|
|
22
|
+
shareAiPrompt(input: $input) {
|
|
23
|
+
${e}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
`,
|
|
27
|
+
revokeShare: t`
|
|
28
|
+
mutation RevokeAiPromptShare($input: RevokeShareInput!) {
|
|
29
|
+
revokeAiPromptShare(input: $input) {
|
|
30
|
+
id
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`,
|
|
34
|
+
updateShareRole: t`
|
|
35
|
+
mutation UpdateAiPromptShareRole($input: UpdateShareRoleInput!) {
|
|
36
|
+
updateAiPromptShareRole(input: $input) {
|
|
37
|
+
id
|
|
38
|
+
role
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
`,
|
|
42
|
+
createShareLink: t`
|
|
43
|
+
mutation CreateAiPromptShareLink($input: CreateShareGrantLinkInput!) {
|
|
44
|
+
createAiPromptShareLink(input: $input) {
|
|
45
|
+
${e}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
`,
|
|
49
|
+
revokeShareLink: t`
|
|
50
|
+
mutation RevokeAiPromptShareLink($input: RevokeShareInput!) {
|
|
51
|
+
revokeAiPromptShareLink(input: $input) {
|
|
52
|
+
id
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
`
|
|
56
|
+
},
|
|
57
|
+
action: {
|
|
58
|
+
readField: "action",
|
|
59
|
+
createLinkField: "createActionShareLink",
|
|
60
|
+
sharesQuery: t`
|
|
61
|
+
query ActionShares($id: ID!) {
|
|
62
|
+
action(id: $id) {
|
|
63
|
+
id
|
|
64
|
+
name
|
|
65
|
+
vibeId
|
|
66
|
+
hasShares
|
|
67
|
+
myRole
|
|
68
|
+
shares {
|
|
69
|
+
${e}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
`,
|
|
74
|
+
share: t`
|
|
75
|
+
mutation ShareAction($input: ShareEntityInput!) {
|
|
76
|
+
shareAction(input: $input) {
|
|
77
|
+
${e}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
`,
|
|
81
|
+
revokeShare: t`
|
|
82
|
+
mutation RevokeActionShare($input: RevokeShareInput!) {
|
|
83
|
+
revokeActionShare(input: $input) {
|
|
84
|
+
id
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
`,
|
|
88
|
+
updateShareRole: t`
|
|
89
|
+
mutation UpdateActionShareRole($input: UpdateShareRoleInput!) {
|
|
90
|
+
updateActionShareRole(input: $input) {
|
|
91
|
+
id
|
|
92
|
+
role
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
`,
|
|
96
|
+
createShareLink: t`
|
|
97
|
+
mutation CreateActionShareLink($input: CreateShareGrantLinkInput!) {
|
|
98
|
+
createActionShareLink(input: $input) {
|
|
99
|
+
${e}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
`,
|
|
103
|
+
revokeShareLink: t`
|
|
104
|
+
mutation RevokeActionShareLink($input: RevokeShareInput!) {
|
|
105
|
+
revokeActionShareLink(input: $input) {
|
|
106
|
+
id
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
`
|
|
110
|
+
},
|
|
111
|
+
aicontext: {
|
|
112
|
+
readField: "aiContext",
|
|
113
|
+
createLinkField: "createAiContextShareLink",
|
|
114
|
+
sharesQuery: t`
|
|
115
|
+
query AiContextShares($id: ID!) {
|
|
116
|
+
aiContext(id: $id) {
|
|
117
|
+
id
|
|
118
|
+
name
|
|
119
|
+
vibeId
|
|
120
|
+
hasShares
|
|
121
|
+
myRole
|
|
122
|
+
shares {
|
|
123
|
+
${e}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
`,
|
|
128
|
+
share: t`
|
|
129
|
+
mutation ShareAiContext($input: ShareEntityInput!) {
|
|
130
|
+
shareAiContext(input: $input) {
|
|
131
|
+
${e}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
`,
|
|
135
|
+
revokeShare: t`
|
|
136
|
+
mutation RevokeAiContextShare($input: RevokeShareInput!) {
|
|
137
|
+
revokeAiContextShare(input: $input) {
|
|
138
|
+
id
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
`,
|
|
142
|
+
updateShareRole: t`
|
|
143
|
+
mutation UpdateAiContextShareRole($input: UpdateShareRoleInput!) {
|
|
144
|
+
updateAiContextShareRole(input: $input) {
|
|
145
|
+
id
|
|
146
|
+
role
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
`,
|
|
150
|
+
createShareLink: t`
|
|
151
|
+
mutation CreateAiContextShareLink($input: CreateShareGrantLinkInput!) {
|
|
152
|
+
createAiContextShareLink(input: $input) {
|
|
153
|
+
${e}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
`,
|
|
157
|
+
revokeShareLink: t`
|
|
158
|
+
mutation RevokeAiContextShareLink($input: RevokeShareInput!) {
|
|
159
|
+
revokeAiContextShareLink(input: $input) {
|
|
160
|
+
id
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
`
|
|
164
|
+
},
|
|
165
|
+
instructionfile: {
|
|
166
|
+
readField: "agentInstructionFile",
|
|
167
|
+
createLinkField: "createAgentInstructionFileShareLink",
|
|
168
|
+
sharesQuery: t`
|
|
169
|
+
query AgentInstructionFileShares($id: ID!) {
|
|
170
|
+
agentInstructionFile(id: $id) {
|
|
171
|
+
id
|
|
172
|
+
effectiveFilename
|
|
173
|
+
vibeId
|
|
174
|
+
hasShares
|
|
175
|
+
myRole
|
|
176
|
+
shares {
|
|
177
|
+
${e}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
`,
|
|
182
|
+
share: t`
|
|
183
|
+
mutation ShareAgentInstructionFile($input: ShareEntityInput!) {
|
|
184
|
+
shareAgentInstructionFile(input: $input) {
|
|
185
|
+
${e}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
`,
|
|
189
|
+
revokeShare: t`
|
|
190
|
+
mutation RevokeAgentInstructionFileShare($input: RevokeShareInput!) {
|
|
191
|
+
revokeAgentInstructionFileShare(input: $input) {
|
|
192
|
+
id
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
`,
|
|
196
|
+
updateShareRole: t`
|
|
197
|
+
mutation UpdateAgentInstructionFileShareRole($input: UpdateShareRoleInput!) {
|
|
198
|
+
updateAgentInstructionFileShareRole(input: $input) {
|
|
199
|
+
id
|
|
200
|
+
role
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
`,
|
|
204
|
+
createShareLink: t`
|
|
205
|
+
mutation CreateAgentInstructionFileShareLink($input: CreateShareGrantLinkInput!) {
|
|
206
|
+
createAgentInstructionFileShareLink(input: $input) {
|
|
207
|
+
${e}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
`,
|
|
211
|
+
revokeShareLink: t`
|
|
212
|
+
mutation RevokeAgentInstructionFileShareLink($input: RevokeShareInput!) {
|
|
213
|
+
revokeAgentInstructionFileShareLink(input: $input) {
|
|
214
|
+
id
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
`
|
|
218
|
+
},
|
|
219
|
+
tunnel: {
|
|
220
|
+
readField: "tunnel",
|
|
221
|
+
createLinkField: "createTunnelShareLink",
|
|
222
|
+
sharesQuery: t`
|
|
223
|
+
query TunnelShares($id: ID!) {
|
|
224
|
+
tunnel(id: $id) {
|
|
225
|
+
id
|
|
226
|
+
name
|
|
227
|
+
vibeId
|
|
228
|
+
hasShares
|
|
229
|
+
myRole
|
|
230
|
+
shares {
|
|
231
|
+
${e}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
`,
|
|
236
|
+
share: t`
|
|
237
|
+
mutation ShareTunnel($input: ShareEntityInput!) {
|
|
238
|
+
shareTunnel(input: $input) {
|
|
239
|
+
${e}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
`,
|
|
243
|
+
revokeShare: t`
|
|
244
|
+
mutation RevokeTunnelShare($input: RevokeShareInput!) {
|
|
245
|
+
revokeTunnelShare(input: $input) {
|
|
246
|
+
id
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
`,
|
|
250
|
+
updateShareRole: t`
|
|
251
|
+
mutation UpdateTunnelShareRole($input: UpdateShareRoleInput!) {
|
|
252
|
+
updateTunnelShareRole(input: $input) {
|
|
253
|
+
id
|
|
254
|
+
role
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
`,
|
|
258
|
+
createShareLink: t`
|
|
259
|
+
mutation CreateTunnelShareLink($input: CreateShareGrantLinkInput!) {
|
|
260
|
+
createTunnelShareLink(input: $input) {
|
|
261
|
+
${e}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
`,
|
|
265
|
+
revokeShareLink: t`
|
|
266
|
+
mutation RevokeTunnelShareLink($input: RevokeShareInput!) {
|
|
267
|
+
revokeTunnelShareLink(input: $input) {
|
|
268
|
+
id
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
`
|
|
272
|
+
},
|
|
273
|
+
catalog: {
|
|
274
|
+
readField: "vibecontrolsCatalog",
|
|
275
|
+
createLinkField: "createCatalogShareLink",
|
|
276
|
+
sharesQuery: t`
|
|
277
|
+
query CatalogShares($id: ID!) {
|
|
278
|
+
vibecontrolsCatalog(id: $id) {
|
|
279
|
+
id
|
|
280
|
+
name
|
|
281
|
+
hasShares
|
|
282
|
+
myRole
|
|
283
|
+
shares {
|
|
284
|
+
${e}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
`,
|
|
289
|
+
share: t`
|
|
290
|
+
mutation ShareCatalog($input: ShareEntityInput!) {
|
|
291
|
+
shareCatalog(input: $input) {
|
|
292
|
+
${e}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
`,
|
|
296
|
+
revokeShare: t`
|
|
297
|
+
mutation RevokeCatalogShare($input: RevokeShareInput!) {
|
|
298
|
+
revokeCatalogShare(input: $input) {
|
|
299
|
+
id
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
`,
|
|
303
|
+
updateShareRole: t`
|
|
304
|
+
mutation UpdateCatalogShareRole($input: UpdateShareRoleInput!) {
|
|
305
|
+
updateCatalogShareRole(input: $input) {
|
|
306
|
+
id
|
|
307
|
+
role
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
`,
|
|
311
|
+
createShareLink: t`
|
|
312
|
+
mutation CreateCatalogShareLink($input: CreateShareGrantLinkInput!) {
|
|
313
|
+
createCatalogShareLink(input: $input) {
|
|
314
|
+
${e}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
`,
|
|
318
|
+
revokeShareLink: t`
|
|
319
|
+
mutation RevokeCatalogShareLink($input: RevokeShareInput!) {
|
|
320
|
+
revokeCatalogShareLink(input: $input) {
|
|
321
|
+
id
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
`
|
|
325
|
+
},
|
|
326
|
+
component: {
|
|
327
|
+
readField: "vibecontrolsComponent",
|
|
328
|
+
createLinkField: "createComponentShareLink",
|
|
329
|
+
sharesQuery: t`
|
|
330
|
+
query ComponentShares($id: ID!) {
|
|
331
|
+
vibecontrolsComponent(id: $id) {
|
|
332
|
+
id
|
|
333
|
+
name
|
|
334
|
+
hasShares
|
|
335
|
+
myRole
|
|
336
|
+
shares {
|
|
337
|
+
${e}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
`,
|
|
342
|
+
share: t`
|
|
343
|
+
mutation ShareComponent($input: ShareEntityInput!) {
|
|
344
|
+
shareComponent(input: $input) {
|
|
345
|
+
${e}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
`,
|
|
349
|
+
revokeShare: t`
|
|
350
|
+
mutation RevokeComponentShare($input: RevokeShareInput!) {
|
|
351
|
+
revokeComponentShare(input: $input) {
|
|
352
|
+
id
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
`,
|
|
356
|
+
updateShareRole: t`
|
|
357
|
+
mutation UpdateComponentShareRole($input: UpdateShareRoleInput!) {
|
|
358
|
+
updateComponentShareRole(input: $input) {
|
|
359
|
+
id
|
|
360
|
+
role
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
`,
|
|
364
|
+
createShareLink: t`
|
|
365
|
+
mutation CreateComponentShareLink($input: CreateShareGrantLinkInput!) {
|
|
366
|
+
createComponentShareLink(input: $input) {
|
|
367
|
+
${e}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
`,
|
|
371
|
+
revokeShareLink: t`
|
|
372
|
+
mutation RevokeComponentShareLink($input: RevokeShareInput!) {
|
|
373
|
+
revokeComponentShareLink(input: $input) {
|
|
374
|
+
id
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
`
|
|
378
|
+
},
|
|
379
|
+
template: {
|
|
380
|
+
readField: "vibecontrolsTemplate",
|
|
381
|
+
createLinkField: "createTemplateShareLink",
|
|
382
|
+
sharesQuery: t`
|
|
383
|
+
query TemplateShares($id: ID!) {
|
|
384
|
+
vibecontrolsTemplate(id: $id) {
|
|
385
|
+
id
|
|
386
|
+
name
|
|
387
|
+
hasShares
|
|
388
|
+
myRole
|
|
389
|
+
shares {
|
|
390
|
+
${e}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
`,
|
|
395
|
+
share: t`
|
|
396
|
+
mutation ShareTemplate($input: ShareEntityInput!) {
|
|
397
|
+
shareTemplate(input: $input) {
|
|
398
|
+
${e}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
`,
|
|
402
|
+
revokeShare: t`
|
|
403
|
+
mutation RevokeTemplateShare($input: RevokeShareInput!) {
|
|
404
|
+
revokeTemplateShare(input: $input) {
|
|
405
|
+
id
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
`,
|
|
409
|
+
updateShareRole: t`
|
|
410
|
+
mutation UpdateTemplateShareRole($input: UpdateShareRoleInput!) {
|
|
411
|
+
updateTemplateShareRole(input: $input) {
|
|
412
|
+
id
|
|
413
|
+
role
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
`,
|
|
417
|
+
createShareLink: t`
|
|
418
|
+
mutation CreateTemplateShareLink($input: CreateShareGrantLinkInput!) {
|
|
419
|
+
createTemplateShareLink(input: $input) {
|
|
420
|
+
${e}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
`,
|
|
424
|
+
revokeShareLink: t`
|
|
425
|
+
mutation RevokeTemplateShareLink($input: RevokeShareInput!) {
|
|
426
|
+
revokeTemplateShareLink(input: $input) {
|
|
427
|
+
id
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
`
|
|
431
|
+
},
|
|
432
|
+
scorecard: {
|
|
433
|
+
readField: "vibecontrolsScorecard",
|
|
434
|
+
createLinkField: "createScorecardShareLink",
|
|
435
|
+
readVariables: ({ owner: e }) => ({
|
|
436
|
+
ownerId: e?.ownerId ?? "",
|
|
437
|
+
ownerType: e?.ownerType ?? ""
|
|
438
|
+
}),
|
|
439
|
+
sharesQuery: t`
|
|
440
|
+
query ScorecardShares($ownerId: ID!, $ownerType: ScorecardOwnerType!) {
|
|
441
|
+
vibecontrolsScorecard(ownerId: $ownerId, ownerType: $ownerType) {
|
|
442
|
+
id
|
|
443
|
+
hasShares
|
|
444
|
+
myRole
|
|
445
|
+
shares {
|
|
446
|
+
${e}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
`,
|
|
451
|
+
share: t`
|
|
452
|
+
mutation ShareScorecard($input: ShareEntityInput!) {
|
|
453
|
+
shareScorecard(input: $input) {
|
|
454
|
+
${e}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
`,
|
|
458
|
+
revokeShare: t`
|
|
459
|
+
mutation RevokeScorecardShare($input: RevokeShareInput!) {
|
|
460
|
+
revokeScorecardShare(input: $input) {
|
|
461
|
+
id
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
`,
|
|
465
|
+
updateShareRole: t`
|
|
466
|
+
mutation UpdateScorecardShareRole($input: UpdateShareRoleInput!) {
|
|
467
|
+
updateScorecardShareRole(input: $input) {
|
|
468
|
+
id
|
|
469
|
+
role
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
`,
|
|
473
|
+
createShareLink: t`
|
|
474
|
+
mutation CreateScorecardShareLink($input: CreateShareGrantLinkInput!) {
|
|
475
|
+
createScorecardShareLink(input: $input) {
|
|
476
|
+
${e}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
`,
|
|
480
|
+
revokeShareLink: t`
|
|
481
|
+
mutation RevokeScorecardShareLink($input: RevokeShareInput!) {
|
|
482
|
+
revokeScorecardShareLink(input: $input) {
|
|
483
|
+
id
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
`
|
|
487
|
+
},
|
|
488
|
+
target: {
|
|
489
|
+
readField: "target",
|
|
490
|
+
createLinkField: "createTargetShareLink",
|
|
491
|
+
sharesQuery: t`
|
|
492
|
+
query TargetShares($id: ID!) {
|
|
493
|
+
target(id: $id) {
|
|
494
|
+
id
|
|
495
|
+
name
|
|
496
|
+
hasShares
|
|
497
|
+
myRole
|
|
498
|
+
shares {
|
|
499
|
+
${e}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
`,
|
|
504
|
+
share: t`
|
|
505
|
+
mutation ShareTarget($input: ShareEntityInput!) {
|
|
506
|
+
shareTarget(input: $input) {
|
|
507
|
+
${e}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
`,
|
|
511
|
+
revokeShare: t`
|
|
512
|
+
mutation RevokeTargetShare($input: RevokeShareInput!) {
|
|
513
|
+
revokeTargetShare(input: $input) {
|
|
514
|
+
id
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
`,
|
|
518
|
+
updateShareRole: t`
|
|
519
|
+
mutation UpdateTargetShareRole($input: UpdateShareRoleInput!) {
|
|
520
|
+
updateTargetShareRole(input: $input) {
|
|
521
|
+
id
|
|
522
|
+
role
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
`,
|
|
526
|
+
createShareLink: t`
|
|
527
|
+
mutation CreateTargetShareLink($input: CreateShareGrantLinkInput!) {
|
|
528
|
+
createTargetShareLink(input: $input) {
|
|
529
|
+
${e}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
`,
|
|
533
|
+
revokeShareLink: t`
|
|
534
|
+
mutation RevokeTargetShareLink($input: RevokeShareInput!) {
|
|
535
|
+
revokeTargetShareLink(input: $input) {
|
|
536
|
+
id
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
`
|
|
540
|
+
},
|
|
541
|
+
docs: {
|
|
542
|
+
readField: "vibecontrolsDocsSiteByOwner",
|
|
543
|
+
createLinkField: "createDocsShareLink",
|
|
544
|
+
readVariables: ({ owner: e }) => ({
|
|
545
|
+
ownerId: e?.ownerId ?? "",
|
|
546
|
+
ownerType: e?.ownerType ?? ""
|
|
547
|
+
}),
|
|
548
|
+
sharesQuery: t`
|
|
549
|
+
query DocsSiteShares($ownerId: ID!, $ownerType: VibecontrolsDocsSiteOwnerType!) {
|
|
550
|
+
vibecontrolsDocsSiteByOwner(ownerId: $ownerId, ownerType: $ownerType) {
|
|
551
|
+
id
|
|
552
|
+
name
|
|
553
|
+
vibeId
|
|
554
|
+
hasShares
|
|
555
|
+
myRole
|
|
556
|
+
shares {
|
|
557
|
+
${e}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
`,
|
|
562
|
+
share: t`
|
|
563
|
+
mutation ShareDocs($input: ShareEntityInput!) {
|
|
564
|
+
shareDocs(input: $input) {
|
|
565
|
+
${e}
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
`,
|
|
569
|
+
revokeShare: t`
|
|
570
|
+
mutation RevokeDocsShare($input: RevokeShareInput!) {
|
|
571
|
+
revokeDocsShare(input: $input) {
|
|
572
|
+
id
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
`,
|
|
576
|
+
updateShareRole: t`
|
|
577
|
+
mutation UpdateDocsShareRole($input: UpdateShareRoleInput!) {
|
|
578
|
+
updateDocsShareRole(input: $input) {
|
|
579
|
+
id
|
|
580
|
+
role
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
`,
|
|
584
|
+
createShareLink: t`
|
|
585
|
+
mutation CreateDocsShareLink($input: CreateShareGrantLinkInput!) {
|
|
586
|
+
createDocsShareLink(input: $input) {
|
|
587
|
+
${e}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
`,
|
|
591
|
+
revokeShareLink: t`
|
|
592
|
+
mutation RevokeDocsShareLink($input: RevokeShareInput!) {
|
|
593
|
+
revokeDocsShareLink(input: $input) {
|
|
594
|
+
id
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
`
|
|
598
|
+
}
|
|
599
|
+
};
|
|
600
|
+
//#endregion
|
|
601
|
+
export { n as ENTITY_SHARE_OPS };
|
|
602
|
+
|
|
603
|
+
//# sourceMappingURL=entityShareOps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entityShareOps.js","names":[],"sources":["../../../src/components/sharing/entityShareOps.ts"],"sourcesContent":["/**\n * Per-entity GraphQL document set for the generic-sharing controllers\n * (`useEntityShareController`).\n *\n * The generic-sharing operations (`shareAiPrompt`, `aiPrompt.shares`, `myRole`,\n * …) are NOT in the committed `graphql/wspace.graphql` snapshot the codegen\n * reads, so — exactly like `useVibeShareController` / `useNoteShareController` —\n * we hand-write the documents with inline `gql` against the MFE's Apollo client.\n *\n * Each {@link EntityShareOps} bundles the five mutations + the read query for a\n * single entity. The read query projects the resource's `shares`/`myRole` (and,\n * where the backend exposes it, `hasShares`) onto the fe-libs `ShareController`\n * contract. The mutation/read-field names below were verified 1:1 against the\n * deployed `wspace-vibecontrols-svc/.hive-schema.graphql`.\n *\n * Notable per-entity shape differences captured here:\n * - `aiPrompt` has NO `hasShares` field — its read query omits it.\n * - `agentInstructionFile` has NO `name`; it exposes `effectiveFilename`\n * (non-null) + `customName`, so its read query selects those instead.\n * - `vibecontrolsScorecard` and `vibecontrolsDocsSite` have NO read-by-`id`\n * query — the only reads are `(ownerId, ownerType)`. Their `sharesQuery`\n * therefore takes `($ownerId, $ownerType)` and the entity declares\n * `readVariables` to map the controller's `{ id, owner }` onto those args.\n * `scorecard` additionally has NO display-name field, so the call site uses\n * the resource `id` as the dialog title.\n */\n\nimport { gql, type DocumentNode } from '@apollo/client';\n\nimport { SHARE_GRANT_FIELDS } from './shareControllerTypes';\n\n/**\n * Identity the generic controller resolves a resource by. Most entities read by\n * `id`; the two owner-keyed entities (scorecard, docs) additionally carry the\n * `(ownerId, ownerType)` pair their read query requires.\n */\nexport interface EntityShareIdentity {\n /** Stable resource id (always present once the surface has loaded the row). */\n id: string;\n /** `(ownerId, ownerType)` for entities read by owner instead of by id. */\n owner?: { ownerId: string; ownerType: string } | null;\n}\n\n/** The five share mutation documents + read query for one entity. */\nexport interface EntityShareOps {\n /** Reads the resource's `shares` / `myRole` (+ display name + optional `vibeId`). */\n sharesQuery: DocumentNode;\n /** `share<Entity>(input: ShareEntityInput!)`. */\n share: DocumentNode;\n /** `revoke<Entity>Share(input: RevokeShareInput!)`. */\n revokeShare: DocumentNode;\n /** `update<Entity>ShareRole(input: UpdateShareRoleInput!)`. */\n updateShareRole: DocumentNode;\n /** `create<Entity>ShareLink(input: CreateShareGrantLinkInput!)`. */\n createShareLink: DocumentNode;\n /** `revoke<Entity>ShareLink(input: RevokeShareInput!)`. */\n revokeShareLink: DocumentNode;\n /** Top-level read field name (`aiPrompt`, `action`, …) used to read the response. */\n readField: string;\n /** Mutation field name that returns the created link grant (for `shareUrl`). */\n createLinkField: string;\n /**\n * Maps the resource identity onto the variables {@link sharesQuery} expects.\n * Defaults to `{ id }` for the standard `($id: ID!)` read. Entities read by\n * owner (scorecard, docs) override this to emit `{ ownerId, ownerType }`.\n */\n readVariables?: (identity: EntityShareIdentity) => Record<string, unknown>;\n}\n\n// ── aiprompt ────────────────────────────────────────────────────────────────\n// AiPrompt has NO `hasShares` field — read query omits it.\nconst aiPromptOps: EntityShareOps = {\n readField: 'aiPrompt',\n createLinkField: 'createAiPromptShareLink',\n sharesQuery: gql`\n query AiPromptShares($id: ID!) {\n aiPrompt(id: $id) {\n id\n name\n vibeId\n myRole\n shares {\n ${SHARE_GRANT_FIELDS}\n }\n }\n }\n `,\n share: gql`\n mutation ShareAiPrompt($input: ShareEntityInput!) {\n shareAiPrompt(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShare: gql`\n mutation RevokeAiPromptShare($input: RevokeShareInput!) {\n revokeAiPromptShare(input: $input) {\n id\n }\n }\n `,\n updateShareRole: gql`\n mutation UpdateAiPromptShareRole($input: UpdateShareRoleInput!) {\n updateAiPromptShareRole(input: $input) {\n id\n role\n }\n }\n `,\n createShareLink: gql`\n mutation CreateAiPromptShareLink($input: CreateShareGrantLinkInput!) {\n createAiPromptShareLink(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShareLink: gql`\n mutation RevokeAiPromptShareLink($input: RevokeShareInput!) {\n revokeAiPromptShareLink(input: $input) {\n id\n }\n }\n `,\n};\n\n// ── action ──────────────────────────────────────────────────────────────────\nconst actionOps: EntityShareOps = {\n readField: 'action',\n createLinkField: 'createActionShareLink',\n sharesQuery: gql`\n query ActionShares($id: ID!) {\n action(id: $id) {\n id\n name\n vibeId\n hasShares\n myRole\n shares {\n ${SHARE_GRANT_FIELDS}\n }\n }\n }\n `,\n share: gql`\n mutation ShareAction($input: ShareEntityInput!) {\n shareAction(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShare: gql`\n mutation RevokeActionShare($input: RevokeShareInput!) {\n revokeActionShare(input: $input) {\n id\n }\n }\n `,\n updateShareRole: gql`\n mutation UpdateActionShareRole($input: UpdateShareRoleInput!) {\n updateActionShareRole(input: $input) {\n id\n role\n }\n }\n `,\n createShareLink: gql`\n mutation CreateActionShareLink($input: CreateShareGrantLinkInput!) {\n createActionShareLink(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShareLink: gql`\n mutation RevokeActionShareLink($input: RevokeShareInput!) {\n revokeActionShareLink(input: $input) {\n id\n }\n }\n `,\n};\n\n// ── aicontext ─────────────────────────────────────────────────────────────────\nconst aiContextOps: EntityShareOps = {\n readField: 'aiContext',\n createLinkField: 'createAiContextShareLink',\n sharesQuery: gql`\n query AiContextShares($id: ID!) {\n aiContext(id: $id) {\n id\n name\n vibeId\n hasShares\n myRole\n shares {\n ${SHARE_GRANT_FIELDS}\n }\n }\n }\n `,\n share: gql`\n mutation ShareAiContext($input: ShareEntityInput!) {\n shareAiContext(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShare: gql`\n mutation RevokeAiContextShare($input: RevokeShareInput!) {\n revokeAiContextShare(input: $input) {\n id\n }\n }\n `,\n updateShareRole: gql`\n mutation UpdateAiContextShareRole($input: UpdateShareRoleInput!) {\n updateAiContextShareRole(input: $input) {\n id\n role\n }\n }\n `,\n createShareLink: gql`\n mutation CreateAiContextShareLink($input: CreateShareGrantLinkInput!) {\n createAiContextShareLink(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShareLink: gql`\n mutation RevokeAiContextShareLink($input: RevokeShareInput!) {\n revokeAiContextShareLink(input: $input) {\n id\n }\n }\n `,\n};\n\n// ── instructionfile ───────────────────────────────────────────────────────────\n// AgentInstructionFile has NO `name`; the display name is `effectiveFilename`.\nconst instructionFileOps: EntityShareOps = {\n readField: 'agentInstructionFile',\n createLinkField: 'createAgentInstructionFileShareLink',\n sharesQuery: gql`\n query AgentInstructionFileShares($id: ID!) {\n agentInstructionFile(id: $id) {\n id\n effectiveFilename\n vibeId\n hasShares\n myRole\n shares {\n ${SHARE_GRANT_FIELDS}\n }\n }\n }\n `,\n share: gql`\n mutation ShareAgentInstructionFile($input: ShareEntityInput!) {\n shareAgentInstructionFile(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShare: gql`\n mutation RevokeAgentInstructionFileShare($input: RevokeShareInput!) {\n revokeAgentInstructionFileShare(input: $input) {\n id\n }\n }\n `,\n updateShareRole: gql`\n mutation UpdateAgentInstructionFileShareRole($input: UpdateShareRoleInput!) {\n updateAgentInstructionFileShareRole(input: $input) {\n id\n role\n }\n }\n `,\n createShareLink: gql`\n mutation CreateAgentInstructionFileShareLink($input: CreateShareGrantLinkInput!) {\n createAgentInstructionFileShareLink(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShareLink: gql`\n mutation RevokeAgentInstructionFileShareLink($input: RevokeShareInput!) {\n revokeAgentInstructionFileShareLink(input: $input) {\n id\n }\n }\n `,\n};\n\n// ── tunnel ────────────────────────────────────────────────────────────────────\nconst tunnelOps: EntityShareOps = {\n readField: 'tunnel',\n createLinkField: 'createTunnelShareLink',\n sharesQuery: gql`\n query TunnelShares($id: ID!) {\n tunnel(id: $id) {\n id\n name\n vibeId\n hasShares\n myRole\n shares {\n ${SHARE_GRANT_FIELDS}\n }\n }\n }\n `,\n share: gql`\n mutation ShareTunnel($input: ShareEntityInput!) {\n shareTunnel(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShare: gql`\n mutation RevokeTunnelShare($input: RevokeShareInput!) {\n revokeTunnelShare(input: $input) {\n id\n }\n }\n `,\n updateShareRole: gql`\n mutation UpdateTunnelShareRole($input: UpdateShareRoleInput!) {\n updateTunnelShareRole(input: $input) {\n id\n role\n }\n }\n `,\n createShareLink: gql`\n mutation CreateTunnelShareLink($input: CreateShareGrantLinkInput!) {\n createTunnelShareLink(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShareLink: gql`\n mutation RevokeTunnelShareLink($input: RevokeShareInput!) {\n revokeTunnelShareLink(input: $input) {\n id\n }\n }\n `,\n};\n\n// ── catalog ─────────────────────────────────────────────────────────────────\n// VibecontrolsCatalog has `name`, `hasShares`, `myRole`; NO `vibeId`.\nconst catalogOps: EntityShareOps = {\n readField: 'vibecontrolsCatalog',\n createLinkField: 'createCatalogShareLink',\n sharesQuery: gql`\n query CatalogShares($id: ID!) {\n vibecontrolsCatalog(id: $id) {\n id\n name\n hasShares\n myRole\n shares {\n ${SHARE_GRANT_FIELDS}\n }\n }\n }\n `,\n share: gql`\n mutation ShareCatalog($input: ShareEntityInput!) {\n shareCatalog(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShare: gql`\n mutation RevokeCatalogShare($input: RevokeShareInput!) {\n revokeCatalogShare(input: $input) {\n id\n }\n }\n `,\n updateShareRole: gql`\n mutation UpdateCatalogShareRole($input: UpdateShareRoleInput!) {\n updateCatalogShareRole(input: $input) {\n id\n role\n }\n }\n `,\n createShareLink: gql`\n mutation CreateCatalogShareLink($input: CreateShareGrantLinkInput!) {\n createCatalogShareLink(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShareLink: gql`\n mutation RevokeCatalogShareLink($input: RevokeShareInput!) {\n revokeCatalogShareLink(input: $input) {\n id\n }\n }\n `,\n};\n\n// ── component ───────────────────────────────────────────────────────────────\n// VibecontrolsComponent has `name`, `hasShares`, `myRole`; NO `vibeId`.\nconst componentOps: EntityShareOps = {\n readField: 'vibecontrolsComponent',\n createLinkField: 'createComponentShareLink',\n sharesQuery: gql`\n query ComponentShares($id: ID!) {\n vibecontrolsComponent(id: $id) {\n id\n name\n hasShares\n myRole\n shares {\n ${SHARE_GRANT_FIELDS}\n }\n }\n }\n `,\n share: gql`\n mutation ShareComponent($input: ShareEntityInput!) {\n shareComponent(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShare: gql`\n mutation RevokeComponentShare($input: RevokeShareInput!) {\n revokeComponentShare(input: $input) {\n id\n }\n }\n `,\n updateShareRole: gql`\n mutation UpdateComponentShareRole($input: UpdateShareRoleInput!) {\n updateComponentShareRole(input: $input) {\n id\n role\n }\n }\n `,\n createShareLink: gql`\n mutation CreateComponentShareLink($input: CreateShareGrantLinkInput!) {\n createComponentShareLink(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShareLink: gql`\n mutation RevokeComponentShareLink($input: RevokeShareInput!) {\n revokeComponentShareLink(input: $input) {\n id\n }\n }\n `,\n};\n\n// ── template ────────────────────────────────────────────────────────────────\n// VibecontrolsTemplate has `name`, `hasShares`, `myRole`; NO `vibeId`.\nconst templateOps: EntityShareOps = {\n readField: 'vibecontrolsTemplate',\n createLinkField: 'createTemplateShareLink',\n sharesQuery: gql`\n query TemplateShares($id: ID!) {\n vibecontrolsTemplate(id: $id) {\n id\n name\n hasShares\n myRole\n shares {\n ${SHARE_GRANT_FIELDS}\n }\n }\n }\n `,\n share: gql`\n mutation ShareTemplate($input: ShareEntityInput!) {\n shareTemplate(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShare: gql`\n mutation RevokeTemplateShare($input: RevokeShareInput!) {\n revokeTemplateShare(input: $input) {\n id\n }\n }\n `,\n updateShareRole: gql`\n mutation UpdateTemplateShareRole($input: UpdateShareRoleInput!) {\n updateTemplateShareRole(input: $input) {\n id\n role\n }\n }\n `,\n createShareLink: gql`\n mutation CreateTemplateShareLink($input: CreateShareGrantLinkInput!) {\n createTemplateShareLink(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShareLink: gql`\n mutation RevokeTemplateShareLink($input: RevokeShareInput!) {\n revokeTemplateShareLink(input: $input) {\n id\n }\n }\n `,\n};\n\n// ── scorecard ───────────────────────────────────────────────────────────────\n// VibecontrolsScorecard has NO `name` and NO read-by-`id` query — only\n// `vibecontrolsScorecard(ownerId, ownerType)`. The read takes `($ownerId,\n// $ownerType)` and `readVariables` maps the identity's owner pair onto them.\n// The call site uses the resource `id` as the dialog title (no name field).\nconst scorecardOps: EntityShareOps = {\n readField: 'vibecontrolsScorecard',\n createLinkField: 'createScorecardShareLink',\n readVariables: ({ owner }) => ({\n ownerId: owner?.ownerId ?? '',\n ownerType: owner?.ownerType ?? '',\n }),\n sharesQuery: gql`\n query ScorecardShares($ownerId: ID!, $ownerType: ScorecardOwnerType!) {\n vibecontrolsScorecard(ownerId: $ownerId, ownerType: $ownerType) {\n id\n hasShares\n myRole\n shares {\n ${SHARE_GRANT_FIELDS}\n }\n }\n }\n `,\n share: gql`\n mutation ShareScorecard($input: ShareEntityInput!) {\n shareScorecard(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShare: gql`\n mutation RevokeScorecardShare($input: RevokeShareInput!) {\n revokeScorecardShare(input: $input) {\n id\n }\n }\n `,\n updateShareRole: gql`\n mutation UpdateScorecardShareRole($input: UpdateShareRoleInput!) {\n updateScorecardShareRole(input: $input) {\n id\n role\n }\n }\n `,\n createShareLink: gql`\n mutation CreateScorecardShareLink($input: CreateShareGrantLinkInput!) {\n createScorecardShareLink(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShareLink: gql`\n mutation RevokeScorecardShareLink($input: RevokeShareInput!) {\n revokeScorecardShareLink(input: $input) {\n id\n }\n }\n `,\n};\n\n// ── target ──────────────────────────────────────────────────────────────────\n// Target (bare type) has `name`, `hasShares`, `myRole`; NO `vibeId`.\nconst targetOps: EntityShareOps = {\n readField: 'target',\n createLinkField: 'createTargetShareLink',\n sharesQuery: gql`\n query TargetShares($id: ID!) {\n target(id: $id) {\n id\n name\n hasShares\n myRole\n shares {\n ${SHARE_GRANT_FIELDS}\n }\n }\n }\n `,\n share: gql`\n mutation ShareTarget($input: ShareEntityInput!) {\n shareTarget(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShare: gql`\n mutation RevokeTargetShare($input: RevokeShareInput!) {\n revokeTargetShare(input: $input) {\n id\n }\n }\n `,\n updateShareRole: gql`\n mutation UpdateTargetShareRole($input: UpdateShareRoleInput!) {\n updateTargetShareRole(input: $input) {\n id\n role\n }\n }\n `,\n createShareLink: gql`\n mutation CreateTargetShareLink($input: CreateShareGrantLinkInput!) {\n createTargetShareLink(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShareLink: gql`\n mutation RevokeTargetShareLink($input: RevokeShareInput!) {\n revokeTargetShareLink(input: $input) {\n id\n }\n }\n `,\n};\n\n// ── docs ────────────────────────────────────────────────────────────────────\n// VibecontrolsDocsSite has `name`, `hasShares`, `myRole`, AND `vibeId`, but NO\n// read-by-`id` query — only `vibecontrolsDocsSiteByOwner(ownerId, ownerType)`.\n// The read takes `($ownerId, $ownerType)` and `readVariables` maps the owner\n// pair onto them; `vibeId` still flows through for \"Everyone with Vibe\" mode.\nconst docsOps: EntityShareOps = {\n readField: 'vibecontrolsDocsSiteByOwner',\n createLinkField: 'createDocsShareLink',\n readVariables: ({ owner }) => ({\n ownerId: owner?.ownerId ?? '',\n ownerType: owner?.ownerType ?? '',\n }),\n sharesQuery: gql`\n query DocsSiteShares($ownerId: ID!, $ownerType: VibecontrolsDocsSiteOwnerType!) {\n vibecontrolsDocsSiteByOwner(ownerId: $ownerId, ownerType: $ownerType) {\n id\n name\n vibeId\n hasShares\n myRole\n shares {\n ${SHARE_GRANT_FIELDS}\n }\n }\n }\n `,\n share: gql`\n mutation ShareDocs($input: ShareEntityInput!) {\n shareDocs(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShare: gql`\n mutation RevokeDocsShare($input: RevokeShareInput!) {\n revokeDocsShare(input: $input) {\n id\n }\n }\n `,\n updateShareRole: gql`\n mutation UpdateDocsShareRole($input: UpdateShareRoleInput!) {\n updateDocsShareRole(input: $input) {\n id\n role\n }\n }\n `,\n createShareLink: gql`\n mutation CreateDocsShareLink($input: CreateShareGrantLinkInput!) {\n createDocsShareLink(input: $input) {\n ${SHARE_GRANT_FIELDS}\n }\n }\n `,\n revokeShareLink: gql`\n mutation RevokeDocsShareLink($input: RevokeShareInput!) {\n revokeDocsShareLink(input: $input) {\n id\n }\n }\n `,\n};\n\n/** Entity types served by the generic {@link useEntityShareController}. */\nexport type GenericShareEntity =\n | 'aiprompt'\n | 'action'\n | 'aicontext'\n | 'instructionfile'\n | 'tunnel'\n | 'catalog'\n | 'component'\n | 'template'\n | 'scorecard'\n | 'target'\n | 'docs';\n\n/** Resolve the inline-`gql` document set for a generic-sharing entity. */\nexport const ENTITY_SHARE_OPS: Record<GenericShareEntity, EntityShareOps> = {\n aiprompt: aiPromptOps,\n action: actionOps,\n aicontext: aiContextOps,\n instructionfile: instructionFileOps,\n tunnel: tunnelOps,\n catalog: catalogOps,\n component: componentOps,\n template: templateOps,\n scorecard: scorecardOps,\n target: targetOps,\n docs: docsOps,\n};\n"],"mappings":"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"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import "./shareRegistry.js";
|
|
2
2
|
import "./useVibeShareController.js";
|
|
3
3
|
import "./useNoteShareController.js";
|
|
4
|
+
import "./entityShareOps.js";
|
|
5
|
+
import "./useEntityShareController.js";
|
|
4
6
|
import "./VibeShareButton.js";
|
|
7
|
+
import "./EntityShareButton.js";
|
|
5
8
|
import "./NoteShareDialog.js";
|
|
6
9
|
import "./SharedWithMePanel.js";
|