@parall/sdk 1.55.4 → 1.55.5
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/attachment-client.d.ts +14 -0
- package/dist/attachment-client.d.ts.map +1 -0
- package/dist/attachment-client.js +38 -0
- package/dist/attachment-endpoints.d.ts +7 -0
- package/dist/attachment-endpoints.d.ts.map +1 -0
- package/dist/attachment-endpoints.js +8 -0
- package/dist/attachment-types.d.ts +33 -0
- package/dist/attachment-types.d.ts.map +1 -0
- package/dist/attachment-types.js +1 -0
- package/dist/client.d.ts +59 -11
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +120 -14
- package/dist/constants.d.ts +73 -54
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +21 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/types.d.ts +361 -23
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +12 -0
- package/package.json +1 -1
- package/src/attachment-client.ts +56 -0
- package/src/attachment-endpoints.ts +8 -0
- package/src/attachment-types.ts +36 -0
- package/src/client.ts +267 -27
- package/src/constants.ts +36 -3
- package/src/index.ts +1 -0
- package/src/types.ts +429 -25
package/src/client.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type BrowserViewerRequestOptions, browserViewerRequestOptions } from './browser-viewer.js';
|
|
2
2
|
import { API_BASE, ENDPOINTS, WIKI_BASE } from './constants.js';
|
|
3
|
-
import {
|
|
3
|
+
import { AttachmentClient } from './attachment-client.js';
|
|
4
4
|
import type {
|
|
5
5
|
AddTeamMemberRequest,
|
|
6
6
|
AgentClip,
|
|
@@ -30,6 +30,17 @@ import type {
|
|
|
30
30
|
BrowserProfileLifecycleRequest,
|
|
31
31
|
BrowserProfileListItem,
|
|
32
32
|
BrowserProfileStatus,
|
|
33
|
+
BrowserAlias,
|
|
34
|
+
BrowserAliasCreateRequest,
|
|
35
|
+
BrowserAliasDeleteProof,
|
|
36
|
+
BrowserAliasDeleteRequest,
|
|
37
|
+
BrowserAliasRenameRequest,
|
|
38
|
+
BrowserAliasReadinessCheckReceipt,
|
|
39
|
+
BrowserAliasReadinessCheckRequest,
|
|
40
|
+
BrowserAliasExecutionRequest,
|
|
41
|
+
BrowserAliasExecutionReceipt,
|
|
42
|
+
BrowserAliasGrantReplaceRequest,
|
|
43
|
+
BrowserAliasGrantSet,
|
|
33
44
|
BrowserRuntimeStatus,
|
|
34
45
|
BrowserViewerCommandRequest,
|
|
35
46
|
BrowserViewerCommandResponse,
|
|
@@ -63,6 +74,8 @@ import type {
|
|
|
63
74
|
CompleteRuntimeAuthSessionRequest,
|
|
64
75
|
ComputePricing,
|
|
65
76
|
ComputePricingResponse,
|
|
77
|
+
ManagedBrowserAliasInfo,
|
|
78
|
+
ManagedBrowserAliasSummary,
|
|
66
79
|
CopyWikiFileRequest,
|
|
67
80
|
CopyWikiFileResponse,
|
|
68
81
|
CreateAgentRequest,
|
|
@@ -105,6 +118,9 @@ import type {
|
|
|
105
118
|
EdgeOnboardingStatus,
|
|
106
119
|
EdgePlacement,
|
|
107
120
|
EdgeProfileProxyStatus,
|
|
121
|
+
EdgeProfileOperationConfirmRequest,
|
|
122
|
+
EdgeProfileOperationReceipt,
|
|
123
|
+
EdgeProfileOperationRequest,
|
|
108
124
|
EdgeViewerCommandRequest,
|
|
109
125
|
EdgeViewerCommandResponse,
|
|
110
126
|
ExecEdgeClipRequest,
|
|
@@ -119,7 +135,6 @@ import type {
|
|
|
119
135
|
ExternalTriggerSchema,
|
|
120
136
|
FeatureFlagsResponse,
|
|
121
137
|
FilesystemEntry,
|
|
122
|
-
FileUrlResponse,
|
|
123
138
|
GrantBrowserProfileConsentRequest,
|
|
124
139
|
InboxItem,
|
|
125
140
|
InboxUnreadCountResponse,
|
|
@@ -161,8 +176,6 @@ import type {
|
|
|
161
176
|
PaginatedResponse,
|
|
162
177
|
PlatformConfigResponse,
|
|
163
178
|
PlatformModelsResponse,
|
|
164
|
-
PresignResponse,
|
|
165
|
-
PresignUploadRequest,
|
|
166
179
|
PublishRegistryClipRequest,
|
|
167
180
|
PushSubscribeRequest,
|
|
168
181
|
ReactionSummary,
|
|
@@ -234,6 +247,8 @@ import type {
|
|
|
234
247
|
UpdateWikiChangesetRequest,
|
|
235
248
|
User,
|
|
236
249
|
Wiki,
|
|
250
|
+
WikiAccessPolicy,
|
|
251
|
+
WikiAccessPolicyMember,
|
|
237
252
|
WikiAccessStatus,
|
|
238
253
|
WikiAnchorResolveRequest,
|
|
239
254
|
WikiAnchorResolveResponse,
|
|
@@ -279,7 +294,7 @@ export interface ParallClientOptions {
|
|
|
279
294
|
getFeatureFlagOverrides?: () => string | null | undefined;
|
|
280
295
|
}
|
|
281
296
|
|
|
282
|
-
export class ParallClient extends
|
|
297
|
+
export class ParallClient extends AttachmentClient {
|
|
283
298
|
private baseUrl: string;
|
|
284
299
|
private wikiBaseUrl: string;
|
|
285
300
|
private token: string | null;
|
|
@@ -1251,25 +1266,6 @@ export class ParallClient extends WechatClient {
|
|
|
1251
1266
|
return res.reactions;
|
|
1252
1267
|
}
|
|
1253
1268
|
|
|
1254
|
-
// ---- File Upload ----
|
|
1255
|
-
|
|
1256
|
-
async getUploadPresignUrl(orgId: string, req: PresignUploadRequest): Promise<PresignResponse> {
|
|
1257
|
-
return this.request('POST', ENDPOINTS.UPLOAD_PRESIGN(orgId), req);
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
async completeUpload(orgId: string, attachmentId: string): Promise<{ attachment_id: string }> {
|
|
1261
|
-
return this.request('POST', ENDPOINTS.UPLOAD_COMPLETE(orgId), { attachment_id: attachmentId });
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
async getFileUrl(id: string, opts?: { download?: boolean }): Promise<FileUrlResponse> {
|
|
1265
|
-
return this.request(
|
|
1266
|
-
'GET',
|
|
1267
|
-
ENDPOINTS.FILE(id),
|
|
1268
|
-
undefined,
|
|
1269
|
-
opts?.download ? { download: true } : undefined,
|
|
1270
|
-
);
|
|
1271
|
-
}
|
|
1272
|
-
|
|
1273
1269
|
// ---- Approvals ----
|
|
1274
1270
|
|
|
1275
1271
|
async getApproval(id: string): Promise<Approval> {
|
|
@@ -1280,8 +1276,22 @@ export class ParallClient extends WechatClient {
|
|
|
1280
1276
|
return this.request('POST', ENDPOINTS.APPROVAL_REQUESTS(orgId), req);
|
|
1281
1277
|
}
|
|
1282
1278
|
|
|
1283
|
-
async decideApproval(
|
|
1284
|
-
|
|
1279
|
+
async decideApproval(
|
|
1280
|
+
id: string,
|
|
1281
|
+
decision: 'approve' | 'reject',
|
|
1282
|
+
reason?: string,
|
|
1283
|
+
): Promise<Approval> {
|
|
1284
|
+
if (decision === 'approve' && reason?.trim()) {
|
|
1285
|
+
throw new ApiError(
|
|
1286
|
+
400,
|
|
1287
|
+
'Approval reason is only allowed for rejection decisions',
|
|
1288
|
+
'INVALID_DECISION_REASON',
|
|
1289
|
+
);
|
|
1290
|
+
}
|
|
1291
|
+
return this.request('POST', ENDPOINTS.APPROVAL_DECIDE(id), {
|
|
1292
|
+
decision,
|
|
1293
|
+
...(decision === 'reject' && reason !== undefined ? { reason } : {}),
|
|
1294
|
+
});
|
|
1285
1295
|
}
|
|
1286
1296
|
|
|
1287
1297
|
async cancelApproval(id: string): Promise<void> {
|
|
@@ -2691,7 +2701,7 @@ export class ParallClient extends WechatClient {
|
|
|
2691
2701
|
async getWikiTree(
|
|
2692
2702
|
orgId: string,
|
|
2693
2703
|
wikiId: string,
|
|
2694
|
-
params?: { ref?: string; path?: string },
|
|
2704
|
+
params?: { ref?: string; path?: string; last_commit?: boolean },
|
|
2695
2705
|
): Promise<WikiTreeResponse> {
|
|
2696
2706
|
return this.request('GET', ENDPOINTS.WIKI_TREE(orgId, wikiId), undefined, params);
|
|
2697
2707
|
}
|
|
@@ -2834,6 +2844,23 @@ export class ParallClient extends WechatClient {
|
|
|
2834
2844
|
return res.data.map(normalizeWikiChangeset);
|
|
2835
2845
|
}
|
|
2836
2846
|
|
|
2847
|
+
/** Org-wide changeset listing across every wiki the caller can read.
|
|
2848
|
+
* Server default (no `status`) is the pending set: proposed,
|
|
2849
|
+
* approval_pending, approved. */
|
|
2850
|
+
async getOrgWikiChangesets(
|
|
2851
|
+
orgId: string,
|
|
2852
|
+
opts?: { status?: WikiChangeset['status'][] },
|
|
2853
|
+
): Promise<WikiChangeset[]> {
|
|
2854
|
+
const params = new URLSearchParams();
|
|
2855
|
+
for (const s of opts?.status ?? []) params.append('status', s);
|
|
2856
|
+
const qs = params.toString();
|
|
2857
|
+
const res = await this.request<{ data: WikiChangeset[] | null }>(
|
|
2858
|
+
'GET',
|
|
2859
|
+
`${ENDPOINTS.WIKI_ORG_CHANGESETS(orgId)}${qs ? `?${qs}` : ''}`,
|
|
2860
|
+
);
|
|
2861
|
+
return (res.data ?? []).map(normalizeWikiChangeset);
|
|
2862
|
+
}
|
|
2863
|
+
|
|
2837
2864
|
async getWikiChangeset(
|
|
2838
2865
|
orgId: string,
|
|
2839
2866
|
wikiId: string,
|
|
@@ -3019,6 +3046,59 @@ export class ParallClient extends WechatClient {
|
|
|
3019
3046
|
);
|
|
3020
3047
|
}
|
|
3021
3048
|
|
|
3049
|
+
// ---- Wiki membership projection (who-can-access, invites, join/leave) ----
|
|
3050
|
+
|
|
3051
|
+
async getWikiAccessPolicy(orgId: string, wikiId: string, path = ''): Promise<WikiAccessPolicy> {
|
|
3052
|
+
return this.request(
|
|
3053
|
+
'GET',
|
|
3054
|
+
ENDPOINTS.WIKI_ACCESS_POLICY(orgId, wikiId),
|
|
3055
|
+
undefined,
|
|
3056
|
+
path ? { path } : undefined,
|
|
3057
|
+
);
|
|
3058
|
+
}
|
|
3059
|
+
|
|
3060
|
+
async putWikiAccessPolicy(
|
|
3061
|
+
orgId: string,
|
|
3062
|
+
wikiId: string,
|
|
3063
|
+
policy: WikiAccessPolicy,
|
|
3064
|
+
): Promise<WikiAccessPolicy> {
|
|
3065
|
+
return this.request('PUT', ENDPOINTS.WIKI_ACCESS_POLICY(orgId, wikiId), policy);
|
|
3066
|
+
}
|
|
3067
|
+
|
|
3068
|
+
/** Add-only invite (viewer/editor); allowed for managers, and for editors
|
|
3069
|
+
* when the library enables editors_can_invite. */
|
|
3070
|
+
async addWikiMember(
|
|
3071
|
+
orgId: string,
|
|
3072
|
+
wikiId: string,
|
|
3073
|
+
subject: string,
|
|
3074
|
+
role?: 'viewer' | 'editor',
|
|
3075
|
+
): Promise<void> {
|
|
3076
|
+
await this.request('POST', ENDPOINTS.WIKI_ACCESS_POLICY_MEMBERS(orgId, wikiId), {
|
|
3077
|
+
subject,
|
|
3078
|
+
role,
|
|
3079
|
+
});
|
|
3080
|
+
}
|
|
3081
|
+
|
|
3082
|
+
/** Join a PUBLIC library as an explicit member (lands at the library's
|
|
3083
|
+
* default role). Restricted libraries answer 409 JOIN_REQUIRES_REQUEST —
|
|
3084
|
+
* go through createWikiAccessRequest instead. */
|
|
3085
|
+
async joinWiki(orgId: string, wikiId: string): Promise<void> {
|
|
3086
|
+
await this.request('POST', ENDPOINTS.WIKI_MEMBERSHIP_SELF(orgId, wikiId));
|
|
3087
|
+
}
|
|
3088
|
+
|
|
3089
|
+
/** Remove the caller's explicit membership (team-granted membership stays). */
|
|
3090
|
+
async leaveWiki(orgId: string, wikiId: string): Promise<void> {
|
|
3091
|
+
await this.request('DELETE', ENDPOINTS.WIKI_MEMBERSHIP_SELF(orgId, wikiId));
|
|
3092
|
+
}
|
|
3093
|
+
|
|
3094
|
+
async getWikiMembers(orgId: string, wikiId: string): Promise<WikiAccessPolicyMember[]> {
|
|
3095
|
+
const res = await this.request<{ data: WikiAccessPolicyMember[] | null }>(
|
|
3096
|
+
'GET',
|
|
3097
|
+
ENDPOINTS.WIKI_MEMBERS(orgId, wikiId),
|
|
3098
|
+
);
|
|
3099
|
+
return res.data ?? [];
|
|
3100
|
+
}
|
|
3101
|
+
|
|
3022
3102
|
async createWikiAccessRequest(
|
|
3023
3103
|
orgId: string,
|
|
3024
3104
|
wikiId: string,
|
|
@@ -3750,6 +3830,166 @@ export class ParallClient extends WechatClient {
|
|
|
3750
3830
|
return this.request('GET', ENDPOINTS.ORG_EDGE_PROFILES(orgId, edgeId));
|
|
3751
3831
|
}
|
|
3752
3832
|
|
|
3833
|
+
/** Start one durable Local BYOC Profile operation. Network-unknown callers
|
|
3834
|
+
* must retry with the same key or recover by operation id; a different body
|
|
3835
|
+
* under the same key is rejected. */
|
|
3836
|
+
async createEdgeProfileOperation(
|
|
3837
|
+
orgId: string,
|
|
3838
|
+
edgeId: string,
|
|
3839
|
+
request: EdgeProfileOperationRequest,
|
|
3840
|
+
idempotencyKey: string,
|
|
3841
|
+
): Promise<EdgeProfileOperationReceipt> {
|
|
3842
|
+
return this.request(
|
|
3843
|
+
'POST',
|
|
3844
|
+
ENDPOINTS.ORG_EDGE_PROFILE_OPERATIONS(orgId, edgeId),
|
|
3845
|
+
request,
|
|
3846
|
+
undefined,
|
|
3847
|
+
false,
|
|
3848
|
+
{ headers: { 'Idempotency-Key': idempotencyKey } },
|
|
3849
|
+
);
|
|
3850
|
+
}
|
|
3851
|
+
|
|
3852
|
+
/** Strong-confirm the exact durable Delete impact. A changed impact returns
|
|
3853
|
+
* PROFILE_DELETE_IMPACT_CHANGED with a replacement receipt in
|
|
3854
|
+
* `ApiError.extras.details.operation`. */
|
|
3855
|
+
async confirmEdgeProfileOperation(
|
|
3856
|
+
orgId: string,
|
|
3857
|
+
edgeId: string,
|
|
3858
|
+
operationId: string,
|
|
3859
|
+
request: EdgeProfileOperationConfirmRequest,
|
|
3860
|
+
): Promise<EdgeProfileOperationReceipt> {
|
|
3861
|
+
return this.request(
|
|
3862
|
+
'POST',
|
|
3863
|
+
ENDPOINTS.ORG_EDGE_PROFILE_OPERATION_CONFIRM(orgId, edgeId, operationId),
|
|
3864
|
+
request,
|
|
3865
|
+
);
|
|
3866
|
+
}
|
|
3867
|
+
|
|
3868
|
+
/** Sole read/recovery surface. The server may reconcile an already durable
|
|
3869
|
+
* dispatch/finalization while returning this receipt. */
|
|
3870
|
+
async getEdgeProfileOperation(
|
|
3871
|
+
orgId: string,
|
|
3872
|
+
edgeId: string,
|
|
3873
|
+
operationId: string,
|
|
3874
|
+
): Promise<EdgeProfileOperationReceipt> {
|
|
3875
|
+
return this.request('GET', ENDPOINTS.ORG_EDGE_PROFILE_OPERATION(orgId, edgeId, operationId));
|
|
3876
|
+
}
|
|
3877
|
+
|
|
3878
|
+
/** Create and atomically materialize one Local BYOC Browser Alias. A replay
|
|
3879
|
+
* with the same idempotency key and body returns the original stable ccn_. */
|
|
3880
|
+
async createBrowserAlias(
|
|
3881
|
+
orgId: string,
|
|
3882
|
+
request: BrowserAliasCreateRequest,
|
|
3883
|
+
): Promise<BrowserAlias> {
|
|
3884
|
+
return this.request('POST', ENDPOINTS.ORG_BROWSER_ALIASES(orgId), request);
|
|
3885
|
+
}
|
|
3886
|
+
|
|
3887
|
+
async listBrowserAliases(orgId: string): Promise<BrowserAlias[]> {
|
|
3888
|
+
return this.request('GET', ENDPOINTS.ORG_BROWSER_ALIASES(orgId));
|
|
3889
|
+
}
|
|
3890
|
+
|
|
3891
|
+
async getBrowserAlias(orgId: string, aliasId: string): Promise<BrowserAlias> {
|
|
3892
|
+
return this.request('GET', ENDPOINTS.ORG_BROWSER_ALIAS(orgId, aliasId));
|
|
3893
|
+
}
|
|
3894
|
+
|
|
3895
|
+
async renameBrowserAlias(
|
|
3896
|
+
orgId: string,
|
|
3897
|
+
aliasId: string,
|
|
3898
|
+
request: BrowserAliasRenameRequest,
|
|
3899
|
+
): Promise<BrowserAlias> {
|
|
3900
|
+
return this.request('PATCH', ENDPOINTS.ORG_BROWSER_ALIAS(orgId, aliasId), request);
|
|
3901
|
+
}
|
|
3902
|
+
|
|
3903
|
+
async deleteBrowserAlias(
|
|
3904
|
+
orgId: string,
|
|
3905
|
+
aliasId: string,
|
|
3906
|
+
request: BrowserAliasDeleteRequest,
|
|
3907
|
+
): Promise<BrowserAliasDeleteProof> {
|
|
3908
|
+
return this.request('DELETE', ENDPOINTS.ORG_BROWSER_ALIAS(orgId, aliasId), request);
|
|
3909
|
+
}
|
|
3910
|
+
|
|
3911
|
+
/** Start one durable readiness check. The key is carried as the standard
|
|
3912
|
+
* Idempotency-Key header; the request body is intentionally empty. */
|
|
3913
|
+
async createBrowserAliasReadinessCheck(
|
|
3914
|
+
orgId: string,
|
|
3915
|
+
aliasId: string,
|
|
3916
|
+
request: BrowserAliasReadinessCheckRequest,
|
|
3917
|
+
): Promise<BrowserAliasReadinessCheckReceipt> {
|
|
3918
|
+
return this.request(
|
|
3919
|
+
'POST',
|
|
3920
|
+
ENDPOINTS.ORG_BROWSER_ALIAS_READINESS_CHECKS(orgId, aliasId),
|
|
3921
|
+
undefined,
|
|
3922
|
+
undefined,
|
|
3923
|
+
false,
|
|
3924
|
+
{ headers: { 'Idempotency-Key': request.idempotency_key } },
|
|
3925
|
+
);
|
|
3926
|
+
}
|
|
3927
|
+
|
|
3928
|
+
/** Sole durable recovery surface for one readiness request. */
|
|
3929
|
+
async getBrowserAliasReadinessCheck(
|
|
3930
|
+
orgId: string,
|
|
3931
|
+
aliasId: string,
|
|
3932
|
+
checkId: string,
|
|
3933
|
+
): Promise<BrowserAliasReadinessCheckReceipt> {
|
|
3934
|
+
return this.request(
|
|
3935
|
+
'GET',
|
|
3936
|
+
ENDPOINTS.ORG_BROWSER_ALIAS_READINESS_CHECK(orgId, aliasId, checkId),
|
|
3937
|
+
);
|
|
3938
|
+
}
|
|
3939
|
+
|
|
3940
|
+
/** Organization Owner view. Hashes, reviewed snapshots and deltas are
|
|
3941
|
+
* intentionally available only on this human-JWT management surface. */
|
|
3942
|
+
async listBrowserAliasGrants(orgId: string, keyId: string): Promise<BrowserAliasGrantSet[]> {
|
|
3943
|
+
return this.request('GET', ENDPOINTS.ORG_API_KEY_BROWSER_ALIAS_GRANTS(orgId, keyId));
|
|
3944
|
+
}
|
|
3945
|
+
|
|
3946
|
+
async getBrowserAliasGrant(
|
|
3947
|
+
orgId: string,
|
|
3948
|
+
keyId: string,
|
|
3949
|
+
aliasId: string,
|
|
3950
|
+
): Promise<BrowserAliasGrantSet> {
|
|
3951
|
+
return this.request('GET', ENDPOINTS.ORG_API_KEY_BROWSER_ALIAS_GRANT(orgId, keyId, aliasId));
|
|
3952
|
+
}
|
|
3953
|
+
|
|
3954
|
+
async replaceBrowserAliasGrant(
|
|
3955
|
+
orgId: string,
|
|
3956
|
+
keyId: string,
|
|
3957
|
+
aliasId: string,
|
|
3958
|
+
request: BrowserAliasGrantReplaceRequest,
|
|
3959
|
+
): Promise<BrowserAliasGrantSet> {
|
|
3960
|
+
return this.request(
|
|
3961
|
+
'PUT',
|
|
3962
|
+
ENDPOINTS.ORG_API_KEY_BROWSER_ALIAS_GRANT(orgId, keyId, aliasId),
|
|
3963
|
+
request,
|
|
3964
|
+
);
|
|
3965
|
+
}
|
|
3966
|
+
|
|
3967
|
+
/** Managed-key discovery. The response is already grant-filtered and never
|
|
3968
|
+
* carries contract hashes, review snapshots, Edge IDs or Profile IDs. */
|
|
3969
|
+
async listManagedBrowserAliases(orgId: string): Promise<ManagedBrowserAliasSummary[]> {
|
|
3970
|
+
return this.request('GET', ENDPOINTS.ORG_MANAGED_ALIASES(orgId));
|
|
3971
|
+
}
|
|
3972
|
+
|
|
3973
|
+
async getManagedBrowserAlias(orgId: string, aliasName: string): Promise<ManagedBrowserAliasInfo> {
|
|
3974
|
+
return this.request('GET', ENDPOINTS.ORG_MANAGED_ALIAS(orgId, aliasName));
|
|
3975
|
+
}
|
|
3976
|
+
|
|
3977
|
+
/** Accept and dispatch one @alias command. request_id is generated by the
|
|
3978
|
+
* caller before local validation and is also the sole durable recovery key. */
|
|
3979
|
+
async createBrowserAliasExecution(
|
|
3980
|
+
orgId: string,
|
|
3981
|
+
request: BrowserAliasExecutionRequest,
|
|
3982
|
+
): Promise<BrowserAliasExecutionReceipt> {
|
|
3983
|
+
return this.request('POST', ENDPOINTS.ORG_BROWSER_ALIAS_EXECUTIONS(orgId), request);
|
|
3984
|
+
}
|
|
3985
|
+
|
|
3986
|
+
async getBrowserAliasExecution(
|
|
3987
|
+
orgId: string,
|
|
3988
|
+
requestId: string,
|
|
3989
|
+
): Promise<BrowserAliasExecutionReceipt> {
|
|
3990
|
+
return this.request('GET', ENDPOINTS.ORG_BROWSER_ALIAS_EXECUTION(orgId, requestId));
|
|
3991
|
+
}
|
|
3992
|
+
|
|
3753
3993
|
/**
|
|
3754
3994
|
* Read a hosted Cloud Profile's egress-proxy status (manager-only: hosted
|
|
3755
3995
|
* human maintainer or org admin). Sanitized — the password never comes back.
|
package/src/constants.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { attachmentEndpoints } from './attachment-endpoints.js';
|
|
2
|
+
|
|
1
3
|
// API base path
|
|
2
4
|
export const API_BASE = '/api/v1';
|
|
3
5
|
|
|
@@ -432,9 +434,7 @@ export const ENDPOINTS = {
|
|
|
432
434
|
`${API_BASE}/messages/${id}/reactions/${encodeURIComponent(emoji)}`,
|
|
433
435
|
|
|
434
436
|
// Upload (org-scoped)
|
|
435
|
-
|
|
436
|
-
UPLOAD_COMPLETE: (orgId: string) => `${API_BASE}/orgs/${orgId}/upload/complete`,
|
|
437
|
-
FILE: (id: string) => `${API_BASE}/files/${id}`,
|
|
437
|
+
...attachmentEndpoints(API_BASE),
|
|
438
438
|
|
|
439
439
|
// Approval requests (org-scoped)
|
|
440
440
|
APPROVAL_REQUESTS: (orgId: string) => `${API_BASE}/orgs/${orgId}/approval-requests`,
|
|
@@ -718,6 +718,8 @@ export const ENDPOINTS = {
|
|
|
718
718
|
// backend router so `deleted` isn't captured as a {wikiId}; the SDK builder
|
|
719
719
|
// is just a string.
|
|
720
720
|
WIKIS_DELETED: (orgId: string) => `${WIKI_BASE}/orgs/${orgId}/wikis/deleted`,
|
|
721
|
+
// Org-wide changeset listing across readable wikis (Working on tab).
|
|
722
|
+
WIKI_ORG_CHANGESETS: (orgId: string) => `${WIKI_BASE}/orgs/${orgId}/wiki-changesets`,
|
|
721
723
|
// Detail URL — also reused for DELETE (soft-delete) and `${WIKI}/restore`.
|
|
722
724
|
WIKI: (orgId: string, wikiId: string) => `${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}`,
|
|
723
725
|
WIKI_RESTORE: (orgId: string, wikiId: string) =>
|
|
@@ -768,6 +770,14 @@ export const ENDPOINTS = {
|
|
|
768
770
|
`${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/restrictions`,
|
|
769
771
|
WIKI_RESTRICTION: (orgId: string, wikiId: string, restrictionId: string) =>
|
|
770
772
|
`${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/restrictions/${restrictionId}`,
|
|
773
|
+
WIKI_ACCESS_POLICY: (orgId: string, wikiId: string) =>
|
|
774
|
+
`${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/access-policy`,
|
|
775
|
+
WIKI_ACCESS_POLICY_MEMBERS: (orgId: string, wikiId: string) =>
|
|
776
|
+
`${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/access-policy/members`,
|
|
777
|
+
WIKI_MEMBERSHIP_SELF: (orgId: string, wikiId: string) =>
|
|
778
|
+
`${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/membership/self`,
|
|
779
|
+
WIKI_MEMBERS: (orgId: string, wikiId: string) =>
|
|
780
|
+
`${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/members`,
|
|
771
781
|
WIKI_ACCESS_STATUS: (orgId: string, wikiId: string) =>
|
|
772
782
|
`${WIKI_BASE}/orgs/${orgId}/wikis/${wikiId}/access-status`,
|
|
773
783
|
WIKI_ACCESS_REQUESTS: (orgId: string, wikiId: string) =>
|
|
@@ -939,6 +949,29 @@ export const ENDPOINTS = {
|
|
|
939
949
|
ORG_EDGE_ONBOARDING: (orgId: string) => `/api/v1/orgs/${orgId}/edge/onboarding`,
|
|
940
950
|
ORG_EDGE_PROFILES: (orgId: string, edgeId: string) =>
|
|
941
951
|
`/api/v1/orgs/${orgId}/edge/${edgeId}/profiles`,
|
|
952
|
+
ORG_EDGE_PROFILE_OPERATIONS: (orgId: string, edgeId: string) =>
|
|
953
|
+
`/api/v1/orgs/${orgId}/edge/${edgeId}/profile-operations`,
|
|
954
|
+
ORG_EDGE_PROFILE_OPERATION: (orgId: string, edgeId: string, operationId: string) =>
|
|
955
|
+
`/api/v1/orgs/${orgId}/edge/${edgeId}/profile-operations/${operationId}`,
|
|
956
|
+
ORG_EDGE_PROFILE_OPERATION_CONFIRM: (orgId: string, edgeId: string, operationId: string) =>
|
|
957
|
+
`/api/v1/orgs/${orgId}/edge/${edgeId}/profile-operations/${operationId}/confirm`,
|
|
958
|
+
ORG_BROWSER_ALIASES: (orgId: string) => `/api/v1/orgs/${orgId}/browser-aliases`,
|
|
959
|
+
ORG_BROWSER_ALIAS: (orgId: string, aliasId: string) =>
|
|
960
|
+
`/api/v1/orgs/${orgId}/browser-aliases/${aliasId}`,
|
|
961
|
+
ORG_BROWSER_ALIAS_READINESS_CHECKS: (orgId: string, aliasId: string) =>
|
|
962
|
+
`/api/v1/orgs/${orgId}/browser-aliases/${aliasId}/readiness-checks`,
|
|
963
|
+
ORG_BROWSER_ALIAS_READINESS_CHECK: (orgId: string, aliasId: string, checkId: string) =>
|
|
964
|
+
`/api/v1/orgs/${orgId}/browser-aliases/${aliasId}/readiness-checks/${checkId}`,
|
|
965
|
+
ORG_API_KEY_BROWSER_ALIAS_GRANTS: (orgId: string, keyId: string) =>
|
|
966
|
+
`/api/v1/orgs/${orgId}/api-keys/${keyId}/browser-alias-grants`,
|
|
967
|
+
ORG_API_KEY_BROWSER_ALIAS_GRANT: (orgId: string, keyId: string, aliasId: string) =>
|
|
968
|
+
`/api/v1/orgs/${orgId}/api-keys/${keyId}/browser-alias-grants/${aliasId}`,
|
|
969
|
+
ORG_MANAGED_ALIASES: (orgId: string) => `/api/v1/orgs/${orgId}/aliases`,
|
|
970
|
+
ORG_MANAGED_ALIAS: (orgId: string, aliasName: string) =>
|
|
971
|
+
`/api/v1/orgs/${orgId}/aliases/${encodeURIComponent(aliasName)}`,
|
|
972
|
+
ORG_BROWSER_ALIAS_EXECUTIONS: (orgId: string) => `/api/v1/orgs/${orgId}/executions`,
|
|
973
|
+
ORG_BROWSER_ALIAS_EXECUTION: (orgId: string, requestId: string) =>
|
|
974
|
+
`/api/v1/orgs/${orgId}/executions/${encodeURIComponent(requestId)}`,
|
|
942
975
|
// Per-profile egress proxy (hosted Cloud Profiles; manager-only, human-only).
|
|
943
976
|
ORG_EDGE_PROFILE_PROXY: (orgId: string, edgeId: string, profileName: string) =>
|
|
944
977
|
`/api/v1/orgs/${orgId}/edge/${edgeId}/profiles/${encodeURIComponent(profileName)}/proxy`,
|