@wix/auto_sdk_crm_notes 1.0.6 → 1.0.7
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/meta.d.ts +143 -1
- package/build/cjs/meta.js +36 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/meta.d.mts +143 -1
- package/build/es/meta.mjs +32 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/meta.d.ts +143 -1
- package/build/internal/cjs/meta.js +36 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/meta.d.mts +143 -1
- package/build/internal/es/meta.mjs +32 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
package/build/cjs/meta.d.ts
CHANGED
|
@@ -210,6 +210,148 @@ interface Cursors {
|
|
|
210
210
|
/** Cursor pointing to previous page in the list of results. */
|
|
211
211
|
prev?: string | null;
|
|
212
212
|
}
|
|
213
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
214
|
+
createdEvent?: EntityCreatedEvent;
|
|
215
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
216
|
+
deletedEvent?: EntityDeletedEvent;
|
|
217
|
+
actionEvent?: ActionEvent;
|
|
218
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
219
|
+
id?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
222
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
223
|
+
*/
|
|
224
|
+
entityFqdn?: string;
|
|
225
|
+
/**
|
|
226
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
227
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
228
|
+
*/
|
|
229
|
+
slug?: string;
|
|
230
|
+
/** ID of the entity associated with the event. */
|
|
231
|
+
entityId?: string;
|
|
232
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
233
|
+
eventTime?: Date | null;
|
|
234
|
+
/**
|
|
235
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
236
|
+
* (for example, GDPR).
|
|
237
|
+
*/
|
|
238
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
239
|
+
/** If present, indicates the action that triggered the event. */
|
|
240
|
+
originatedFrom?: string | null;
|
|
241
|
+
/**
|
|
242
|
+
* 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.
|
|
243
|
+
* 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.
|
|
244
|
+
*/
|
|
245
|
+
entityEventSequence?: string | null;
|
|
246
|
+
}
|
|
247
|
+
/** @oneof */
|
|
248
|
+
interface DomainEventBodyOneOf {
|
|
249
|
+
createdEvent?: EntityCreatedEvent;
|
|
250
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
251
|
+
deletedEvent?: EntityDeletedEvent;
|
|
252
|
+
actionEvent?: ActionEvent;
|
|
253
|
+
}
|
|
254
|
+
interface EntityCreatedEvent {
|
|
255
|
+
entityAsJson?: string;
|
|
256
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
257
|
+
restoreInfo?: RestoreInfo;
|
|
258
|
+
}
|
|
259
|
+
interface RestoreInfo {
|
|
260
|
+
deletedDate?: Date | null;
|
|
261
|
+
}
|
|
262
|
+
interface EntityUpdatedEvent {
|
|
263
|
+
/**
|
|
264
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
265
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
266
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
267
|
+
*/
|
|
268
|
+
currentEntityAsJson?: string;
|
|
269
|
+
}
|
|
270
|
+
interface EntityDeletedEvent {
|
|
271
|
+
/** Entity that was deleted. */
|
|
272
|
+
deletedEntityAsJson?: string | null;
|
|
273
|
+
}
|
|
274
|
+
interface ActionEvent {
|
|
275
|
+
bodyAsJson?: string;
|
|
276
|
+
}
|
|
277
|
+
interface MessageEnvelope {
|
|
278
|
+
/**
|
|
279
|
+
* App instance ID.
|
|
280
|
+
* @format GUID
|
|
281
|
+
*/
|
|
282
|
+
instanceId?: string | null;
|
|
283
|
+
/**
|
|
284
|
+
* Event type.
|
|
285
|
+
* @maxLength 150
|
|
286
|
+
*/
|
|
287
|
+
eventType?: string;
|
|
288
|
+
/** The identification type and identity data. */
|
|
289
|
+
identity?: IdentificationData;
|
|
290
|
+
/** Stringify payload. */
|
|
291
|
+
data?: string;
|
|
292
|
+
}
|
|
293
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
294
|
+
/**
|
|
295
|
+
* ID of a site visitor that has not logged in to the site.
|
|
296
|
+
* @format GUID
|
|
297
|
+
*/
|
|
298
|
+
anonymousVisitorId?: string;
|
|
299
|
+
/**
|
|
300
|
+
* ID of a site visitor that has logged in to the site.
|
|
301
|
+
* @format GUID
|
|
302
|
+
*/
|
|
303
|
+
memberId?: string;
|
|
304
|
+
/**
|
|
305
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
306
|
+
* @format GUID
|
|
307
|
+
*/
|
|
308
|
+
wixUserId?: string;
|
|
309
|
+
/**
|
|
310
|
+
* ID of an app.
|
|
311
|
+
* @format GUID
|
|
312
|
+
*/
|
|
313
|
+
appId?: string;
|
|
314
|
+
/** @readonly */
|
|
315
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
316
|
+
}
|
|
317
|
+
/** @oneof */
|
|
318
|
+
interface IdentificationDataIdOneOf {
|
|
319
|
+
/**
|
|
320
|
+
* ID of a site visitor that has not logged in to the site.
|
|
321
|
+
* @format GUID
|
|
322
|
+
*/
|
|
323
|
+
anonymousVisitorId?: string;
|
|
324
|
+
/**
|
|
325
|
+
* ID of a site visitor that has logged in to the site.
|
|
326
|
+
* @format GUID
|
|
327
|
+
*/
|
|
328
|
+
memberId?: string;
|
|
329
|
+
/**
|
|
330
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
331
|
+
* @format GUID
|
|
332
|
+
*/
|
|
333
|
+
wixUserId?: string;
|
|
334
|
+
/**
|
|
335
|
+
* ID of an app.
|
|
336
|
+
* @format GUID
|
|
337
|
+
*/
|
|
338
|
+
appId?: string;
|
|
339
|
+
}
|
|
340
|
+
declare enum WebhookIdentityType {
|
|
341
|
+
UNKNOWN = "UNKNOWN",
|
|
342
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
343
|
+
MEMBER = "MEMBER",
|
|
344
|
+
WIX_USER = "WIX_USER",
|
|
345
|
+
APP = "APP"
|
|
346
|
+
}
|
|
347
|
+
/** @enumType */
|
|
348
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
349
|
+
/** @docsIgnore */
|
|
350
|
+
type QueryNotesApplicationErrors = {
|
|
351
|
+
code?: 'MISSING_CONTACT_ID';
|
|
352
|
+
description?: string;
|
|
353
|
+
data?: Record<string, any>;
|
|
354
|
+
};
|
|
213
355
|
|
|
214
356
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
215
357
|
getUrl: (context: any) => string;
|
|
@@ -233,4 +375,4 @@ declare function deleteNote(): __PublicMethodMetaInfo<'DELETE', {
|
|
|
233
375
|
}, DeleteNoteRequest$1, DeleteNoteRequest, DeleteNoteResponse$1, DeleteNoteResponse>;
|
|
234
376
|
declare function queryNotes(): __PublicMethodMetaInfo<'POST', {}, QueryNotesRequest$1, QueryNotesRequest, QueryNotesResponse$1, QueryNotesResponse>;
|
|
235
377
|
|
|
236
|
-
export { type __PublicMethodMetaInfo, createNote, deleteNote, getNote, queryNotes, updateNote };
|
|
378
|
+
export { type ActionEvent as ActionEventOriginal, type CreateNoteRequest as CreateNoteRequestOriginal, type CreateNoteResponse as CreateNoteResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DeleteNoteRequest as DeleteNoteRequestOriginal, type DeleteNoteResponse as DeleteNoteResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type GetNoteRequest as GetNoteRequestOriginal, type GetNoteResponse as GetNoteResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type Note as NoteOriginal, type NoteSource as NoteSourceOriginal, NoteType as NoteTypeOriginal, type NoteTypeWithLiterals as NoteTypeWithLiteralsOriginal, type QueryNotesApplicationErrors as QueryNotesApplicationErrorsOriginal, type QueryNotesRequest as QueryNotesRequestOriginal, type QueryNotesResponse as QueryNotesResponseOriginal, type RestoreInfo as RestoreInfoOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, SourceType as SourceTypeOriginal, type SourceTypeWithLiterals as SourceTypeWithLiteralsOriginal, type UpdateNoteRequest as UpdateNoteRequestOriginal, type UpdateNoteResponse as UpdateNoteResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, createNote, deleteNote, getNote, queryNotes, updateNote };
|
package/build/cjs/meta.js
CHANGED
|
@@ -20,6 +20,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// meta.ts
|
|
21
21
|
var meta_exports = {};
|
|
22
22
|
__export(meta_exports, {
|
|
23
|
+
NoteTypeOriginal: () => NoteType,
|
|
24
|
+
SortOrderOriginal: () => SortOrder,
|
|
25
|
+
SourceTypeOriginal: () => SourceType,
|
|
26
|
+
WebhookIdentityTypeOriginal: () => WebhookIdentityType,
|
|
23
27
|
createNote: () => createNote2,
|
|
24
28
|
deleteNote: () => deleteNote2,
|
|
25
29
|
getNote: () => getNote2,
|
|
@@ -214,6 +218,34 @@ function queryNotes(payload) {
|
|
|
214
218
|
return __queryNotes;
|
|
215
219
|
}
|
|
216
220
|
|
|
221
|
+
// src/crm-notes-v2-note-notes.types.ts
|
|
222
|
+
var NoteType = /* @__PURE__ */ ((NoteType2) => {
|
|
223
|
+
NoteType2["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
|
|
224
|
+
NoteType2["NOT_SET"] = "NOT_SET";
|
|
225
|
+
NoteType2["MEETING_SUMMARY"] = "MEETING_SUMMARY";
|
|
226
|
+
NoteType2["CALL_SUMMARY"] = "CALL_SUMMARY";
|
|
227
|
+
return NoteType2;
|
|
228
|
+
})(NoteType || {});
|
|
229
|
+
var SourceType = /* @__PURE__ */ ((SourceType2) => {
|
|
230
|
+
SourceType2["UNKNOWN_SOURCE_TYPE"] = "UNKNOWN_SOURCE_TYPE";
|
|
231
|
+
SourceType2["APP"] = "APP";
|
|
232
|
+
SourceType2["USER"] = "USER";
|
|
233
|
+
return SourceType2;
|
|
234
|
+
})(SourceType || {});
|
|
235
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
236
|
+
SortOrder2["ASC"] = "ASC";
|
|
237
|
+
SortOrder2["DESC"] = "DESC";
|
|
238
|
+
return SortOrder2;
|
|
239
|
+
})(SortOrder || {});
|
|
240
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
241
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
242
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
243
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
244
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
245
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
246
|
+
return WebhookIdentityType2;
|
|
247
|
+
})(WebhookIdentityType || {});
|
|
248
|
+
|
|
217
249
|
// src/crm-notes-v2-note-notes.meta.ts
|
|
218
250
|
function createNote2() {
|
|
219
251
|
const payload = {};
|
|
@@ -307,6 +339,10 @@ function queryNotes2() {
|
|
|
307
339
|
}
|
|
308
340
|
// Annotate the CommonJS export names for ESM import in node:
|
|
309
341
|
0 && (module.exports = {
|
|
342
|
+
NoteTypeOriginal,
|
|
343
|
+
SortOrderOriginal,
|
|
344
|
+
SourceTypeOriginal,
|
|
345
|
+
WebhookIdentityTypeOriginal,
|
|
310
346
|
createNote,
|
|
311
347
|
deleteNote,
|
|
312
348
|
getNote,
|
package/build/cjs/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../meta.ts","../../src/crm-notes-v2-note-notes.http.ts","../../src/crm-notes-v2-note-notes.meta.ts"],"sourcesContent":["export * from './src/crm-notes-v2-note-notes.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCrmNotesV2NotesUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/notes-app/v2/notes',\n destPath: '/v2/notes',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/crm/notes/v2/notes',\n destPath: '/v2/notes',\n },\n ],\n _: [\n {\n srcPath: '/_api/notes-app/v2/notes',\n destPath: '/v2/notes',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/notes-app/v2/notes',\n destPath: '/v2/notes',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_crm_notes';\n\n/** Creates a new note associated with a specific contact. */\nexport function createNote(payload: object): RequestOptionsFactory<any> {\n function __createNote({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'note.createdDate' }, { path: 'note.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.crm.notes.v2.note',\n method: 'POST' as any,\n methodFqn: 'wix.crm.notes.v2.Notes.CreateNote',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmNotesV2NotesUrl({\n protoPath: '/v2/notes',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'note.createdDate' }, { path: 'note.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createNote;\n}\n\n/** Retrieves a note by ID. */\nexport function getNote(payload: object): RequestOptionsFactory<any> {\n function __getNote({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.notes.v2.note',\n method: 'GET' as any,\n methodFqn: 'wix.crm.notes.v2.Notes.GetNote',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmNotesV2NotesUrl({\n protoPath: '/v2/notes/{noteId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'note.createdDate' }, { path: 'note.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getNote;\n}\n\n/**\n * Updates a note.\n *\n * This method supports partial updates.\n * To prevent conflicting changes, the current revision must be passed when updating the note.\n */\nexport function updateNote(payload: object): RequestOptionsFactory<any> {\n function __updateNote({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'mask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'note.createdDate' }, { path: 'note.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.crm.notes.v2.note',\n method: 'PATCH' as any,\n methodFqn: 'wix.crm.notes.v2.Notes.UpdateNote',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmNotesV2NotesUrl({\n protoPath: '/v2/notes/{note.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'note.createdDate' }, { path: 'note.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateNote;\n}\n\n/** Deletes a note. */\nexport function deleteNote(payload: object): RequestOptionsFactory<any> {\n function __deleteNote({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.notes.v2.note',\n method: 'DELETE' as any,\n methodFqn: 'wix.crm.notes.v2.Notes.DeleteNote',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmNotesV2NotesUrl({\n protoPath: '/v2/notes/{noteId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteNote;\n}\n\n/**\n * Retrieves a list of up to 1,000 notes given the provided filtering, paging, and sorting.\n *\n * <blockquote class=\"important\">\n *\n * __Important:__\n * When making the first query request without a cursor, the `contactId` field is required. For subsequent requests using cursor pagination, `contactId` becomes optional as the cursor contains the context from the previous query.\n *\n * </blockquote>\n *\n * By default, notes are sorted by created date in descending order.\n *\n * Refer to [*Notes: Supported Filters and Sorting*](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/notes/notes-v2/supported-filters-and-sorting) for a complete list of supported filters and sorting options.\n *\n * To learn about working with *Query* endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging).\n */\nexport function queryNotes(payload: object): RequestOptionsFactory<any> {\n function __queryNotes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.notes.v2.note',\n method: 'POST' as any,\n methodFqn: 'wix.crm.notes.v2.Notes.QueryNotes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmNotesV2NotesUrl({\n protoPath: '/v2/notes/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'notes.createdDate' },\n { path: 'notes.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryNotes;\n}\n","import * as ambassadorWixCrmNotesV2Note from './crm-notes-v2-note-notes.http.js';\nimport * as ambassadorWixCrmNotesV2NoteTypes from './crm-notes-v2-note-notes.types.js';\nimport * as ambassadorWixCrmNotesV2NoteUniversalTypes from './crm-notes-v2-note-notes.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function createNote(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixCrmNotesV2NoteUniversalTypes.CreateNoteRequest,\n ambassadorWixCrmNotesV2NoteTypes.CreateNoteRequest,\n ambassadorWixCrmNotesV2NoteUniversalTypes.CreateNoteResponse,\n ambassadorWixCrmNotesV2NoteTypes.CreateNoteResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions = ambassadorWixCrmNotesV2Note.createNote(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/notes',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getNote(): __PublicMethodMetaInfo<\n 'GET',\n { noteId: string },\n ambassadorWixCrmNotesV2NoteUniversalTypes.GetNoteRequest,\n ambassadorWixCrmNotesV2NoteTypes.GetNoteRequest,\n ambassadorWixCrmNotesV2NoteUniversalTypes.GetNoteResponse,\n ambassadorWixCrmNotesV2NoteTypes.GetNoteResponse\n> {\n const payload = { noteId: ':noteId' } as any;\n\n const getRequestOptions = ambassadorWixCrmNotesV2Note.getNote(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v2/notes/{noteId}',\n pathParams: { noteId: 'noteId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateNote(): __PublicMethodMetaInfo<\n 'PATCH',\n { noteId: string },\n ambassadorWixCrmNotesV2NoteUniversalTypes.UpdateNoteRequest,\n ambassadorWixCrmNotesV2NoteTypes.UpdateNoteRequest,\n ambassadorWixCrmNotesV2NoteUniversalTypes.UpdateNoteResponse,\n ambassadorWixCrmNotesV2NoteTypes.UpdateNoteResponse\n> {\n const payload = { note: { id: ':noteId' } } as any;\n\n const getRequestOptions = ambassadorWixCrmNotesV2Note.updateNote(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v2/notes/{note.id}',\n pathParams: { noteId: 'noteId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteNote(): __PublicMethodMetaInfo<\n 'DELETE',\n { noteId: string },\n ambassadorWixCrmNotesV2NoteUniversalTypes.DeleteNoteRequest,\n ambassadorWixCrmNotesV2NoteTypes.DeleteNoteRequest,\n ambassadorWixCrmNotesV2NoteUniversalTypes.DeleteNoteResponse,\n ambassadorWixCrmNotesV2NoteTypes.DeleteNoteResponse\n> {\n const payload = { noteId: ':noteId' } as any;\n\n const getRequestOptions = ambassadorWixCrmNotesV2Note.deleteNote(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v2/notes/{noteId}',\n pathParams: { noteId: 'noteId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function queryNotes(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixCrmNotesV2NoteUniversalTypes.QueryNotesRequest,\n ambassadorWixCrmNotesV2NoteTypes.QueryNotesRequest,\n ambassadorWixCrmNotesV2NoteUniversalTypes.QueryNotesResponse,\n ambassadorWixCrmNotesV2NoteTypes.QueryNotesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions = ambassadorWixCrmNotesV2Note.queryNotes(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/notes/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA,kBAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,kBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,6BACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,WAAW,SAA6C;AACtE,WAAS,aAAa,EAAE,KAAK,GAAQ;AACnC,UAAM,qBAAiB,uCAAe,SAAS;AAAA,MAC7C;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,mBAAmB,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAAA,MACpE;AAAA,IACF,CAAC;AACD,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,6BAA6B;AAAA,QAChC,WAAW;AAAA,QACX,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O,SAASC,cAOd;AACA,QAAM,UAAU,EAAE,QAAQ,UAAU;AAEpC,QAAM,oBAAgD,WAAW,OAAO;AAExE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,QAAQ,SAAS;AAAA,IAC/B,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,cAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAAgD,WAAW,OAAO;AAExE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["createNote","deleteNote","getNote","queryNotes","updateNote","import_timestamp","import_rest_modules","payload","createNote","getNote","updateNote","deleteNote","queryNotes"]}
|
|
1
|
+
{"version":3,"sources":["../../meta.ts","../../src/crm-notes-v2-note-notes.http.ts","../../src/crm-notes-v2-note-notes.types.ts","../../src/crm-notes-v2-note-notes.meta.ts"],"sourcesContent":["export * from './src/crm-notes-v2-note-notes.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCrmNotesV2NotesUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/notes-app/v2/notes',\n destPath: '/v2/notes',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/crm/notes/v2/notes',\n destPath: '/v2/notes',\n },\n ],\n _: [\n {\n srcPath: '/_api/notes-app/v2/notes',\n destPath: '/v2/notes',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/notes-app/v2/notes',\n destPath: '/v2/notes',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_crm_notes';\n\n/** Creates a new note associated with a specific contact. */\nexport function createNote(payload: object): RequestOptionsFactory<any> {\n function __createNote({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'note.createdDate' }, { path: 'note.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.crm.notes.v2.note',\n method: 'POST' as any,\n methodFqn: 'wix.crm.notes.v2.Notes.CreateNote',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmNotesV2NotesUrl({\n protoPath: '/v2/notes',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'note.createdDate' }, { path: 'note.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createNote;\n}\n\n/** Retrieves a note by ID. */\nexport function getNote(payload: object): RequestOptionsFactory<any> {\n function __getNote({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.notes.v2.note',\n method: 'GET' as any,\n methodFqn: 'wix.crm.notes.v2.Notes.GetNote',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmNotesV2NotesUrl({\n protoPath: '/v2/notes/{noteId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'note.createdDate' }, { path: 'note.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getNote;\n}\n\n/**\n * Updates a note.\n *\n * This method supports partial updates.\n * To prevent conflicting changes, the current revision must be passed when updating the note.\n */\nexport function updateNote(payload: object): RequestOptionsFactory<any> {\n function __updateNote({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'mask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'note.createdDate' }, { path: 'note.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.crm.notes.v2.note',\n method: 'PATCH' as any,\n methodFqn: 'wix.crm.notes.v2.Notes.UpdateNote',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmNotesV2NotesUrl({\n protoPath: '/v2/notes/{note.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'note.createdDate' }, { path: 'note.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateNote;\n}\n\n/** Deletes a note. */\nexport function deleteNote(payload: object): RequestOptionsFactory<any> {\n function __deleteNote({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.notes.v2.note',\n method: 'DELETE' as any,\n methodFqn: 'wix.crm.notes.v2.Notes.DeleteNote',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmNotesV2NotesUrl({\n protoPath: '/v2/notes/{noteId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteNote;\n}\n\n/**\n * Retrieves a list of up to 1,000 notes given the provided filtering, paging, and sorting.\n *\n * <blockquote class=\"important\">\n *\n * __Important:__\n * When making the first query request without a cursor, the `contactId` field is required. For subsequent requests using cursor pagination, `contactId` becomes optional as the cursor contains the context from the previous query.\n *\n * </blockquote>\n *\n * By default, notes are sorted by created date in descending order.\n *\n * Refer to [*Notes: Supported Filters and Sorting*](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/notes/notes-v2/supported-filters-and-sorting) for a complete list of supported filters and sorting options.\n *\n * To learn about working with *Query* endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging).\n */\nexport function queryNotes(payload: object): RequestOptionsFactory<any> {\n function __queryNotes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.notes.v2.note',\n method: 'POST' as any,\n methodFqn: 'wix.crm.notes.v2.Notes.QueryNotes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmNotesV2NotesUrl({\n protoPath: '/v2/notes/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'notes.createdDate' },\n { path: 'notes.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryNotes;\n}\n","/** A note contains textual information associated with a contact. */\nexport interface Note {\n /**\n * Note ID.\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /**\n * Revision number, which increments by 1 each time the note is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the note.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the note was created.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the note was last updated.\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * Contact ID associated with the note.\n * @format GUID\n * @immutable\n */\n contactId?: string | null;\n /**\n * Note text.\n * @maxLength 2048\n */\n text?: string | null;\n /**\n * Note type for organizing notes by their purpose.\n *\n * Default: `NOT_SET`\n */\n type?: NoteTypeWithLiterals;\n /**\n * Information about who created the note.\n * @readonly\n */\n source?: NoteSource;\n}\n\nexport enum NoteType {\n /** Unknown note type. */\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n /** Note doesn't have a specific classification. */\n NOT_SET = 'NOT_SET',\n /** Note is a summary of a meeting related to the contact. */\n MEETING_SUMMARY = 'MEETING_SUMMARY',\n /** Note is a summary of a call related to the contact. */\n CALL_SUMMARY = 'CALL_SUMMARY',\n}\n\n/** @enumType */\nexport type NoteTypeWithLiterals =\n | NoteType\n | 'UNKNOWN_TYPE'\n | 'NOT_SET'\n | 'MEETING_SUMMARY'\n | 'CALL_SUMMARY';\n\nexport interface NoteSource {\n /**\n * Note creator.\n * @readonly\n */\n sourceType?: SourceTypeWithLiterals;\n /**\n * App ID, if the note was created by an app.\n * @format GUID\n * @readonly\n */\n appId?: string | null;\n /**\n * User ID, if the note was created by a Wix user.\n * @format GUID\n * @readonly\n */\n userId?: string | null;\n}\n\n/** Note creator. */\nexport enum SourceType {\n UNKNOWN_SOURCE_TYPE = 'UNKNOWN_SOURCE_TYPE',\n APP = 'APP',\n USER = 'USER',\n}\n\n/** @enumType */\nexport type SourceTypeWithLiterals =\n | SourceType\n | 'UNKNOWN_SOURCE_TYPE'\n | 'APP'\n | 'USER';\n\nexport interface CreateNoteRequest {\n /** Note to create. */\n note: Note;\n}\n\nexport interface CreateNoteResponse {\n /** Created note. */\n note?: Note;\n}\n\nexport interface GetNoteRequest {\n /**\n * Note ID.\n * @format GUID\n */\n noteId: string;\n}\n\nexport interface GetNoteResponse {\n /** Retrieved note. */\n note?: Note;\n}\n\nexport interface UpdateNoteRequest {\n /** Note to update. */\n note: Note;\n}\n\nexport interface UpdateNoteResponse {\n /** Updated note. */\n note?: Note;\n}\n\nexport interface DeleteNoteRequest {\n /**\n * Note ID.\n * @format GUID\n */\n noteId: string;\n}\n\nexport interface DeleteNoteResponse {}\n\nexport interface QueryNotesRequest {\n /**\n * WQL query object.\n *\n * For more information, see [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).\n */\n query?: CursorQuery;\n /**\n * Contact ID to retrieve notes for. Required when not using cursor pagination.\n * @format GUID\n */\n contactId?: string | null;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /** Name of the field to sort by. */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 1000\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\nexport interface QueryNotesResponse {\n /** Retrieved notes. */\n notes?: Note[];\n /** Paging information. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * 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.\n * 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.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type QueryNotesApplicationErrors = {\n code?: 'MISSING_CONTACT_ID';\n description?: string;\n data?: Record<string, any>;\n};\n","import * as ambassadorWixCrmNotesV2Note from './crm-notes-v2-note-notes.http.js';\nimport * as ambassadorWixCrmNotesV2NoteTypes from './crm-notes-v2-note-notes.types.js';\nimport * as ambassadorWixCrmNotesV2NoteUniversalTypes from './crm-notes-v2-note-notes.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function createNote(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixCrmNotesV2NoteUniversalTypes.CreateNoteRequest,\n ambassadorWixCrmNotesV2NoteTypes.CreateNoteRequest,\n ambassadorWixCrmNotesV2NoteUniversalTypes.CreateNoteResponse,\n ambassadorWixCrmNotesV2NoteTypes.CreateNoteResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions = ambassadorWixCrmNotesV2Note.createNote(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/notes',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getNote(): __PublicMethodMetaInfo<\n 'GET',\n { noteId: string },\n ambassadorWixCrmNotesV2NoteUniversalTypes.GetNoteRequest,\n ambassadorWixCrmNotesV2NoteTypes.GetNoteRequest,\n ambassadorWixCrmNotesV2NoteUniversalTypes.GetNoteResponse,\n ambassadorWixCrmNotesV2NoteTypes.GetNoteResponse\n> {\n const payload = { noteId: ':noteId' } as any;\n\n const getRequestOptions = ambassadorWixCrmNotesV2Note.getNote(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v2/notes/{noteId}',\n pathParams: { noteId: 'noteId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateNote(): __PublicMethodMetaInfo<\n 'PATCH',\n { noteId: string },\n ambassadorWixCrmNotesV2NoteUniversalTypes.UpdateNoteRequest,\n ambassadorWixCrmNotesV2NoteTypes.UpdateNoteRequest,\n ambassadorWixCrmNotesV2NoteUniversalTypes.UpdateNoteResponse,\n ambassadorWixCrmNotesV2NoteTypes.UpdateNoteResponse\n> {\n const payload = { note: { id: ':noteId' } } as any;\n\n const getRequestOptions = ambassadorWixCrmNotesV2Note.updateNote(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v2/notes/{note.id}',\n pathParams: { noteId: 'noteId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteNote(): __PublicMethodMetaInfo<\n 'DELETE',\n { noteId: string },\n ambassadorWixCrmNotesV2NoteUniversalTypes.DeleteNoteRequest,\n ambassadorWixCrmNotesV2NoteTypes.DeleteNoteRequest,\n ambassadorWixCrmNotesV2NoteUniversalTypes.DeleteNoteResponse,\n ambassadorWixCrmNotesV2NoteTypes.DeleteNoteResponse\n> {\n const payload = { noteId: ':noteId' } as any;\n\n const getRequestOptions = ambassadorWixCrmNotesV2Note.deleteNote(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v2/notes/{noteId}',\n pathParams: { noteId: 'noteId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function queryNotes(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixCrmNotesV2NoteUniversalTypes.QueryNotesRequest,\n ambassadorWixCrmNotesV2NoteTypes.QueryNotesRequest,\n ambassadorWixCrmNotesV2NoteUniversalTypes.QueryNotesResponse,\n ambassadorWixCrmNotesV2NoteTypes.QueryNotesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions = ambassadorWixCrmNotesV2Note.queryNotes(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/notes/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n Note as NoteOriginal,\n NoteType as NoteTypeOriginal,\n NoteTypeWithLiterals as NoteTypeWithLiteralsOriginal,\n NoteSource as NoteSourceOriginal,\n SourceType as SourceTypeOriginal,\n SourceTypeWithLiterals as SourceTypeWithLiteralsOriginal,\n CreateNoteRequest as CreateNoteRequestOriginal,\n CreateNoteResponse as CreateNoteResponseOriginal,\n GetNoteRequest as GetNoteRequestOriginal,\n GetNoteResponse as GetNoteResponseOriginal,\n UpdateNoteRequest as UpdateNoteRequestOriginal,\n UpdateNoteResponse as UpdateNoteResponseOriginal,\n DeleteNoteRequest as DeleteNoteRequestOriginal,\n DeleteNoteResponse as DeleteNoteResponseOriginal,\n QueryNotesRequest as QueryNotesRequestOriginal,\n CursorQuery as CursorQueryOriginal,\n CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal,\n Sorting as SortingOriginal,\n SortOrder as SortOrderOriginal,\n SortOrderWithLiterals as SortOrderWithLiteralsOriginal,\n CursorPaging as CursorPagingOriginal,\n QueryNotesResponse as QueryNotesResponseOriginal,\n CursorPagingMetadata as CursorPagingMetadataOriginal,\n Cursors as CursorsOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n QueryNotesApplicationErrors as QueryNotesApplicationErrorsOriginal,\n} from './crm-notes-v2-note-notes.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA,kBAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,kBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,6BACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;A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f,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,cAOd;AACA,QAAM,UAAU,EAAE,QAAQ,UAAU;AAEpC,QAAM,oBAAgD,WAAW,OAAO;AAExE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,QAAQ,SAAS;AAAA,IAC/B,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,cAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAAgD,WAAW,OAAO;AAExE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["createNote","deleteNote","getNote","queryNotes","updateNote","import_timestamp","import_rest_modules","payload","NoteType","SourceType","SortOrder","WebhookIdentityType","createNote","getNote","updateNote","deleteNote","queryNotes"]}
|
package/build/es/meta.d.mts
CHANGED
|
@@ -210,6 +210,148 @@ interface Cursors {
|
|
|
210
210
|
/** Cursor pointing to previous page in the list of results. */
|
|
211
211
|
prev?: string | null;
|
|
212
212
|
}
|
|
213
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
214
|
+
createdEvent?: EntityCreatedEvent;
|
|
215
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
216
|
+
deletedEvent?: EntityDeletedEvent;
|
|
217
|
+
actionEvent?: ActionEvent;
|
|
218
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
219
|
+
id?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
222
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
223
|
+
*/
|
|
224
|
+
entityFqdn?: string;
|
|
225
|
+
/**
|
|
226
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
227
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
228
|
+
*/
|
|
229
|
+
slug?: string;
|
|
230
|
+
/** ID of the entity associated with the event. */
|
|
231
|
+
entityId?: string;
|
|
232
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
233
|
+
eventTime?: Date | null;
|
|
234
|
+
/**
|
|
235
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
236
|
+
* (for example, GDPR).
|
|
237
|
+
*/
|
|
238
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
239
|
+
/** If present, indicates the action that triggered the event. */
|
|
240
|
+
originatedFrom?: string | null;
|
|
241
|
+
/**
|
|
242
|
+
* 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.
|
|
243
|
+
* 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.
|
|
244
|
+
*/
|
|
245
|
+
entityEventSequence?: string | null;
|
|
246
|
+
}
|
|
247
|
+
/** @oneof */
|
|
248
|
+
interface DomainEventBodyOneOf {
|
|
249
|
+
createdEvent?: EntityCreatedEvent;
|
|
250
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
251
|
+
deletedEvent?: EntityDeletedEvent;
|
|
252
|
+
actionEvent?: ActionEvent;
|
|
253
|
+
}
|
|
254
|
+
interface EntityCreatedEvent {
|
|
255
|
+
entityAsJson?: string;
|
|
256
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
257
|
+
restoreInfo?: RestoreInfo;
|
|
258
|
+
}
|
|
259
|
+
interface RestoreInfo {
|
|
260
|
+
deletedDate?: Date | null;
|
|
261
|
+
}
|
|
262
|
+
interface EntityUpdatedEvent {
|
|
263
|
+
/**
|
|
264
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
265
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
266
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
267
|
+
*/
|
|
268
|
+
currentEntityAsJson?: string;
|
|
269
|
+
}
|
|
270
|
+
interface EntityDeletedEvent {
|
|
271
|
+
/** Entity that was deleted. */
|
|
272
|
+
deletedEntityAsJson?: string | null;
|
|
273
|
+
}
|
|
274
|
+
interface ActionEvent {
|
|
275
|
+
bodyAsJson?: string;
|
|
276
|
+
}
|
|
277
|
+
interface MessageEnvelope {
|
|
278
|
+
/**
|
|
279
|
+
* App instance ID.
|
|
280
|
+
* @format GUID
|
|
281
|
+
*/
|
|
282
|
+
instanceId?: string | null;
|
|
283
|
+
/**
|
|
284
|
+
* Event type.
|
|
285
|
+
* @maxLength 150
|
|
286
|
+
*/
|
|
287
|
+
eventType?: string;
|
|
288
|
+
/** The identification type and identity data. */
|
|
289
|
+
identity?: IdentificationData;
|
|
290
|
+
/** Stringify payload. */
|
|
291
|
+
data?: string;
|
|
292
|
+
}
|
|
293
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
294
|
+
/**
|
|
295
|
+
* ID of a site visitor that has not logged in to the site.
|
|
296
|
+
* @format GUID
|
|
297
|
+
*/
|
|
298
|
+
anonymousVisitorId?: string;
|
|
299
|
+
/**
|
|
300
|
+
* ID of a site visitor that has logged in to the site.
|
|
301
|
+
* @format GUID
|
|
302
|
+
*/
|
|
303
|
+
memberId?: string;
|
|
304
|
+
/**
|
|
305
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
306
|
+
* @format GUID
|
|
307
|
+
*/
|
|
308
|
+
wixUserId?: string;
|
|
309
|
+
/**
|
|
310
|
+
* ID of an app.
|
|
311
|
+
* @format GUID
|
|
312
|
+
*/
|
|
313
|
+
appId?: string;
|
|
314
|
+
/** @readonly */
|
|
315
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
316
|
+
}
|
|
317
|
+
/** @oneof */
|
|
318
|
+
interface IdentificationDataIdOneOf {
|
|
319
|
+
/**
|
|
320
|
+
* ID of a site visitor that has not logged in to the site.
|
|
321
|
+
* @format GUID
|
|
322
|
+
*/
|
|
323
|
+
anonymousVisitorId?: string;
|
|
324
|
+
/**
|
|
325
|
+
* ID of a site visitor that has logged in to the site.
|
|
326
|
+
* @format GUID
|
|
327
|
+
*/
|
|
328
|
+
memberId?: string;
|
|
329
|
+
/**
|
|
330
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
331
|
+
* @format GUID
|
|
332
|
+
*/
|
|
333
|
+
wixUserId?: string;
|
|
334
|
+
/**
|
|
335
|
+
* ID of an app.
|
|
336
|
+
* @format GUID
|
|
337
|
+
*/
|
|
338
|
+
appId?: string;
|
|
339
|
+
}
|
|
340
|
+
declare enum WebhookIdentityType {
|
|
341
|
+
UNKNOWN = "UNKNOWN",
|
|
342
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
343
|
+
MEMBER = "MEMBER",
|
|
344
|
+
WIX_USER = "WIX_USER",
|
|
345
|
+
APP = "APP"
|
|
346
|
+
}
|
|
347
|
+
/** @enumType */
|
|
348
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
349
|
+
/** @docsIgnore */
|
|
350
|
+
type QueryNotesApplicationErrors = {
|
|
351
|
+
code?: 'MISSING_CONTACT_ID';
|
|
352
|
+
description?: string;
|
|
353
|
+
data?: Record<string, any>;
|
|
354
|
+
};
|
|
213
355
|
|
|
214
356
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
215
357
|
getUrl: (context: any) => string;
|
|
@@ -233,4 +375,4 @@ declare function deleteNote(): __PublicMethodMetaInfo<'DELETE', {
|
|
|
233
375
|
}, DeleteNoteRequest$1, DeleteNoteRequest, DeleteNoteResponse$1, DeleteNoteResponse>;
|
|
234
376
|
declare function queryNotes(): __PublicMethodMetaInfo<'POST', {}, QueryNotesRequest$1, QueryNotesRequest, QueryNotesResponse$1, QueryNotesResponse>;
|
|
235
377
|
|
|
236
|
-
export { type __PublicMethodMetaInfo, createNote, deleteNote, getNote, queryNotes, updateNote };
|
|
378
|
+
export { type ActionEvent as ActionEventOriginal, type CreateNoteRequest as CreateNoteRequestOriginal, type CreateNoteResponse as CreateNoteResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DeleteNoteRequest as DeleteNoteRequestOriginal, type DeleteNoteResponse as DeleteNoteResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type GetNoteRequest as GetNoteRequestOriginal, type GetNoteResponse as GetNoteResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type Note as NoteOriginal, type NoteSource as NoteSourceOriginal, NoteType as NoteTypeOriginal, type NoteTypeWithLiterals as NoteTypeWithLiteralsOriginal, type QueryNotesApplicationErrors as QueryNotesApplicationErrorsOriginal, type QueryNotesRequest as QueryNotesRequestOriginal, type QueryNotesResponse as QueryNotesResponseOriginal, type RestoreInfo as RestoreInfoOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, SourceType as SourceTypeOriginal, type SourceTypeWithLiterals as SourceTypeWithLiteralsOriginal, type UpdateNoteRequest as UpdateNoteRequestOriginal, type UpdateNoteResponse as UpdateNoteResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, createNote, deleteNote, getNote, queryNotes, updateNote };
|
package/build/es/meta.mjs
CHANGED
|
@@ -184,6 +184,34 @@ function queryNotes(payload) {
|
|
|
184
184
|
return __queryNotes;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
+
// src/crm-notes-v2-note-notes.types.ts
|
|
188
|
+
var NoteType = /* @__PURE__ */ ((NoteType2) => {
|
|
189
|
+
NoteType2["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
|
|
190
|
+
NoteType2["NOT_SET"] = "NOT_SET";
|
|
191
|
+
NoteType2["MEETING_SUMMARY"] = "MEETING_SUMMARY";
|
|
192
|
+
NoteType2["CALL_SUMMARY"] = "CALL_SUMMARY";
|
|
193
|
+
return NoteType2;
|
|
194
|
+
})(NoteType || {});
|
|
195
|
+
var SourceType = /* @__PURE__ */ ((SourceType2) => {
|
|
196
|
+
SourceType2["UNKNOWN_SOURCE_TYPE"] = "UNKNOWN_SOURCE_TYPE";
|
|
197
|
+
SourceType2["APP"] = "APP";
|
|
198
|
+
SourceType2["USER"] = "USER";
|
|
199
|
+
return SourceType2;
|
|
200
|
+
})(SourceType || {});
|
|
201
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
202
|
+
SortOrder2["ASC"] = "ASC";
|
|
203
|
+
SortOrder2["DESC"] = "DESC";
|
|
204
|
+
return SortOrder2;
|
|
205
|
+
})(SortOrder || {});
|
|
206
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
207
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
208
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
209
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
210
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
211
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
212
|
+
return WebhookIdentityType2;
|
|
213
|
+
})(WebhookIdentityType || {});
|
|
214
|
+
|
|
187
215
|
// src/crm-notes-v2-note-notes.meta.ts
|
|
188
216
|
function createNote2() {
|
|
189
217
|
const payload = {};
|
|
@@ -276,6 +304,10 @@ function queryNotes2() {
|
|
|
276
304
|
};
|
|
277
305
|
}
|
|
278
306
|
export {
|
|
307
|
+
NoteType as NoteTypeOriginal,
|
|
308
|
+
SortOrder as SortOrderOriginal,
|
|
309
|
+
SourceType as SourceTypeOriginal,
|
|
310
|
+
WebhookIdentityType as WebhookIdentityTypeOriginal,
|
|
279
311
|
createNote2 as createNote,
|
|
280
312
|
deleteNote2 as deleteNote,
|
|
281
313
|
getNote2 as getNote,
|