@topolo/sdk 0.7.0 → 0.8.1
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 +11 -3
- package/dist/index.cjs +258 -53
- package/dist/index.d.cts +76 -8
- package/dist/index.d.ts +76 -8
- package/dist/index.js +255 -53
- package/dist/node/credential-store.cjs +16 -5
- package/dist/node/credential-store.d.cts +3 -1
- package/dist/node/credential-store.d.ts +3 -1
- package/dist/node/credential-store.js +16 -5
- package/package.json +5 -4
- package/src/application-requirements.ts +0 -517
- package/src/applications.generated.ts +0 -1509
- package/src/auth.ts +0 -48
- package/src/client.test.ts +0 -894
- package/src/client.ts +0 -1025
- package/src/errors.ts +0 -39
- package/src/index.test.ts +0 -69
- package/src/index.ts +0 -125
- package/src/modules/crm.test.ts +0 -208
- package/src/modules/crm.ts +0 -110
- package/src/modules/identity.test.ts +0 -165
- package/src/modules/identity.ts +0 -18
- package/src/modules/p2p.test.ts +0 -540
- package/src/modules/p2p.ts +0 -448
- package/src/node/credential-store.ts +0 -378
- package/src/oauth.test.ts +0 -216
- package/src/oauth.ts +0 -138
- package/src/services.generated.ts +0 -55
- package/src/services.test.ts +0 -243
- package/src/services.ts +0 -138
- package/src/widgets.test.ts +0 -416
- package/src/widgets.ts +0 -362
package/dist/index.d.cts
CHANGED
|
@@ -47,6 +47,12 @@ interface TopoloClientOptions {
|
|
|
47
47
|
timeoutMs?: number;
|
|
48
48
|
/** Injected fetch, for testing. Defaults to global fetch. */
|
|
49
49
|
fetch?: typeof fetch;
|
|
50
|
+
/**
|
|
51
|
+
* Refresh a rejected access-token credential. When supplied, the client
|
|
52
|
+
* retries one 401 response with the returned credential. Concurrent 401s
|
|
53
|
+
* share one refresh operation. API keys are never refreshed.
|
|
54
|
+
*/
|
|
55
|
+
refreshCredential?: () => Promise<TopoloCredential | null>;
|
|
50
56
|
/**
|
|
51
57
|
* Observability hook. Fires once per request lifecycle (`request` at start,
|
|
52
58
|
* then exactly one of `response` or `error`). Safe to leave unset — off by
|
|
@@ -84,6 +90,8 @@ type TopoloDebugEvent = {
|
|
|
84
90
|
};
|
|
85
91
|
interface RequestOptions {
|
|
86
92
|
service: string;
|
|
93
|
+
/** Catalog-resolved origin for an action target. */
|
|
94
|
+
baseUrl?: string;
|
|
87
95
|
path: string;
|
|
88
96
|
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
89
97
|
query?: Record<string, string | number | boolean | undefined>;
|
|
@@ -129,6 +137,8 @@ interface TopoloApiKeyResourceMetadata {
|
|
|
129
137
|
}
|
|
130
138
|
interface TopoloActionCatalogEntry {
|
|
131
139
|
actionId: string;
|
|
140
|
+
target: string | null;
|
|
141
|
+
apiBaseUrl: string | null;
|
|
132
142
|
name: string;
|
|
133
143
|
toolName: string | null;
|
|
134
144
|
title: string;
|
|
@@ -140,6 +150,8 @@ interface TopoloActionCatalogEntry {
|
|
|
140
150
|
path: string;
|
|
141
151
|
permissionName: string;
|
|
142
152
|
requiredPermission: string;
|
|
153
|
+
/** Static catalog permission or target-enforced input-dependent authorization. */
|
|
154
|
+
authorizationMode?: 'static' | 'runtime';
|
|
143
155
|
inputSchema: Record<string, unknown>;
|
|
144
156
|
outputSchema: Record<string, unknown>;
|
|
145
157
|
readOnly: boolean;
|
|
@@ -150,17 +162,39 @@ interface TopoloActionCatalogEntry {
|
|
|
150
162
|
status: string | null;
|
|
151
163
|
sourceRevision: string | null;
|
|
152
164
|
}
|
|
165
|
+
interface TopoloCatalogPage {
|
|
166
|
+
nextCursor: string | null;
|
|
167
|
+
hasMore: boolean;
|
|
168
|
+
}
|
|
169
|
+
interface TopoloServiceCatalogPage {
|
|
170
|
+
services: TopoloServiceCatalogEntry[];
|
|
171
|
+
page: TopoloCatalogPage;
|
|
172
|
+
}
|
|
173
|
+
interface TopoloActionCatalogPage {
|
|
174
|
+
actions: TopoloActionCatalogEntry[];
|
|
175
|
+
page: TopoloCatalogPage;
|
|
176
|
+
}
|
|
177
|
+
interface TopoloActionCatalogSummary {
|
|
178
|
+
algorithm: 'sha256-v1';
|
|
179
|
+
digest: string;
|
|
180
|
+
actionCount: number;
|
|
181
|
+
}
|
|
182
|
+
interface TopoloCatalogSearchOptions {
|
|
183
|
+
query?: string;
|
|
184
|
+
cursor?: string;
|
|
185
|
+
limit?: number;
|
|
186
|
+
}
|
|
153
187
|
declare class TopoloClient {
|
|
154
|
-
private
|
|
188
|
+
private credential;
|
|
155
189
|
private readonly agent;
|
|
156
190
|
private readonly serviceUrls?;
|
|
157
191
|
private readonly appIds?;
|
|
158
192
|
private readonly requireConfirmForWrites;
|
|
159
193
|
private readonly timeoutMs;
|
|
160
194
|
private readonly fetchImpl;
|
|
195
|
+
private readonly refreshCredential?;
|
|
196
|
+
private refreshInFlight;
|
|
161
197
|
private readonly debug?;
|
|
162
|
-
private serviceCatalogCache;
|
|
163
|
-
private actionCatalogCache;
|
|
164
198
|
/**
|
|
165
199
|
* Process-wide cache for slug → app-id lookups. Keyed by
|
|
166
200
|
* `${authBaseUrl}|${slug}` so multiple `TopoloClient` instances pointing at
|
|
@@ -181,6 +215,7 @@ declare class TopoloClient {
|
|
|
181
215
|
* use and for the generic `topolo api` / MCP passthrough tool.
|
|
182
216
|
*/
|
|
183
217
|
request<T = unknown>(opts: RequestOptions): Promise<T>;
|
|
218
|
+
private refreshRejectedAccessToken;
|
|
184
219
|
private resolveRequestService;
|
|
185
220
|
private resolveLiveCallableService;
|
|
186
221
|
/**
|
|
@@ -206,19 +241,31 @@ declare class TopoloClient {
|
|
|
206
241
|
* The live Auth catalog is the authority because it is scoped to the caller's
|
|
207
242
|
* organization and effective permissions.
|
|
208
243
|
*/
|
|
209
|
-
|
|
244
|
+
searchServices(options?: TopoloCatalogSearchOptions): Promise<TopoloServiceCatalogPage>;
|
|
245
|
+
/** @deprecated Prefer searchServices() so callers retain the continuation cursor. */
|
|
246
|
+
listServices(options?: TopoloCatalogSearchOptions): Promise<TopoloServiceCatalogEntry[]>;
|
|
247
|
+
getService(application: string): Promise<TopoloServiceCatalogEntry>;
|
|
210
248
|
/**
|
|
211
249
|
* List callable actions from the live registry-canonical catalog (definitions
|
|
212
250
|
* from the Catalog registry, scoping from Auth). The response is scoped to the
|
|
213
251
|
* caller's organization and effective permissions; no bundled/static app
|
|
214
252
|
* action list is used as an authorization source.
|
|
215
253
|
*/
|
|
216
|
-
|
|
217
|
-
service
|
|
254
|
+
searchActions(options: TopoloCatalogSearchOptions & {
|
|
255
|
+
service: string;
|
|
256
|
+
}): Promise<TopoloActionCatalogPage>;
|
|
257
|
+
getActionCatalogSummary(service: string): Promise<TopoloActionCatalogSummary>;
|
|
258
|
+
/** @deprecated Prefer searchActions() so callers retain the continuation cursor. */
|
|
259
|
+
listActions(options?: TopoloCatalogSearchOptions & {
|
|
260
|
+
service: string;
|
|
218
261
|
}): Promise<TopoloActionCatalogEntry[]>;
|
|
219
262
|
getAction(action: string): Promise<TopoloActionCatalogEntry>;
|
|
220
263
|
callAction<T = unknown>(action: string, input?: Record<string, unknown>, options?: {
|
|
221
264
|
confirm?: boolean;
|
|
265
|
+
resource?: {
|
|
266
|
+
resourceType: string;
|
|
267
|
+
resourceId: string;
|
|
268
|
+
};
|
|
222
269
|
}): Promise<T>;
|
|
223
270
|
/**
|
|
224
271
|
* Bundled generated registry for tooling that audits platform packaging, not
|
|
@@ -252,6 +299,24 @@ interface CredentialIntrospection {
|
|
|
252
299
|
} | null;
|
|
253
300
|
}
|
|
254
301
|
|
|
302
|
+
declare const ACTION_CATALOG_DIGEST_ALGORITHM: "sha256-v1";
|
|
303
|
+
interface TopoloActionDigestInput {
|
|
304
|
+
actionId?: string;
|
|
305
|
+
name: string;
|
|
306
|
+
method: string;
|
|
307
|
+
path: string;
|
|
308
|
+
permission?: string | null;
|
|
309
|
+
permissionName?: string | null;
|
|
310
|
+
authorizationMode?: string | null;
|
|
311
|
+
target?: string | null;
|
|
312
|
+
readOnly: boolean;
|
|
313
|
+
requiresConfirmation: boolean;
|
|
314
|
+
agentAccess?: string | null;
|
|
315
|
+
inputSchema: Record<string, unknown>;
|
|
316
|
+
outputSchema: Record<string, unknown>;
|
|
317
|
+
}
|
|
318
|
+
declare function digestTopoloActionCatalog(actions: TopoloActionDigestInput[], appId: string): Promise<string>;
|
|
319
|
+
|
|
255
320
|
declare const APP_API_URLS: {
|
|
256
321
|
readonly agent: "https://agent.topolo.app";
|
|
257
322
|
readonly auth: "https://auth.topolo.app";
|
|
@@ -1052,7 +1117,7 @@ declare const APPLICATIONS: {
|
|
|
1052
1117
|
readonly kind: "worker";
|
|
1053
1118
|
readonly apiUrl: "https://topolo.io";
|
|
1054
1119
|
readonly domains: readonly ["topolo.io"];
|
|
1055
|
-
readonly routes: readonly ["topolo.io", "www.topolo.io"];
|
|
1120
|
+
readonly routes: readonly ["one.topolo.io", "topolo.io", "www.topolo.io"];
|
|
1056
1121
|
readonly appId: null;
|
|
1057
1122
|
}];
|
|
1058
1123
|
};
|
|
@@ -1601,6 +1666,9 @@ declare class TopoloPermissionError extends TopoloSdkError {
|
|
|
1601
1666
|
readonly required: string[];
|
|
1602
1667
|
constructor(message: string, required: string[]);
|
|
1603
1668
|
}
|
|
1669
|
+
declare class TopoloConfirmationRequiredError extends TopoloSdkError {
|
|
1670
|
+
constructor(message: string);
|
|
1671
|
+
}
|
|
1604
1672
|
declare class TopoloHttpError extends TopoloSdkError {
|
|
1605
1673
|
readonly status: number;
|
|
1606
1674
|
readonly body: unknown;
|
|
@@ -2092,4 +2160,4 @@ declare function createTopolo(options: TopoloClientOptions): {
|
|
|
2092
2160
|
};
|
|
2093
2161
|
type Topolo = ReturnType<typeof createTopolo>;
|
|
2094
2162
|
|
|
2095
|
-
export { APPLICATIONS, APPLICATION_REQUIREMENTS, APPLICATION_REQUIREMENTS_VERSION, type AgentIdentity, type AppApiId, type ApplicationCatalogEntry, type ApplicationDeployTarget, type ApplicationId, type ApplicationRequirement, type ApplicationRequirementAudit, type ApplicationRequirementFinding, type ApplicationRequirementMigrationItem, type ApplicationRequirementScope, type ApplicationRequirementScore, type ApplicationRequirementStatus, type ApplicationRequirementsAuditReport, type CredentialIntrospection, type CrmContactSummary, CrmModule, DEFAULT_APP_URLS, type DeviceAuthorizationResponse, IdentityModule, type ListContactsOptions, type ListContactsResult, type OAuthHelperOptions, type P2PActionDetail, type P2PActionRequestInput, type P2PActionRequestResult, type P2PActionRow, type P2PActionRun, type P2PCapability, type P2PConnection, type P2PHold, type P2PLedgerEntry, P2PModule, type P2PPolicy, type P2PPricingModel, type P2PSettlementBatch, type P2PSettlementGroup, type PublishCapabilityInput, type RequestOptions, type ServiceCatalogUrlEntry, TOPOLO_WIDGET_ENDPOINT, TOPOLO_WIDGET_REFRESH_INTERVAL_MS, type TokenResponse, type Topolo, type TopoloActionCatalogEntry, type TopoloApiKeyResourceMetadata, TopoloAuthError, type TopoloChartWidget, TopoloClient, type TopoloClientOptions, type TopoloCredential, type TopoloDebugEvent, TopoloHttpError, type TopoloNotificationsWidget, TopoloOAuth, TopoloPermissionError, type TopoloQuickActionsWidget, type TopoloRecentActivityWidget, TopoloSdkError, type TopoloServiceCatalogEntry, type TopoloStatsWidget, type TopoloWidget, type TopoloWidgetActionItem, type TopoloWidgetActivityItem, type TopoloWidgetApiResponse, type TopoloWidgetBase, type TopoloWidgetConfig, type TopoloWidgetDraft, type TopoloWidgetMetric, type TopoloWidgetNotificationItem, type TopoloWidgetResponseOptions, type TopoloWidgetSnapshotMetadata, type TopoloWidgetSnapshotMetric, type TopoloWidgetType, type TopoloWidgetValidationResult, applicationRequirementScopes, auditAllApplicationRequirements, auditApplicationRequirements, createTopolo, createTopoloWidgetError, createTopoloWidgetResponse, defineTopoloChartWidget, defineTopoloNotificationsWidget, defineTopoloQuickActionsWidget, defineTopoloRecentActivityWidget, defineTopoloStatsWidget, requirementsForApplication, resolveCatalogServiceUrl, resolveServiceUrl, validateTopoloWidgetResponse };
|
|
2163
|
+
export { ACTION_CATALOG_DIGEST_ALGORITHM, APPLICATIONS, APPLICATION_REQUIREMENTS, APPLICATION_REQUIREMENTS_VERSION, type AgentIdentity, type AppApiId, type ApplicationCatalogEntry, type ApplicationDeployTarget, type ApplicationId, type ApplicationRequirement, type ApplicationRequirementAudit, type ApplicationRequirementFinding, type ApplicationRequirementMigrationItem, type ApplicationRequirementScope, type ApplicationRequirementScore, type ApplicationRequirementStatus, type ApplicationRequirementsAuditReport, type CredentialIntrospection, type CrmContactSummary, CrmModule, DEFAULT_APP_URLS, type DeviceAuthorizationResponse, IdentityModule, type ListContactsOptions, type ListContactsResult, type OAuthHelperOptions, type P2PActionDetail, type P2PActionRequestInput, type P2PActionRequestResult, type P2PActionRow, type P2PActionRun, type P2PCapability, type P2PConnection, type P2PHold, type P2PLedgerEntry, P2PModule, type P2PPolicy, type P2PPricingModel, type P2PSettlementBatch, type P2PSettlementGroup, type PublishCapabilityInput, type RequestOptions, type ServiceCatalogUrlEntry, TOPOLO_WIDGET_ENDPOINT, TOPOLO_WIDGET_REFRESH_INTERVAL_MS, type TokenResponse, type Topolo, type TopoloActionCatalogEntry, type TopoloActionCatalogSummary, type TopoloActionDigestInput, type TopoloApiKeyResourceMetadata, TopoloAuthError, type TopoloChartWidget, TopoloClient, type TopoloClientOptions, TopoloConfirmationRequiredError, type TopoloCredential, type TopoloDebugEvent, TopoloHttpError, type TopoloNotificationsWidget, TopoloOAuth, TopoloPermissionError, type TopoloQuickActionsWidget, type TopoloRecentActivityWidget, TopoloSdkError, type TopoloServiceCatalogEntry, type TopoloStatsWidget, type TopoloWidget, type TopoloWidgetActionItem, type TopoloWidgetActivityItem, type TopoloWidgetApiResponse, type TopoloWidgetBase, type TopoloWidgetConfig, type TopoloWidgetDraft, type TopoloWidgetMetric, type TopoloWidgetNotificationItem, type TopoloWidgetResponseOptions, type TopoloWidgetSnapshotMetadata, type TopoloWidgetSnapshotMetric, type TopoloWidgetType, type TopoloWidgetValidationResult, applicationRequirementScopes, auditAllApplicationRequirements, auditApplicationRequirements, createTopolo, createTopoloWidgetError, createTopoloWidgetResponse, defineTopoloChartWidget, defineTopoloNotificationsWidget, defineTopoloQuickActionsWidget, defineTopoloRecentActivityWidget, defineTopoloStatsWidget, digestTopoloActionCatalog, requirementsForApplication, resolveCatalogServiceUrl, resolveServiceUrl, validateTopoloWidgetResponse };
|
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,12 @@ interface TopoloClientOptions {
|
|
|
47
47
|
timeoutMs?: number;
|
|
48
48
|
/** Injected fetch, for testing. Defaults to global fetch. */
|
|
49
49
|
fetch?: typeof fetch;
|
|
50
|
+
/**
|
|
51
|
+
* Refresh a rejected access-token credential. When supplied, the client
|
|
52
|
+
* retries one 401 response with the returned credential. Concurrent 401s
|
|
53
|
+
* share one refresh operation. API keys are never refreshed.
|
|
54
|
+
*/
|
|
55
|
+
refreshCredential?: () => Promise<TopoloCredential | null>;
|
|
50
56
|
/**
|
|
51
57
|
* Observability hook. Fires once per request lifecycle (`request` at start,
|
|
52
58
|
* then exactly one of `response` or `error`). Safe to leave unset — off by
|
|
@@ -84,6 +90,8 @@ type TopoloDebugEvent = {
|
|
|
84
90
|
};
|
|
85
91
|
interface RequestOptions {
|
|
86
92
|
service: string;
|
|
93
|
+
/** Catalog-resolved origin for an action target. */
|
|
94
|
+
baseUrl?: string;
|
|
87
95
|
path: string;
|
|
88
96
|
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
89
97
|
query?: Record<string, string | number | boolean | undefined>;
|
|
@@ -129,6 +137,8 @@ interface TopoloApiKeyResourceMetadata {
|
|
|
129
137
|
}
|
|
130
138
|
interface TopoloActionCatalogEntry {
|
|
131
139
|
actionId: string;
|
|
140
|
+
target: string | null;
|
|
141
|
+
apiBaseUrl: string | null;
|
|
132
142
|
name: string;
|
|
133
143
|
toolName: string | null;
|
|
134
144
|
title: string;
|
|
@@ -140,6 +150,8 @@ interface TopoloActionCatalogEntry {
|
|
|
140
150
|
path: string;
|
|
141
151
|
permissionName: string;
|
|
142
152
|
requiredPermission: string;
|
|
153
|
+
/** Static catalog permission or target-enforced input-dependent authorization. */
|
|
154
|
+
authorizationMode?: 'static' | 'runtime';
|
|
143
155
|
inputSchema: Record<string, unknown>;
|
|
144
156
|
outputSchema: Record<string, unknown>;
|
|
145
157
|
readOnly: boolean;
|
|
@@ -150,17 +162,39 @@ interface TopoloActionCatalogEntry {
|
|
|
150
162
|
status: string | null;
|
|
151
163
|
sourceRevision: string | null;
|
|
152
164
|
}
|
|
165
|
+
interface TopoloCatalogPage {
|
|
166
|
+
nextCursor: string | null;
|
|
167
|
+
hasMore: boolean;
|
|
168
|
+
}
|
|
169
|
+
interface TopoloServiceCatalogPage {
|
|
170
|
+
services: TopoloServiceCatalogEntry[];
|
|
171
|
+
page: TopoloCatalogPage;
|
|
172
|
+
}
|
|
173
|
+
interface TopoloActionCatalogPage {
|
|
174
|
+
actions: TopoloActionCatalogEntry[];
|
|
175
|
+
page: TopoloCatalogPage;
|
|
176
|
+
}
|
|
177
|
+
interface TopoloActionCatalogSummary {
|
|
178
|
+
algorithm: 'sha256-v1';
|
|
179
|
+
digest: string;
|
|
180
|
+
actionCount: number;
|
|
181
|
+
}
|
|
182
|
+
interface TopoloCatalogSearchOptions {
|
|
183
|
+
query?: string;
|
|
184
|
+
cursor?: string;
|
|
185
|
+
limit?: number;
|
|
186
|
+
}
|
|
153
187
|
declare class TopoloClient {
|
|
154
|
-
private
|
|
188
|
+
private credential;
|
|
155
189
|
private readonly agent;
|
|
156
190
|
private readonly serviceUrls?;
|
|
157
191
|
private readonly appIds?;
|
|
158
192
|
private readonly requireConfirmForWrites;
|
|
159
193
|
private readonly timeoutMs;
|
|
160
194
|
private readonly fetchImpl;
|
|
195
|
+
private readonly refreshCredential?;
|
|
196
|
+
private refreshInFlight;
|
|
161
197
|
private readonly debug?;
|
|
162
|
-
private serviceCatalogCache;
|
|
163
|
-
private actionCatalogCache;
|
|
164
198
|
/**
|
|
165
199
|
* Process-wide cache for slug → app-id lookups. Keyed by
|
|
166
200
|
* `${authBaseUrl}|${slug}` so multiple `TopoloClient` instances pointing at
|
|
@@ -181,6 +215,7 @@ declare class TopoloClient {
|
|
|
181
215
|
* use and for the generic `topolo api` / MCP passthrough tool.
|
|
182
216
|
*/
|
|
183
217
|
request<T = unknown>(opts: RequestOptions): Promise<T>;
|
|
218
|
+
private refreshRejectedAccessToken;
|
|
184
219
|
private resolveRequestService;
|
|
185
220
|
private resolveLiveCallableService;
|
|
186
221
|
/**
|
|
@@ -206,19 +241,31 @@ declare class TopoloClient {
|
|
|
206
241
|
* The live Auth catalog is the authority because it is scoped to the caller's
|
|
207
242
|
* organization and effective permissions.
|
|
208
243
|
*/
|
|
209
|
-
|
|
244
|
+
searchServices(options?: TopoloCatalogSearchOptions): Promise<TopoloServiceCatalogPage>;
|
|
245
|
+
/** @deprecated Prefer searchServices() so callers retain the continuation cursor. */
|
|
246
|
+
listServices(options?: TopoloCatalogSearchOptions): Promise<TopoloServiceCatalogEntry[]>;
|
|
247
|
+
getService(application: string): Promise<TopoloServiceCatalogEntry>;
|
|
210
248
|
/**
|
|
211
249
|
* List callable actions from the live registry-canonical catalog (definitions
|
|
212
250
|
* from the Catalog registry, scoping from Auth). The response is scoped to the
|
|
213
251
|
* caller's organization and effective permissions; no bundled/static app
|
|
214
252
|
* action list is used as an authorization source.
|
|
215
253
|
*/
|
|
216
|
-
|
|
217
|
-
service
|
|
254
|
+
searchActions(options: TopoloCatalogSearchOptions & {
|
|
255
|
+
service: string;
|
|
256
|
+
}): Promise<TopoloActionCatalogPage>;
|
|
257
|
+
getActionCatalogSummary(service: string): Promise<TopoloActionCatalogSummary>;
|
|
258
|
+
/** @deprecated Prefer searchActions() so callers retain the continuation cursor. */
|
|
259
|
+
listActions(options?: TopoloCatalogSearchOptions & {
|
|
260
|
+
service: string;
|
|
218
261
|
}): Promise<TopoloActionCatalogEntry[]>;
|
|
219
262
|
getAction(action: string): Promise<TopoloActionCatalogEntry>;
|
|
220
263
|
callAction<T = unknown>(action: string, input?: Record<string, unknown>, options?: {
|
|
221
264
|
confirm?: boolean;
|
|
265
|
+
resource?: {
|
|
266
|
+
resourceType: string;
|
|
267
|
+
resourceId: string;
|
|
268
|
+
};
|
|
222
269
|
}): Promise<T>;
|
|
223
270
|
/**
|
|
224
271
|
* Bundled generated registry for tooling that audits platform packaging, not
|
|
@@ -252,6 +299,24 @@ interface CredentialIntrospection {
|
|
|
252
299
|
} | null;
|
|
253
300
|
}
|
|
254
301
|
|
|
302
|
+
declare const ACTION_CATALOG_DIGEST_ALGORITHM: "sha256-v1";
|
|
303
|
+
interface TopoloActionDigestInput {
|
|
304
|
+
actionId?: string;
|
|
305
|
+
name: string;
|
|
306
|
+
method: string;
|
|
307
|
+
path: string;
|
|
308
|
+
permission?: string | null;
|
|
309
|
+
permissionName?: string | null;
|
|
310
|
+
authorizationMode?: string | null;
|
|
311
|
+
target?: string | null;
|
|
312
|
+
readOnly: boolean;
|
|
313
|
+
requiresConfirmation: boolean;
|
|
314
|
+
agentAccess?: string | null;
|
|
315
|
+
inputSchema: Record<string, unknown>;
|
|
316
|
+
outputSchema: Record<string, unknown>;
|
|
317
|
+
}
|
|
318
|
+
declare function digestTopoloActionCatalog(actions: TopoloActionDigestInput[], appId: string): Promise<string>;
|
|
319
|
+
|
|
255
320
|
declare const APP_API_URLS: {
|
|
256
321
|
readonly agent: "https://agent.topolo.app";
|
|
257
322
|
readonly auth: "https://auth.topolo.app";
|
|
@@ -1052,7 +1117,7 @@ declare const APPLICATIONS: {
|
|
|
1052
1117
|
readonly kind: "worker";
|
|
1053
1118
|
readonly apiUrl: "https://topolo.io";
|
|
1054
1119
|
readonly domains: readonly ["topolo.io"];
|
|
1055
|
-
readonly routes: readonly ["topolo.io", "www.topolo.io"];
|
|
1120
|
+
readonly routes: readonly ["one.topolo.io", "topolo.io", "www.topolo.io"];
|
|
1056
1121
|
readonly appId: null;
|
|
1057
1122
|
}];
|
|
1058
1123
|
};
|
|
@@ -1601,6 +1666,9 @@ declare class TopoloPermissionError extends TopoloSdkError {
|
|
|
1601
1666
|
readonly required: string[];
|
|
1602
1667
|
constructor(message: string, required: string[]);
|
|
1603
1668
|
}
|
|
1669
|
+
declare class TopoloConfirmationRequiredError extends TopoloSdkError {
|
|
1670
|
+
constructor(message: string);
|
|
1671
|
+
}
|
|
1604
1672
|
declare class TopoloHttpError extends TopoloSdkError {
|
|
1605
1673
|
readonly status: number;
|
|
1606
1674
|
readonly body: unknown;
|
|
@@ -2092,4 +2160,4 @@ declare function createTopolo(options: TopoloClientOptions): {
|
|
|
2092
2160
|
};
|
|
2093
2161
|
type Topolo = ReturnType<typeof createTopolo>;
|
|
2094
2162
|
|
|
2095
|
-
export { APPLICATIONS, APPLICATION_REQUIREMENTS, APPLICATION_REQUIREMENTS_VERSION, type AgentIdentity, type AppApiId, type ApplicationCatalogEntry, type ApplicationDeployTarget, type ApplicationId, type ApplicationRequirement, type ApplicationRequirementAudit, type ApplicationRequirementFinding, type ApplicationRequirementMigrationItem, type ApplicationRequirementScope, type ApplicationRequirementScore, type ApplicationRequirementStatus, type ApplicationRequirementsAuditReport, type CredentialIntrospection, type CrmContactSummary, CrmModule, DEFAULT_APP_URLS, type DeviceAuthorizationResponse, IdentityModule, type ListContactsOptions, type ListContactsResult, type OAuthHelperOptions, type P2PActionDetail, type P2PActionRequestInput, type P2PActionRequestResult, type P2PActionRow, type P2PActionRun, type P2PCapability, type P2PConnection, type P2PHold, type P2PLedgerEntry, P2PModule, type P2PPolicy, type P2PPricingModel, type P2PSettlementBatch, type P2PSettlementGroup, type PublishCapabilityInput, type RequestOptions, type ServiceCatalogUrlEntry, TOPOLO_WIDGET_ENDPOINT, TOPOLO_WIDGET_REFRESH_INTERVAL_MS, type TokenResponse, type Topolo, type TopoloActionCatalogEntry, type TopoloApiKeyResourceMetadata, TopoloAuthError, type TopoloChartWidget, TopoloClient, type TopoloClientOptions, type TopoloCredential, type TopoloDebugEvent, TopoloHttpError, type TopoloNotificationsWidget, TopoloOAuth, TopoloPermissionError, type TopoloQuickActionsWidget, type TopoloRecentActivityWidget, TopoloSdkError, type TopoloServiceCatalogEntry, type TopoloStatsWidget, type TopoloWidget, type TopoloWidgetActionItem, type TopoloWidgetActivityItem, type TopoloWidgetApiResponse, type TopoloWidgetBase, type TopoloWidgetConfig, type TopoloWidgetDraft, type TopoloWidgetMetric, type TopoloWidgetNotificationItem, type TopoloWidgetResponseOptions, type TopoloWidgetSnapshotMetadata, type TopoloWidgetSnapshotMetric, type TopoloWidgetType, type TopoloWidgetValidationResult, applicationRequirementScopes, auditAllApplicationRequirements, auditApplicationRequirements, createTopolo, createTopoloWidgetError, createTopoloWidgetResponse, defineTopoloChartWidget, defineTopoloNotificationsWidget, defineTopoloQuickActionsWidget, defineTopoloRecentActivityWidget, defineTopoloStatsWidget, requirementsForApplication, resolveCatalogServiceUrl, resolveServiceUrl, validateTopoloWidgetResponse };
|
|
2163
|
+
export { ACTION_CATALOG_DIGEST_ALGORITHM, APPLICATIONS, APPLICATION_REQUIREMENTS, APPLICATION_REQUIREMENTS_VERSION, type AgentIdentity, type AppApiId, type ApplicationCatalogEntry, type ApplicationDeployTarget, type ApplicationId, type ApplicationRequirement, type ApplicationRequirementAudit, type ApplicationRequirementFinding, type ApplicationRequirementMigrationItem, type ApplicationRequirementScope, type ApplicationRequirementScore, type ApplicationRequirementStatus, type ApplicationRequirementsAuditReport, type CredentialIntrospection, type CrmContactSummary, CrmModule, DEFAULT_APP_URLS, type DeviceAuthorizationResponse, IdentityModule, type ListContactsOptions, type ListContactsResult, type OAuthHelperOptions, type P2PActionDetail, type P2PActionRequestInput, type P2PActionRequestResult, type P2PActionRow, type P2PActionRun, type P2PCapability, type P2PConnection, type P2PHold, type P2PLedgerEntry, P2PModule, type P2PPolicy, type P2PPricingModel, type P2PSettlementBatch, type P2PSettlementGroup, type PublishCapabilityInput, type RequestOptions, type ServiceCatalogUrlEntry, TOPOLO_WIDGET_ENDPOINT, TOPOLO_WIDGET_REFRESH_INTERVAL_MS, type TokenResponse, type Topolo, type TopoloActionCatalogEntry, type TopoloActionCatalogSummary, type TopoloActionDigestInput, type TopoloApiKeyResourceMetadata, TopoloAuthError, type TopoloChartWidget, TopoloClient, type TopoloClientOptions, TopoloConfirmationRequiredError, type TopoloCredential, type TopoloDebugEvent, TopoloHttpError, type TopoloNotificationsWidget, TopoloOAuth, TopoloPermissionError, type TopoloQuickActionsWidget, type TopoloRecentActivityWidget, TopoloSdkError, type TopoloServiceCatalogEntry, type TopoloStatsWidget, type TopoloWidget, type TopoloWidgetActionItem, type TopoloWidgetActivityItem, type TopoloWidgetApiResponse, type TopoloWidgetBase, type TopoloWidgetConfig, type TopoloWidgetDraft, type TopoloWidgetMetric, type TopoloWidgetNotificationItem, type TopoloWidgetResponseOptions, type TopoloWidgetSnapshotMetadata, type TopoloWidgetSnapshotMetric, type TopoloWidgetType, type TopoloWidgetValidationResult, applicationRequirementScopes, auditAllApplicationRequirements, auditApplicationRequirements, createTopolo, createTopoloWidgetError, createTopoloWidgetResponse, defineTopoloChartWidget, defineTopoloNotificationsWidget, defineTopoloQuickActionsWidget, defineTopoloRecentActivityWidget, defineTopoloStatsWidget, digestTopoloActionCatalog, requirementsForApplication, resolveCatalogServiceUrl, resolveServiceUrl, validateTopoloWidgetResponse };
|