@ankhorage/projects 0.7.3 → 0.9.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/README.md +20 -12
- package/dist/capabilities/index.d.ts +330 -0
- package/dist/capabilities/index.js +194 -0
- package/dist/capabilities/socialManagerMediaAnalytics.d.ts +92 -0
- package/dist/capabilities/socialManagerMediaAnalytics.js +75 -0
- package/dist/features/projects/composition/composeGeneratedRuntimeMaterialization.d.ts +1 -0
- package/dist/features/projects/composition/composeGeneratedRuntimeMaterialization.js +13 -5
- package/dist/features/projects/composition/createExpoProjectMaterializer.d.ts +4 -6
- package/dist/features/projects/composition/createExpoProjectMaterializer.js +29 -36
- package/dist/features/projects/composition/createNavigatorMaterializationFiles.d.ts +14 -0
- package/dist/features/projects/composition/createNavigatorMaterializationFiles.js +19 -0
- package/dist/features/projects/composition/createRootNavigatorGenerationOptions.d.ts +9 -0
- package/dist/features/projects/composition/createRootNavigatorGenerationOptions.js +10 -0
- package/dist/features/projects/composition/createSocialManagerServerFiles.d.ts +6 -0
- package/dist/features/projects/composition/createSocialManagerServerFiles.js +16 -0
- package/dist/features/trusted-social-manager-host/adapters/createConnectionFileSystemRepositories.d.ts +16 -0
- package/dist/features/trusted-social-manager-host/adapters/createConnectionFileSystemRepositories.js +201 -0
- package/dist/features/trusted-social-manager-host/adapters/createConnectionFileSystemStoreAsync.d.ts +25 -0
- package/dist/features/trusted-social-manager-host/adapters/createConnectionFileSystemStoreAsync.js +72 -0
- package/dist/features/trusted-social-manager-host/adapters/createSocialManagerDraftStoreAsync.d.ts +7 -0
- package/dist/features/trusted-social-manager-host/adapters/createSocialManagerDraftStoreAsync.js +160 -0
- package/dist/features/trusted-social-manager-host/adapters/createSocialManagerFlowSecurityAsync.d.ts +19 -0
- package/dist/features/trusted-social-manager-host/adapters/createSocialManagerFlowSecurityAsync.js +176 -0
- package/dist/features/trusted-social-manager-host/adapters/createSocialManagerMediaPreflight.d.ts +4 -0
- package/dist/features/trusted-social-manager-host/adapters/createSocialManagerMediaPreflight.js +37 -0
- package/dist/features/trusted-social-manager-host/adapters/createSocialManagerMediaStoreAsync.d.ts +7 -0
- package/dist/features/trusted-social-manager-host/adapters/createSocialManagerMediaStoreAsync.js +242 -0
- package/dist/features/trusted-social-manager-host/adapters/createSocialOperationStoresAsync.d.ts +13 -0
- package/dist/features/trusted-social-manager-host/adapters/createSocialOperationStoresAsync.js +244 -0
- package/dist/features/trusted-social-manager-host/adapters/projectSocialManagerConnection.d.ts +53 -0
- package/dist/features/trusted-social-manager-host/adapters/projectSocialManagerConnection.js +42 -0
- package/dist/features/trusted-social-manager-host/application/createSocialManagerPublicationRuntime.d.ts +10 -0
- package/dist/features/trusted-social-manager-host/application/createSocialManagerPublicationRuntime.js +240 -0
- package/dist/features/trusted-social-manager-host/application/resolveSocialManagerPublication.d.ts +22 -0
- package/dist/features/trusted-social-manager-host/application/resolveSocialManagerPublication.js +97 -0
- package/dist/features/trusted-social-manager-host/composition/createSocialManagerCapabilityOperations.d.ts +22 -0
- package/dist/features/trusted-social-manager-host/composition/createSocialManagerCapabilityOperations.js +224 -0
- package/dist/features/trusted-social-manager-host/composition/createSocialManagerConnectionOperations.d.ts +20 -0
- package/dist/features/trusted-social-manager-host/composition/createSocialManagerConnectionOperations.js +152 -0
- package/dist/features/trusted-social-manager-host/composition/createSocialManagerLocalProviderFixtures.d.ts +22 -0
- package/dist/features/trusted-social-manager-host/composition/createSocialManagerLocalProviderFixtures.js +271 -0
- package/dist/features/trusted-social-manager-host/composition/createSocialManagerMediaOperations.d.ts +14 -0
- package/dist/features/trusted-social-manager-host/composition/createSocialManagerMediaOperations.js +72 -0
- package/dist/features/trusted-social-manager-host/composition/createSocialManagerProvider.d.ts +20 -0
- package/dist/features/trusted-social-manager-host/composition/createSocialManagerProvider.js +20 -0
- package/dist/features/trusted-social-manager-host/composition/createSocialManagerPublicationOperations.d.ts +15 -0
- package/dist/features/trusted-social-manager-host/composition/createSocialManagerPublicationOperations.js +185 -0
- package/dist/features/trusted-social-manager-host/composition/createTrustedSocialManagerFileSystemPersistenceAsync.d.ts +14 -0
- package/dist/features/trusted-social-manager-host/composition/createTrustedSocialManagerFileSystemPersistenceAsync.js +17 -0
- package/dist/features/trusted-social-manager-host/composition/createTrustedSocialManagerHost.d.ts +51 -0
- package/dist/features/trusted-social-manager-host/composition/createTrustedSocialManagerHost.js +188 -0
- package/dist/features/trusted-social-manager-host/composition/createTrustedSocialManagerLocalHostAsync.d.ts +18 -0
- package/dist/features/trusted-social-manager-host/composition/createTrustedSocialManagerLocalHostAsync.js +177 -0
- package/dist/features/trusted-social-manager-host/composition/createTrustedSocialManagerLocalServerAsync.d.ts +26 -0
- package/dist/features/trusted-social-manager-host/composition/createTrustedSocialManagerLocalServerAsync.js +66 -0
- package/dist/features/trusted-social-manager-host/domain/publicationConfig.d.ts +18 -0
- package/dist/features/trusted-social-manager-host/domain/publicationConfig.js +77 -0
- package/dist/features/trusted-social-manager-host/domain/readSocialManagerConnectionRequest.d.ts +54 -0
- package/dist/features/trusted-social-manager-host/domain/readSocialManagerConnectionRequest.js +77 -0
- package/dist/features/trusted-social-manager-host/domain/readSocialManagerDraftContent.d.ts +3 -0
- package/dist/features/trusted-social-manager-host/domain/readSocialManagerDraftContent.js +47 -0
- package/dist/features/trusted-social-manager-host/domain/socialManagerConnectionIdentity.d.ts +17 -0
- package/dist/features/trusted-social-manager-host/domain/socialManagerConnectionIdentity.js +17 -0
- package/dist/features/trusted-zefix-host/composition/createTrustedZefixHost.d.ts +1 -2
- package/dist/features/trusted-zefix-host/composition/createTrustedZefixHost.js +3 -59
- package/dist/features/trusted-zefix-host/composition/createTrustedZefixWorkerEntry.d.ts +36 -0
- package/dist/features/trusted-zefix-host/composition/createTrustedZefixWorkerEntry.js +105 -0
- package/dist/features/trusted-zefix-host/composition/createTrustedZefixWorkerHandler.d.ts +35 -0
- package/dist/features/trusted-zefix-host/composition/createTrustedZefixWorkerHandler.js +92 -0
- package/dist/features/trusted-zefix-host/composition/zefixOperations.d.ts +20 -0
- package/dist/features/trusted-zefix-host/composition/zefixOperations.js +57 -0
- package/dist/features/worker-materialization/composition/composeWorkerMaterialization.d.ts +13 -0
- package/dist/features/worker-materialization/composition/composeWorkerMaterialization.js +90 -0
- package/dist/features/worker-materialization/composition/createWorkerMaterializationFile.d.ts +13 -0
- package/dist/features/worker-materialization/composition/createWorkerMaterializationFile.js +48 -0
- package/dist/features/worker-materialization/constants/worker.d.ts +6 -0
- package/dist/features/worker-materialization/constants/worker.js +6 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +16 -0
- package/dist/types/socialManager.d.ts +77 -0
- package/dist/types/socialManager.js +1 -0
- package/dist/types/socialManagerPublication.d.ts +27 -0
- package/dist/types/socialManagerPublication.js +1 -0
- package/dist/worker/index.d.ts +3 -0
- package/dist/worker/index.js +3 -0
- package/package.json +511 -9
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { createFlowNodeOperationResolver, createFlowRuntime, } from '@ankhorage/flow';
|
|
3
|
+
import { executeSocialActionAsync, } from '@ankhorage/social';
|
|
4
|
+
import { createKeyedAsyncMutex } from '@ankhorage/utility/concurrency';
|
|
5
|
+
import { assertCallerScope, readPublicationConfig, sameTarget, } from '../domain/publicationConfig.js';
|
|
6
|
+
import { readDestinationAsync, requireBindingAsync, resolveCommandAsync, } from './resolveSocialManagerPublication.js';
|
|
7
|
+
const capabilityId = 'projects.social.publication.execute';
|
|
8
|
+
const providerId = '@ankhorage/projects';
|
|
9
|
+
/*** Compose the released Flow engine with one protected Social operation and immutable draft references. */
|
|
10
|
+
export function createSocialManagerPublicationRuntime(input) {
|
|
11
|
+
const operation = createPublicationOperation(input);
|
|
12
|
+
const mutex = createKeyedAsyncMutex();
|
|
13
|
+
const runtime = createFlowRuntime({
|
|
14
|
+
...input.flow,
|
|
15
|
+
nodeRegistry: createFlowNodeOperationResolver({
|
|
16
|
+
capabilityRegistry: {
|
|
17
|
+
getCapability: (node) => node.capability.providerId === providerId && node.capability.capabilityId === capabilityId
|
|
18
|
+
? {
|
|
19
|
+
id: capabilityId,
|
|
20
|
+
owner: providerId,
|
|
21
|
+
access: ['invoke'],
|
|
22
|
+
binding: { kind: 'action', bindableAs: ['target'] },
|
|
23
|
+
}
|
|
24
|
+
: undefined,
|
|
25
|
+
},
|
|
26
|
+
capabilityResolver: { getExecutor: () => operation },
|
|
27
|
+
}),
|
|
28
|
+
});
|
|
29
|
+
return {
|
|
30
|
+
runtime,
|
|
31
|
+
scheduleAsync: (request) => mutex.run(publicationId(request), () => scheduleAsync(input, runtime, request)),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/*** Persist one exact, independently approvable destination run; Flow owns scheduling and execution. */
|
|
35
|
+
async function scheduleAsync(input, runtime, request) {
|
|
36
|
+
const scheduledRequest = {
|
|
37
|
+
...request,
|
|
38
|
+
runAt: request.runAt ?? (input.flow.clock?.now() ?? new Date()).toISOString(),
|
|
39
|
+
};
|
|
40
|
+
const { caller, draftId, revision, destinationIndex, runAt } = scheduledRequest;
|
|
41
|
+
assertCallerScope(input.scope, caller);
|
|
42
|
+
assertScheduleInput(scheduledRequest);
|
|
43
|
+
const destination = await readDestinationAsync(input, scheduledRequest);
|
|
44
|
+
const binding = await requireBindingAsync(input, caller, destination);
|
|
45
|
+
const config = {
|
|
46
|
+
caller,
|
|
47
|
+
draftId,
|
|
48
|
+
revision,
|
|
49
|
+
destinationIndex,
|
|
50
|
+
runAt,
|
|
51
|
+
connectionRevision: binding.connection.revision,
|
|
52
|
+
target: binding.target,
|
|
53
|
+
};
|
|
54
|
+
const flow = createPublicationDefinition(config);
|
|
55
|
+
const scope = { tenantId: caller.tenantId, projectId: caller.projectId };
|
|
56
|
+
const existing = await runtime.getWorkflowAsync(scope, flow.id, flow.version);
|
|
57
|
+
if (!existing)
|
|
58
|
+
await runtime.createDraftAsync(scope, flow);
|
|
59
|
+
else if (JSON.stringify(existing.definition) !== JSON.stringify(flow))
|
|
60
|
+
throw new Error('Social publication configuration changed.');
|
|
61
|
+
if (!existing?.publishedAt)
|
|
62
|
+
await runtime.publishAsync(scope, flow.id, flow.version);
|
|
63
|
+
const run = await runtime.triggerAsync({
|
|
64
|
+
scope,
|
|
65
|
+
flowId: flow.id,
|
|
66
|
+
triggerId: 'publish',
|
|
67
|
+
idempotencyKey: flow.id,
|
|
68
|
+
runAt,
|
|
69
|
+
});
|
|
70
|
+
const approvalId = await ensureApprovalAsync(input, runtime, scheduledRequest, run.id);
|
|
71
|
+
return { run, approvalId };
|
|
72
|
+
}
|
|
73
|
+
/*** Create a pending approval only once, without resetting a previously resolved decision. */
|
|
74
|
+
async function ensureApprovalAsync(input, runtime, request, runId) {
|
|
75
|
+
const { caller } = request;
|
|
76
|
+
const scope = { tenantId: caller.tenantId, projectId: caller.projectId };
|
|
77
|
+
const approvalId = `social-approval:${runId}`;
|
|
78
|
+
if (!(await input.flow.store.getApprovalAsync(scope, approvalId)))
|
|
79
|
+
await runtime.requestApprovalAsync({
|
|
80
|
+
scope,
|
|
81
|
+
approval: {
|
|
82
|
+
id: approvalId,
|
|
83
|
+
runId,
|
|
84
|
+
status: 'pending',
|
|
85
|
+
requestedBy: caller.actorId,
|
|
86
|
+
requestedAt: (input.flow.clock?.now() ?? new Date()).toISOString(),
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
return approvalId;
|
|
90
|
+
}
|
|
91
|
+
/*** Validate one exact destination revision and canonical UTC instant. */
|
|
92
|
+
function assertScheduleInput(request) {
|
|
93
|
+
const { caller, revision, destinationIndex, runAt } = request;
|
|
94
|
+
if (!caller.actorId.trim())
|
|
95
|
+
throw new Error('Social publication requires a caller.');
|
|
96
|
+
if (!Number.isSafeInteger(revision) ||
|
|
97
|
+
revision < 1 ||
|
|
98
|
+
!Number.isSafeInteger(destinationIndex) ||
|
|
99
|
+
destinationIndex < 0 ||
|
|
100
|
+
(runAt !== undefined &&
|
|
101
|
+
(!Number.isFinite(Date.parse(runAt)) || new Date(runAt).toISOString() !== runAt))) {
|
|
102
|
+
throw new Error('Invalid Social Manager publication request.');
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/*** Derive a stable intent identity so a repeated schedule request cannot create another run. */
|
|
106
|
+
function publicationId(request) {
|
|
107
|
+
const { caller, draftId, revision, destinationIndex, runAt } = request;
|
|
108
|
+
return ('social-' +
|
|
109
|
+
createHash('sha256')
|
|
110
|
+
.update(JSON.stringify([
|
|
111
|
+
caller.tenantId,
|
|
112
|
+
caller.projectId,
|
|
113
|
+
caller.environmentId,
|
|
114
|
+
caller.actorId,
|
|
115
|
+
draftId,
|
|
116
|
+
revision,
|
|
117
|
+
destinationIndex,
|
|
118
|
+
runAt ?? null,
|
|
119
|
+
]))
|
|
120
|
+
.digest('hex'));
|
|
121
|
+
}
|
|
122
|
+
/*** Construct a server-owned graph that pins the approved revision and provider destination. */
|
|
123
|
+
function createPublicationDefinition(config) {
|
|
124
|
+
return {
|
|
125
|
+
id: publicationId(config),
|
|
126
|
+
version: 1,
|
|
127
|
+
title: 'Social publication',
|
|
128
|
+
triggers: [{ id: 'publish', kind: 'manual' }],
|
|
129
|
+
edges: [],
|
|
130
|
+
nodes: [
|
|
131
|
+
{
|
|
132
|
+
id: 'publication',
|
|
133
|
+
capability: { providerId, capabilityId },
|
|
134
|
+
config: {
|
|
135
|
+
publication: {
|
|
136
|
+
kind: 'inline',
|
|
137
|
+
value: {
|
|
138
|
+
caller: { ...config.caller },
|
|
139
|
+
draftId: config.draftId,
|
|
140
|
+
revision: config.revision,
|
|
141
|
+
destinationIndex: config.destinationIndex,
|
|
142
|
+
runAt: config.runAt,
|
|
143
|
+
connectionRevision: config.connectionRevision,
|
|
144
|
+
target: { ...config.target },
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
ports: [{ id: 'receipt', direction: 'output' }],
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
/*** Register an externally effective node; no internal operation can bypass the Flow security permit. */
|
|
154
|
+
function createPublicationOperation(input) {
|
|
155
|
+
return {
|
|
156
|
+
effect: {
|
|
157
|
+
kind: 'protected',
|
|
158
|
+
createSecurityOperation: ({ node, effect }) => {
|
|
159
|
+
const { caller } = readPublicationConfig(node, input.scope);
|
|
160
|
+
return {
|
|
161
|
+
actor: {
|
|
162
|
+
id: caller.actorId,
|
|
163
|
+
tenantId: caller.tenantId,
|
|
164
|
+
projectId: caller.projectId,
|
|
165
|
+
environment: caller.environmentId,
|
|
166
|
+
},
|
|
167
|
+
capability: capabilityId,
|
|
168
|
+
operationId: effect.idempotencyKey,
|
|
169
|
+
idempotencyKey: effect.idempotencyKey,
|
|
170
|
+
};
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
executeAsync: async ({ node, effect, signal }) => {
|
|
174
|
+
signal.throwIfAborted();
|
|
175
|
+
await requireApprovalAsync(input, node, effect.idempotencyKey);
|
|
176
|
+
const resolved = await resolveCommandAsync(input, node, effect.idempotencyKey);
|
|
177
|
+
signal.throwIfAborted();
|
|
178
|
+
const decision = await executeSocialActionAsync(resolved.command, {
|
|
179
|
+
authorizeAsync: () => Promise.resolve(resolved.grant),
|
|
180
|
+
}, input.mediaPreflight, resolved.provider);
|
|
181
|
+
if (!decision.dispatched)
|
|
182
|
+
throw new Error(`Social publication: ${decision.reason}.`);
|
|
183
|
+
return receiptOutput(decision.receipt);
|
|
184
|
+
},
|
|
185
|
+
reconcileAsync: async ({ node, effect }) => {
|
|
186
|
+
const resolved = await resolveCommandAsync(input, node, effect.idempotencyKey);
|
|
187
|
+
const result = await resolved.provider.reconcileAsync(resolved.command, resolved.grant.authorizationRef);
|
|
188
|
+
if (result.state !== 'found')
|
|
189
|
+
return 'unknown';
|
|
190
|
+
if (!matchesReceipt(result.receipt, resolved.command, resolved.grant.authorizationRef))
|
|
191
|
+
throw new Error('Social publication receipt does not match the authorized operation.');
|
|
192
|
+
return receiptOutput(result.receipt);
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
/*** Independently bind the approval to the actual durable run before dispatching. */
|
|
197
|
+
async function requireApprovalAsync(input, node, operationKey) {
|
|
198
|
+
const suffix = ':step:publication';
|
|
199
|
+
if (!operationKey.endsWith(suffix))
|
|
200
|
+
throw new Error('Invalid Social publication operation identity.');
|
|
201
|
+
const runId = operationKey.slice(0, -suffix.length);
|
|
202
|
+
const config = readPublicationConfig(node, input.scope);
|
|
203
|
+
const scope = { tenantId: config.caller.tenantId, projectId: config.caller.projectId };
|
|
204
|
+
const run = await input.flow.store.getRunAsync(scope, runId);
|
|
205
|
+
const approval = await input.flow.store.getApprovalAsync(scope, 'social-approval:' + runId);
|
|
206
|
+
if (run?.flow.id !== publicationId(config) ||
|
|
207
|
+
run.flow.version !== 1 ||
|
|
208
|
+
approval?.runId !== runId ||
|
|
209
|
+
approval.status !== 'approved' ||
|
|
210
|
+
(approval.expiresAt !== undefined &&
|
|
211
|
+
Date.parse(approval.expiresAt) <= (input.flow.clock?.now() ?? new Date()).getTime()))
|
|
212
|
+
throw new Error('Social publication has no current exact approval.');
|
|
213
|
+
}
|
|
214
|
+
/*** Reject a stale or cross-authorization reconciliation receipt. */
|
|
215
|
+
function matchesReceipt(receipt, command, authorizationRef) {
|
|
216
|
+
return (!!receipt.receiptId &&
|
|
217
|
+
receipt.operationKey === command.operationKey &&
|
|
218
|
+
receipt.actorId === command.actorId &&
|
|
219
|
+
receipt.tenantId === command.tenantId &&
|
|
220
|
+
receipt.authorizationRef === authorizationRef &&
|
|
221
|
+
sameTarget(receipt.target, command.target));
|
|
222
|
+
}
|
|
223
|
+
/*** Project an authoritative receipt without disclosing its opaque authorization reference. */
|
|
224
|
+
function receiptOutput(receipt) {
|
|
225
|
+
return {
|
|
226
|
+
output: {
|
|
227
|
+
receipt: {
|
|
228
|
+
kind: 'inline',
|
|
229
|
+
value: {
|
|
230
|
+
receiptId: receipt.receiptId,
|
|
231
|
+
operationKey: receipt.operationKey,
|
|
232
|
+
provider: receipt.target.provider,
|
|
233
|
+
destinationId: receipt.target.destinationId,
|
|
234
|
+
...(receipt.resourceId === undefined ? {} : { resourceId: receipt.resourceId }),
|
|
235
|
+
...(receipt.resourceUrl === undefined ? {} : { resourceUrl: receipt.resourceUrl }),
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
};
|
|
240
|
+
}
|
package/dist/features/trusted-social-manager-host/application/resolveSocialManagerPublication.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { FlowNode } from '@ankhorage/contracts/flow';
|
|
2
|
+
import type { SocialActionCommand } from '@ankhorage/social';
|
|
3
|
+
import type { SocialManagerCaller, SocialManagerDestination } from '../../../types/socialManager.js';
|
|
4
|
+
import type { SocialManagerPublicationBinding, SocialManagerPublicationDependencies, SocialManagerPublicationRequest } from '../../../types/socialManagerPublication.js';
|
|
5
|
+
/*** Resolve the immutable destination and current authorization before execution or reconciliation. */
|
|
6
|
+
export declare function resolveCommandAsync(input: SocialManagerPublicationDependencies, node: FlowNode, operationKey: string): Promise<{
|
|
7
|
+
command: SocialActionCommand;
|
|
8
|
+
grant: {
|
|
9
|
+
readonly authorized: true;
|
|
10
|
+
readonly authorizationRef: string;
|
|
11
|
+
readonly operationKey: string;
|
|
12
|
+
readonly tenantId: string;
|
|
13
|
+
readonly actorId: string;
|
|
14
|
+
readonly target: import("@ankhorage/social").SocialTargetRef;
|
|
15
|
+
readonly scopes: readonly string[];
|
|
16
|
+
};
|
|
17
|
+
provider: import("@ankhorage/social").SocialProviderPort;
|
|
18
|
+
}>;
|
|
19
|
+
/*** Revalidate the connection's current exact target and the provider's present publish requirements. */
|
|
20
|
+
export declare function requireBindingAsync(input: SocialManagerPublicationDependencies, caller: SocialManagerCaller, destination: SocialManagerDestination): Promise<SocialManagerPublicationBinding>;
|
|
21
|
+
/*** Read a destination from its immutable revision rather than the mutable current draft. */
|
|
22
|
+
export declare function readDestinationAsync(input: SocialManagerPublicationDependencies, request: SocialManagerPublicationRequest): Promise<SocialManagerDestination>;
|
package/dist/features/trusted-social-manager-host/application/resolveSocialManagerPublication.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { resolveAuthorizedTargetAsync } from '@ankhorage/connection';
|
|
2
|
+
import { assertCallerScope, readPublicationConfig, sameTarget, } from '../domain/publicationConfig.js';
|
|
3
|
+
/*** Resolve the immutable destination and current authorization before execution or reconciliation. */
|
|
4
|
+
export async function resolveCommandAsync(input, node, operationKey) {
|
|
5
|
+
const config = readPublicationConfig(node, input.scope);
|
|
6
|
+
const destination = await readDestinationAsync(input, config);
|
|
7
|
+
const binding = await requireBindingAsync(input, config.caller, destination);
|
|
8
|
+
if (binding.connection.revision !== config.connectionRevision ||
|
|
9
|
+
!sameTarget(binding.target, config.target)) {
|
|
10
|
+
throw new Error('Social publication target or authorization changed after scheduling.');
|
|
11
|
+
}
|
|
12
|
+
const media = await input.resolveMediaAsync(config.caller, destination.mediaIds);
|
|
13
|
+
if (JSON.stringify(media.map((item) => item.mediaId)) !== JSON.stringify(destination.mediaIds))
|
|
14
|
+
throw new Error('Social publication media references are unavailable.');
|
|
15
|
+
const command = {
|
|
16
|
+
operationKey,
|
|
17
|
+
tenantId: config.caller.tenantId,
|
|
18
|
+
actorId: config.caller.actorId,
|
|
19
|
+
target: binding.target,
|
|
20
|
+
action: {
|
|
21
|
+
kind: 'publish',
|
|
22
|
+
...(destination.text.trim() ? { text: destination.text } : {}),
|
|
23
|
+
...(destination.link === undefined ? {} : { link: destination.link }),
|
|
24
|
+
media,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
const grant = {
|
|
28
|
+
authorized: true,
|
|
29
|
+
operationKey,
|
|
30
|
+
tenantId: command.tenantId,
|
|
31
|
+
actorId: command.actorId,
|
|
32
|
+
target: command.target,
|
|
33
|
+
authorizationRef: binding.connection.authorizationRef,
|
|
34
|
+
scopes: binding.connection.grantedScopes,
|
|
35
|
+
};
|
|
36
|
+
return { command, grant, provider: binding.provider };
|
|
37
|
+
}
|
|
38
|
+
/*** Revalidate the connection's current exact target and the provider's present publish requirements. */
|
|
39
|
+
export async function requireBindingAsync(input, caller, destination) {
|
|
40
|
+
const binding = await input.resolveBindingAsync(caller, destination);
|
|
41
|
+
if (!binding)
|
|
42
|
+
throw new Error('Social publication connection is unavailable.');
|
|
43
|
+
assertBinding(caller, destination, binding);
|
|
44
|
+
const { connection, target, provider } = binding;
|
|
45
|
+
const capability = await provider.getCapabilityAsync(target);
|
|
46
|
+
const action = capability?.actions.find((candidate) => candidate.kind === 'publish');
|
|
47
|
+
if (!capability?.enabled || !capability.publishingAllowed || !action)
|
|
48
|
+
throw new Error('Social publication is not currently supported.');
|
|
49
|
+
const eligibility = await resolveAuthorizedTargetAsync(input.discovery, {
|
|
50
|
+
target: {
|
|
51
|
+
tenantId: caller.tenantId,
|
|
52
|
+
projectId: caller.projectId,
|
|
53
|
+
environmentId: caller.environmentId,
|
|
54
|
+
actorId: caller.actorId,
|
|
55
|
+
provider: connection.provider,
|
|
56
|
+
connectionId: connection.connectionId,
|
|
57
|
+
accountId: connection.accountId,
|
|
58
|
+
targetId: destination.targetId,
|
|
59
|
+
},
|
|
60
|
+
operation: 'publish',
|
|
61
|
+
roles: [],
|
|
62
|
+
scopes: action.requiredScopes,
|
|
63
|
+
});
|
|
64
|
+
if (!eligibility.granted ||
|
|
65
|
+
!action.requiredScopes.every((scope) => connection.grantedScopes.includes(scope)))
|
|
66
|
+
throw new Error('Social publication target is not authorized.');
|
|
67
|
+
return binding;
|
|
68
|
+
}
|
|
69
|
+
/*** Verify the binding is exactly the current actor, connection, account and destination. */
|
|
70
|
+
function assertBinding(caller, destination, binding) {
|
|
71
|
+
const { connection, target, provider } = binding;
|
|
72
|
+
assertCallerScope(caller, connection);
|
|
73
|
+
if (connection.actorId !== caller.actorId ||
|
|
74
|
+
connection.connectionId !== destination.connectionId ||
|
|
75
|
+
connection.accountId !== target.accountId ||
|
|
76
|
+
target.destinationId !== destination.targetId ||
|
|
77
|
+
connection.status !== 'connected' ||
|
|
78
|
+
!connection.authorizationRef ||
|
|
79
|
+
provider.provider !== target.provider ||
|
|
80
|
+
!providerMatches(connection.provider, target.provider))
|
|
81
|
+
throw new Error('Social publication connection does not match the selected destination.');
|
|
82
|
+
}
|
|
83
|
+
/*** Read a destination from its immutable revision rather than the mutable current draft. */
|
|
84
|
+
export async function readDestinationAsync(input, request) {
|
|
85
|
+
const draft = await input.drafts.readAsync(request.caller, request.draftId, request.revision);
|
|
86
|
+
const destination = draft?.content.destinations[request.destinationIndex];
|
|
87
|
+
if (!destination)
|
|
88
|
+
throw new Error('Social publication draft revision or destination is unavailable.');
|
|
89
|
+
return destination;
|
|
90
|
+
}
|
|
91
|
+
/*** Match the four supported delegated authorization families to their Social provider. */
|
|
92
|
+
function providerMatches(connection, social) {
|
|
93
|
+
return ((connection === 'facebook-login' && social === 'facebook') ||
|
|
94
|
+
(connection === 'instagram-login' && social === 'instagram') ||
|
|
95
|
+
(connection === 'linkedin' && social === 'linkedin') ||
|
|
96
|
+
(connection === 'pinterest' && social === 'pinterest'));
|
|
97
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ApiHandler } from '@ankhorage/api';
|
|
2
|
+
import { type SocialAnalyticsAdapter, type SocialMediaRef } from '@ankhorage/social';
|
|
3
|
+
import type { SocialManagerCaller, SocialManagerDestination, SocialManagerDraftStore } from '../../../types/socialManager.js';
|
|
4
|
+
import type { SocialManagerPublicationBinding } from '../../../types/socialManagerPublication.js';
|
|
5
|
+
type SocialManagerCapabilityOperation = Readonly<{
|
|
6
|
+
intent: 'create' | 'read';
|
|
7
|
+
method: 'GET' | 'POST';
|
|
8
|
+
handler: ApiHandler;
|
|
9
|
+
}>;
|
|
10
|
+
type AnalyticsBinding = SocialManagerPublicationBinding & Readonly<{
|
|
11
|
+
analytics: SocialAnalyticsAdapter;
|
|
12
|
+
}>;
|
|
13
|
+
export type SocialManagerCapabilityHostDependencies = Readonly<{
|
|
14
|
+
drafts: SocialManagerDraftStore;
|
|
15
|
+
resolveBindingAsync: (caller: SocialManagerCaller, destination: SocialManagerDestination) => Promise<SocialManagerPublicationBinding | undefined>;
|
|
16
|
+
resolveAnalyticsBindingAsync: (caller: SocialManagerCaller, destination: SocialManagerDestination) => Promise<AnalyticsBinding | undefined>;
|
|
17
|
+
resolveMediaAsync: (caller: SocialManagerCaller, mediaIds: readonly string[]) => Promise<readonly SocialMediaRef[]>;
|
|
18
|
+
now: () => string;
|
|
19
|
+
}>;
|
|
20
|
+
/*** Bind provider capability, content preparation, and analytics reads to immutable caller-owned drafts. */
|
|
21
|
+
export declare function createSocialManagerCapabilityOperations(input: SocialManagerCapabilityHostDependencies, callerOf: (request: Parameters<ApiHandler>[0]) => SocialManagerCaller | undefined): Readonly<Record<string, SocialManagerCapabilityOperation>>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { getSocialAnalyticsCapabilitiesAsync, retrieveSocialAnalyticsAsync, } from '@ankhorage/social';
|
|
2
|
+
import { isRecord } from '@ankhorage/utility/object';
|
|
3
|
+
/*** Bind provider capability, content preparation, and analytics reads to immutable caller-owned drafts. */
|
|
4
|
+
export function createSocialManagerCapabilityOperations(input, callerOf) {
|
|
5
|
+
return {
|
|
6
|
+
'projects.social.capabilities.read': operation('read', 'GET', (request) => readCapabilityAsync(input, callerOf(request), request.query)),
|
|
7
|
+
'projects.social.content.validate': operation('create', 'POST', (request) => validateContentAsync(input, callerOf(request), request.body)),
|
|
8
|
+
'projects.social.preview.prepare': operation('create', 'POST', (request) => preparePreviewAsync(input, callerOf(request), request.body)),
|
|
9
|
+
'projects.social.analytics.capabilities': operation('read', 'GET', (request) => readAnalyticsCapabilitiesAsync(input, callerOf(request), request.query)),
|
|
10
|
+
'projects.social.analytics.retrieve': operation('create', 'POST', (request) => retrieveAnalyticsAsync(input, callerOf(request), request.body)),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
/*** Resolve current provider capability for the selected immutable destination. */
|
|
14
|
+
async function readCapabilityAsync(input, caller, value) {
|
|
15
|
+
const selection = readSelection(value);
|
|
16
|
+
if (!caller || !selection)
|
|
17
|
+
return response('invalid');
|
|
18
|
+
const resolved = await resolveDestinationAsync(input, caller, selection);
|
|
19
|
+
if (!resolved)
|
|
20
|
+
return response('missing');
|
|
21
|
+
const binding = await input.resolveBindingAsync(caller, resolved.destination);
|
|
22
|
+
const capability = binding && (await binding.provider.getCapabilityAsync(binding.target));
|
|
23
|
+
return capability ? { body: capability } : response('missing');
|
|
24
|
+
}
|
|
25
|
+
/*** Validate exact draft content against the current provider capability and immutable media references. */
|
|
26
|
+
async function validateContentAsync(input, caller, value) {
|
|
27
|
+
const selection = readSelection(value);
|
|
28
|
+
if (!caller || !selection)
|
|
29
|
+
return response('invalid');
|
|
30
|
+
const resolved = await resolveDestinationAsync(input, caller, selection);
|
|
31
|
+
if (!resolved)
|
|
32
|
+
return response('missing');
|
|
33
|
+
const binding = await input.resolveBindingAsync(caller, resolved.destination);
|
|
34
|
+
if (!binding)
|
|
35
|
+
return response('missing');
|
|
36
|
+
const capability = await binding.provider.getCapabilityAsync(binding.target);
|
|
37
|
+
if (!capability)
|
|
38
|
+
return response('missing');
|
|
39
|
+
const media = await input.resolveMediaAsync(caller, resolved.destination.mediaIds);
|
|
40
|
+
if (media.length !== resolved.destination.mediaIds.length)
|
|
41
|
+
return response('missing');
|
|
42
|
+
return { body: validateDestination(capability, resolved.destination, media) };
|
|
43
|
+
}
|
|
44
|
+
/*** Prepare a redaction-safe exact preview after validating the current destination and immutable media. */
|
|
45
|
+
async function preparePreviewAsync(input, caller, value) {
|
|
46
|
+
const selection = readSelection(value);
|
|
47
|
+
if (!caller || !selection)
|
|
48
|
+
return response('invalid');
|
|
49
|
+
const resolved = await resolveDestinationAsync(input, caller, selection);
|
|
50
|
+
if (!resolved)
|
|
51
|
+
return response('missing');
|
|
52
|
+
const binding = await input.resolveBindingAsync(caller, resolved.destination);
|
|
53
|
+
if (!binding)
|
|
54
|
+
return response('missing');
|
|
55
|
+
const capability = await binding.provider.getCapabilityAsync(binding.target);
|
|
56
|
+
if (!capability)
|
|
57
|
+
return response('missing');
|
|
58
|
+
const media = await input.resolveMediaAsync(caller, resolved.destination.mediaIds);
|
|
59
|
+
if (media.length !== resolved.destination.mediaIds.length)
|
|
60
|
+
return response('missing');
|
|
61
|
+
const validation = validateDestination(capability, resolved.destination, media);
|
|
62
|
+
return validation.valid
|
|
63
|
+
? {
|
|
64
|
+
body: {
|
|
65
|
+
draftId: selection.draftId,
|
|
66
|
+
revision: selection.revision,
|
|
67
|
+
destinationIndex: selection.destinationIndex,
|
|
68
|
+
target: binding.target,
|
|
69
|
+
text: resolved.destination.text,
|
|
70
|
+
...(resolved.destination.link === undefined ? {} : { link: resolved.destination.link }),
|
|
71
|
+
media,
|
|
72
|
+
},
|
|
73
|
+
}
|
|
74
|
+
: { status: 422, body: validation };
|
|
75
|
+
}
|
|
76
|
+
/*** Read provider-native metric availability for one authenticated immutable destination. */
|
|
77
|
+
async function readAnalyticsCapabilitiesAsync(input, caller, value) {
|
|
78
|
+
const analytics = await resolveAnalyticsAsync(input, caller, value);
|
|
79
|
+
if (!analytics)
|
|
80
|
+
return response('missing');
|
|
81
|
+
return {
|
|
82
|
+
body: await getSocialAnalyticsCapabilitiesAsync({
|
|
83
|
+
adapter: analytics.binding.analytics,
|
|
84
|
+
query: analytics.query,
|
|
85
|
+
}),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
/*** Retrieve provider-native observations without converting metrics, units, provenance, or windows. */
|
|
89
|
+
async function retrieveAnalyticsAsync(input, caller, value) {
|
|
90
|
+
const analytics = await resolveAnalyticsAsync(input, caller, value);
|
|
91
|
+
const maximumAgeMs = isRecord(value) ? value.maximumAgeMs : undefined;
|
|
92
|
+
if (!analytics ||
|
|
93
|
+
typeof maximumAgeMs !== 'number' ||
|
|
94
|
+
!Number.isFinite(maximumAgeMs) ||
|
|
95
|
+
maximumAgeMs < 0)
|
|
96
|
+
return response('invalid');
|
|
97
|
+
return {
|
|
98
|
+
body: await retrieveSocialAnalyticsAsync({
|
|
99
|
+
adapter: analytics.binding.analytics,
|
|
100
|
+
query: analytics.query,
|
|
101
|
+
observedAt: input.now(),
|
|
102
|
+
maximumAgeMs,
|
|
103
|
+
}),
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/*** Resolve exact analytics provenance from trusted caller, binding, and optionally selected published content. */
|
|
107
|
+
async function resolveAnalyticsAsync(input, caller, value) {
|
|
108
|
+
const selection = readSelection(value);
|
|
109
|
+
const metricIds = readMetricIds(value);
|
|
110
|
+
if (!caller || !selection || !metricIds)
|
|
111
|
+
return undefined;
|
|
112
|
+
const resolved = await resolveDestinationAsync(input, caller, selection);
|
|
113
|
+
if (!resolved)
|
|
114
|
+
return undefined;
|
|
115
|
+
const binding = await input.resolveAnalyticsBindingAsync(caller, resolved.destination);
|
|
116
|
+
if (!binding)
|
|
117
|
+
return undefined;
|
|
118
|
+
const contentId = isRecord(value) && typeof value.contentId === 'string' && value.contentId.trim()
|
|
119
|
+
? value.contentId
|
|
120
|
+
: undefined;
|
|
121
|
+
return {
|
|
122
|
+
binding,
|
|
123
|
+
query: createAnalyticsQuery(caller, binding.target, metricIds, contentId),
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/*** Derive analytics provenance solely from server-authenticated identity and selected provider target. */
|
|
127
|
+
function createAnalyticsQuery(caller, target, providerMetricIds, contentId) {
|
|
128
|
+
return {
|
|
129
|
+
provenance: {
|
|
130
|
+
tenantId: caller.tenantId,
|
|
131
|
+
provider: target.provider,
|
|
132
|
+
accountId: target.accountId,
|
|
133
|
+
targetId: target.destinationId,
|
|
134
|
+
...(contentId === undefined ? {} : { contentId }),
|
|
135
|
+
},
|
|
136
|
+
providerMetricIds,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
/*** Read one immutable draft destination selector from either API query values or a JSON body. */
|
|
140
|
+
function readSelection(value) {
|
|
141
|
+
if (!isRecord(value))
|
|
142
|
+
return undefined;
|
|
143
|
+
const { draftId, revision, destinationIndex } = value;
|
|
144
|
+
return typeof draftId === 'string' && draftId.trim().length > 0 && typeof revision === 'string'
|
|
145
|
+
? readNumberSelection(draftId, Number(revision), typeof destinationIndex === 'string' ? Number(destinationIndex) : destinationIndex)
|
|
146
|
+
: typeof draftId === 'string' && draftId.trim().length > 0 && typeof revision === 'number'
|
|
147
|
+
? readNumberSelection(draftId, revision, destinationIndex)
|
|
148
|
+
: undefined;
|
|
149
|
+
}
|
|
150
|
+
/*** Reject malformed revision and destination indexes before storage or provider work. */
|
|
151
|
+
function readNumberSelection(draftId, revision, destinationIndex) {
|
|
152
|
+
return Number.isSafeInteger(revision) &&
|
|
153
|
+
revision > 0 &&
|
|
154
|
+
typeof destinationIndex === 'number' &&
|
|
155
|
+
Number.isSafeInteger(destinationIndex) &&
|
|
156
|
+
destinationIndex >= 0
|
|
157
|
+
? { draftId, revision, destinationIndex }
|
|
158
|
+
: undefined;
|
|
159
|
+
}
|
|
160
|
+
/*** Read nonempty provider metric names from body arrays or repeated HTTP query values. */
|
|
161
|
+
function readMetricIds(value) {
|
|
162
|
+
if (!isRecord(value))
|
|
163
|
+
return undefined;
|
|
164
|
+
const metricIds = value.providerMetricIds;
|
|
165
|
+
const values = Array.isArray(metricIds)
|
|
166
|
+
? metricIds
|
|
167
|
+
: typeof metricIds === 'string'
|
|
168
|
+
? metricIds.split(',')
|
|
169
|
+
: undefined;
|
|
170
|
+
const normalized = values?.filter((metricId) => typeof metricId === 'string' && metricId.trim().length > 0);
|
|
171
|
+
return normalized && normalized.length > 0 ? normalized : undefined;
|
|
172
|
+
}
|
|
173
|
+
/*** Read the immutable destination rather than trusting a browser-supplied connection or target identity. */
|
|
174
|
+
async function resolveDestinationAsync(input, caller, selection) {
|
|
175
|
+
const draft = await input.drafts.readAsync(caller, selection.draftId, selection.revision);
|
|
176
|
+
const destination = draft?.content.destinations[selection.destinationIndex];
|
|
177
|
+
return destination === undefined ? undefined : { destination };
|
|
178
|
+
}
|
|
179
|
+
/*** Produce deterministic validation failures that identify provider constraints without reflecting credentials. */
|
|
180
|
+
function validateDestination(capability, destination, media) {
|
|
181
|
+
const errors = [
|
|
182
|
+
...(!capability.enabled || !capability.publishingAllowed ? ['publishing_unavailable'] : []),
|
|
183
|
+
...(capability.maxTextLength !== undefined && destination.text.length > capability.maxTextLength
|
|
184
|
+
? ['text_too_long']
|
|
185
|
+
: []),
|
|
186
|
+
...(capability.maxMediaItems !== undefined && media.length > capability.maxMediaItems
|
|
187
|
+
? ['too_many_media_items']
|
|
188
|
+
: []),
|
|
189
|
+
...contentTypeErrors(capability, destination, media),
|
|
190
|
+
...mediaCapabilityErrors(capability, media),
|
|
191
|
+
];
|
|
192
|
+
return errors.length === 0 ? { valid: true } : { valid: false, errors };
|
|
193
|
+
}
|
|
194
|
+
/*** Verify that the exact draft's text, link, and media content classes are enabled by this provider target. */
|
|
195
|
+
function contentTypeErrors(capability, destination, media) {
|
|
196
|
+
const required = [
|
|
197
|
+
...(destination.text.trim() ? ['text'] : []),
|
|
198
|
+
...(destination.link === undefined ? [] : ['link']),
|
|
199
|
+
...media.map((item) => item.kind),
|
|
200
|
+
];
|
|
201
|
+
return required
|
|
202
|
+
.filter((kind) => !capability.contentTypes.includes(kind))
|
|
203
|
+
.map((kind) => `unsupported_${kind}`);
|
|
204
|
+
}
|
|
205
|
+
/*** Verify provider media kind, MIME type, and immutable byte length constraints. */
|
|
206
|
+
function mediaCapabilityErrors(capability, media) {
|
|
207
|
+
return media.flatMap((item) => {
|
|
208
|
+
const supported = capability.media.find((candidate) => candidate.kind === item.kind);
|
|
209
|
+
return !supported?.contentTypes.includes(item.contentType)
|
|
210
|
+
? [`unsupported_${item.kind}_media`]
|
|
211
|
+
: item.byteLength > supported.maxByteLength
|
|
212
|
+
? [`${item.kind}_media_too_large`]
|
|
213
|
+
: [];
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
/*** Declare one canonical capability operation. */
|
|
217
|
+
function operation(intent, method, handler) {
|
|
218
|
+
return { intent, method, handler };
|
|
219
|
+
}
|
|
220
|
+
/*** Return one redacted invalid or absent Social Manager capability response. */
|
|
221
|
+
function response(kind) {
|
|
222
|
+
const code = kind === 'invalid' ? 'invalid_social_capability_request' : 'social_destination_not_found';
|
|
223
|
+
return { status: kind === 'invalid' ? 400 : 404, body: { error: { code } } };
|
|
224
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ApiHandler } from '@ankhorage/api';
|
|
2
|
+
import { type AuthorizationHealthSnapshot, type DelegatedAuthorizationDependencies, type ManagedConnection, type RevocationDependencies } from '@ankhorage/connection';
|
|
3
|
+
import type { SocialManagerCaller } from '../../../types/socialManager.js';
|
|
4
|
+
import type { ConnectionFileSystemStore } from '../adapters/createConnectionFileSystemStoreAsync.js';
|
|
5
|
+
export type SocialManagerConnectionHostDependencies = Readonly<{
|
|
6
|
+
store: ConnectionFileSystemStore;
|
|
7
|
+
authorization: DelegatedAuthorizationDependencies['adapter'];
|
|
8
|
+
now: DelegatedAuthorizationDependencies['now'];
|
|
9
|
+
healthAsync: (connection: ManagedConnection) => Promise<AuthorizationHealthSnapshot>;
|
|
10
|
+
revocation: Omit<RevocationDependencies, 'repository'>;
|
|
11
|
+
}>;
|
|
12
|
+
type ConnectionOperation = Readonly<{
|
|
13
|
+
intent: 'action' | 'create' | 'delete' | 'read' | 'update';
|
|
14
|
+
method: 'DELETE' | 'GET' | 'POST';
|
|
15
|
+
handler: ApiHandler;
|
|
16
|
+
}>;
|
|
17
|
+
export type SocialManagerConnectionOperations = Readonly<Record<string, ConnectionOperation>>;
|
|
18
|
+
/*** Bind released Connection use cases to verified caller identity and redacted HTTP projections. */
|
|
19
|
+
export declare function createSocialManagerConnectionOperations(input: SocialManagerConnectionHostDependencies, callerOf: (request: Parameters<ApiHandler>[0]) => SocialManagerCaller | undefined): SocialManagerConnectionOperations;
|
|
20
|
+
export {};
|