@wix/crm 1.0.0 → 1.0.2
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 +4 -1
- package/build/cjs/index.js +5 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/src/contacts-v4-contact.http.d.ts +192 -0
- package/build/cjs/src/contacts-v4-contact.http.js +522 -0
- package/build/cjs/src/contacts-v4-contact.http.js.map +1 -0
- package/build/cjs/src/contacts-v4-contact.public.d.ts +14 -0
- package/build/cjs/src/contacts-v4-contact.public.js +64 -0
- package/build/cjs/src/contacts-v4-contact.public.js.map +1 -0
- package/build/cjs/src/contacts-v4-contact.types.d.ts +1310 -0
- package/build/cjs/src/contacts-v4-contact.types.js +202 -0
- package/build/cjs/src/contacts-v4-contact.types.js.map +1 -0
- package/build/cjs/src/contacts-v4-contact.universal.d.ts +1663 -0
- package/build/cjs/src/contacts-v4-contact.universal.js +903 -0
- package/build/cjs/src/contacts-v4-contact.universal.js.map +1 -0
- package/build/cjs/src/contacts-v4-extended-field.http.d.ts +31 -0
- package/build/cjs/src/contacts-v4-extended-field.http.js +215 -0
- package/build/cjs/src/contacts-v4-extended-field.http.js.map +1 -0
- package/build/cjs/src/contacts-v4-extended-field.public.d.ts +12 -0
- package/build/cjs/src/contacts-v4-extended-field.public.js +40 -0
- package/build/cjs/src/contacts-v4-extended-field.public.js.map +1 -0
- package/build/cjs/src/contacts-v4-extended-field.types.d.ts +257 -0
- package/build/cjs/src/contacts-v4-extended-field.types.js +23 -0
- package/build/cjs/src/contacts-v4-extended-field.types.js.map +1 -0
- package/build/cjs/src/contacts-v4-extended-field.universal.d.ts +476 -0
- package/build/cjs/src/contacts-v4-extended-field.universal.js +393 -0
- package/build/cjs/src/contacts-v4-extended-field.universal.js.map +1 -0
- package/build/cjs/src/contacts-v4-label.http.d.ts +31 -0
- package/build/cjs/src/contacts-v4-label.http.js +191 -0
- package/build/cjs/src/contacts-v4-label.http.js.map +1 -0
- package/build/cjs/src/contacts-v4-label.public.d.ts +11 -0
- package/build/cjs/src/contacts-v4-label.public.js +33 -0
- package/build/cjs/src/contacts-v4-label.public.js.map +1 -0
- package/build/cjs/src/contacts-v4-label.types.d.ts +253 -0
- package/build/cjs/src/contacts-v4-label.types.js +17 -0
- package/build/cjs/src/contacts-v4-label.types.js.map +1 -0
- package/build/cjs/src/contacts-v4-label.universal.d.ts +442 -0
- package/build/cjs/src/contacts-v4-label.universal.js +326 -0
- package/build/cjs/src/contacts-v4-label.universal.js.map +1 -0
- package/build/es/index.d.ts +4 -1
- package/build/es/index.js +4 -1
- package/build/es/index.js.map +1 -1
- package/build/es/src/contacts-v4-contact.http.d.ts +192 -0
- package/build/es/src/contacts-v4-contact.http.js +512 -0
- package/build/es/src/contacts-v4-contact.http.js.map +1 -0
- package/build/es/src/contacts-v4-contact.public.d.ts +14 -0
- package/build/es/src/contacts-v4-contact.public.js +39 -0
- package/build/es/src/contacts-v4-contact.public.js.map +1 -0
- package/build/es/src/contacts-v4-contact.types.d.ts +1310 -0
- package/build/es/src/contacts-v4-contact.types.js +199 -0
- package/build/es/src/contacts-v4-contact.types.js.map +1 -0
- package/build/es/src/contacts-v4-contact.universal.d.ts +1663 -0
- package/build/es/src/contacts-v4-contact.universal.js +874 -0
- package/build/es/src/contacts-v4-contact.universal.js.map +1 -0
- package/build/es/src/contacts-v4-extended-field.http.d.ts +31 -0
- package/build/es/src/contacts-v4-extended-field.http.js +207 -0
- package/build/es/src/contacts-v4-extended-field.http.js.map +1 -0
- package/build/es/src/contacts-v4-extended-field.public.d.ts +12 -0
- package/build/es/src/contacts-v4-extended-field.public.js +29 -0
- package/build/es/src/contacts-v4-extended-field.public.js.map +1 -0
- package/build/es/src/contacts-v4-extended-field.types.d.ts +257 -0
- package/build/es/src/contacts-v4-extended-field.types.js +20 -0
- package/build/es/src/contacts-v4-extended-field.types.js.map +1 -0
- package/build/es/src/contacts-v4-extended-field.universal.d.ts +476 -0
- package/build/es/src/contacts-v4-extended-field.universal.js +366 -0
- package/build/es/src/contacts-v4-extended-field.universal.js.map +1 -0
- package/build/es/src/contacts-v4-label.http.d.ts +31 -0
- package/build/es/src/contacts-v4-label.http.js +184 -0
- package/build/es/src/contacts-v4-label.http.js.map +1 -0
- package/build/es/src/contacts-v4-label.public.d.ts +11 -0
- package/build/es/src/contacts-v4-label.public.js +24 -0
- package/build/es/src/contacts-v4-label.public.js.map +1 -0
- package/build/es/src/contacts-v4-label.types.d.ts +253 -0
- package/build/es/src/contacts-v4-label.types.js +14 -0
- package/build/es/src/contacts-v4-label.types.js.map +1 -0
- package/build/es/src/contacts-v4-label.universal.d.ts +442 -0
- package/build/es/src/contacts-v4-label.universal.js +300 -0
- package/build/es/src/contacts-v4-label.universal.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.queryExtendedFields = exports.deleteExtendedField = exports.renameExtendedField = exports.getExtendedField = exports.findOrCreateExtendedField = exports.SortOrder = exports.FieldType = exports.FieldDataType = exports.__debug = void 0;
|
|
32
|
+
const velo_1 = require("@wix/metro-runtime/velo");
|
|
33
|
+
const ambassadorWixContactsV4ExtendedField = __importStar(require("./contacts-v4-extended-field.http"));
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
const motion_edm_autogen_query_wrapper_1 = require("@wix/motion-edm-autogen-query-wrapper");
|
|
36
|
+
let __verbose = false;
|
|
37
|
+
function __log(...args) {
|
|
38
|
+
__verbose && console.log(...args);
|
|
39
|
+
}
|
|
40
|
+
function __inspect(obj) {
|
|
41
|
+
return obj;
|
|
42
|
+
}
|
|
43
|
+
exports.__debug = {
|
|
44
|
+
verboseLogging: {
|
|
45
|
+
on: () => (__verbose = true),
|
|
46
|
+
off: () => (__verbose = false),
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
const _toVeloEntity = '$';
|
|
50
|
+
const _fromVeloEntity = '$';
|
|
51
|
+
var FieldDataType;
|
|
52
|
+
(function (FieldDataType) {
|
|
53
|
+
FieldDataType["UNKNOWN_DATA_TYPE"] = "UNKNOWN_DATA_TYPE";
|
|
54
|
+
FieldDataType["TEXT"] = "TEXT";
|
|
55
|
+
FieldDataType["NUMBER"] = "NUMBER";
|
|
56
|
+
FieldDataType["DATE"] = "DATE";
|
|
57
|
+
FieldDataType["URL"] = "URL";
|
|
58
|
+
})(FieldDataType = exports.FieldDataType || (exports.FieldDataType = {}));
|
|
59
|
+
var FieldType;
|
|
60
|
+
(function (FieldType) {
|
|
61
|
+
FieldType["UNKNOWN"] = "UNKNOWN";
|
|
62
|
+
FieldType["SYSTEM"] = "SYSTEM";
|
|
63
|
+
FieldType["USER_DEFINED"] = "USER_DEFINED";
|
|
64
|
+
})(FieldType = exports.FieldType || (exports.FieldType = {}));
|
|
65
|
+
var SortOrder;
|
|
66
|
+
(function (SortOrder) {
|
|
67
|
+
SortOrder["ASC"] = "ASC";
|
|
68
|
+
SortOrder["DESC"] = "DESC";
|
|
69
|
+
})(SortOrder = exports.SortOrder || (exports.SortOrder = {}));
|
|
70
|
+
const _deleteExtendedFieldRequest = {};
|
|
71
|
+
const _deleteExtendedFieldResponse = {};
|
|
72
|
+
const _findOrCreateExtendedFieldRequest = {};
|
|
73
|
+
const _findOrCreateExtendedFieldResponse = {};
|
|
74
|
+
const _getExtendedFieldRequest = {};
|
|
75
|
+
const _getExtendedFieldResponse = {};
|
|
76
|
+
const _queryExtendedFieldsRequest = {};
|
|
77
|
+
const _queryExtendedFieldsResponse = {};
|
|
78
|
+
const _updateExtendedFieldRequest = {};
|
|
79
|
+
const _updateExtendedFieldResponse = {};
|
|
80
|
+
/**
|
|
81
|
+
* Retrieves a custom field with a given name, or creates one if it doesn't exist.
|
|
82
|
+
*
|
|
83
|
+
* Successful calls to this endpoint always return a field,
|
|
84
|
+
* which can be passed to subsequent requests.
|
|
85
|
+
*
|
|
86
|
+
* To find an existing custom field without potentially creating a new one, use
|
|
87
|
+
* [Get Extended Field](https:dev.wix.com/api/rest/contacts/extended-fields/get-extended-field) or
|
|
88
|
+
* [List Extended Fields](https:dev.wix.com/api/rest/contacts/extended-fields/list-extended-fields).
|
|
89
|
+
*
|
|
90
|
+
* This function is not a universal function and runs only on the backend.
|
|
91
|
+
* @param displayName - Display name to find or create.
|
|
92
|
+
*
|
|
93
|
+
* If an existing custom field is an exact match
|
|
94
|
+
* for the specified `displayName`,
|
|
95
|
+
* the existing field is returned.
|
|
96
|
+
* If not, a new field is created and returned.
|
|
97
|
+
* @public
|
|
98
|
+
* @documentationMaturity preview
|
|
99
|
+
* @requiredField displayName
|
|
100
|
+
* @returns Extended field that was found or created.
|
|
101
|
+
*/
|
|
102
|
+
function findOrCreateExtendedField(displayName, options) {
|
|
103
|
+
var _a, _b, _c;
|
|
104
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
105
|
+
const requestTransformation = {
|
|
106
|
+
displayName: '$[0]',
|
|
107
|
+
dataType: '$[1].dataType',
|
|
108
|
+
};
|
|
109
|
+
const responseTransformation = '$';
|
|
110
|
+
// @ts-ignore
|
|
111
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
112
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
113
|
+
rootSchema: _findOrCreateExtendedFieldRequest,
|
|
114
|
+
depSchemas: {},
|
|
115
|
+
fqdnTransformation: {
|
|
116
|
+
paths: [],
|
|
117
|
+
transformation: _fromVeloEntity,
|
|
118
|
+
},
|
|
119
|
+
customTransformation: requestTransformation,
|
|
120
|
+
});
|
|
121
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
122
|
+
rootSchema: _findOrCreateExtendedFieldResponse,
|
|
123
|
+
depSchemas: {},
|
|
124
|
+
fqdnTransformation: {
|
|
125
|
+
paths: [...['field']],
|
|
126
|
+
transformation: _toVeloEntity,
|
|
127
|
+
},
|
|
128
|
+
customTransformation: responseTransformation,
|
|
129
|
+
});
|
|
130
|
+
const payload = toAmbassadorRequest([displayName, options]);
|
|
131
|
+
const reqOpts = ambassadorWixContactsV4ExtendedField.findOrCreateExtendedField(payload);
|
|
132
|
+
__log(`"FindOrCreateExtendedField" sending request with: ${__inspect(reqOpts)}`);
|
|
133
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
134
|
+
try {
|
|
135
|
+
const result = yield httpClient.request(reqOpts);
|
|
136
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
137
|
+
return fromJSON(result.data);
|
|
138
|
+
}
|
|
139
|
+
catch (err) {
|
|
140
|
+
const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
|
|
141
|
+
'displayName',
|
|
142
|
+
'options',
|
|
143
|
+
]);
|
|
144
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
145
|
+
throw transformedError;
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
exports.findOrCreateExtendedField = findOrCreateExtendedField;
|
|
150
|
+
/**
|
|
151
|
+
* Retrieves an extended field.
|
|
152
|
+
*
|
|
153
|
+
* This function is not a universal function and runs only on the backend.
|
|
154
|
+
* @param key - Extended field key.
|
|
155
|
+
*
|
|
156
|
+
* When accessing contact data,
|
|
157
|
+
* extended field values are available at `info.extendedFields.items[key]`.
|
|
158
|
+
* For example, if the key is "custom.patronus",
|
|
159
|
+
* the value can be accessed at `info.extendedFields.items["custom.patronus"]`.
|
|
160
|
+
*
|
|
161
|
+
* Once set, `key` cannot be modified, even if `displayName` changes.
|
|
162
|
+
* @public
|
|
163
|
+
* @documentationMaturity preview
|
|
164
|
+
* @requiredField key
|
|
165
|
+
* @returns The specified field.
|
|
166
|
+
*/
|
|
167
|
+
function getExtendedField(key) {
|
|
168
|
+
var _a, _b, _c;
|
|
169
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
170
|
+
const requestTransformation = { key: '$[0]' };
|
|
171
|
+
const responseTransformation = '$.field';
|
|
172
|
+
// @ts-ignore
|
|
173
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
174
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
175
|
+
rootSchema: _getExtendedFieldRequest,
|
|
176
|
+
depSchemas: {},
|
|
177
|
+
fqdnTransformation: {
|
|
178
|
+
paths: [],
|
|
179
|
+
transformation: _fromVeloEntity,
|
|
180
|
+
},
|
|
181
|
+
customTransformation: requestTransformation,
|
|
182
|
+
});
|
|
183
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
184
|
+
rootSchema: _getExtendedFieldResponse,
|
|
185
|
+
depSchemas: {},
|
|
186
|
+
fqdnTransformation: {
|
|
187
|
+
paths: [...['field']],
|
|
188
|
+
transformation: _toVeloEntity,
|
|
189
|
+
},
|
|
190
|
+
customTransformation: responseTransformation,
|
|
191
|
+
});
|
|
192
|
+
const payload = toAmbassadorRequest([key]);
|
|
193
|
+
const reqOpts = ambassadorWixContactsV4ExtendedField.getExtendedField(payload);
|
|
194
|
+
__log(`"GetExtendedField" sending request with: ${__inspect(reqOpts)}`);
|
|
195
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
196
|
+
try {
|
|
197
|
+
const result = yield httpClient.request(reqOpts);
|
|
198
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
199
|
+
return fromJSON(result.data);
|
|
200
|
+
}
|
|
201
|
+
catch (err) {
|
|
202
|
+
const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
|
|
203
|
+
'key',
|
|
204
|
+
]);
|
|
205
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
206
|
+
throw transformedError;
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
exports.getExtendedField = getExtendedField;
|
|
211
|
+
/**
|
|
212
|
+
* Updates an extended field's specified properties.
|
|
213
|
+
*
|
|
214
|
+
* This function is not a universal function and runs only on the backend.
|
|
215
|
+
* @param key - Extended field key.
|
|
216
|
+
*
|
|
217
|
+
* When accessing contact data,
|
|
218
|
+
* extended field data is available at `extendedFields[key]`.
|
|
219
|
+
* For example, if the key is "custom.notes",
|
|
220
|
+
* the value can be accessed at `extendedFields["custom.notes"]`.
|
|
221
|
+
*
|
|
222
|
+
* `key` is generated when the extended field is created
|
|
223
|
+
* and cannot be modified, even if `displayName` changes.
|
|
224
|
+
* @public
|
|
225
|
+
* @documentationMaturity preview
|
|
226
|
+
* @requiredField key
|
|
227
|
+
* @requiredField options.field.displayName
|
|
228
|
+
* @returns Updated extended field.
|
|
229
|
+
*/
|
|
230
|
+
function renameExtendedField(key, options) {
|
|
231
|
+
var _a, _b, _c;
|
|
232
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
233
|
+
const requestTransformation = { field: { '*': '$[1].field', key: '$[0]' } };
|
|
234
|
+
const responseTransformation = '$.field';
|
|
235
|
+
// @ts-ignore
|
|
236
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
237
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
238
|
+
rootSchema: _updateExtendedFieldRequest,
|
|
239
|
+
depSchemas: {},
|
|
240
|
+
fqdnTransformation: {
|
|
241
|
+
paths: [...['field']],
|
|
242
|
+
transformation: _fromVeloEntity,
|
|
243
|
+
},
|
|
244
|
+
customTransformation: requestTransformation,
|
|
245
|
+
});
|
|
246
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
247
|
+
rootSchema: _updateExtendedFieldResponse,
|
|
248
|
+
depSchemas: {},
|
|
249
|
+
fqdnTransformation: {
|
|
250
|
+
paths: [...['field']],
|
|
251
|
+
transformation: _toVeloEntity,
|
|
252
|
+
},
|
|
253
|
+
customTransformation: responseTransformation,
|
|
254
|
+
});
|
|
255
|
+
const payload = toAmbassadorRequest([key, options]);
|
|
256
|
+
const reqOpts = ambassadorWixContactsV4ExtendedField.updateExtendedField(payload);
|
|
257
|
+
__log(`"UpdateExtendedField" sending request with: ${__inspect(reqOpts)}`);
|
|
258
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
259
|
+
try {
|
|
260
|
+
const result = yield httpClient.request(reqOpts);
|
|
261
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
262
|
+
return fromJSON(result.data);
|
|
263
|
+
}
|
|
264
|
+
catch (err) {
|
|
265
|
+
const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
|
|
266
|
+
'key',
|
|
267
|
+
'options',
|
|
268
|
+
]);
|
|
269
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
270
|
+
throw transformedError;
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
exports.renameExtendedField = renameExtendedField;
|
|
275
|
+
/**
|
|
276
|
+
* Deletes an extended field.
|
|
277
|
+
*
|
|
278
|
+
* When an extended field is deleted,
|
|
279
|
+
* any contact data stored in the field is permanently deleted as well.
|
|
280
|
+
*
|
|
281
|
+
* This function is not a universal function and runs only on the backend.
|
|
282
|
+
* @param key - Extended field key.
|
|
283
|
+
* @public
|
|
284
|
+
* @documentationMaturity preview
|
|
285
|
+
* @requiredField key
|
|
286
|
+
*/
|
|
287
|
+
function deleteExtendedField(key) {
|
|
288
|
+
var _a, _b, _c;
|
|
289
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
290
|
+
const requestTransformation = { key: '$[0]' };
|
|
291
|
+
const responseTransformation = '$';
|
|
292
|
+
// @ts-ignore
|
|
293
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
294
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
295
|
+
rootSchema: _deleteExtendedFieldRequest,
|
|
296
|
+
depSchemas: {},
|
|
297
|
+
fqdnTransformation: {
|
|
298
|
+
paths: [],
|
|
299
|
+
transformation: _fromVeloEntity,
|
|
300
|
+
},
|
|
301
|
+
customTransformation: requestTransformation,
|
|
302
|
+
});
|
|
303
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
304
|
+
rootSchema: _deleteExtendedFieldResponse,
|
|
305
|
+
depSchemas: {},
|
|
306
|
+
fqdnTransformation: {
|
|
307
|
+
paths: [],
|
|
308
|
+
transformation: _toVeloEntity,
|
|
309
|
+
},
|
|
310
|
+
customTransformation: responseTransformation,
|
|
311
|
+
});
|
|
312
|
+
const payload = toAmbassadorRequest([key]);
|
|
313
|
+
const reqOpts = ambassadorWixContactsV4ExtendedField.deleteExtendedField(payload);
|
|
314
|
+
__log(`"DeleteExtendedField" sending request with: ${__inspect(reqOpts)}`);
|
|
315
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
316
|
+
try {
|
|
317
|
+
const result = yield httpClient.request(reqOpts);
|
|
318
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
319
|
+
return fromJSON(result.data);
|
|
320
|
+
}
|
|
321
|
+
catch (err) {
|
|
322
|
+
const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
|
|
323
|
+
'key',
|
|
324
|
+
]);
|
|
325
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
326
|
+
throw transformedError;
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
exports.deleteExtendedField = deleteExtendedField;
|
|
331
|
+
/**
|
|
332
|
+
* Retrieves a list of extended fields.
|
|
333
|
+
*
|
|
334
|
+
* For a detailed list of supported operations, see [sorting and filtering for extended fields](https://dev.wix.com/api/rest/contacts/extended-fields/sort-and-filter). To learn more about query language, see
|
|
335
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
336
|
+
*
|
|
337
|
+
* This function is not a universal function and runs only on the backend.
|
|
338
|
+
* @public
|
|
339
|
+
* @documentationMaturity preview
|
|
340
|
+
*/
|
|
341
|
+
function queryExtendedFields() {
|
|
342
|
+
const requestTransformation = { '*': '$[1]', query: '$[0]' };
|
|
343
|
+
const responseTransformation = {
|
|
344
|
+
items: '$.fields',
|
|
345
|
+
pagingMetadata: '$.pagingMetadata',
|
|
346
|
+
};
|
|
347
|
+
// @ts-ignore
|
|
348
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
349
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
350
|
+
rootSchema: _queryExtendedFieldsRequest,
|
|
351
|
+
depSchemas: {},
|
|
352
|
+
fqdnTransformation: {
|
|
353
|
+
paths: [],
|
|
354
|
+
transformation: _fromVeloEntity,
|
|
355
|
+
},
|
|
356
|
+
customTransformation: requestTransformation,
|
|
357
|
+
});
|
|
358
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
359
|
+
rootSchema: _queryExtendedFieldsResponse,
|
|
360
|
+
depSchemas: {},
|
|
361
|
+
fqdnTransformation: {
|
|
362
|
+
paths: [...['Array#fields']],
|
|
363
|
+
transformation: _toVeloEntity,
|
|
364
|
+
},
|
|
365
|
+
customTransformation: responseTransformation,
|
|
366
|
+
});
|
|
367
|
+
return (0, motion_edm_autogen_query_wrapper_1.wrapWithQueryBuilder)({
|
|
368
|
+
func: (payload) => __awaiter(this, void 0, void 0, function* () {
|
|
369
|
+
var _a, _b, _c;
|
|
370
|
+
const reqOpts = ambassadorWixContactsV4ExtendedField.queryExtendedFields(payload);
|
|
371
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
372
|
+
try {
|
|
373
|
+
const result = yield httpClient.request(reqOpts);
|
|
374
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
375
|
+
return result;
|
|
376
|
+
}
|
|
377
|
+
catch (err) {
|
|
378
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
379
|
+
throw err;
|
|
380
|
+
}
|
|
381
|
+
}),
|
|
382
|
+
requestTransformer: (...args) => toAmbassadorRequest(args),
|
|
383
|
+
responseTransformer: ({ data }) => fromJSON(data),
|
|
384
|
+
errorTransformer: (err) => {
|
|
385
|
+
const transformedError = (0, velo_1.transformError)(err, requestTransformation);
|
|
386
|
+
throw transformedError;
|
|
387
|
+
},
|
|
388
|
+
pagingMethod: 'OFFSET',
|
|
389
|
+
transformationPaths: (0, velo_1.resolveQueryFieldsTransformationPaths)(_toVeloEntity),
|
|
390
|
+
})({ cursorWithEmptyFilterAndSort: true });
|
|
391
|
+
}
|
|
392
|
+
exports.queryExtendedFields = queryExtendedFields;
|
|
393
|
+
//# sourceMappingURL=contacts-v4-extended-field.universal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contacts-v4-extended-field.universal.js","sourceRoot":"","sources":["../../../src/contacts-v4-extended-field.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAIiC;AAEjC,wGAA0F;AAC1F,aAAa;AACb,4FAA6E;AAE7E,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OA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AM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gBACjD,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,+CAAtB,WAAW,EAAc,MAAM,CAAC,CAAC;gBACjC,OAAO,MAAM,CAAC;aACf;YAAC,OAAO,GAAG,EAAE;gBACZ,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;gBAC5B,MAAM,GAAG,CAAC;aACX;QACH,CAAC,CAAA;QACD,kBAAkB,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC;QACjE,mBAAmB,EAAE,CAAC,EAAE,IAAI,EAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;QACtD,gBAAgB,EAAE,CAAC,GAAQ,EAAE,EAAE;YAC7B,MAAM,gBAAgB,GAAG,IAAA,qBAAc,EAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC;YAEpE,MAAM,gBAAgB,CAAC;QACzB,CAAC;QACD,YAAY,EAAE,QAAQ;QACtB,mBAAmB,EAAE,IAAA,4CAAqC,EAAC,aAAa,CAAC;KAC1E,CAAC,CAAC,EAAE,4BAA4B,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7C,CAAC;AA1DD,kDA0DC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
+
import { DeleteLabelRequest, DeleteLabelResponse, FindOrCreateLabelRequest, FindOrCreateLabelResponse, QueryLabelsRequest, QueryLabelsResponse, UpdateLabelRequest, UpdateLabelResponse } from './contacts-v4-label.types';
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves a label with a given name, or creates one if it doesn't exist.
|
|
5
|
+
*
|
|
6
|
+
* Successful calls to this endpoint always return a label,
|
|
7
|
+
* which can be passed to subsequent requests.
|
|
8
|
+
*
|
|
9
|
+
* For example, in the Contacts API,
|
|
10
|
+
* [Label Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/label-contact) and
|
|
11
|
+
* [Unlabel Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/unlabel-contact)
|
|
12
|
+
* requests will fail if you include a nonexistant label.
|
|
13
|
+
* To ensure successful calls, you can call this endpoint first,
|
|
14
|
+
* and then use the response in the label and unlabel requests.
|
|
15
|
+
*
|
|
16
|
+
* To find an existing label without potentially creating a new one, use
|
|
17
|
+
* [Get Label](https://dev.wix.com/api/rest/contacts/labels/get-label) or
|
|
18
|
+
* [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
|
|
19
|
+
*/
|
|
20
|
+
export declare function findOrCreateLabel(payload: FindOrCreateLabelRequest): RequestOptionsFactory<FindOrCreateLabelResponse>;
|
|
21
|
+
/** Updates a label's specified properties. */
|
|
22
|
+
export declare function updateLabel(payload: UpdateLabelRequest): RequestOptionsFactory<UpdateLabelResponse>;
|
|
23
|
+
/** Deletes a label from the site and removes it from contacts it applies to. */
|
|
24
|
+
export declare function deleteLabel(payload: DeleteLabelRequest): RequestOptionsFactory<DeleteLabelResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves a list of contact labels. Up to 1000 labels can be returned per request.
|
|
27
|
+
*
|
|
28
|
+
* For a detailed list of supported operations, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter). To learn how to query labels, see
|
|
29
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
30
|
+
*/
|
|
31
|
+
export declare function queryLabels(payload: QueryLabelsRequest): RequestOptionsFactory<QueryLabelsResponse>;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.queryLabels = exports.deleteLabel = exports.updateLabel = exports.findOrCreateLabel = void 0;
|
|
4
|
+
const metro_runtime_1 = require("@wix/metro-runtime");
|
|
5
|
+
const ambassador_1 = require("@wix/metro-runtime/ambassador");
|
|
6
|
+
const metro_runtime_2 = require("@wix/metro-runtime");
|
|
7
|
+
const _contactLabel = {
|
|
8
|
+
createdDate: 'google.protobuf.Timestamp',
|
|
9
|
+
updatedDate: 'google.protobuf.Timestamp',
|
|
10
|
+
};
|
|
11
|
+
const _deleteLabelRequest = {};
|
|
12
|
+
const _deleteLabelResponse = {};
|
|
13
|
+
const _findOrCreateLabelRequest = {};
|
|
14
|
+
const _findOrCreateLabelResponse = { label: '_contactLabel' };
|
|
15
|
+
const _queryLabelsRequest = {};
|
|
16
|
+
const _queryLabelsResponse = { labels: '_contactLabel' };
|
|
17
|
+
const _updateLabelRequest = { label: '_contactLabel' };
|
|
18
|
+
const _updateLabelResponse = { label: '_contactLabel' };
|
|
19
|
+
function resolveComWixpressContactsLabelsV4ContactLabelsServiceV4Url(opts) {
|
|
20
|
+
const domainToMappings = {
|
|
21
|
+
'api._api_base_domain_': [
|
|
22
|
+
{
|
|
23
|
+
srcPath: '/contacts-labels-app',
|
|
24
|
+
destPath: '',
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
'www.wixapis.com': [
|
|
28
|
+
{
|
|
29
|
+
srcPath: '/contacts/v4/labels',
|
|
30
|
+
destPath: '/v4/labels',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
'www._base_domain_': [
|
|
34
|
+
{
|
|
35
|
+
srcPath: '/_api/contacts/v4/labels',
|
|
36
|
+
destPath: '/v4/labels',
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
'manage._base_domain_': [
|
|
40
|
+
{
|
|
41
|
+
srcPath: '/_api/contacts/v4/labels',
|
|
42
|
+
destPath: '/v4/labels',
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
'editor._base_domain_': [
|
|
46
|
+
{
|
|
47
|
+
srcPath: '/_api/contacts/v4/labels',
|
|
48
|
+
destPath: '/v4/labels',
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
'blocks._base_domain_': [
|
|
52
|
+
{
|
|
53
|
+
srcPath: '/_api/contacts/v4/labels',
|
|
54
|
+
destPath: '/v4/labels',
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
'create.editorx': [
|
|
58
|
+
{
|
|
59
|
+
srcPath: '/_api/contacts/v4/labels',
|
|
60
|
+
destPath: '/v4/labels',
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
};
|
|
64
|
+
return (0, metro_runtime_2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Retrieves a label with a given name, or creates one if it doesn't exist.
|
|
68
|
+
*
|
|
69
|
+
* Successful calls to this endpoint always return a label,
|
|
70
|
+
* which can be passed to subsequent requests.
|
|
71
|
+
*
|
|
72
|
+
* For example, in the Contacts API,
|
|
73
|
+
* [Label Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/label-contact) and
|
|
74
|
+
* [Unlabel Contact](https://dev.wix.com/api/rest/contacts/contacts/contacts-v4/unlabel-contact)
|
|
75
|
+
* requests will fail if you include a nonexistant label.
|
|
76
|
+
* To ensure successful calls, you can call this endpoint first,
|
|
77
|
+
* and then use the response in the label and unlabel requests.
|
|
78
|
+
*
|
|
79
|
+
* To find an existing label without potentially creating a new one, use
|
|
80
|
+
* [Get Label](https://dev.wix.com/api/rest/contacts/labels/get-label) or
|
|
81
|
+
* [List Labels](https://dev.wix.com/api/rest/contacts/labels/list-labels).
|
|
82
|
+
*/
|
|
83
|
+
function findOrCreateLabel(payload) {
|
|
84
|
+
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_findOrCreateLabelRequest, {});
|
|
85
|
+
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_findOrCreateLabelResponse, {
|
|
86
|
+
_contactLabel,
|
|
87
|
+
});
|
|
88
|
+
function __findOrCreateLabel({ host }) {
|
|
89
|
+
const serializedData = toReq(payload);
|
|
90
|
+
const metadata = {
|
|
91
|
+
entityFqdn: 'wix.contacts.v4.label',
|
|
92
|
+
method: 'POST',
|
|
93
|
+
methodFqn: 'com.wixpress.contacts.labels.v4.ContactLabelsServiceV4.FindOrCreateLabel',
|
|
94
|
+
url: resolveComWixpressContactsLabelsV4ContactLabelsServiceV4Url({
|
|
95
|
+
protoPath: '/v4/labels',
|
|
96
|
+
data: serializedData,
|
|
97
|
+
host,
|
|
98
|
+
}),
|
|
99
|
+
data: serializedData,
|
|
100
|
+
transformResponse: fromRes,
|
|
101
|
+
};
|
|
102
|
+
return metadata;
|
|
103
|
+
}
|
|
104
|
+
__findOrCreateLabel.fromReq = fromReq;
|
|
105
|
+
return __findOrCreateLabel;
|
|
106
|
+
}
|
|
107
|
+
exports.findOrCreateLabel = findOrCreateLabel;
|
|
108
|
+
/** Updates a label's specified properties. */
|
|
109
|
+
function updateLabel(payload) {
|
|
110
|
+
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_updateLabelRequest, {
|
|
111
|
+
_contactLabel,
|
|
112
|
+
});
|
|
113
|
+
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_updateLabelResponse, {
|
|
114
|
+
_contactLabel,
|
|
115
|
+
});
|
|
116
|
+
function __updateLabel({ host }) {
|
|
117
|
+
const serializedData = toReq(payload);
|
|
118
|
+
const metadata = {
|
|
119
|
+
entityFqdn: 'wix.contacts.v4.label',
|
|
120
|
+
method: 'PATCH',
|
|
121
|
+
methodFqn: 'com.wixpress.contacts.labels.v4.ContactLabelsServiceV4.UpdateLabel',
|
|
122
|
+
url: resolveComWixpressContactsLabelsV4ContactLabelsServiceV4Url({
|
|
123
|
+
protoPath: '/v4/labels/{label.key}',
|
|
124
|
+
data: serializedData,
|
|
125
|
+
host,
|
|
126
|
+
}),
|
|
127
|
+
data: serializedData,
|
|
128
|
+
transformResponse: fromRes,
|
|
129
|
+
};
|
|
130
|
+
return metadata;
|
|
131
|
+
}
|
|
132
|
+
__updateLabel.fromReq = fromReq;
|
|
133
|
+
return __updateLabel;
|
|
134
|
+
}
|
|
135
|
+
exports.updateLabel = updateLabel;
|
|
136
|
+
/** Deletes a label from the site and removes it from contacts it applies to. */
|
|
137
|
+
function deleteLabel(payload) {
|
|
138
|
+
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_deleteLabelRequest, {});
|
|
139
|
+
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_deleteLabelResponse, {});
|
|
140
|
+
function __deleteLabel({ host }) {
|
|
141
|
+
const serializedData = toReq(payload);
|
|
142
|
+
const metadata = {
|
|
143
|
+
entityFqdn: 'wix.contacts.v4.label',
|
|
144
|
+
method: 'DELETE',
|
|
145
|
+
methodFqn: 'com.wixpress.contacts.labels.v4.ContactLabelsServiceV4.DeleteLabel',
|
|
146
|
+
url: resolveComWixpressContactsLabelsV4ContactLabelsServiceV4Url({
|
|
147
|
+
protoPath: '/v4/labels/{key}',
|
|
148
|
+
data: serializedData,
|
|
149
|
+
host,
|
|
150
|
+
}),
|
|
151
|
+
params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
|
|
152
|
+
transformResponse: fromRes,
|
|
153
|
+
};
|
|
154
|
+
return metadata;
|
|
155
|
+
}
|
|
156
|
+
__deleteLabel.fromReq = fromReq;
|
|
157
|
+
return __deleteLabel;
|
|
158
|
+
}
|
|
159
|
+
exports.deleteLabel = deleteLabel;
|
|
160
|
+
/**
|
|
161
|
+
* Retrieves a list of contact labels. Up to 1000 labels can be returned per request.
|
|
162
|
+
*
|
|
163
|
+
* For a detailed list of supported operations, see [sorting and filtering for labels](https://dev.wix.com/api/rest/contacts/labels/sort-and-filter). To learn how to query labels, see
|
|
164
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
165
|
+
*/
|
|
166
|
+
function queryLabels(payload) {
|
|
167
|
+
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_queryLabelsRequest, {});
|
|
168
|
+
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_queryLabelsResponse, {
|
|
169
|
+
_contactLabel,
|
|
170
|
+
});
|
|
171
|
+
function __queryLabels({ host }) {
|
|
172
|
+
const serializedData = toReq(payload);
|
|
173
|
+
const metadata = {
|
|
174
|
+
entityFqdn: 'wix.contacts.v4.label',
|
|
175
|
+
method: 'POST',
|
|
176
|
+
methodFqn: 'com.wixpress.contacts.labels.v4.ContactLabelsServiceV4.QueryLabels',
|
|
177
|
+
url: resolveComWixpressContactsLabelsV4ContactLabelsServiceV4Url({
|
|
178
|
+
protoPath: '/v4/labels/query',
|
|
179
|
+
data: serializedData,
|
|
180
|
+
host,
|
|
181
|
+
}),
|
|
182
|
+
data: serializedData,
|
|
183
|
+
transformResponse: fromRes,
|
|
184
|
+
};
|
|
185
|
+
return metadata;
|
|
186
|
+
}
|
|
187
|
+
__queryLabels.fromReq = fromReq;
|
|
188
|
+
return __queryLabels;
|
|
189
|
+
}
|
|
190
|
+
exports.queryLabels = queryLabels;
|
|
191
|
+
//# sourceMappingURL=contacts-v4-label.http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contacts-v4-label.http.js","sourceRoot":"","sources":["../../../src/contacts-v4-label.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sDAAgD;AAchD,MAAM,aAAa,GAAG;IACpB,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,2BAA2B;CACzC,CAAC;AACF,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AACrC,MAAM,0BAA0B,GAAG,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;AAC9D,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,oBAAoB,GAAG,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;AACzD,MAAM,mBAAmB,GAAG,EAA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C;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,uBAAuB;YACnC,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,oEAAoE;YACtE,GAAG,EAAE,2DAA2D,CAAC;gBAC/D,SAAS,EAAE,kBAAkB;gBAC7B,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,aAAa,CAAC,OAAO,GAAG,OAAO,CAAC;IAEhC,OAAO,aAAa,CAAC;AACvB,CAAC;AAjCD,kCAiCC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
+
import { FindOrCreateLabelOptions, QueryLabelsOptions, RenameLabelOptions } from './contacts-v4-label.universal';
|
|
3
|
+
export declare const __metadata: {
|
|
4
|
+
PACKAGE_NAME: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function findOrCreateLabel(httpClient: HttpClient): (displayName: string, options?: FindOrCreateLabelOptions | undefined) => Promise<import("./contacts-v4-label.universal").FindOrCreateLabelResponse>;
|
|
7
|
+
export declare function renameLabel(httpClient: HttpClient): (key: string, options?: RenameLabelOptions | undefined) => Promise<import("./contacts-v4-label.universal").ContactLabel>;
|
|
8
|
+
export declare function deleteLabel(httpClient: HttpClient): (key: string) => Promise<void>;
|
|
9
|
+
export declare function queryLabels(httpClient: HttpClient): (options?: QueryLabelsOptions | undefined) => import("./contacts-v4-label.universal").LabelsQueryBuilder;
|
|
10
|
+
export { LabelType, SortOrder } from './contacts-v4-label.universal';
|
|
11
|
+
export { ContactLabel, ListLabelsRequest, Sorting, Paging, ListLabelsResponse, PagingMetadata, FindOrCreateLabelRequest, FindOrCreateLabelResponse, LabelsQuotaReached, ListLabelNamespacesRequest, ListLabelNamespacesResponse, ContactLabelNamespace, GetLabelRequest, GetLabelResponse, GetLabelByLegacyIdRequest, GetLabelByLegacyIdResponse, UpdateLabelRequest, UpdateLabelResponse, DeleteLabelRequest, DeleteLabelResponse, PurgeRequest, PurgeResponse, GdprListRequest, GdprListResponse, QueryLabelsRequest, Query, QueryLabelsResponse, FindOrCreateLabelOptions, RenameLabelOptions, QueryLabelsOptions, LabelsQueryResult, LabelsQueryBuilder, } from './contacts-v4-label.universal';
|