@wix/auto_sdk_consent-policy_cmp 1.0.3 → 1.0.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/build/cjs/index.d.ts +28 -1
- package/build/cjs/index.js +212 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +209 -1
- package/build/cjs/index.typings.js +192 -15
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +58 -1
- package/build/cjs/meta.js +166 -15
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +28 -0
- package/build/es/index.mjs +189 -0
- package/build/es/index.mjs.map +1 -0
- package/build/{internal/cjs/src/bu-legal-v2-cmp-config-cmp.universal.d.ts → es/index.typings.d.mts} +32 -25
- package/build/es/index.typings.mjs +169 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +58 -0
- package/build/es/meta.mjs +141 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +28 -1
- package/build/internal/cjs/index.js +212 -15
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +209 -1
- package/build/internal/cjs/index.typings.js +192 -15
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +58 -1
- package/build/internal/cjs/meta.js +166 -15
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +28 -0
- package/build/internal/es/index.mjs +189 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/{src/bu-legal-v2-cmp-config-cmp.universal.d.ts → index.typings.d.mts} +32 -25
- package/build/internal/es/index.typings.mjs +169 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +58 -0
- package/build/internal/es/meta.mjs +141 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +12 -10
- package/build/cjs/src/bu-legal-v2-cmp-config-cmp.context.d.ts +0 -6
- package/build/cjs/src/bu-legal-v2-cmp-config-cmp.context.js +0 -10
- package/build/cjs/src/bu-legal-v2-cmp-config-cmp.context.js.map +0 -1
- package/build/cjs/src/bu-legal-v2-cmp-config-cmp.http.d.ts +0 -5
- package/build/cjs/src/bu-legal-v2-cmp-config-cmp.http.js +0 -105
- package/build/cjs/src/bu-legal-v2-cmp-config-cmp.http.js.map +0 -1
- package/build/cjs/src/bu-legal-v2-cmp-config-cmp.meta.d.ts +0 -14
- package/build/cjs/src/bu-legal-v2-cmp-config-cmp.meta.js +0 -66
- package/build/cjs/src/bu-legal-v2-cmp-config-cmp.meta.js.map +0 -1
- package/build/cjs/src/bu-legal-v2-cmp-config-cmp.public.d.ts +0 -23
- package/build/cjs/src/bu-legal-v2-cmp-config-cmp.public.js +0 -20
- package/build/cjs/src/bu-legal-v2-cmp-config-cmp.public.js.map +0 -1
- package/build/cjs/src/bu-legal-v2-cmp-config-cmp.types.d.ts +0 -174
- package/build/cjs/src/bu-legal-v2-cmp-config-cmp.types.js +0 -12
- package/build/cjs/src/bu-legal-v2-cmp-config-cmp.types.js.map +0 -1
- package/build/cjs/src/bu-legal-v2-cmp-config-cmp.universal.d.ts +0 -202
- package/build/cjs/src/bu-legal-v2-cmp-config-cmp.universal.js +0 -111
- package/build/cjs/src/bu-legal-v2-cmp-config-cmp.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/bu-legal-v2-cmp-config-cmp.context.d.ts +0 -6
- package/build/es/src/bu-legal-v2-cmp-config-cmp.context.js +0 -6
- package/build/es/src/bu-legal-v2-cmp-config-cmp.context.js.map +0 -1
- package/build/es/src/bu-legal-v2-cmp-config-cmp.http.d.ts +0 -5
- package/build/es/src/bu-legal-v2-cmp-config-cmp.http.js +0 -100
- package/build/es/src/bu-legal-v2-cmp-config-cmp.http.js.map +0 -1
- package/build/es/src/bu-legal-v2-cmp-config-cmp.meta.d.ts +0 -14
- package/build/es/src/bu-legal-v2-cmp-config-cmp.meta.js +0 -38
- package/build/es/src/bu-legal-v2-cmp-config-cmp.meta.js.map +0 -1
- package/build/es/src/bu-legal-v2-cmp-config-cmp.public.d.ts +0 -23
- package/build/es/src/bu-legal-v2-cmp-config-cmp.public.js +0 -14
- package/build/es/src/bu-legal-v2-cmp-config-cmp.public.js.map +0 -1
- package/build/es/src/bu-legal-v2-cmp-config-cmp.types.d.ts +0 -174
- package/build/es/src/bu-legal-v2-cmp-config-cmp.types.js +0 -9
- package/build/es/src/bu-legal-v2-cmp-config-cmp.types.js.map +0 -1
- package/build/es/src/bu-legal-v2-cmp-config-cmp.universal.d.ts +0 -202
- package/build/es/src/bu-legal-v2-cmp-config-cmp.universal.js +0 -83
- package/build/es/src/bu-legal-v2-cmp-config-cmp.universal.js.map +0 -1
- package/build/internal/cjs/src/bu-legal-v2-cmp-config-cmp.context.d.ts +0 -6
- package/build/internal/cjs/src/bu-legal-v2-cmp-config-cmp.context.js +0 -10
- package/build/internal/cjs/src/bu-legal-v2-cmp-config-cmp.context.js.map +0 -1
- package/build/internal/cjs/src/bu-legal-v2-cmp-config-cmp.http.d.ts +0 -5
- package/build/internal/cjs/src/bu-legal-v2-cmp-config-cmp.http.js +0 -105
- package/build/internal/cjs/src/bu-legal-v2-cmp-config-cmp.http.js.map +0 -1
- package/build/internal/cjs/src/bu-legal-v2-cmp-config-cmp.meta.d.ts +0 -14
- package/build/internal/cjs/src/bu-legal-v2-cmp-config-cmp.meta.js +0 -66
- package/build/internal/cjs/src/bu-legal-v2-cmp-config-cmp.meta.js.map +0 -1
- package/build/internal/cjs/src/bu-legal-v2-cmp-config-cmp.public.d.ts +0 -23
- package/build/internal/cjs/src/bu-legal-v2-cmp-config-cmp.public.js +0 -20
- package/build/internal/cjs/src/bu-legal-v2-cmp-config-cmp.public.js.map +0 -1
- package/build/internal/cjs/src/bu-legal-v2-cmp-config-cmp.types.d.ts +0 -174
- package/build/internal/cjs/src/bu-legal-v2-cmp-config-cmp.types.js +0 -12
- package/build/internal/cjs/src/bu-legal-v2-cmp-config-cmp.types.js.map +0 -1
- package/build/internal/cjs/src/bu-legal-v2-cmp-config-cmp.universal.js +0 -111
- package/build/internal/cjs/src/bu-legal-v2-cmp-config-cmp.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/bu-legal-v2-cmp-config-cmp.context.d.ts +0 -6
- package/build/internal/es/src/bu-legal-v2-cmp-config-cmp.context.js +0 -6
- package/build/internal/es/src/bu-legal-v2-cmp-config-cmp.context.js.map +0 -1
- package/build/internal/es/src/bu-legal-v2-cmp-config-cmp.http.d.ts +0 -5
- package/build/internal/es/src/bu-legal-v2-cmp-config-cmp.http.js +0 -100
- package/build/internal/es/src/bu-legal-v2-cmp-config-cmp.http.js.map +0 -1
- package/build/internal/es/src/bu-legal-v2-cmp-config-cmp.meta.d.ts +0 -14
- package/build/internal/es/src/bu-legal-v2-cmp-config-cmp.meta.js +0 -38
- package/build/internal/es/src/bu-legal-v2-cmp-config-cmp.meta.js.map +0 -1
- package/build/internal/es/src/bu-legal-v2-cmp-config-cmp.public.d.ts +0 -23
- package/build/internal/es/src/bu-legal-v2-cmp-config-cmp.public.js +0 -14
- package/build/internal/es/src/bu-legal-v2-cmp-config-cmp.public.js.map +0 -1
- package/build/internal/es/src/bu-legal-v2-cmp-config-cmp.types.d.ts +0 -174
- package/build/internal/es/src/bu-legal-v2-cmp-config-cmp.types.js +0 -9
- package/build/internal/es/src/bu-legal-v2-cmp-config-cmp.types.js.map +0 -1
- package/build/internal/es/src/bu-legal-v2-cmp-config-cmp.universal.js +0 -83
- package/build/internal/es/src/bu-legal-v2-cmp-config-cmp.universal.js.map +0 -1
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.updateCmpConfig = exports.getCmpConfig = void 0;
|
|
27
|
-
const ambassadorWixBuLegalV2CmpConfig = __importStar(require("./bu-legal-v2-cmp-config-cmp.http.js"));
|
|
28
|
-
function getCmpConfig() {
|
|
29
|
-
const payload = {};
|
|
30
|
-
const getRequestOptions = ambassadorWixBuLegalV2CmpConfig.getCmpConfig(payload);
|
|
31
|
-
const getUrl = (context) => {
|
|
32
|
-
const { url } = getRequestOptions(context);
|
|
33
|
-
return url;
|
|
34
|
-
};
|
|
35
|
-
return {
|
|
36
|
-
getUrl,
|
|
37
|
-
httpMethod: 'GET',
|
|
38
|
-
path: '/v2/cmp-configs',
|
|
39
|
-
pathParams: {},
|
|
40
|
-
__requestType: null,
|
|
41
|
-
__originalRequestType: null,
|
|
42
|
-
__responseType: null,
|
|
43
|
-
__originalResponseType: null,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
exports.getCmpConfig = getCmpConfig;
|
|
47
|
-
function updateCmpConfig() {
|
|
48
|
-
const payload = {};
|
|
49
|
-
const getRequestOptions = ambassadorWixBuLegalV2CmpConfig.updateCmpConfig(payload);
|
|
50
|
-
const getUrl = (context) => {
|
|
51
|
-
const { url } = getRequestOptions(context);
|
|
52
|
-
return url;
|
|
53
|
-
};
|
|
54
|
-
return {
|
|
55
|
-
getUrl,
|
|
56
|
-
httpMethod: 'PATCH',
|
|
57
|
-
path: '/v2/cmp-configs',
|
|
58
|
-
pathParams: {},
|
|
59
|
-
__requestType: null,
|
|
60
|
-
__originalRequestType: null,
|
|
61
|
-
__responseType: null,
|
|
62
|
-
__originalResponseType: null,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
exports.updateCmpConfig = updateCmpConfig;
|
|
66
|
-
//# sourceMappingURL=bu-legal-v2-cmp-config-cmp.meta.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bu-legal-v2-cmp-config-cmp.meta.js","sourceRoot":"","sources":["../../../src/bu-legal-v2-cmp-config-cmp.meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sGAAwF;AAsBxF,SAAgB,YAAY;IAQ1B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,+BAA+B,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IAExD,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE,iBAAiB;QACvB,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AA5BD,oCA4BC;AAED,SAAgB,eAAe;IAQ7B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,+BAA+B,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAE3D,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,OAAO;QACnB,IAAI,EAAE,iBAAiB;QACvB,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AA5BD,0CA4BC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
-
import { CmpConfig } from './bu-legal-v2-cmp-config-cmp.universal.js';
|
|
3
|
-
export declare const __metadata: {
|
|
4
|
-
PACKAGE_NAME: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function getCmpConfig(httpClient: HttpClient): GetCmpConfigSignature;
|
|
7
|
-
interface GetCmpConfigSignature {
|
|
8
|
-
/**
|
|
9
|
-
* Retrieves a CMP config.
|
|
10
|
-
* @returns Requested CMP config.
|
|
11
|
-
*/
|
|
12
|
-
(): Promise<CmpConfig>;
|
|
13
|
-
}
|
|
14
|
-
export declare function updateCmpConfig(httpClient: HttpClient): UpdateCmpConfigSignature;
|
|
15
|
-
interface UpdateCmpConfigSignature {
|
|
16
|
-
/**
|
|
17
|
-
* Updates a CMP config.
|
|
18
|
-
* @param - CMP config to be updated.
|
|
19
|
-
* @returns Updated CMP config.
|
|
20
|
-
*/
|
|
21
|
-
(cmpConfig: CmpConfig): Promise<CmpConfig>;
|
|
22
|
-
}
|
|
23
|
-
export { ActionEvent, CmpConfig, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, GetCmpConfigRequest, GetCmpConfigResponse, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, RestoreInfo, UpdateCmpConfigRequest, UpdateCmpConfigResponse, WebhookIdentityType, } from './bu-legal-v2-cmp-config-cmp.universal.js';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WebhookIdentityType = exports.updateCmpConfig = exports.getCmpConfig = exports.__metadata = void 0;
|
|
4
|
-
const bu_legal_v2_cmp_config_cmp_universal_js_1 = require("./bu-legal-v2-cmp-config-cmp.universal.js");
|
|
5
|
-
exports.__metadata = { PACKAGE_NAME: '@wix/consent-policy' };
|
|
6
|
-
function getCmpConfig(httpClient) {
|
|
7
|
-
return () => (0, bu_legal_v2_cmp_config_cmp_universal_js_1.getCmpConfig)(
|
|
8
|
-
// @ts-ignore
|
|
9
|
-
{ httpClient });
|
|
10
|
-
}
|
|
11
|
-
exports.getCmpConfig = getCmpConfig;
|
|
12
|
-
function updateCmpConfig(httpClient) {
|
|
13
|
-
return (cmpConfig) => (0, bu_legal_v2_cmp_config_cmp_universal_js_1.updateCmpConfig)(cmpConfig,
|
|
14
|
-
// @ts-ignore
|
|
15
|
-
{ httpClient });
|
|
16
|
-
}
|
|
17
|
-
exports.updateCmpConfig = updateCmpConfig;
|
|
18
|
-
var bu_legal_v2_cmp_config_cmp_universal_js_2 = require("./bu-legal-v2-cmp-config-cmp.universal.js");
|
|
19
|
-
Object.defineProperty(exports, "WebhookIdentityType", { enumerable: true, get: function () { return bu_legal_v2_cmp_config_cmp_universal_js_2.WebhookIdentityType; } });
|
|
20
|
-
//# sourceMappingURL=bu-legal-v2-cmp-config-cmp.public.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bu-legal-v2-cmp-config-cmp.public.js","sourceRoot":"","sources":["../../../src/bu-legal-v2-cmp-config-cmp.public.ts"],"names":[],"mappings":";;;AACA,uGAImD;AAEtC,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAElE,SAAgB,YAAY,CAAC,UAAsB;IACjD,OAAO,GAAG,EAAE,CACV,IAAA,sDAAqB;IACnB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAND,oCAMC;AAUD,SAAgB,eAAe,CAC7B,UAAsB;IAEtB,OAAO,CAAC,SAAkD,EAAE,EAAE,CAC5D,IAAA,yDAAwB,EACtB,SAAS;IACT,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AATD,0CASC;AAWD,qGAiBmD;AADjD,8IAAA,mBAAmB,OAAA"}
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A CMP Config is a collection of settings and parameters defined within a consent management platform.
|
|
3
|
-
*
|
|
4
|
-
* Currently only contains a toggle to manage the visibility of social components until site visitors provide their consent.
|
|
5
|
-
*/
|
|
6
|
-
export interface CmpConfig {
|
|
7
|
-
/**
|
|
8
|
-
* Revision number, which increments by 1 each time the CMP config is updated.
|
|
9
|
-
* To prevent conflicting changes,
|
|
10
|
-
* the current revision must be passed when updating the CMP config.
|
|
11
|
-
* @readonly
|
|
12
|
-
*/
|
|
13
|
-
revision?: string | null;
|
|
14
|
-
/**
|
|
15
|
-
* Date and time the CMP config was created.
|
|
16
|
-
* @readonly
|
|
17
|
-
*/
|
|
18
|
-
createdDate?: Date | null;
|
|
19
|
-
/**
|
|
20
|
-
* Date and time the CMP config was last updated.
|
|
21
|
-
* @readonly
|
|
22
|
-
*/
|
|
23
|
-
updatedDate?: Date | null;
|
|
24
|
-
/** Whether elements are blocked until consent is given. */
|
|
25
|
-
socialElementsBlocked?: boolean | null;
|
|
26
|
-
}
|
|
27
|
-
export interface GetCmpConfigRequest {
|
|
28
|
-
}
|
|
29
|
-
export interface GetCmpConfigResponse {
|
|
30
|
-
/** Requested CMP config. */
|
|
31
|
-
cmpConfig?: CmpConfig;
|
|
32
|
-
}
|
|
33
|
-
export interface UpdateCmpConfigRequest {
|
|
34
|
-
/** CMP config to be updated. */
|
|
35
|
-
cmpConfig: CmpConfig;
|
|
36
|
-
}
|
|
37
|
-
export interface UpdateCmpConfigResponse {
|
|
38
|
-
/** Updated CMP config. */
|
|
39
|
-
cmpConfig?: CmpConfig;
|
|
40
|
-
}
|
|
41
|
-
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
42
|
-
createdEvent?: EntityCreatedEvent;
|
|
43
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
44
|
-
deletedEvent?: EntityDeletedEvent;
|
|
45
|
-
actionEvent?: ActionEvent;
|
|
46
|
-
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
47
|
-
id?: string;
|
|
48
|
-
/**
|
|
49
|
-
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
50
|
-
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
51
|
-
*/
|
|
52
|
-
entityFqdn?: string;
|
|
53
|
-
/**
|
|
54
|
-
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
55
|
-
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
56
|
-
*/
|
|
57
|
-
slug?: string;
|
|
58
|
-
/** ID of the entity associated with the event. */
|
|
59
|
-
entityId?: string;
|
|
60
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
61
|
-
eventTime?: Date | null;
|
|
62
|
-
/**
|
|
63
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
64
|
-
* (for example, GDPR).
|
|
65
|
-
*/
|
|
66
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
67
|
-
/** If present, indicates the action that triggered the event. */
|
|
68
|
-
originatedFrom?: string | null;
|
|
69
|
-
/**
|
|
70
|
-
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
71
|
-
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
72
|
-
*/
|
|
73
|
-
entityEventSequence?: string | null;
|
|
74
|
-
}
|
|
75
|
-
/** @oneof */
|
|
76
|
-
export interface DomainEventBodyOneOf {
|
|
77
|
-
createdEvent?: EntityCreatedEvent;
|
|
78
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
79
|
-
deletedEvent?: EntityDeletedEvent;
|
|
80
|
-
actionEvent?: ActionEvent;
|
|
81
|
-
}
|
|
82
|
-
export interface EntityCreatedEvent {
|
|
83
|
-
entityAsJson?: string;
|
|
84
|
-
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
85
|
-
restoreInfo?: RestoreInfo;
|
|
86
|
-
}
|
|
87
|
-
export interface RestoreInfo {
|
|
88
|
-
deletedDate?: Date | null;
|
|
89
|
-
}
|
|
90
|
-
export interface EntityUpdatedEvent {
|
|
91
|
-
/**
|
|
92
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
93
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
94
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
95
|
-
*/
|
|
96
|
-
currentEntityAsJson?: string;
|
|
97
|
-
}
|
|
98
|
-
export interface EntityDeletedEvent {
|
|
99
|
-
/** Entity that was deleted. */
|
|
100
|
-
deletedEntityAsJson?: string | null;
|
|
101
|
-
}
|
|
102
|
-
export interface ActionEvent {
|
|
103
|
-
bodyAsJson?: string;
|
|
104
|
-
}
|
|
105
|
-
export interface MessageEnvelope {
|
|
106
|
-
/**
|
|
107
|
-
* App instance ID.
|
|
108
|
-
* @format GUID
|
|
109
|
-
*/
|
|
110
|
-
instanceId?: string | null;
|
|
111
|
-
/**
|
|
112
|
-
* Event type.
|
|
113
|
-
* @maxLength 150
|
|
114
|
-
*/
|
|
115
|
-
eventType?: string;
|
|
116
|
-
/** The identification type and identity data. */
|
|
117
|
-
identity?: IdentificationData;
|
|
118
|
-
/** Stringify payload. */
|
|
119
|
-
data?: string;
|
|
120
|
-
}
|
|
121
|
-
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
122
|
-
/**
|
|
123
|
-
* ID of a site visitor that has not logged in to the site.
|
|
124
|
-
* @format GUID
|
|
125
|
-
*/
|
|
126
|
-
anonymousVisitorId?: string;
|
|
127
|
-
/**
|
|
128
|
-
* ID of a site visitor that has logged in to the site.
|
|
129
|
-
* @format GUID
|
|
130
|
-
*/
|
|
131
|
-
memberId?: string;
|
|
132
|
-
/**
|
|
133
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
134
|
-
* @format GUID
|
|
135
|
-
*/
|
|
136
|
-
wixUserId?: string;
|
|
137
|
-
/**
|
|
138
|
-
* ID of an app.
|
|
139
|
-
* @format GUID
|
|
140
|
-
*/
|
|
141
|
-
appId?: string;
|
|
142
|
-
/** @readonly */
|
|
143
|
-
identityType?: WebhookIdentityType;
|
|
144
|
-
}
|
|
145
|
-
/** @oneof */
|
|
146
|
-
export interface IdentificationDataIdOneOf {
|
|
147
|
-
/**
|
|
148
|
-
* ID of a site visitor that has not logged in to the site.
|
|
149
|
-
* @format GUID
|
|
150
|
-
*/
|
|
151
|
-
anonymousVisitorId?: string;
|
|
152
|
-
/**
|
|
153
|
-
* ID of a site visitor that has logged in to the site.
|
|
154
|
-
* @format GUID
|
|
155
|
-
*/
|
|
156
|
-
memberId?: string;
|
|
157
|
-
/**
|
|
158
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
159
|
-
* @format GUID
|
|
160
|
-
*/
|
|
161
|
-
wixUserId?: string;
|
|
162
|
-
/**
|
|
163
|
-
* ID of an app.
|
|
164
|
-
* @format GUID
|
|
165
|
-
*/
|
|
166
|
-
appId?: string;
|
|
167
|
-
}
|
|
168
|
-
export declare enum WebhookIdentityType {
|
|
169
|
-
UNKNOWN = "UNKNOWN",
|
|
170
|
-
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
171
|
-
MEMBER = "MEMBER",
|
|
172
|
-
WIX_USER = "WIX_USER",
|
|
173
|
-
APP = "APP"
|
|
174
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WebhookIdentityType = void 0;
|
|
4
|
-
var WebhookIdentityType;
|
|
5
|
-
(function (WebhookIdentityType) {
|
|
6
|
-
WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
|
|
7
|
-
WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
8
|
-
WebhookIdentityType["MEMBER"] = "MEMBER";
|
|
9
|
-
WebhookIdentityType["WIX_USER"] = "WIX_USER";
|
|
10
|
-
WebhookIdentityType["APP"] = "APP";
|
|
11
|
-
})(WebhookIdentityType || (exports.WebhookIdentityType = WebhookIdentityType = {}));
|
|
12
|
-
//# sourceMappingURL=bu-legal-v2-cmp-config-cmp.types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bu-legal-v2-cmp-config-cmp.types.js","sourceRoot":"","sources":["../../../src/bu-legal-v2-cmp-config-cmp.types.ts"],"names":[],"mappings":";;;AAqLA,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,mCAAnB,mBAAmB,QAM9B"}
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
-
/**
|
|
3
|
-
* A CMP Config is a collection of settings and parameters defined within a consent management platform.
|
|
4
|
-
*
|
|
5
|
-
* Currently only contains a toggle to manage the visibility of social components until site visitors provide their consent.
|
|
6
|
-
*/
|
|
7
|
-
export interface CmpConfig {
|
|
8
|
-
/**
|
|
9
|
-
* Revision number, which increments by 1 each time the CMP config is updated.
|
|
10
|
-
* To prevent conflicting changes,
|
|
11
|
-
* the current revision must be passed when updating the CMP config.
|
|
12
|
-
* @readonly
|
|
13
|
-
*/
|
|
14
|
-
revision?: string | null;
|
|
15
|
-
/**
|
|
16
|
-
* Date and time the CMP config was created.
|
|
17
|
-
* @readonly
|
|
18
|
-
*/
|
|
19
|
-
_createdDate?: Date | null;
|
|
20
|
-
/**
|
|
21
|
-
* Date and time the CMP config was last updated.
|
|
22
|
-
* @readonly
|
|
23
|
-
*/
|
|
24
|
-
_updatedDate?: Date | null;
|
|
25
|
-
/** Whether elements are blocked until consent is given. */
|
|
26
|
-
socialElementsBlocked?: boolean | null;
|
|
27
|
-
}
|
|
28
|
-
export interface GetCmpConfigRequest {
|
|
29
|
-
}
|
|
30
|
-
export interface GetCmpConfigResponse {
|
|
31
|
-
/** Requested CMP config. */
|
|
32
|
-
cmpConfig?: CmpConfig;
|
|
33
|
-
}
|
|
34
|
-
export interface UpdateCmpConfigRequest {
|
|
35
|
-
/** CMP config to be updated. */
|
|
36
|
-
cmpConfig: CmpConfig;
|
|
37
|
-
}
|
|
38
|
-
export interface UpdateCmpConfigResponse {
|
|
39
|
-
/** Updated CMP config. */
|
|
40
|
-
cmpConfig?: CmpConfig;
|
|
41
|
-
}
|
|
42
|
-
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
43
|
-
createdEvent?: EntityCreatedEvent;
|
|
44
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
45
|
-
deletedEvent?: EntityDeletedEvent;
|
|
46
|
-
actionEvent?: ActionEvent;
|
|
47
|
-
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
48
|
-
_id?: string;
|
|
49
|
-
/**
|
|
50
|
-
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
51
|
-
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
52
|
-
*/
|
|
53
|
-
entityFqdn?: string;
|
|
54
|
-
/**
|
|
55
|
-
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
56
|
-
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
57
|
-
*/
|
|
58
|
-
slug?: string;
|
|
59
|
-
/** ID of the entity associated with the event. */
|
|
60
|
-
entityId?: string;
|
|
61
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
62
|
-
eventTime?: Date | null;
|
|
63
|
-
/**
|
|
64
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
65
|
-
* (for example, GDPR).
|
|
66
|
-
*/
|
|
67
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
68
|
-
/** If present, indicates the action that triggered the event. */
|
|
69
|
-
originatedFrom?: string | null;
|
|
70
|
-
/**
|
|
71
|
-
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
72
|
-
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
73
|
-
*/
|
|
74
|
-
entityEventSequence?: string | null;
|
|
75
|
-
}
|
|
76
|
-
/** @oneof */
|
|
77
|
-
export interface DomainEventBodyOneOf {
|
|
78
|
-
createdEvent?: EntityCreatedEvent;
|
|
79
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
80
|
-
deletedEvent?: EntityDeletedEvent;
|
|
81
|
-
actionEvent?: ActionEvent;
|
|
82
|
-
}
|
|
83
|
-
export interface EntityCreatedEvent {
|
|
84
|
-
entity?: string;
|
|
85
|
-
}
|
|
86
|
-
export interface RestoreInfo {
|
|
87
|
-
deletedDate?: Date | null;
|
|
88
|
-
}
|
|
89
|
-
export interface EntityUpdatedEvent {
|
|
90
|
-
/**
|
|
91
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
92
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
93
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
94
|
-
*/
|
|
95
|
-
currentEntity?: string;
|
|
96
|
-
}
|
|
97
|
-
export interface EntityDeletedEvent {
|
|
98
|
-
/** Entity that was deleted. */
|
|
99
|
-
deletedEntity?: string | null;
|
|
100
|
-
}
|
|
101
|
-
export interface ActionEvent {
|
|
102
|
-
body?: string;
|
|
103
|
-
}
|
|
104
|
-
export interface MessageEnvelope {
|
|
105
|
-
/**
|
|
106
|
-
* App instance ID.
|
|
107
|
-
* @format GUID
|
|
108
|
-
*/
|
|
109
|
-
instanceId?: string | null;
|
|
110
|
-
/**
|
|
111
|
-
* Event type.
|
|
112
|
-
* @maxLength 150
|
|
113
|
-
*/
|
|
114
|
-
eventType?: string;
|
|
115
|
-
/** The identification type and identity data. */
|
|
116
|
-
identity?: IdentificationData;
|
|
117
|
-
/** Stringify payload. */
|
|
118
|
-
data?: string;
|
|
119
|
-
}
|
|
120
|
-
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
121
|
-
/**
|
|
122
|
-
* ID of a site visitor that has not logged in to the site.
|
|
123
|
-
* @format GUID
|
|
124
|
-
*/
|
|
125
|
-
anonymousVisitorId?: string;
|
|
126
|
-
/**
|
|
127
|
-
* ID of a site visitor that has logged in to the site.
|
|
128
|
-
* @format GUID
|
|
129
|
-
*/
|
|
130
|
-
memberId?: string;
|
|
131
|
-
/**
|
|
132
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
133
|
-
* @format GUID
|
|
134
|
-
*/
|
|
135
|
-
wixUserId?: string;
|
|
136
|
-
/**
|
|
137
|
-
* ID of an app.
|
|
138
|
-
* @format GUID
|
|
139
|
-
*/
|
|
140
|
-
appId?: string;
|
|
141
|
-
/** @readonly */
|
|
142
|
-
identityType?: WebhookIdentityType;
|
|
143
|
-
}
|
|
144
|
-
/** @oneof */
|
|
145
|
-
export interface IdentificationDataIdOneOf {
|
|
146
|
-
/**
|
|
147
|
-
* ID of a site visitor that has not logged in to the site.
|
|
148
|
-
* @format GUID
|
|
149
|
-
*/
|
|
150
|
-
anonymousVisitorId?: string;
|
|
151
|
-
/**
|
|
152
|
-
* ID of a site visitor that has logged in to the site.
|
|
153
|
-
* @format GUID
|
|
154
|
-
*/
|
|
155
|
-
memberId?: string;
|
|
156
|
-
/**
|
|
157
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
158
|
-
* @format GUID
|
|
159
|
-
*/
|
|
160
|
-
wixUserId?: string;
|
|
161
|
-
/**
|
|
162
|
-
* ID of an app.
|
|
163
|
-
* @format GUID
|
|
164
|
-
*/
|
|
165
|
-
appId?: string;
|
|
166
|
-
}
|
|
167
|
-
export declare enum WebhookIdentityType {
|
|
168
|
-
UNKNOWN = "UNKNOWN",
|
|
169
|
-
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
170
|
-
MEMBER = "MEMBER",
|
|
171
|
-
WIX_USER = "WIX_USER",
|
|
172
|
-
APP = "APP"
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Retrieves a CMP config.
|
|
176
|
-
* @public
|
|
177
|
-
* @documentationMaturity preview
|
|
178
|
-
* @permissionId COOKIE_CONSENT.CMP_CONFIG_READ
|
|
179
|
-
* @permissionScope Manage CMP Configurations
|
|
180
|
-
* @permissionScopeId SCOPE.CMP_CONFIG.MANAGE
|
|
181
|
-
* @permissionScope Read CMP Configurations
|
|
182
|
-
* @permissionScopeId SCOPE.CMP_CONFIG.READ_ONLY
|
|
183
|
-
* @applicableIdentity APP
|
|
184
|
-
* @returns Requested CMP config.
|
|
185
|
-
* @fqn wix.bu.legal.v2.CmpConfigService.GetCmpConfig
|
|
186
|
-
*/
|
|
187
|
-
export declare function getCmpConfig(): Promise<CmpConfig>;
|
|
188
|
-
/**
|
|
189
|
-
* Updates a CMP config.
|
|
190
|
-
* @param cmpConfig - CMP config to be updated.
|
|
191
|
-
* @public
|
|
192
|
-
* @documentationMaturity preview
|
|
193
|
-
* @requiredField cmpConfig
|
|
194
|
-
* @requiredField cmpConfig.revision
|
|
195
|
-
* @permissionId COOKIE_CONSENT.CMP_CONFIG_UPDATE
|
|
196
|
-
* @permissionScope Manage CMP Configurations
|
|
197
|
-
* @permissionScopeId SCOPE.CMP_CONFIG.MANAGE
|
|
198
|
-
* @applicableIdentity APP
|
|
199
|
-
* @returns Updated CMP config.
|
|
200
|
-
* @fqn wix.bu.legal.v2.CmpConfigService.UpdateCmpConfig
|
|
201
|
-
*/
|
|
202
|
-
export declare function updateCmpConfig(cmpConfig: NonNullablePaths<CmpConfig, `revision`>): Promise<CmpConfig>;
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.updateCmpConfig = exports.getCmpConfig = exports.WebhookIdentityType = void 0;
|
|
27
|
-
const transform_error_1 = require("@wix/sdk-runtime/transform-error");
|
|
28
|
-
const rename_all_nested_keys_1 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
29
|
-
const ambassadorWixBuLegalV2CmpConfig = __importStar(require("./bu-legal-v2-cmp-config-cmp.http.js"));
|
|
30
|
-
var WebhookIdentityType;
|
|
31
|
-
(function (WebhookIdentityType) {
|
|
32
|
-
WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
|
|
33
|
-
WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
34
|
-
WebhookIdentityType["MEMBER"] = "MEMBER";
|
|
35
|
-
WebhookIdentityType["WIX_USER"] = "WIX_USER";
|
|
36
|
-
WebhookIdentityType["APP"] = "APP";
|
|
37
|
-
})(WebhookIdentityType || (exports.WebhookIdentityType = WebhookIdentityType = {}));
|
|
38
|
-
/**
|
|
39
|
-
* Retrieves a CMP config.
|
|
40
|
-
* @public
|
|
41
|
-
* @documentationMaturity preview
|
|
42
|
-
* @permissionId COOKIE_CONSENT.CMP_CONFIG_READ
|
|
43
|
-
* @permissionScope Manage CMP Configurations
|
|
44
|
-
* @permissionScopeId SCOPE.CMP_CONFIG.MANAGE
|
|
45
|
-
* @permissionScope Read CMP Configurations
|
|
46
|
-
* @permissionScopeId SCOPE.CMP_CONFIG.READ_ONLY
|
|
47
|
-
* @applicableIdentity APP
|
|
48
|
-
* @returns Requested CMP config.
|
|
49
|
-
* @fqn wix.bu.legal.v2.CmpConfigService.GetCmpConfig
|
|
50
|
-
*/
|
|
51
|
-
async function getCmpConfig() {
|
|
52
|
-
// @ts-ignore
|
|
53
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
54
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({});
|
|
55
|
-
const reqOpts = ambassadorWixBuLegalV2CmpConfig.getCmpConfig(payload);
|
|
56
|
-
sideEffects?.onSiteCall?.();
|
|
57
|
-
try {
|
|
58
|
-
const result = await httpClient.request(reqOpts);
|
|
59
|
-
sideEffects?.onSuccess?.(result);
|
|
60
|
-
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data)?.cmpConfig;
|
|
61
|
-
}
|
|
62
|
-
catch (err) {
|
|
63
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
64
|
-
spreadPathsToArguments: {},
|
|
65
|
-
explicitPathsToArguments: {},
|
|
66
|
-
singleArgumentUnchanged: false,
|
|
67
|
-
}, []);
|
|
68
|
-
sideEffects?.onError?.(err);
|
|
69
|
-
throw transformedError;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
exports.getCmpConfig = getCmpConfig;
|
|
73
|
-
/**
|
|
74
|
-
* Updates a CMP config.
|
|
75
|
-
* @param cmpConfig - CMP config to be updated.
|
|
76
|
-
* @public
|
|
77
|
-
* @documentationMaturity preview
|
|
78
|
-
* @requiredField cmpConfig
|
|
79
|
-
* @requiredField cmpConfig.revision
|
|
80
|
-
* @permissionId COOKIE_CONSENT.CMP_CONFIG_UPDATE
|
|
81
|
-
* @permissionScope Manage CMP Configurations
|
|
82
|
-
* @permissionScopeId SCOPE.CMP_CONFIG.MANAGE
|
|
83
|
-
* @applicableIdentity APP
|
|
84
|
-
* @returns Updated CMP config.
|
|
85
|
-
* @fqn wix.bu.legal.v2.CmpConfigService.UpdateCmpConfig
|
|
86
|
-
*/
|
|
87
|
-
async function updateCmpConfig(cmpConfig) {
|
|
88
|
-
// @ts-ignore
|
|
89
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
90
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
91
|
-
cmpConfig: cmpConfig,
|
|
92
|
-
});
|
|
93
|
-
const reqOpts = ambassadorWixBuLegalV2CmpConfig.updateCmpConfig(payload);
|
|
94
|
-
sideEffects?.onSiteCall?.();
|
|
95
|
-
try {
|
|
96
|
-
const result = await httpClient.request(reqOpts);
|
|
97
|
-
sideEffects?.onSuccess?.(result);
|
|
98
|
-
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data)?.cmpConfig;
|
|
99
|
-
}
|
|
100
|
-
catch (err) {
|
|
101
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
102
|
-
spreadPathsToArguments: {},
|
|
103
|
-
explicitPathsToArguments: { cmpConfig: '$[0]' },
|
|
104
|
-
singleArgumentUnchanged: false,
|
|
105
|
-
}, ['cmpConfig']);
|
|
106
|
-
sideEffects?.onError?.(err);
|
|
107
|
-
throw transformedError;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
exports.updateCmpConfig = updateCmpConfig;
|
|
111
|
-
//# sourceMappingURL=bu-legal-v2-cmp-config-cmp.universal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bu-legal-v2-cmp-config-cmp.universal.js","sourceRoot":"","sources":["../../../src/bu-legal-v2-cmp-config-cmp.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAuF;AACvF,oFAGiD;AAEjD,sGAAwF;AAqLxF,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,mCAAnB,mBAAmB,QAM9B;AAED;;;;;;;;;;;;GAYG;AACI,KAAK,UAAU,YAAY;IAChC,aAAa;IACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,8DAAqC,EAAC,EAAE,CAAC,CAAC;IAE1D,MAAM,OAAO,GAAG,+BAA+B,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IAEtE,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;QAEjC,OAAO,IAAA,gEAAuC,EAAC,MAAM,CAAC,IAAI,CAAC,EAAE,SAAU,CAAC;IAC1E,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,IAAA,gCAAiB,EACxC,GAAG,EACH;YACE,sBAAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE,EAAE;YAC5B,uBAAuB,EAAE,KAAK;SAC/B,EACD,EAAE,CACH,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC;AA/BD,oCA+BC;AAED;;;;;;;;;;;;;GAaG;AACI,KAAK,UAAU,eAAe,CACnC,SAAkD;IAElD,aAAa;IACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,8DAAqC,EAAC;QACpD,SAAS,EAAE,SAAS;KACrB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,+BAA+B,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAEzE,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;QAEjC,OAAO,IAAA,gEAAuC,EAAC,MAAM,CAAC,IAAI,CAAC,EAAE,SAAU,CAAC;IAC1E,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,IAAA,gCAAiB,EACxC,GAAG,EACH;YACE,sBAAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;YAC/C,uBAAuB,EAAE,KAAK;SAC/B,EACD,CAAC,WAAW,CAAC,CACd,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC;AAnCD,0CAmCC"}
|
package/build/es/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/bu-legal-v2-cmp-config-cmp.context.js';
|
package/build/es/index.js
DELETED
package/build/es/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,6CAA6C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/bu-legal-v2-cmp-config-cmp.universal.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":"AAAA,cAAc,+CAA+C,CAAC"}
|
package/build/es/meta.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/bu-legal-v2-cmp-config-cmp.meta.js';
|
package/build/es/meta.js
DELETED
package/build/es/meta.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { getCmpConfig as publicGetCmpConfig, updateCmpConfig as publicUpdateCmpConfig } from './bu-legal-v2-cmp-config-cmp.public.js';
|
|
2
|
-
import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
|
|
3
|
-
export declare const getCmpConfig: MaybeContext<BuildRESTFunction<typeof publicGetCmpConfig> & typeof publicGetCmpConfig>;
|
|
4
|
-
export declare const updateCmpConfig: MaybeContext<BuildRESTFunction<typeof publicUpdateCmpConfig> & typeof publicUpdateCmpConfig>;
|
|
5
|
-
export { WebhookIdentityType } from './bu-legal-v2-cmp-config-cmp.universal.js';
|
|
6
|
-
export { CmpConfig, GetCmpConfigRequest, GetCmpConfigResponse, UpdateCmpConfigRequest, UpdateCmpConfigResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, RestoreInfo, EntityUpdatedEvent, EntityDeletedEvent, ActionEvent, MessageEnvelope, IdentificationData, IdentificationDataIdOneOf, } from './bu-legal-v2-cmp-config-cmp.universal.js';
|