@anchrd/intel-contract 0.16.0 → 0.17.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/dist/contract/node.d.ts +10 -0
- package/dist/contract/node.js +6 -0
- package/dist/contract/share.d.ts +27 -0
- package/dist/contract/share.js +7 -0
- package/package.json +1 -1
package/dist/contract/node.d.ts
CHANGED
|
@@ -107,8 +107,18 @@ export declare const ArchiveNodeInput: z.ZodObject<{
|
|
|
107
107
|
export type ArchiveNodeInput = z.infer<typeof ArchiveNodeInput>;
|
|
108
108
|
export declare const PurgeNodeInput: z.ZodObject<{
|
|
109
109
|
nodeId: z.ZodString;
|
|
110
|
+
idempotencyKey: z.ZodString;
|
|
110
111
|
}, z.core.$strict>;
|
|
111
112
|
export type PurgeNodeInput = z.infer<typeof PurgeNodeInput>;
|
|
113
|
+
export declare const PurgeNodePreviewInput: z.ZodObject<{
|
|
114
|
+
nodeId: z.ZodString;
|
|
115
|
+
}, z.core.$strict>;
|
|
116
|
+
export type PurgeNodePreviewInput = z.infer<typeof PurgeNodePreviewInput>;
|
|
117
|
+
export declare const PurgeNodePreview: z.ZodObject<{
|
|
118
|
+
inboundLinks: z.ZodNumber;
|
|
119
|
+
totalItems: z.ZodNumber;
|
|
120
|
+
}, z.core.$strict>;
|
|
121
|
+
export type PurgeNodePreview = z.infer<typeof PurgeNodePreview>;
|
|
112
122
|
export declare const PurgeNodeResult: z.ZodObject<{
|
|
113
123
|
purged: z.ZodLiteral<true>;
|
|
114
124
|
title: z.ZodString;
|
package/dist/contract/node.js
CHANGED
|
@@ -192,6 +192,12 @@ export const ArchiveNodeInput = z.strictObject({
|
|
|
192
192
|
// honest answer: the second caller really did not delete anything.
|
|
193
193
|
export const PurgeNodeInput = z.strictObject({
|
|
194
194
|
nodeId: IntelId.describe("Node to delete for good. It must already be archived — a living node has no path into nothing."),
|
|
195
|
+
idempotencyKey: IdempotencyKey,
|
|
196
|
+
});
|
|
197
|
+
export const PurgeNodePreviewInput = z.strictObject({ nodeId: IntelId });
|
|
198
|
+
export const PurgeNodePreview = z.strictObject({
|
|
199
|
+
inboundLinks: z.number().int().nonnegative(),
|
|
200
|
+
totalItems: z.number().int().positive(),
|
|
195
201
|
});
|
|
196
202
|
// The title travels back because after this call nothing can look it up any more — not the row, not
|
|
197
203
|
// a version, not the index. A caller that wants to say what it just deleted has this one chance.
|
package/dist/contract/share.d.ts
CHANGED
|
@@ -136,6 +136,33 @@ export declare const ResourceGrantList: z.ZodObject<{
|
|
|
136
136
|
}, z.core.$strict>>;
|
|
137
137
|
}, z.core.$strict>;
|
|
138
138
|
export type ResourceGrantList = z.infer<typeof ResourceGrantList>;
|
|
139
|
+
export declare const ResourceAccessList: z.ZodObject<{
|
|
140
|
+
resourceId: z.ZodString;
|
|
141
|
+
ownerIds: z.ZodArray<z.ZodString>;
|
|
142
|
+
items: z.ZodArray<z.ZodObject<{
|
|
143
|
+
id: z.ZodString;
|
|
144
|
+
resourceId: z.ZodString;
|
|
145
|
+
principal: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
146
|
+
type: z.ZodLiteral<"user">;
|
|
147
|
+
id: z.ZodString;
|
|
148
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
149
|
+
type: z.ZodLiteral<"email">;
|
|
150
|
+
email: z.ZodEmail;
|
|
151
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
152
|
+
type: z.ZodLiteral<"organization">;
|
|
153
|
+
}, z.core.$strict>], "type">;
|
|
154
|
+
verb: z.ZodEnum<{
|
|
155
|
+
read: "read";
|
|
156
|
+
write: "write";
|
|
157
|
+
execute: "execute";
|
|
158
|
+
share: "share";
|
|
159
|
+
}>;
|
|
160
|
+
expiresAt: z.ZodNullable<z.ZodISODateTime>;
|
|
161
|
+
createdBy: z.ZodString;
|
|
162
|
+
createdAt: z.ZodISODateTime;
|
|
163
|
+
}, z.core.$strict>>;
|
|
164
|
+
}, z.core.$strict>;
|
|
165
|
+
export type ResourceAccessList = z.infer<typeof ResourceAccessList>;
|
|
139
166
|
export declare const RevokeGrantResult: z.ZodObject<{
|
|
140
167
|
revoked: z.ZodBoolean;
|
|
141
168
|
}, z.core.$strict>;
|
package/dist/contract/share.js
CHANGED
|
@@ -64,4 +64,11 @@ export const ResourceGrantList = z.strictObject({
|
|
|
64
64
|
applicableVerbs: z.array(ResourceVerb).min(1),
|
|
65
65
|
items: z.array(ResourceGrant),
|
|
66
66
|
});
|
|
67
|
+
// A display-only, effective view. Unlike ResourceGrantList it crosses ancestor folders and names
|
|
68
|
+
// owners, because ownership grants access without creating a revocable grant row.
|
|
69
|
+
export const ResourceAccessList = z.strictObject({
|
|
70
|
+
resourceId: IntelId,
|
|
71
|
+
ownerIds: z.array(IntelId),
|
|
72
|
+
items: z.array(ResourceGrant),
|
|
73
|
+
});
|
|
67
74
|
export const RevokeGrantResult = z.strictObject({ revoked: z.boolean() });
|