@wix/auto_sdk_site-import_imports 1.0.7 → 1.0.8
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/build/cjs/index.d.ts +40 -3
- package/build/cjs/index.js +117 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +78 -1
- package/build/cjs/index.typings.js +100 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +33 -2
- package/build/cjs/meta.js +84 -2
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +40 -3
- package/build/es/index.mjs +114 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +78 -1
- package/build/es/index.typings.mjs +97 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +33 -2
- package/build/es/meta.mjs +81 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +40 -3
- package/build/internal/cjs/index.typings.d.ts +78 -1
- package/build/internal/cjs/meta.d.ts +33 -2
- package/build/internal/es/index.d.mts +40 -3
- package/build/internal/es/index.typings.d.mts +78 -1
- package/build/internal/es/meta.d.mts +33 -2
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { StartImportOptions, StartImportResponse, GetImportStatusOptions, GetImportStatusResponse, GetImportDebugResponse, CancelImportResponse, SendImportMessageResponse, StartFrontendPreviewResponse, GetImportSourceOptions, GetImportSourceResponse, GetImportSourceFileOptions, GetImportSourceFileResponse, GetImportSourceForSiteOptions, GetImportSourceForSiteResponse, GetImportSourceFileForSiteOptions, GetImportSourceFileForSiteResponse, SearchImportSourceOptions, SearchImportSourceResponse, SearchImportSourceForSiteOptions, SearchImportSourceForSiteResponse, GetImportBySiteOptions, GetImportBySiteResponse } from './index.typings.js';
|
|
3
|
-
export { CancelImportRequest, ClaudeResultSummary, FailedTaskDetail, GetImportBySiteRequest, GetImportDebugRequest, GetImportSourceFileForSiteRequest, GetImportSourceFileRequest, GetImportSourceForSiteRequest, GetImportSourceRequest, GetImportStatusRequest, Import, ImportActivity, ImportActivityKind, ImportActivityKindWithLiterals, ImportArtifact, ImportArtifactFormat, ImportArtifactFormatWithLiterals, ImportDestination, ImportDestinationWithLiterals, ImportStatus, ImportStatusWithLiterals, ImportTodo, ImportTodoStatus, ImportTodoStatusWithLiterals, SearchImportSourceForSiteRequest, SearchImportSourceRequest, SearchMatch, SendImportMessageRequest, SourceChange, SourceChangeStatus, SourceChangeStatusWithLiterals, SourceConfidence, SourceConfidenceWithLiterals, SourceFile, SourceMatch, SourcePlatform, SourcePlatformWithLiterals, SourceSyncMode, SourceSyncModeWithLiterals, StartFrontendPreviewRequest, StartImportRequest, TaskDebug } from './index.typings.js';
|
|
2
|
+
import { StartImportOptions, StartImportResponse, GetImportStatusOptions, GetImportStatusResponse, GetImportDebugResponse, CancelImportResponse, SendImportMessageResponse, StartFrontendPreviewResponse, GetImportSourceOptions, GetImportSourceResponse, GetImportSourceFileOptions, GetImportSourceFileResponse, GetImportSourceForSiteOptions, GetImportSourceForSiteResponse, GetImportSourceFileForSiteOptions, GetImportSourceFileForSiteResponse, SearchImportSourceOptions, SearchImportSourceResponse, SearchImportSourceForSiteOptions, SearchImportSourceForSiteResponse, GetImportBySiteOptions, GetImportBySiteResponse, StartSkillSessionOptions } from './index.typings.js';
|
|
3
|
+
export { CancelImportRequest, ClaudeResultSummary, FailedTaskDetail, GetImportBySiteRequest, GetImportDebugRequest, GetImportSourceFileForSiteRequest, GetImportSourceFileRequest, GetImportSourceForSiteRequest, GetImportSourceRequest, GetImportStatusRequest, Import, ImportActivity, ImportActivityKind, ImportActivityKindWithLiterals, ImportArtifact, ImportArtifactFormat, ImportArtifactFormatWithLiterals, ImportDestination, ImportDestinationWithLiterals, ImportStatus, ImportStatusWithLiterals, ImportTodo, ImportTodoStatus, ImportTodoStatusWithLiterals, LinkSkillSessionRequest, LinkSkillSessionResponse, SearchImportSourceForSiteRequest, SearchImportSourceRequest, SearchMatch, SendImportMessageRequest, SourceChange, SourceChangeStatus, SourceChangeStatusWithLiterals, SourceConfidence, SourceConfidenceWithLiterals, SourceFile, SourceMatch, SourcePlatform, SourcePlatformWithLiterals, SourceSyncMode, SourceSyncModeWithLiterals, StartFrontendPreviewRequest, StartImportRequest, StartSkillSessionRequest, StartSkillSessionResponse, TaskDebug } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function startImport$1(httpClient: HttpClient): StartImportSignature;
|
|
6
6
|
interface StartImportSignature {
|
|
@@ -217,6 +217,41 @@ interface GetImportBySiteSignature {
|
|
|
217
217
|
*/
|
|
218
218
|
(options?: GetImportBySiteOptions): Promise<NonNullablePaths<GetImportBySiteResponse, `importId`, 0>>;
|
|
219
219
|
}
|
|
220
|
+
declare function startSkillSession$1(httpClient: HttpClient): StartSkillSessionSignature;
|
|
221
|
+
interface StartSkillSessionSignature {
|
|
222
|
+
/**
|
|
223
|
+
* Tell the service that someone started the `wix-replatform` skill, BEFORE they have logged in
|
|
224
|
+
* (spec 0030). The one deliberate anonymous method of this service: it reads two fields, writes
|
|
225
|
+
* one log line (`bix.skill-session.started`) and touches no sandbox, import, key-value store,
|
|
226
|
+
* Conductor or secret, which is why it may be anonymous. Not behind the import rollout: the
|
|
227
|
+
* point is to count people the rollout does not enable.
|
|
228
|
+
* `anonymous: ALLOWED` must be the ONLY audience (the guidelines forbid mixing it) and the
|
|
229
|
+
* method has no permission option (the permissions manager treats a permission on an anonymous
|
|
230
|
+
* method as a misconfiguration). A method with no account is ORGANIZATION-tenanted, overriding
|
|
231
|
+
* this service's ACCOUNT default for this one rpc.
|
|
232
|
+
* The platform enforces the GUID format and maxLength below; the version's character set and the
|
|
233
|
+
* all-zeros id are checked by the handler (the proto cannot express either).
|
|
234
|
+
* flynt: `anonymous-identity-requires-approval` is excluded in code on this method (below), which
|
|
235
|
+
* makes Wix Standards raise `flynt-exclusions`; that one is opted out in Standards with the reason
|
|
236
|
+
* and P13n reviews it (spec 0030 A.4 / A.10 step 1).
|
|
237
|
+
* @param - Random GUID the skill generated for this run. The all-zeros GUID is refused by the handler.
|
|
238
|
+
*/
|
|
239
|
+
(skillSessionId: string, options: NonNullablePaths<StartSkillSessionOptions, `skillsVersion`, 0>): Promise<void>;
|
|
240
|
+
}
|
|
241
|
+
declare function linkSkillSession$1(httpClient: HttpClient): LinkSkillSessionSignature;
|
|
242
|
+
interface LinkSkillSessionSignature {
|
|
243
|
+
/**
|
|
244
|
+
* Tie a skill session to the caller's account, after `wix login` (spec 0030). The account comes
|
|
245
|
+
* from the gateway-signed identity (`requireIdentity(ctx).accountId`), never the request: the
|
|
246
|
+
* message has no account field. Writes one log line (`bix.skill-session.linked`) every call and
|
|
247
|
+
* keeps no state. Not behind the import rollout: it works for an owner account that
|
|
248
|
+
* StartImport answers with NOT_ENABLED. Its own permission, in the same scope as start_import.
|
|
249
|
+
* Logged-in users only: a skill session is linked by the account owner who ran `wix login`.
|
|
250
|
+
* @param - The id the skill sent in StartSkillSession. There is deliberately no account field: the
|
|
251
|
+
* account is read from the caller's login.
|
|
252
|
+
*/
|
|
253
|
+
(skillSessionId: string): Promise<void>;
|
|
254
|
+
}
|
|
220
255
|
|
|
221
256
|
declare const startImport: MaybeContext<BuildRESTFunction<typeof startImport$1> & typeof startImport$1>;
|
|
222
257
|
declare const getImportStatus: MaybeContext<BuildRESTFunction<typeof getImportStatus$1> & typeof getImportStatus$1>;
|
|
@@ -231,5 +266,7 @@ declare const getImportSourceFileForSite: MaybeContext<BuildRESTFunction<typeof
|
|
|
231
266
|
declare const searchImportSource: MaybeContext<BuildRESTFunction<typeof searchImportSource$1> & typeof searchImportSource$1>;
|
|
232
267
|
declare const searchImportSourceForSite: MaybeContext<BuildRESTFunction<typeof searchImportSourceForSite$1> & typeof searchImportSourceForSite$1>;
|
|
233
268
|
declare const getImportBySite: MaybeContext<BuildRESTFunction<typeof getImportBySite$1> & typeof getImportBySite$1>;
|
|
269
|
+
declare const startSkillSession: MaybeContext<BuildRESTFunction<typeof startSkillSession$1> & typeof startSkillSession$1>;
|
|
270
|
+
declare const linkSkillSession: MaybeContext<BuildRESTFunction<typeof linkSkillSession$1> & typeof linkSkillSession$1>;
|
|
234
271
|
|
|
235
|
-
export { CancelImportResponse, GetImportBySiteOptions, GetImportBySiteResponse, GetImportDebugResponse, GetImportSourceFileForSiteOptions, GetImportSourceFileForSiteResponse, GetImportSourceFileOptions, GetImportSourceFileResponse, GetImportSourceForSiteOptions, GetImportSourceForSiteResponse, GetImportSourceOptions, GetImportSourceResponse, GetImportStatusOptions, GetImportStatusResponse, SearchImportSourceForSiteOptions, SearchImportSourceForSiteResponse, SearchImportSourceOptions, SearchImportSourceResponse, SendImportMessageResponse, StartFrontendPreviewResponse, StartImportOptions, StartImportResponse, cancelImport, getImportBySite, getImportDebug, getImportSource, getImportSourceFile, getImportSourceFileForSite, getImportSourceForSite, getImportStatus, searchImportSource, searchImportSourceForSite, sendImportMessage, startFrontendPreview, startImport };
|
|
272
|
+
export { CancelImportResponse, GetImportBySiteOptions, GetImportBySiteResponse, GetImportDebugResponse, GetImportSourceFileForSiteOptions, GetImportSourceFileForSiteResponse, GetImportSourceFileOptions, GetImportSourceFileResponse, GetImportSourceForSiteOptions, GetImportSourceForSiteResponse, GetImportSourceOptions, GetImportSourceResponse, GetImportStatusOptions, GetImportStatusResponse, SearchImportSourceForSiteOptions, SearchImportSourceForSiteResponse, SearchImportSourceOptions, SearchImportSourceResponse, SendImportMessageResponse, StartFrontendPreviewResponse, StartImportOptions, StartImportResponse, StartSkillSessionOptions, cancelImport, getImportBySite, getImportDebug, getImportSource, getImportSourceFile, getImportSourceFileForSite, getImportSourceForSite, getImportStatus, linkSkillSession, searchImportSource, searchImportSourceForSite, sendImportMessage, startFrontendPreview, startImport, startSkillSession };
|
package/build/cjs/index.js
CHANGED
|
@@ -37,11 +37,13 @@ __export(index_exports, {
|
|
|
37
37
|
getImportSourceFileForSite: () => getImportSourceFileForSite4,
|
|
38
38
|
getImportSourceForSite: () => getImportSourceForSite4,
|
|
39
39
|
getImportStatus: () => getImportStatus4,
|
|
40
|
+
linkSkillSession: () => linkSkillSession4,
|
|
40
41
|
searchImportSource: () => searchImportSource4,
|
|
41
42
|
searchImportSourceForSite: () => searchImportSourceForSite4,
|
|
42
43
|
sendImportMessage: () => sendImportMessage4,
|
|
43
44
|
startFrontendPreview: () => startFrontendPreview4,
|
|
44
|
-
startImport: () => startImport4
|
|
45
|
+
startImport: () => startImport4,
|
|
46
|
+
startSkillSession: () => startSkillSession4
|
|
45
47
|
});
|
|
46
48
|
module.exports = __toCommonJS(index_exports);
|
|
47
49
|
|
|
@@ -382,6 +384,48 @@ function getImportBySite(payload) {
|
|
|
382
384
|
}
|
|
383
385
|
return __getImportBySite;
|
|
384
386
|
}
|
|
387
|
+
function startSkillSession(payload) {
|
|
388
|
+
function __startSkillSession({ host }) {
|
|
389
|
+
const metadata = {
|
|
390
|
+
entityFqdn: "wix.ecom.site_import.v1.import",
|
|
391
|
+
method: "POST",
|
|
392
|
+
methodFqn: "wix.ecom.site_import.v1.SiteImportService.StartSkillSession",
|
|
393
|
+
packageName: PACKAGE_NAME,
|
|
394
|
+
migrationOptions: {
|
|
395
|
+
optInTransformResponse: true
|
|
396
|
+
},
|
|
397
|
+
url: resolveWixEcomSiteImportV1SiteImportServiceUrl({
|
|
398
|
+
protoPath: "/v1/skill-sessions",
|
|
399
|
+
data: payload,
|
|
400
|
+
host
|
|
401
|
+
}),
|
|
402
|
+
data: payload
|
|
403
|
+
};
|
|
404
|
+
return metadata;
|
|
405
|
+
}
|
|
406
|
+
return __startSkillSession;
|
|
407
|
+
}
|
|
408
|
+
function linkSkillSession(payload) {
|
|
409
|
+
function __linkSkillSession({ host }) {
|
|
410
|
+
const metadata = {
|
|
411
|
+
entityFqdn: "wix.ecom.site_import.v1.import",
|
|
412
|
+
method: "POST",
|
|
413
|
+
methodFqn: "wix.ecom.site_import.v1.SiteImportService.LinkSkillSession",
|
|
414
|
+
packageName: PACKAGE_NAME,
|
|
415
|
+
migrationOptions: {
|
|
416
|
+
optInTransformResponse: true
|
|
417
|
+
},
|
|
418
|
+
url: resolveWixEcomSiteImportV1SiteImportServiceUrl({
|
|
419
|
+
protoPath: "/v1/skill-sessions/link",
|
|
420
|
+
data: payload,
|
|
421
|
+
host
|
|
422
|
+
}),
|
|
423
|
+
data: payload
|
|
424
|
+
};
|
|
425
|
+
return metadata;
|
|
426
|
+
}
|
|
427
|
+
return __linkSkillSession;
|
|
428
|
+
}
|
|
385
429
|
|
|
386
430
|
// src/ecom-site-import-v1-import-imports.universal.ts
|
|
387
431
|
var ImportDestination = /* @__PURE__ */ ((ImportDestination2) => {
|
|
@@ -862,6 +906,58 @@ async function getImportBySite2(options) {
|
|
|
862
906
|
throw transformedError;
|
|
863
907
|
}
|
|
864
908
|
}
|
|
909
|
+
async function startSkillSession2(skillSessionId, options) {
|
|
910
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
911
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
912
|
+
skillSessionId,
|
|
913
|
+
skillsVersion: options?.skillsVersion
|
|
914
|
+
});
|
|
915
|
+
const reqOpts = startSkillSession(payload);
|
|
916
|
+
sideEffects?.onSiteCall?.();
|
|
917
|
+
try {
|
|
918
|
+
const result = await httpClient.request(reqOpts);
|
|
919
|
+
sideEffects?.onSuccess?.(result);
|
|
920
|
+
} catch (err) {
|
|
921
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
922
|
+
err,
|
|
923
|
+
{
|
|
924
|
+
spreadPathsToArguments: {},
|
|
925
|
+
explicitPathsToArguments: {
|
|
926
|
+
skillSessionId: "$[0]",
|
|
927
|
+
skillsVersion: "$[1].skillsVersion"
|
|
928
|
+
},
|
|
929
|
+
singleArgumentUnchanged: false
|
|
930
|
+
},
|
|
931
|
+
["skillSessionId", "options"]
|
|
932
|
+
);
|
|
933
|
+
sideEffects?.onError?.(err);
|
|
934
|
+
throw transformedError;
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
async function linkSkillSession2(skillSessionId) {
|
|
938
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
939
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
940
|
+
skillSessionId
|
|
941
|
+
});
|
|
942
|
+
const reqOpts = linkSkillSession(payload);
|
|
943
|
+
sideEffects?.onSiteCall?.();
|
|
944
|
+
try {
|
|
945
|
+
const result = await httpClient.request(reqOpts);
|
|
946
|
+
sideEffects?.onSuccess?.(result);
|
|
947
|
+
} catch (err) {
|
|
948
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
949
|
+
err,
|
|
950
|
+
{
|
|
951
|
+
spreadPathsToArguments: {},
|
|
952
|
+
explicitPathsToArguments: { skillSessionId: "$[0]" },
|
|
953
|
+
singleArgumentUnchanged: false
|
|
954
|
+
},
|
|
955
|
+
["skillSessionId"]
|
|
956
|
+
);
|
|
957
|
+
sideEffects?.onError?.(err);
|
|
958
|
+
throw transformedError;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
865
961
|
|
|
866
962
|
// src/ecom-site-import-v1-import-imports.public.ts
|
|
867
963
|
function startImport3(httpClient) {
|
|
@@ -963,6 +1059,21 @@ function getImportBySite3(httpClient) {
|
|
|
963
1059
|
{ httpClient }
|
|
964
1060
|
);
|
|
965
1061
|
}
|
|
1062
|
+
function startSkillSession3(httpClient) {
|
|
1063
|
+
return (skillSessionId, options) => startSkillSession2(
|
|
1064
|
+
skillSessionId,
|
|
1065
|
+
options,
|
|
1066
|
+
// @ts-ignore
|
|
1067
|
+
{ httpClient }
|
|
1068
|
+
);
|
|
1069
|
+
}
|
|
1070
|
+
function linkSkillSession3(httpClient) {
|
|
1071
|
+
return (skillSessionId) => linkSkillSession2(
|
|
1072
|
+
skillSessionId,
|
|
1073
|
+
// @ts-ignore
|
|
1074
|
+
{ httpClient }
|
|
1075
|
+
);
|
|
1076
|
+
}
|
|
966
1077
|
|
|
967
1078
|
// src/ecom-site-import-v1-import-imports.context.ts
|
|
968
1079
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
@@ -979,6 +1090,8 @@ var getImportSourceFileForSite4 = /* @__PURE__ */ (0, import_rest_modules3.creat
|
|
|
979
1090
|
var searchImportSource4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(searchImportSource3);
|
|
980
1091
|
var searchImportSourceForSite4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(searchImportSourceForSite3);
|
|
981
1092
|
var getImportBySite4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getImportBySite3);
|
|
1093
|
+
var startSkillSession4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(startSkillSession3);
|
|
1094
|
+
var linkSkillSession4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(linkSkillSession3);
|
|
982
1095
|
// Annotate the CommonJS export names for ESM import in node:
|
|
983
1096
|
0 && (module.exports = {
|
|
984
1097
|
ImportActivityKind,
|
|
@@ -998,10 +1111,12 @@ var getImportBySite4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule
|
|
|
998
1111
|
getImportSourceFileForSite,
|
|
999
1112
|
getImportSourceForSite,
|
|
1000
1113
|
getImportStatus,
|
|
1114
|
+
linkSkillSession,
|
|
1001
1115
|
searchImportSource,
|
|
1002
1116
|
searchImportSourceForSite,
|
|
1003
1117
|
sendImportMessage,
|
|
1004
1118
|
startFrontendPreview,
|
|
1005
|
-
startImport
|
|
1119
|
+
startImport,
|
|
1120
|
+
startSkillSession
|
|
1006
1121
|
});
|
|
1007
1122
|
//# sourceMappingURL=index.js.map
|