@nikcli-ai/sdk 1.322.0 → 1.323.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/httpapi/compat.d.ts
CHANGED
|
@@ -165,7 +165,7 @@ export declare function compat(raw: Raw, defaults?: CompatDefaults): {
|
|
|
165
165
|
getApiShareShareId: (input: WithDirectory<import("./client.js").ShareApiInput>, options?: CallOptions) => Promise<Result<import("./client.js").ShareData>>;
|
|
166
166
|
getApiShareShareIdData: (input: WithDirectory<import("./client.js").ShareDataInput>, options?: CallOptions) => Promise<Result<import("./client.js").ShareData>>;
|
|
167
167
|
getShareShareId: (input: WithDirectory<import("./client.js").SharePageInput>, options?: CallOptions) => Promise<Result<import("./client.js").ShareData>>;
|
|
168
|
-
getSShareId: (input: WithDirectory<import("./client.js").ShareShortInput>, options?: CallOptions) => Promise<Result<
|
|
168
|
+
getSShareId: (input: WithDirectory<import("./client.js").ShareShortInput>, options?: CallOptions) => Promise<Result<import("./client.js").ShareShortOutput>>;
|
|
169
169
|
global: {
|
|
170
170
|
dispose: (options?: CallOptions, overrides?: CallOptions) => Promise<Result<boolean>>;
|
|
171
171
|
event: (options?: CallOptions, overrides?: CallOptions) => Promise<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TopLevelVcsStatusOutput, TopLevelVcsApplyInput, TopLevelCommandOutput, TopLevelAgentOutput, TopLevelSkillOutput, TopLevelLspOutput, TopLevelFormatterOutput, AnalyticsDailyInput, AnalyticsDailyOutput, AnalyticsSessionInput, AnalyticsSessionsOutput, AnalyticsDataInput, AppLogInput, AppSkillCreateInput, AppSkillDeleteInput, BrainTriggerInput, ChatbotBotsOutput, ChatbotStartInput, ChatbotStopInput, DiscordSetupInput, VoiceTranscribeInput, ProfilePatchInput, ProfileHabitsInput, ProfilePreviewInput, ProfileClearHabitsInput, ConfigUpdateInput, ConnectorsAuthSetInput, ConnectorsAuthRemoveInput, ConnectorsInvalidateInput, ExperimentalToolsInput, ExperimentalWorktreeCreateInput, ExperimentalWorktreeRemoveInput, ExperimentalWorktreeResetInput, ExperimentalManagedWorktreeCreateInput, ExperimentalManagedWorktreeRemoveInput, ExperimentalManagedWorktreeLinkInput, ExperimentalManagedWorktreeChildrenInput, ExperimentalManagedWorktreeAncestorsInput, FileFindTextInput, FileFindTextOutput, FileFindFileInput, FileFindFileOutput, FileFindSymbolInput, FileFindSymbolOutput, FileListInput, FileListOutput, FileContentInput, FileWriteInput, FileStatusOutput, McpAddInput, McpStartAuthInput, McpAuthCallbackInput, McpAuthenticateInput, McpRemoveAuthInput, McpConnectInput, McpDisconnectInput, McpToggleInput, MissionGenerateInput, MissionRecentExecsInput, MissionGetInput, MissionUpsertInput, MissionUpdateInput, MissionRemoveInput, MissionStartInput, MissionPauseInput, MissionCancelInput, MissionFeatureMutateInput, MissionExecsInput, MobileAuthTokenListOutput, MobileAuthTokenCreateInput, MobileAuthTokenCreateOutput, MobileAuthTokenRevokeInput, MobileAuthTokenRevokeOutput, MobileCommandListOutput, MobileProjectListOutput, MobileMemoryHistoryOutput, MobileMemorySearchInput, MobileMemorySearchOutput, MobileMemoryStashListOutput, MobileMemoryStashCreateInput, MobileMemoryStashDeleteInput, MobileGithubReposOutput, MobileGithubBranchesInput, MobileGithubBranchesOutput, MobileGithubImportsOutput, MobileGithubOauthClientInput, MobileGithubOauthDevicePollInput, MobileGithubAuthSetInput, MobileGithubImportInput, MobileGithubImportOutput, MobileGithubSessionCreateInput, MobileSessionListInput, MobileSessionListOutput, MobileSessionCreateInput, MobileSessionDetailInput, MobileSessionDeleteInput, MobileSessionDiffInput, MobileSessionDiffOutput, MobileSessionCommandListInput, MobileSessionCommandListOutput, MobileSessionCommandInput, MobileSessionCommandOutput, MobileSessionMessageInput, MobileSessionAbortInput, MobilePermissionRespondInput, MobileQuestionRespondInput, MobileQuestionRejectInput, MobileSessionPublishInput, MobileSessionCleanupInput, MobileSessionStreamInput, MobileSessionStreamOutput, MobileSessionRenameInput, MobileSessionTodoInput, MobileSessionTodoOutput, MobileTeleportUploadBeginOutput, MobileTeleportUploadChunkInput, MobileTeleportUploadChunkOutput, MobileTeleportInInput, MobileTeleportOutInput, MobileWorktreeCreateInput, MobileWorktreeRemoveInput, MobileWorktreeResetInput, MobileGitDiffInput, MobileGitDiffOutput, MobileGitCommitsInput, MobileGitCommitsOutput, MobileGitBranchesOutput, MobileGitCommitInput, MobileGitCommitOutput, MobileGitCheckoutInput, MobileGitStageInput, MobileGitUnstageInput, MobileGitDiscardInput, MobileGitPushInput, MobileGitPushOutput, MobileGitPullOutput, MobileLoopListOutput, MobileLoopCreateInput, MobileLoopTemplatesOutput, MobileLoopGenerateInput, MobileLoopRunsRecentInput, MobileLoopRunsRecentOutput, MobileLoopGetInput, MobileLoopGetOutput, MobileLoopDeleteInput, MobileLoopUpdateInput, MobileLoopRunsInput, MobileLoopRunsOutput, MobileLoopRunInput, MobileLoopAbortInput, MobileLoopToggleInput, MobileLoopPauseInput, MobileLoopResumeInput, MobileRoutineListOutput, MobileRoutineCreateInput, MobileRoutineGetInput, MobileRoutineDeleteInput, MobileRoutineUpdateInput, MobileRoutineRunInput, MobileRoutinePauseInput, MobileRoutineResumeInput, MobileRoutineTriggerInput, MobilePtyListOutput, MobilePtyCreateInput, MobilePtyGetInput, MobilePtyUpdateInput, MobilePtyRemoveInput, MobileMissionListOutput, MobileMissionCreateInput, MobileMissionTemplatesOutput, MobileMissionGenerateInput, MobileMissionExecsRecentInput, MobileMissionExecsRecentOutput, MobileMissionGetInput, MobileMissionGetOutput, MobileMissionUpdateInput, MobileMissionDeleteInput, MobileMissionExecsInput, MobileMissionExecsOutput, MobileMissionStartInput, MobileMissionPauseInput, MobileMissionCancelInput, MobileMissionFeatureMutateInput, MobileEventsOutput, MobileBrainStatusOutput, MobileBrainTriggerInput, MobileBrainTriggerOutput, MobileChatBotListOutput, MobileChatBotStartInput, MobileChatBotStartOutput, MobileChatBotStopInput, MobileChatBotStopOutput, MobileObservabilityGetOutput, MobileObservabilitySetInput, MobileObservabilitySetOutput, MobileLspStatusOutput, MobileFusionListOutput, MobileFusionSetInput, MobileFusionSetOutput, MobileHostBrowserOutput, MobileHostComputerOutput, MobileHostHerdrGetOutput, MobileHostHerdrSetInput, MobileHostHerdrSetOutput, MobileHostIslandOutput, MobileHostDevtoolsOutput, ProjectListOutput, ProjectUpdateInput, ProjectDirectoryListInput, ProjectDirectoryListOutput, ProjectCopyCreateInput, ProjectCopyRemoveInput, ProjectCopyRefreshInput, ProviderApiInput, ProviderRemoveAuthInput, ProviderOauthAuthorizeInput, ProviderOauthAuthorizeOutput, ProviderOauthCallbackInput, QuestionListOutput, QuestionReplyInput, QuestionRejectInput, PermissionListOutput, PermissionReplyInput, PtyCreateInput, PtyGetInput, PtyUpdateInput, PtyRemoveInput, LoopGenerateInput, LoopRecentRunsInput, LoopGetInput, LoopUpsertInput, LoopUpdateInput, LoopRemoveInput, LoopToggleInput, LoopRunInput, LoopAbortInput, LoopPauseInput, LoopResumeInput, LoopRunsInput, SessionListInput, SessionCreateInput, SessionGetInput, SessionRemoveInput, SessionUpdateInput, SessionForkInput, SessionAbortInput, SessionRevertInput, SessionUnrevertInput, SessionShareInput, SessionUnshareInput, SessionSummarizeInput, SessionCommandInput, SessionShellInput, SessionPermissionRespondInput, SessionChildrenInput, SessionTodoInput, SessionDiffInput, SessionMessagesInput, SessionPendingInput, SessionPendingSteerInput, SessionMessageInput, SessionMessageRemoveInput, SessionPartRemoveInput, SessionPartUpdateInput, SessionV2EntriesInput, SessionV2StateInput, SessionV2EventsInput, SessionInstructionsInput, SessionContextBreakdownInput, SessionContextToggleInput, SessionGoalInput, SessionBackgroundInput, SessionBackgroundInspectInput, SessionBackgroundReadInput, SessionBackgroundCancelInput, SessionMonitorInput, SessionMonitorLogInput, SessionMonitorCancelInput, AccountCompleteInput, SyncEventInput, SyncOutboxInput, SyncSnapshotInput, SyncStreamInput, SyncStreamOutput, SyncStatsInput, SyncConfigInput, TuiAppendPromptInput, TuiExecuteCommandInput, TuiShowToastInput, TuiPublishInput, TuiSelectSessionInput, TuiControlResponseInput, WorkspaceAdaptorsOutput, WorkspaceStatusOutput, WorkspaceCreateInput, WorkspaceListOutput, WorkspaceRemoveInput, WorkspaceRestoreInput, WorkspaceSessionRestoreInput, WorkspaceWarpInput, AuthSetInput, AuthRemoveInput, ConfigManagementMcpAddInput, ConfigManagementMcpUpdateInput, ConfigManagementMcpRemoveInput, ConfigManagementProfileCreateInput, ConfigManagementProfileActivateInput, SessionPromptPromptInput, SessionPromptPromptAsyncInput, ShareShortInput, SharePageInput, ShareApiInput, ShareDataInput, EventsSubscribeOutput, EventsGlobalOutput, WorkspaceExtraEventsInput, WorkspaceExtraEventsOutput, WorkspaceExtraSessionWarpInput, UsersRegisterInput, UsersLoginInput, UsersUpdateInput } from "./types.js";
|
|
1
|
+
import type { TopLevelVcsStatusOutput, TopLevelVcsApplyInput, TopLevelCommandOutput, TopLevelAgentOutput, TopLevelSkillOutput, TopLevelLspOutput, TopLevelFormatterOutput, AnalyticsDailyInput, AnalyticsDailyOutput, AnalyticsSessionInput, AnalyticsSessionsOutput, AnalyticsDataInput, AppLogInput, AppSkillCreateInput, AppSkillDeleteInput, BrainTriggerInput, ChatbotBotsOutput, ChatbotStartInput, ChatbotStopInput, DiscordSetupInput, VoiceTranscribeInput, ProfilePatchInput, ProfileHabitsInput, ProfilePreviewInput, ProfileClearHabitsInput, ConfigUpdateInput, ConnectorsAuthSetInput, ConnectorsAuthRemoveInput, ConnectorsInvalidateInput, ExperimentalToolsInput, ExperimentalWorktreeCreateInput, ExperimentalWorktreeRemoveInput, ExperimentalWorktreeResetInput, ExperimentalManagedWorktreeCreateInput, ExperimentalManagedWorktreeRemoveInput, ExperimentalManagedWorktreeLinkInput, ExperimentalManagedWorktreeChildrenInput, ExperimentalManagedWorktreeAncestorsInput, FileFindTextInput, FileFindTextOutput, FileFindFileInput, FileFindFileOutput, FileFindSymbolInput, FileFindSymbolOutput, FileListInput, FileListOutput, FileContentInput, FileWriteInput, FileStatusOutput, McpAddInput, McpStartAuthInput, McpAuthCallbackInput, McpAuthenticateInput, McpRemoveAuthInput, McpConnectInput, McpDisconnectInput, McpToggleInput, MissionGenerateInput, MissionRecentExecsInput, MissionGetInput, MissionUpsertInput, MissionUpdateInput, MissionRemoveInput, MissionStartInput, MissionPauseInput, MissionCancelInput, MissionFeatureMutateInput, MissionExecsInput, MobileAuthTokenListOutput, MobileAuthTokenCreateInput, MobileAuthTokenCreateOutput, MobileAuthTokenRevokeInput, MobileAuthTokenRevokeOutput, MobileCommandListOutput, MobileProjectListOutput, MobileMemoryHistoryOutput, MobileMemorySearchInput, MobileMemorySearchOutput, MobileMemoryStashListOutput, MobileMemoryStashCreateInput, MobileMemoryStashDeleteInput, MobileGithubReposOutput, MobileGithubBranchesInput, MobileGithubBranchesOutput, MobileGithubImportsOutput, MobileGithubOauthClientInput, MobileGithubOauthDevicePollInput, MobileGithubAuthSetInput, MobileGithubImportInput, MobileGithubImportOutput, MobileGithubSessionCreateInput, MobileSessionListInput, MobileSessionListOutput, MobileSessionCreateInput, MobileSessionDetailInput, MobileSessionDeleteInput, MobileSessionDiffInput, MobileSessionDiffOutput, MobileSessionCommandListInput, MobileSessionCommandListOutput, MobileSessionCommandInput, MobileSessionCommandOutput, MobileSessionMessageInput, MobileSessionAbortInput, MobilePermissionRespondInput, MobileQuestionRespondInput, MobileQuestionRejectInput, MobileSessionPublishInput, MobileSessionCleanupInput, MobileSessionStreamInput, MobileSessionStreamOutput, MobileSessionRenameInput, MobileSessionTodoInput, MobileSessionTodoOutput, MobileTeleportUploadBeginOutput, MobileTeleportUploadChunkInput, MobileTeleportUploadChunkOutput, MobileTeleportInInput, MobileTeleportOutInput, MobileWorktreeCreateInput, MobileWorktreeRemoveInput, MobileWorktreeResetInput, MobileGitDiffInput, MobileGitDiffOutput, MobileGitCommitsInput, MobileGitCommitsOutput, MobileGitBranchesOutput, MobileGitCommitInput, MobileGitCommitOutput, MobileGitCheckoutInput, MobileGitStageInput, MobileGitUnstageInput, MobileGitDiscardInput, MobileGitPushInput, MobileGitPushOutput, MobileGitPullOutput, MobileLoopListOutput, MobileLoopCreateInput, MobileLoopTemplatesOutput, MobileLoopGenerateInput, MobileLoopRunsRecentInput, MobileLoopRunsRecentOutput, MobileLoopGetInput, MobileLoopGetOutput, MobileLoopDeleteInput, MobileLoopUpdateInput, MobileLoopRunsInput, MobileLoopRunsOutput, MobileLoopRunInput, MobileLoopAbortInput, MobileLoopToggleInput, MobileLoopPauseInput, MobileLoopResumeInput, MobileRoutineListOutput, MobileRoutineCreateInput, MobileRoutineGetInput, MobileRoutineDeleteInput, MobileRoutineUpdateInput, MobileRoutineRunInput, MobileRoutinePauseInput, MobileRoutineResumeInput, MobileRoutineTriggerInput, MobilePtyListOutput, MobilePtyCreateInput, MobilePtyGetInput, MobilePtyUpdateInput, MobilePtyRemoveInput, MobileMissionListOutput, MobileMissionCreateInput, MobileMissionTemplatesOutput, MobileMissionGenerateInput, MobileMissionExecsRecentInput, MobileMissionExecsRecentOutput, MobileMissionGetInput, MobileMissionGetOutput, MobileMissionUpdateInput, MobileMissionDeleteInput, MobileMissionExecsInput, MobileMissionExecsOutput, MobileMissionStartInput, MobileMissionPauseInput, MobileMissionCancelInput, MobileMissionFeatureMutateInput, MobileEventsOutput, MobileBrainStatusOutput, MobileBrainTriggerInput, MobileBrainTriggerOutput, MobileChatBotListOutput, MobileChatBotStartInput, MobileChatBotStartOutput, MobileChatBotStopInput, MobileChatBotStopOutput, MobileObservabilityGetOutput, MobileObservabilitySetInput, MobileObservabilitySetOutput, MobileLspStatusOutput, MobileFusionListOutput, MobileFusionSetInput, MobileFusionSetOutput, MobileHostBrowserOutput, MobileHostComputerOutput, MobileHostHerdrGetOutput, MobileHostHerdrSetInput, MobileHostHerdrSetOutput, MobileHostIslandOutput, MobileHostDevtoolsOutput, ProjectListOutput, ProjectUpdateInput, ProjectDirectoryListInput, ProjectDirectoryListOutput, ProjectCopyCreateInput, ProjectCopyRemoveInput, ProjectCopyRefreshInput, ProviderApiInput, ProviderRemoveAuthInput, ProviderOauthAuthorizeInput, ProviderOauthAuthorizeOutput, ProviderOauthCallbackInput, QuestionListOutput, QuestionReplyInput, QuestionRejectInput, PermissionListOutput, PermissionReplyInput, PtyCreateInput, PtyGetInput, PtyUpdateInput, PtyRemoveInput, LoopGenerateInput, LoopRecentRunsInput, LoopGetInput, LoopUpsertInput, LoopUpdateInput, LoopRemoveInput, LoopToggleInput, LoopRunInput, LoopAbortInput, LoopPauseInput, LoopResumeInput, LoopRunsInput, SessionListInput, SessionCreateInput, SessionGetInput, SessionRemoveInput, SessionUpdateInput, SessionForkInput, SessionAbortInput, SessionRevertInput, SessionUnrevertInput, SessionShareInput, SessionUnshareInput, SessionSummarizeInput, SessionCommandInput, SessionShellInput, SessionPermissionRespondInput, SessionChildrenInput, SessionTodoInput, SessionDiffInput, SessionMessagesInput, SessionPendingInput, SessionPendingSteerInput, SessionMessageInput, SessionMessageRemoveInput, SessionPartRemoveInput, SessionPartUpdateInput, SessionV2EntriesInput, SessionV2StateInput, SessionV2EventsInput, SessionInstructionsInput, SessionContextBreakdownInput, SessionContextToggleInput, SessionGoalInput, SessionBackgroundInput, SessionBackgroundInspectInput, SessionBackgroundReadInput, SessionBackgroundCancelInput, SessionMonitorInput, SessionMonitorLogInput, SessionMonitorCancelInput, AccountCompleteInput, SyncEventInput, SyncOutboxInput, SyncSnapshotInput, SyncStreamInput, SyncStreamOutput, SyncStatsInput, SyncConfigInput, TuiAppendPromptInput, TuiExecuteCommandInput, TuiShowToastInput, TuiPublishInput, TuiSelectSessionInput, TuiControlResponseInput, WorkspaceAdaptorsOutput, WorkspaceStatusOutput, WorkspaceCreateInput, WorkspaceListOutput, WorkspaceRemoveInput, WorkspaceRestoreInput, WorkspaceSessionRestoreInput, WorkspaceWarpInput, AuthSetInput, AuthRemoveInput, ConfigManagementMcpAddInput, ConfigManagementMcpUpdateInput, ConfigManagementMcpRemoveInput, ConfigManagementProfileCreateInput, ConfigManagementProfileActivateInput, SessionPromptPromptInput, SessionPromptPromptAsyncInput, ShareShortInput, ShareShortOutput, SharePageInput, ShareApiInput, ShareDataInput, EventsSubscribeOutput, EventsGlobalOutput, WorkspaceExtraEventsInput, WorkspaceExtraEventsOutput, WorkspaceExtraSessionWarpInput, UsersRegisterInput, UsersLoginInput, UsersUpdateInput } from "./types.js";
|
|
2
2
|
export interface ClientOptions {
|
|
3
3
|
readonly baseUrl: string;
|
|
4
4
|
readonly fetch?: typeof globalThis.fetch;
|
|
@@ -397,7 +397,7 @@ export declare function make(options: ClientOptions): {
|
|
|
397
397
|
promptAsync: (input: SessionPromptPromptAsyncInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
398
398
|
};
|
|
399
399
|
share: {
|
|
400
|
-
short: (input: ShareShortInput, requestOptions?: RequestOptions) => Promise<
|
|
400
|
+
short: (input: ShareShortInput, requestOptions?: RequestOptions) => Promise<ShareShortOutput>;
|
|
401
401
|
page: (input: SharePageInput, requestOptions?: RequestOptions) => Promise<import("./types.js").ShareData>;
|
|
402
402
|
api: (input: ShareApiInput, requestOptions?: RequestOptions) => Promise<import("./types.js").ShareData>;
|
|
403
403
|
data: (input: ShareDataInput, requestOptions?: RequestOptions) => Promise<import("./types.js").ShareData>;
|
|
@@ -35,8 +35,17 @@ export function make(options) {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
const responseError = async (response, descriptor) => {
|
|
38
|
-
if (descriptor.declaredStatuses.includes(response.status))
|
|
38
|
+
if (descriptor.declaredStatuses.includes(response.status)) {
|
|
39
|
+
const names = descriptor.errorHeaders?.[String(response.status)];
|
|
40
|
+
if (descriptor.emptyErrors?.includes(response.status)) {
|
|
41
|
+
try {
|
|
42
|
+
await response.body?.cancel();
|
|
43
|
+
}
|
|
44
|
+
catch { }
|
|
45
|
+
throw { headers: readDeclaredHeaders(response, names) ?? {} };
|
|
46
|
+
}
|
|
39
47
|
throw await json(response);
|
|
48
|
+
}
|
|
40
49
|
try {
|
|
41
50
|
await response.body?.cancel();
|
|
42
51
|
}
|
|
@@ -54,9 +63,9 @@ export function make(options) {
|
|
|
54
63
|
await response.body?.cancel();
|
|
55
64
|
}
|
|
56
65
|
catch { }
|
|
57
|
-
return undefined;
|
|
66
|
+
return attachDeclaredHeaders(undefined, response, descriptor.responseHeaders);
|
|
58
67
|
}
|
|
59
|
-
return (await json(response));
|
|
68
|
+
return attachDeclaredHeaders(await json(response), response, descriptor.responseHeaders);
|
|
60
69
|
};
|
|
61
70
|
const sse = (descriptor, requestOptions) => ({
|
|
62
71
|
async *[Symbol.asyncIterator]() {
|
|
@@ -2084,7 +2093,9 @@ export function make(options) {
|
|
|
2084
2093
|
path: `/sync/event`,
|
|
2085
2094
|
body: { event: input["event"], projectID: input["projectID"] },
|
|
2086
2095
|
successStatus: 204,
|
|
2087
|
-
declaredStatuses: [],
|
|
2096
|
+
declaredStatuses: [429, 401],
|
|
2097
|
+
errorHeaders: { "401": ["www-authenticate"], "429": ["retry-after"] },
|
|
2098
|
+
emptyErrors: [429, 401],
|
|
2088
2099
|
empty: true,
|
|
2089
2100
|
}, requestOptions),
|
|
2090
2101
|
outbox: (input, requestOptions) => request({
|
|
@@ -2365,9 +2376,10 @@ export function make(options) {
|
|
|
2365
2376
|
short: (input, requestOptions) => request({
|
|
2366
2377
|
method: "GET",
|
|
2367
2378
|
path: `/s/${encodeURIComponent(input.shareID)}`,
|
|
2368
|
-
successStatus:
|
|
2379
|
+
successStatus: 308,
|
|
2369
2380
|
declaredStatuses: [],
|
|
2370
|
-
|
|
2381
|
+
responseHeaders: ["location"],
|
|
2382
|
+
empty: true,
|
|
2371
2383
|
}, requestOptions),
|
|
2372
2384
|
page: (input, requestOptions) => request({
|
|
2373
2385
|
method: "GET",
|
|
@@ -2496,3 +2508,18 @@ async function json(response) {
|
|
|
2496
2508
|
function isContentType(response, expected) {
|
|
2497
2509
|
return response.headers.get("content-type")?.split(";", 1)[0]?.trim().toLowerCase() === expected;
|
|
2498
2510
|
}
|
|
2511
|
+
function readDeclaredHeaders(response, names) {
|
|
2512
|
+
if (names === undefined)
|
|
2513
|
+
return undefined;
|
|
2514
|
+
const headers = {};
|
|
2515
|
+
for (const name of names) {
|
|
2516
|
+
const value = response.headers.get(name);
|
|
2517
|
+
if (value !== null)
|
|
2518
|
+
headers[name] = value;
|
|
2519
|
+
}
|
|
2520
|
+
return headers;
|
|
2521
|
+
}
|
|
2522
|
+
function attachDeclaredHeaders(body, response, names) {
|
|
2523
|
+
const headers = readDeclaredHeaders(response, names);
|
|
2524
|
+
return headers === undefined ? body : { body, headers };
|
|
2525
|
+
}
|
|
@@ -209,7 +209,7 @@ export declare const makeCompat: (raw: Raw, helpers: CompatHelpers) => {
|
|
|
209
209
|
getSShareId: (input: import("./types.js").ShareShortInput & {
|
|
210
210
|
readonly directory?: string;
|
|
211
211
|
readonly workspace?: string;
|
|
212
|
-
}, options?: import("../compat.js").CallOptions) => Promise<import("../compat.js").Result<
|
|
212
|
+
}, options?: import("../compat.js").CallOptions) => Promise<import("../compat.js").Result<import("./types.js").ShareShortOutput>>;
|
|
213
213
|
global: {
|
|
214
214
|
dispose: (options?: import("../compat.js").CallOptions, overrides?: import("../compat.js").CallOptions) => Promise<import("../compat.js").Result<boolean>>;
|
|
215
215
|
event: (options?: import("../compat.js").CallOptions, overrides?: import("../compat.js").CallOptions) => Promise<{
|
|
@@ -5587,6 +5587,16 @@ export type SessionBackgroundNotFound = {
|
|
|
5587
5587
|
export type AccountError = {
|
|
5588
5588
|
readonly error: string;
|
|
5589
5589
|
};
|
|
5590
|
+
export type SyncRateLimited = {
|
|
5591
|
+
readonly headers: {
|
|
5592
|
+
readonly "retry-after": string;
|
|
5593
|
+
};
|
|
5594
|
+
};
|
|
5595
|
+
export type UnauthorizedChallenge = {
|
|
5596
|
+
readonly headers: {
|
|
5597
|
+
readonly "www-authenticate"?: string | undefined;
|
|
5598
|
+
};
|
|
5599
|
+
};
|
|
5590
5600
|
export type TuiValidationError = {
|
|
5591
5601
|
readonly data: unknown;
|
|
5592
5602
|
readonly error: unknown;
|
|
@@ -10428,7 +10438,12 @@ export type ShareShortInput = {
|
|
|
10428
10438
|
readonly shareID: string;
|
|
10429
10439
|
}["shareID"];
|
|
10430
10440
|
};
|
|
10431
|
-
export type ShareShortOutput =
|
|
10441
|
+
export type ShareShortOutput = {
|
|
10442
|
+
readonly body: void;
|
|
10443
|
+
readonly headers: {
|
|
10444
|
+
readonly location: string;
|
|
10445
|
+
};
|
|
10446
|
+
};
|
|
10432
10447
|
export type SharePageInput = {
|
|
10433
10448
|
readonly shareID: {
|
|
10434
10449
|
readonly shareID: string;
|
package/dist/server.d.ts
CHANGED
|
@@ -230,7 +230,7 @@ export declare function createNikcli(options?: ServerOptions): Promise<{
|
|
|
230
230
|
getSShareId: (input: import("./httpapi/client.js").ShareShortInput & {
|
|
231
231
|
readonly directory?: string;
|
|
232
232
|
readonly workspace?: string;
|
|
233
|
-
}, options?: import("./httpapi/compat.js").CallOptions) => Promise<import("./httpapi/compat.js").Result<
|
|
233
|
+
}, options?: import("./httpapi/compat.js").CallOptions) => Promise<import("./httpapi/compat.js").Result<import("./httpapi/client.js").ShareShortOutput>>;
|
|
234
234
|
global: {
|
|
235
235
|
dispose: (options?: import("./httpapi/compat.js").CallOptions, overrides?: import("./httpapi/compat.js").CallOptions) => Promise<import("./httpapi/compat.js").Result<boolean>>;
|
|
236
236
|
event: (options?: import("./httpapi/compat.js").CallOptions, overrides?: import("./httpapi/compat.js").CallOptions) => Promise<{
|