@wix/auto_sdk_crm_notes 1.0.4 → 1.0.6

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.
@@ -96,6 +96,9 @@ function createNote(payload) {
96
96
  method: "POST",
97
97
  methodFqn: "wix.crm.notes.v2.Notes.CreateNote",
98
98
  packageName: PACKAGE_NAME,
99
+ migrationOptions: {
100
+ optInTransformResponse: true
101
+ },
99
102
  url: resolveWixCrmNotesV2NotesUrl({
100
103
  protoPath: "/v2/notes",
101
104
  data: serializedData,
@@ -120,6 +123,9 @@ function getNote(payload) {
120
123
  method: "GET",
121
124
  methodFqn: "wix.crm.notes.v2.Notes.GetNote",
122
125
  packageName: PACKAGE_NAME,
126
+ migrationOptions: {
127
+ optInTransformResponse: true
128
+ },
123
129
  url: resolveWixCrmNotesV2NotesUrl({
124
130
  protoPath: "/v2/notes/{noteId}",
125
131
  data: payload,
@@ -154,6 +160,9 @@ function updateNote(payload) {
154
160
  method: "PATCH",
155
161
  methodFqn: "wix.crm.notes.v2.Notes.UpdateNote",
156
162
  packageName: PACKAGE_NAME,
163
+ migrationOptions: {
164
+ optInTransformResponse: true
165
+ },
157
166
  url: resolveWixCrmNotesV2NotesUrl({
158
167
  protoPath: "/v2/notes/{note.id}",
159
168
  data: serializedData,
@@ -178,6 +187,9 @@ function deleteNote(payload) {
178
187
  method: "DELETE",
179
188
  methodFqn: "wix.crm.notes.v2.Notes.DeleteNote",
180
189
  packageName: PACKAGE_NAME,
190
+ migrationOptions: {
191
+ optInTransformResponse: true
192
+ },
181
193
  url: resolveWixCrmNotesV2NotesUrl({
182
194
  protoPath: "/v2/notes/{noteId}",
183
195
  data: payload,
@@ -196,6 +208,9 @@ function queryNotes(payload) {
196
208
  method: "POST",
197
209
  methodFqn: "wix.crm.notes.v2.Notes.QueryNotes",
198
210
  packageName: PACKAGE_NAME,
211
+ migrationOptions: {
212
+ optInTransformResponse: true
213
+ },
199
214
  url: resolveWixCrmNotesV2NotesUrl({
200
215
  protoPath: "/v2/notes/query",
201
216
  data: payload,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/crm-notes-v2-note-notes.public.ts","../../src/crm-notes-v2-note-notes.universal.ts","../../src/crm-notes-v2-note-notes.http.ts","../../src/crm-notes-v2-note-notes.context.ts"],"sourcesContent":["export * from './src/crm-notes-v2-note-notes.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Note,\n NoteCreatedEnvelope,\n NoteDeletedEnvelope,\n NoteUpdatedEnvelope,\n NotesQueryBuilder,\n QueryNotesOptions,\n UpdateNote,\n createNote as universalCreateNote,\n deleteNote as universalDeleteNote,\n getNote as universalGetNote,\n queryNotes as universalQueryNotes,\n updateNote as universalUpdateNote,\n} from './crm-notes-v2-note-notes.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/crm' };\n\nexport function createNote(httpClient: HttpClient): CreateNoteSignature {\n return (note: NonNullablePaths<Note, `contactId`, 2>) =>\n universalCreateNote(\n note,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateNoteSignature {\n /**\n * Creates a new note associated with a specific contact.\n * @param - Note to create.\n * @returns Created note.\n */\n (note: NonNullablePaths<Note, `contactId`, 2>): Promise<\n NonNullablePaths<Note, `type` | `source.sourceType`, 3>\n >;\n}\n\nexport function getNote(httpClient: HttpClient): GetNoteSignature {\n return (noteId: string) =>\n universalGetNote(\n noteId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetNoteSignature {\n /**\n * Retrieves a note by ID.\n * @param - Note ID.\n * @returns Retrieved note.\n */\n (noteId: string): Promise<\n NonNullablePaths<Note, `type` | `source.sourceType`, 3>\n >;\n}\n\nexport function updateNote(httpClient: HttpClient): UpdateNoteSignature {\n return (_id: string, note: NonNullablePaths<UpdateNote, `revision`, 2>) =>\n universalUpdateNote(\n _id,\n note,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateNoteSignature {\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 * @param - Note ID.\n * @returns Updated note.\n */\n (_id: string, note: NonNullablePaths<UpdateNote, `revision`, 2>): Promise<\n NonNullablePaths<Note, `type` | `source.sourceType`, 3>\n >;\n}\n\nexport function deleteNote(httpClient: HttpClient): DeleteNoteSignature {\n return (noteId: string) =>\n universalDeleteNote(\n noteId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteNoteSignature {\n /**\n * Deletes a note.\n * @param - Note ID.\n */\n (noteId: string): Promise<void>;\n}\n\nexport function queryNotes(httpClient: HttpClient): QueryNotesSignature {\n return (options?: QueryNotesOptions) =>\n universalQueryNotes(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryNotesSignature {\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 */\n (options?: QueryNotesOptions): NotesQueryBuilder;\n}\n\nexport const onNoteCreated = EventDefinition(\n 'wix.crm.notes.v2.note_created',\n true,\n (event: NoteCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<NoteCreatedEnvelope>();\nexport const onNoteDeleted = EventDefinition(\n 'wix.crm.notes.v2.note_deleted',\n true,\n (event: NoteDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'undefined.createdDate' },\n { path: 'undefined.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<NoteDeletedEnvelope>();\nexport const onNoteUpdated = EventDefinition(\n 'wix.crm.notes.v2.note_updated',\n true,\n (event: NoteUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<NoteUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n CreateNoteRequest,\n CreateNoteResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteNoteRequest,\n DeleteNoteResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetNoteRequest,\n GetNoteResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n Note,\n NoteCreatedEnvelope,\n NoteDeletedEnvelope,\n NoteSource,\n NoteType,\n NoteUpdatedEnvelope,\n NotesQueryBuilder,\n NotesQueryResult,\n QueryNotesOptions,\n QueryNotesRequest,\n QueryNotesResponse,\n RestoreInfo,\n SortOrder,\n Sorting,\n SourceType,\n UpdateNote,\n UpdateNoteRequest,\n UpdateNoteResponse,\n WebhookIdentityType,\n} from './crm-notes-v2-note-notes.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixCrmNotesV2Note from './crm-notes-v2-note-notes.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\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 entity?: string;\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 currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: 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\nexport interface BaseEventMetadata {\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}\n\nexport interface EventMetadata extends BaseEventMetadata {\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\nexport interface NoteCreatedEnvelope {\n entity: Note;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a note is created.\n * @permissionScope Read Members and Contacts - all read permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS\n * @permissionScope Manage Notes\n * @permissionScopeId SCOPE.DC-CRM.MANAGE-NOTES\n * @permissionScope Picasso private app mega scope (site)\n * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE\n * @permissionScope Manage Members and Contacts - all permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS\n * @permissionScope Read Notes\n * @permissionScopeId SCOPE.DC-CRM.READ-NOTES\n * @permissionId CRM_NOTES.NOTE_READ\n * @webhook\n * @eventType wix.crm.notes.v2.note_created\n * @serviceIdentifier wix.crm.notes.v2.Notes\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onNoteCreated(\n handler: (event: NoteCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface NoteDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a note is deleted.\n * @permissionScope Read Members and Contacts - all read permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS\n * @permissionScope Manage Notes\n * @permissionScopeId SCOPE.DC-CRM.MANAGE-NOTES\n * @permissionScope Picasso private app mega scope (site)\n * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE\n * @permissionScope Manage Members and Contacts - all permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS\n * @permissionScope Read Notes\n * @permissionScopeId SCOPE.DC-CRM.READ-NOTES\n * @permissionId CRM_NOTES.NOTE_READ\n * @webhook\n * @eventType wix.crm.notes.v2.note_deleted\n * @serviceIdentifier wix.crm.notes.v2.Notes\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onNoteDeleted(\n handler: (event: NoteDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface NoteUpdatedEnvelope {\n entity: Note;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a note is updated.\n * @permissionScope Read Members and Contacts - all read permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS\n * @permissionScope Manage Notes\n * @permissionScopeId SCOPE.DC-CRM.MANAGE-NOTES\n * @permissionScope Picasso private app mega scope (site)\n * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE\n * @permissionScope Manage Members and Contacts - all permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS\n * @permissionScope Read Notes\n * @permissionScopeId SCOPE.DC-CRM.READ-NOTES\n * @permissionId CRM_NOTES.NOTE_READ\n * @webhook\n * @eventType wix.crm.notes.v2.note_updated\n * @serviceIdentifier wix.crm.notes.v2.Notes\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onNoteUpdated(\n handler: (event: NoteUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a new note associated with a specific contact.\n * @param note - Note to create.\n * @public\n * @documentationMaturity preview\n * @requiredField note\n * @requiredField note.contactId\n * @permissionId CRM_NOTES.NOTE_CREATE\n * @applicableIdentity APP\n * @returns Created note.\n * @fqn wix.crm.notes.v2.Notes.CreateNote\n */\nexport async function createNote(\n note: NonNullablePaths<Note, `contactId`, 2>\n): Promise<NonNullablePaths<Note, `type` | `source.sourceType`, 3>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ note: note });\n\n const reqOpts = ambassadorWixCrmNotesV2Note.createNote(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.note!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { note: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['note']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a note by ID.\n * @param noteId - Note ID.\n * @public\n * @documentationMaturity preview\n * @requiredField noteId\n * @permissionId CRM_NOTES.NOTE_READ\n * @applicableIdentity APP\n * @returns Retrieved note.\n * @fqn wix.crm.notes.v2.Notes.GetNote\n */\nexport async function getNote(\n noteId: string\n): Promise<NonNullablePaths<Note, `type` | `source.sourceType`, 3>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ noteId: noteId });\n\n const reqOpts = ambassadorWixCrmNotesV2Note.getNote(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.note!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { noteId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['noteId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\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 * @param _id - Note ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField note\n * @requiredField note.revision\n * @permissionId CRM_NOTES.NOTE_UPDATE\n * @applicableIdentity APP\n * @returns Updated note.\n * @fqn wix.crm.notes.v2.Notes.UpdateNote\n */\nexport async function updateNote(\n _id: string,\n note: NonNullablePaths<UpdateNote, `revision`, 2>\n): Promise<NonNullablePaths<Note, `type` | `source.sourceType`, 3>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n note: { ...note, id: _id },\n });\n\n const reqOpts = ambassadorWixCrmNotesV2Note.updateNote(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.note!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { note: '$[1]' },\n explicitPathsToArguments: { 'note.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'note']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateNote {\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\n/**\n * Deletes a note.\n * @param noteId - Note ID.\n * @public\n * @documentationMaturity preview\n * @requiredField noteId\n * @permissionId CRM_NOTES.NOTE_DELETE\n * @applicableIdentity APP\n * @fqn wix.crm.notes.v2.Notes.DeleteNote\n */\nexport async function deleteNote(noteId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ noteId: noteId });\n\n const reqOpts = ambassadorWixCrmNotesV2Note.deleteNote(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { noteId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['noteId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\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 * @public\n * @documentationMaturity preview\n * @permissionId CRM_NOTES.NOTE_READ\n * @applicableIdentity APP\n * @fqn wix.crm.notes.v2.Notes.QueryNotes\n */\nexport function queryNotes(options?: QueryNotesOptions): NotesQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<Note, 'CURSOR', QueryNotesRequest, QueryNotesResponse>({\n func: async (payload: QueryNotesRequest) => {\n const reqOpts = ambassadorWixCrmNotesV2Note.queryNotes({\n ...payload,\n ...(options ?? {}),\n });\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryNotesRequest['query']) => {\n const args = [query, options] as [\n QueryNotesRequest['query'],\n QueryNotesOptions\n ];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryNotesResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.notes,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\nexport interface QueryNotesOptions {\n /**\n * Contact ID to retrieve notes for. Required when not using cursor pagination.\n * @format GUID\n */\n contactId?: string | null | undefined;\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface NotesQueryResult extends QueryCursorResult {\n items: Note[];\n query: NotesQueryBuilder;\n next: () => Promise<NotesQueryResult>;\n prev: () => Promise<NotesQueryResult>;\n}\n\nexport interface NotesQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'contactId'\n | 'type',\n value: any\n ) => NotesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName: '_createdDate' | '_updatedDate' | 'type',\n value: any\n ) => NotesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => NotesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => NotesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => NotesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => NotesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasSome: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any[]\n ) => NotesQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'contactId'\n | 'type',\n value: any\n ) => NotesQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName: '_createdDate' | '_updatedDate',\n value: boolean\n ) => NotesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<'_createdDate' | '_updatedDate'>\n ) => NotesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<'_createdDate' | '_updatedDate'>\n ) => NotesQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => NotesQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => NotesQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<NotesQueryResult>;\n}\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 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 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 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 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 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 {\n createNote as publicCreateNote,\n getNote as publicGetNote,\n updateNote as publicUpdateNote,\n deleteNote as publicDeleteNote,\n queryNotes as publicQueryNotes,\n} from './crm-notes-v2-note-notes.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onNoteCreated as publicOnNoteCreated } from './crm-notes-v2-note-notes.public.js';\nimport { onNoteDeleted as publicOnNoteDeleted } from './crm-notes-v2-note-notes.public.js';\nimport { onNoteUpdated as publicOnNoteUpdated } from './crm-notes-v2-note-notes.public.js';\n\nexport const createNote: MaybeContext<\n BuildRESTFunction<typeof publicCreateNote> & typeof publicCreateNote\n> = /*#__PURE__*/ createRESTModule(publicCreateNote);\nexport const getNote: MaybeContext<\n BuildRESTFunction<typeof publicGetNote> & typeof publicGetNote\n> = /*#__PURE__*/ createRESTModule(publicGetNote);\nexport const updateNote: MaybeContext<\n BuildRESTFunction<typeof publicUpdateNote> & typeof publicUpdateNote\n> = /*#__PURE__*/ createRESTModule(publicUpdateNote);\nexport const deleteNote: MaybeContext<\n BuildRESTFunction<typeof publicDeleteNote> & typeof publicDeleteNote\n> = /*#__PURE__*/ createRESTModule(publicDeleteNote);\nexport const queryNotes: MaybeContext<\n BuildRESTFunction<typeof publicQueryNotes> & typeof publicQueryNotes\n> = /*#__PURE__*/ createRESTModule(publicQueryNotes);\n/**\n * Triggered when a note is created.\n */\nexport const onNoteCreated: BuildEventDefinition<typeof publicOnNoteCreated> &\n typeof publicOnNoteCreated = createEventModule(publicOnNoteCreated);\n/**\n * Triggered when a note is deleted.\n */\nexport const onNoteDeleted: BuildEventDefinition<typeof publicOnNoteDeleted> &\n typeof publicOnNoteDeleted = createEventModule(publicOnNoteDeleted);\n/**\n * Triggered when a note is updated.\n */\nexport const onNoteUpdated: BuildEventDefinition<typeof publicOnNoteUpdated> &\n typeof publicOnNoteUpdated = createEventModule(publicOnNoteUpdated);\n\nexport {\n NoteType,\n SourceType,\n SortOrder,\n WebhookIdentityType,\n} from './crm-notes-v2-note-notes.universal.js';\nexport {\n Note,\n NoteSource,\n CreateNoteRequest,\n CreateNoteResponse,\n GetNoteRequest,\n GetNoteResponse,\n UpdateNoteRequest,\n UpdateNoteResponse,\n DeleteNoteRequest,\n DeleteNoteResponse,\n QueryNotesRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryNotesResponse,\n CursorPagingMetadata,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n NoteCreatedEnvelope,\n NoteDeletedEnvelope,\n NoteUpdatedEnvelope,\n UpdateNote,\n QueryNotesOptions,\n NotesQueryResult,\n NotesQueryBuilder,\n} from './crm-notes-v2-note-notes.universal.js';\nexport {\n NoteTypeWithLiterals,\n SourceTypeWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n QueryNotesApplicationErrors,\n} from './crm-notes-v2-note-notes.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAAA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B;AAAA,UAChC,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAuB;AAChB,IAAM,oBAAgB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA,CAAC,cACC;AAAA,QACE,wCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAuB;;;AG9KvB,IAAAC,uBAAiC;AACjC,sCAAkC;AAU3B,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,WAEK,2DAAiBA,QAAa;AACzC,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,cAEK,2DAAiBA,WAAgB;AAI5C,IAAMC,qBACkB,mDAAkB,aAAmB;AAI7D,IAAMC,qBACkB,mDAAkB,aAAmB;AAI7D,IAAMC,qBACkB,mDAAkB,aAAmB;","names":["createNote","deleteNote","getNote","onNoteCreated","onNoteDeleted","onNoteUpdated","queryNotes","updateNote","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","import_transform_paths","NoteType","SourceType","SortOrder","WebhookIdentityType","createNote","sdkTransformError","getNote","updateNote","deleteNote","queryNotes","createNote","getNote","updateNote","deleteNote","queryNotes","import_rest_modules","createNote","getNote","updateNote","deleteNote","queryNotes","onNoteCreated","onNoteDeleted","onNoteUpdated"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/crm-notes-v2-note-notes.public.ts","../../src/crm-notes-v2-note-notes.universal.ts","../../src/crm-notes-v2-note-notes.http.ts","../../src/crm-notes-v2-note-notes.context.ts"],"sourcesContent":["export * from './src/crm-notes-v2-note-notes.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Note,\n NoteCreatedEnvelope,\n NoteDeletedEnvelope,\n NoteUpdatedEnvelope,\n NotesQueryBuilder,\n QueryNotesOptions,\n UpdateNote,\n createNote as universalCreateNote,\n deleteNote as universalDeleteNote,\n getNote as universalGetNote,\n queryNotes as universalQueryNotes,\n updateNote as universalUpdateNote,\n} from './crm-notes-v2-note-notes.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/crm' };\n\nexport function createNote(httpClient: HttpClient): CreateNoteSignature {\n return (note: NonNullablePaths<Note, `contactId`, 2>) =>\n universalCreateNote(\n note,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateNoteSignature {\n /**\n * Creates a new note associated with a specific contact.\n * @param - Note to create.\n * @returns Created note.\n */\n (note: NonNullablePaths<Note, `contactId`, 2>): Promise<\n NonNullablePaths<Note, `type` | `source.sourceType`, 3>\n >;\n}\n\nexport function getNote(httpClient: HttpClient): GetNoteSignature {\n return (noteId: string) =>\n universalGetNote(\n noteId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetNoteSignature {\n /**\n * Retrieves a note by ID.\n * @param - Note ID.\n * @returns Retrieved note.\n */\n (noteId: string): Promise<\n NonNullablePaths<Note, `type` | `source.sourceType`, 3>\n >;\n}\n\nexport function updateNote(httpClient: HttpClient): UpdateNoteSignature {\n return (_id: string, note: NonNullablePaths<UpdateNote, `revision`, 2>) =>\n universalUpdateNote(\n _id,\n note,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateNoteSignature {\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 * @param - Note ID.\n * @returns Updated note.\n */\n (_id: string, note: NonNullablePaths<UpdateNote, `revision`, 2>): Promise<\n NonNullablePaths<Note, `type` | `source.sourceType`, 3>\n >;\n}\n\nexport function deleteNote(httpClient: HttpClient): DeleteNoteSignature {\n return (noteId: string) =>\n universalDeleteNote(\n noteId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteNoteSignature {\n /**\n * Deletes a note.\n * @param - Note ID.\n */\n (noteId: string): Promise<void>;\n}\n\nexport function queryNotes(httpClient: HttpClient): QueryNotesSignature {\n return (options?: QueryNotesOptions) =>\n universalQueryNotes(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryNotesSignature {\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 */\n (options?: QueryNotesOptions): NotesQueryBuilder;\n}\n\nexport const onNoteCreated = EventDefinition(\n 'wix.crm.notes.v2.note_created',\n true,\n (event: NoteCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<NoteCreatedEnvelope>();\nexport const onNoteDeleted = EventDefinition(\n 'wix.crm.notes.v2.note_deleted',\n true,\n (event: NoteDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'undefined.createdDate' },\n { path: 'undefined.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<NoteDeletedEnvelope>();\nexport const onNoteUpdated = EventDefinition(\n 'wix.crm.notes.v2.note_updated',\n true,\n (event: NoteUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<NoteUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n CreateNoteRequest,\n CreateNoteResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteNoteRequest,\n DeleteNoteResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetNoteRequest,\n GetNoteResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n Note,\n NoteCreatedEnvelope,\n NoteDeletedEnvelope,\n NoteSource,\n NoteType,\n NoteUpdatedEnvelope,\n NotesQueryBuilder,\n NotesQueryResult,\n QueryNotesOptions,\n QueryNotesRequest,\n QueryNotesResponse,\n RestoreInfo,\n SortOrder,\n Sorting,\n SourceType,\n UpdateNote,\n UpdateNoteRequest,\n UpdateNoteResponse,\n WebhookIdentityType,\n} from './crm-notes-v2-note-notes.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixCrmNotesV2Note from './crm-notes-v2-note-notes.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\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 entity?: string;\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 currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: 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\nexport interface BaseEventMetadata {\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}\n\nexport interface EventMetadata extends BaseEventMetadata {\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\nexport interface NoteCreatedEnvelope {\n entity: Note;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a note is created.\n * @permissionScope Read Members and Contacts - all read permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS\n * @permissionScope Manage Notes\n * @permissionScopeId SCOPE.DC-CRM.MANAGE-NOTES\n * @permissionScope Manage Members and Contacts - all permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS\n * @permissionScope Read Notes\n * @permissionScopeId SCOPE.DC-CRM.READ-NOTES\n * @permissionId CRM_NOTES.NOTE_READ\n * @webhook\n * @eventType wix.crm.notes.v2.note_created\n * @serviceIdentifier wix.crm.notes.v2.Notes\n * @slug created\n */\nexport declare function onNoteCreated(\n handler: (event: NoteCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface NoteDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a note is deleted.\n * @permissionScope Read Members and Contacts - all read permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS\n * @permissionScope Manage Notes\n * @permissionScopeId SCOPE.DC-CRM.MANAGE-NOTES\n * @permissionScope Manage Members and Contacts - all permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS\n * @permissionScope Read Notes\n * @permissionScopeId SCOPE.DC-CRM.READ-NOTES\n * @permissionId CRM_NOTES.NOTE_READ\n * @webhook\n * @eventType wix.crm.notes.v2.note_deleted\n * @serviceIdentifier wix.crm.notes.v2.Notes\n * @slug deleted\n */\nexport declare function onNoteDeleted(\n handler: (event: NoteDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface NoteUpdatedEnvelope {\n entity: Note;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a note is updated.\n * @permissionScope Read Members and Contacts - all read permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS\n * @permissionScope Manage Notes\n * @permissionScopeId SCOPE.DC-CRM.MANAGE-NOTES\n * @permissionScope Manage Members and Contacts - all permissions\n * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS\n * @permissionScope Read Notes\n * @permissionScopeId SCOPE.DC-CRM.READ-NOTES\n * @permissionId CRM_NOTES.NOTE_READ\n * @webhook\n * @eventType wix.crm.notes.v2.note_updated\n * @serviceIdentifier wix.crm.notes.v2.Notes\n * @slug updated\n */\nexport declare function onNoteUpdated(\n handler: (event: NoteUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a new note associated with a specific contact.\n * @param note - Note to create.\n * @public\n * @requiredField note\n * @requiredField note.contactId\n * @permissionId CRM_NOTES.NOTE_CREATE\n * @applicableIdentity APP\n * @returns Created note.\n * @fqn wix.crm.notes.v2.Notes.CreateNote\n */\nexport async function createNote(\n note: NonNullablePaths<Note, `contactId`, 2>\n): Promise<NonNullablePaths<Note, `type` | `source.sourceType`, 3>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ note: note });\n\n const reqOpts = ambassadorWixCrmNotesV2Note.createNote(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.note!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { note: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['note']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a note by ID.\n * @param noteId - Note ID.\n * @public\n * @requiredField noteId\n * @permissionId CRM_NOTES.NOTE_READ\n * @applicableIdentity APP\n * @returns Retrieved note.\n * @fqn wix.crm.notes.v2.Notes.GetNote\n */\nexport async function getNote(\n noteId: string\n): Promise<NonNullablePaths<Note, `type` | `source.sourceType`, 3>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ noteId: noteId });\n\n const reqOpts = ambassadorWixCrmNotesV2Note.getNote(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.note!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { noteId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['noteId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\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 * @param _id - Note ID.\n * @public\n * @requiredField _id\n * @requiredField note\n * @requiredField note.revision\n * @permissionId CRM_NOTES.NOTE_UPDATE\n * @applicableIdentity APP\n * @returns Updated note.\n * @fqn wix.crm.notes.v2.Notes.UpdateNote\n */\nexport async function updateNote(\n _id: string,\n note: NonNullablePaths<UpdateNote, `revision`, 2>\n): Promise<NonNullablePaths<Note, `type` | `source.sourceType`, 3>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n note: { ...note, id: _id },\n });\n\n const reqOpts = ambassadorWixCrmNotesV2Note.updateNote(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.note!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { note: '$[1]' },\n explicitPathsToArguments: { 'note.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'note']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateNote {\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\n/**\n * Deletes a note.\n * @param noteId - Note ID.\n * @public\n * @requiredField noteId\n * @permissionId CRM_NOTES.NOTE_DELETE\n * @applicableIdentity APP\n * @fqn wix.crm.notes.v2.Notes.DeleteNote\n */\nexport async function deleteNote(noteId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ noteId: noteId });\n\n const reqOpts = ambassadorWixCrmNotesV2Note.deleteNote(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { noteId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['noteId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\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 * @public\n * @permissionId CRM_NOTES.NOTE_READ\n * @applicableIdentity APP\n * @fqn wix.crm.notes.v2.Notes.QueryNotes\n */\nexport function queryNotes(options?: QueryNotesOptions): NotesQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<Note, 'CURSOR', QueryNotesRequest, QueryNotesResponse>({\n func: async (payload: QueryNotesRequest) => {\n const reqOpts = ambassadorWixCrmNotesV2Note.queryNotes({\n ...payload,\n ...(options ?? {}),\n });\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryNotesRequest['query']) => {\n const args = [query, options] as [\n QueryNotesRequest['query'],\n QueryNotesOptions\n ];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryNotesResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.notes,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\nexport interface QueryNotesOptions {\n /**\n * Contact ID to retrieve notes for. Required when not using cursor pagination.\n * @format GUID\n */\n contactId?: string | null | undefined;\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface NotesQueryResult extends QueryCursorResult {\n items: Note[];\n query: NotesQueryBuilder;\n next: () => Promise<NotesQueryResult>;\n prev: () => Promise<NotesQueryResult>;\n}\n\nexport interface NotesQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'contactId'\n | 'type',\n value: any\n ) => NotesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName: '_createdDate' | '_updatedDate' | 'type',\n value: any\n ) => NotesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => NotesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => NotesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => NotesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => NotesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any[]\n ) => NotesQueryBuilder;\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'contactId'\n | 'type',\n value: any\n ) => NotesQueryBuilder;\n exists: (\n propertyName: '_createdDate' | '_updatedDate',\n value: boolean\n ) => NotesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<'_createdDate' | '_updatedDate'>\n ) => NotesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<'_createdDate' | '_updatedDate'>\n ) => NotesQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => NotesQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => NotesQueryBuilder;\n find: () => Promise<NotesQueryResult>;\n}\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 {\n createNote as publicCreateNote,\n getNote as publicGetNote,\n updateNote as publicUpdateNote,\n deleteNote as publicDeleteNote,\n queryNotes as publicQueryNotes,\n} from './crm-notes-v2-note-notes.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onNoteCreated as publicOnNoteCreated } from './crm-notes-v2-note-notes.public.js';\nimport { onNoteDeleted as publicOnNoteDeleted } from './crm-notes-v2-note-notes.public.js';\nimport { onNoteUpdated as publicOnNoteUpdated } from './crm-notes-v2-note-notes.public.js';\n\nexport const createNote: MaybeContext<\n BuildRESTFunction<typeof publicCreateNote> & typeof publicCreateNote\n> = /*#__PURE__*/ createRESTModule(publicCreateNote);\nexport const getNote: MaybeContext<\n BuildRESTFunction<typeof publicGetNote> & typeof publicGetNote\n> = /*#__PURE__*/ createRESTModule(publicGetNote);\nexport const updateNote: MaybeContext<\n BuildRESTFunction<typeof publicUpdateNote> & typeof publicUpdateNote\n> = /*#__PURE__*/ createRESTModule(publicUpdateNote);\nexport const deleteNote: MaybeContext<\n BuildRESTFunction<typeof publicDeleteNote> & typeof publicDeleteNote\n> = /*#__PURE__*/ createRESTModule(publicDeleteNote);\nexport const queryNotes: MaybeContext<\n BuildRESTFunction<typeof publicQueryNotes> & typeof publicQueryNotes\n> = /*#__PURE__*/ createRESTModule(publicQueryNotes);\n/**\n * Triggered when a note is created.\n */\nexport const onNoteCreated: BuildEventDefinition<typeof publicOnNoteCreated> &\n typeof publicOnNoteCreated = createEventModule(publicOnNoteCreated);\n/**\n * Triggered when a note is deleted.\n */\nexport const onNoteDeleted: BuildEventDefinition<typeof publicOnNoteDeleted> &\n typeof publicOnNoteDeleted = createEventModule(publicOnNoteDeleted);\n/**\n * Triggered when a note is updated.\n */\nexport const onNoteUpdated: BuildEventDefinition<typeof publicOnNoteUpdated> &\n typeof publicOnNoteUpdated = createEventModule(publicOnNoteUpdated);\n\nexport {\n NoteType,\n SourceType,\n SortOrder,\n WebhookIdentityType,\n} from './crm-notes-v2-note-notes.universal.js';\nexport {\n Note,\n NoteSource,\n CreateNoteRequest,\n CreateNoteResponse,\n GetNoteRequest,\n GetNoteResponse,\n UpdateNoteRequest,\n UpdateNoteResponse,\n DeleteNoteRequest,\n DeleteNoteResponse,\n QueryNotesRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryNotesResponse,\n CursorPagingMetadata,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n NoteCreatedEnvelope,\n NoteDeletedEnvelope,\n NoteUpdatedEnvelope,\n UpdateNote,\n QueryNotesOptions,\n NotesQueryResult,\n NotesQueryBuilder,\n} from './crm-notes-v2-note-notes.universal.js';\nexport {\n NoteTypeWithLiterals,\n SourceTypeWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n QueryNotesApplicationErrors,\n} from './crm-notes-v2-note-notes.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA,kBAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,kBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,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;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BAAiC;AACjC,sCAAkC;AAU3B,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,WAEK,2DAAiBA,QAAa;AACzC,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,cAEK,2DAAiBA,WAAgB;AAI5C,IAAMC,qBACkB,mDAAkB,aAAmB;AAI7D,IAAMC,qBACkB,mDAAkB,aAAmB;AAI7D,IAAMC,qBACkB,mDAAkB,aAAmB;","names":["createNote","deleteNote","getNote","onNoteCreated","onNoteDeleted","onNoteUpdated","queryNotes","updateNote","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","import_transform_paths","NoteType","SourceType","SortOrder","WebhookIdentityType","createNote","sdkTransformError","getNote","updateNote","deleteNote","queryNotes","createNote","getNote","updateNote","deleteNote","queryNotes","import_rest_modules","createNote","getNote","updateNote","deleteNote","queryNotes","onNoteCreated","onNoteDeleted","onNoteUpdated"]}
@@ -403,8 +403,6 @@ interface NoteCreatedEnvelope {
403
403
  * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
404
404
  * @permissionScope Manage Notes
405
405
  * @permissionScopeId SCOPE.DC-CRM.MANAGE-NOTES
406
- * @permissionScope Picasso private app mega scope (site)
407
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
408
406
  * @permissionScope Manage Members and Contacts - all permissions
409
407
  * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
410
408
  * @permissionScope Read Notes
@@ -414,7 +412,6 @@ interface NoteCreatedEnvelope {
414
412
  * @eventType wix.crm.notes.v2.note_created
415
413
  * @serviceIdentifier wix.crm.notes.v2.Notes
416
414
  * @slug created
417
- * @documentationMaturity preview
418
415
  */
419
416
  declare function onNoteCreated(handler: (event: NoteCreatedEnvelope) => void | Promise<void>): void;
420
417
  interface NoteDeletedEnvelope {
@@ -426,8 +423,6 @@ interface NoteDeletedEnvelope {
426
423
  * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
427
424
  * @permissionScope Manage Notes
428
425
  * @permissionScopeId SCOPE.DC-CRM.MANAGE-NOTES
429
- * @permissionScope Picasso private app mega scope (site)
430
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
431
426
  * @permissionScope Manage Members and Contacts - all permissions
432
427
  * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
433
428
  * @permissionScope Read Notes
@@ -437,7 +432,6 @@ interface NoteDeletedEnvelope {
437
432
  * @eventType wix.crm.notes.v2.note_deleted
438
433
  * @serviceIdentifier wix.crm.notes.v2.Notes
439
434
  * @slug deleted
440
- * @documentationMaturity preview
441
435
  */
442
436
  declare function onNoteDeleted(handler: (event: NoteDeletedEnvelope) => void | Promise<void>): void;
443
437
  interface NoteUpdatedEnvelope {
@@ -450,8 +444,6 @@ interface NoteUpdatedEnvelope {
450
444
  * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
451
445
  * @permissionScope Manage Notes
452
446
  * @permissionScopeId SCOPE.DC-CRM.MANAGE-NOTES
453
- * @permissionScope Picasso private app mega scope (site)
454
- * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
455
447
  * @permissionScope Manage Members and Contacts - all permissions
456
448
  * @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
457
449
  * @permissionScope Read Notes
@@ -461,14 +453,12 @@ interface NoteUpdatedEnvelope {
461
453
  * @eventType wix.crm.notes.v2.note_updated
462
454
  * @serviceIdentifier wix.crm.notes.v2.Notes
463
455
  * @slug updated
464
- * @documentationMaturity preview
465
456
  */
466
457
  declare function onNoteUpdated(handler: (event: NoteUpdatedEnvelope) => void | Promise<void>): void;
467
458
  /**
468
459
  * Creates a new note associated with a specific contact.
469
460
  * @param note - Note to create.
470
461
  * @public
471
- * @documentationMaturity preview
472
462
  * @requiredField note
473
463
  * @requiredField note.contactId
474
464
  * @permissionId CRM_NOTES.NOTE_CREATE
@@ -481,7 +471,6 @@ declare function createNote(note: NonNullablePaths<Note, `contactId`, 2>): Promi
481
471
  * Retrieves a note by ID.
482
472
  * @param noteId - Note ID.
483
473
  * @public
484
- * @documentationMaturity preview
485
474
  * @requiredField noteId
486
475
  * @permissionId CRM_NOTES.NOTE_READ
487
476
  * @applicableIdentity APP
@@ -496,7 +485,6 @@ declare function getNote(noteId: string): Promise<NonNullablePaths<Note, `type`
496
485
  * To prevent conflicting changes, the current revision must be passed when updating the note.
497
486
  * @param _id - Note ID.
498
487
  * @public
499
- * @documentationMaturity preview
500
488
  * @requiredField _id
501
489
  * @requiredField note
502
490
  * @requiredField note.revision
@@ -556,7 +544,6 @@ interface UpdateNote {
556
544
  * Deletes a note.
557
545
  * @param noteId - Note ID.
558
546
  * @public
559
- * @documentationMaturity preview
560
547
  * @requiredField noteId
561
548
  * @permissionId CRM_NOTES.NOTE_DELETE
562
549
  * @applicableIdentity APP
@@ -579,7 +566,6 @@ declare function deleteNote(noteId: string): Promise<void>;
579
566
  *
580
567
  * 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).
581
568
  * @public
582
- * @documentationMaturity preview
583
569
  * @permissionId CRM_NOTES.NOTE_READ
584
570
  * @applicableIdentity APP
585
571
  * @fqn wix.crm.notes.v2.Notes.QueryNotes
@@ -608,60 +594,42 @@ interface NotesQueryResult extends QueryCursorResult {
608
594
  interface NotesQueryBuilder {
609
595
  /** @param propertyName - Property whose value is compared with `value`.
610
596
  * @param value - Value to compare against.
611
- * @documentationMaturity preview
612
597
  */
613
598
  eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'contactId' | 'type', value: any) => NotesQueryBuilder;
614
599
  /** @param propertyName - Property whose value is compared with `value`.
615
600
  * @param value - Value to compare against.
616
- * @documentationMaturity preview
617
601
  */
618
602
  ne: (propertyName: '_createdDate' | '_updatedDate' | 'type', value: any) => NotesQueryBuilder;
619
603
  /** @param propertyName - Property whose value is compared with `value`.
620
604
  * @param value - Value to compare against.
621
- * @documentationMaturity preview
622
605
  */
623
606
  ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => NotesQueryBuilder;
624
607
  /** @param propertyName - Property whose value is compared with `value`.
625
608
  * @param value - Value to compare against.
626
- * @documentationMaturity preview
627
609
  */
628
610
  gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => NotesQueryBuilder;
629
611
  /** @param propertyName - Property whose value is compared with `value`.
630
612
  * @param value - Value to compare against.
631
- * @documentationMaturity preview
632
613
  */
633
614
  le: (propertyName: '_createdDate' | '_updatedDate', value: any) => NotesQueryBuilder;
634
615
  /** @param propertyName - Property whose value is compared with `value`.
635
616
  * @param value - Value to compare against.
636
- * @documentationMaturity preview
637
617
  */
638
618
  lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => NotesQueryBuilder;
639
619
  /** @param propertyName - Property whose value is compared with `values`.
640
620
  * @param values - List of values to compare against.
641
- * @documentationMaturity preview
642
621
  */
643
622
  hasSome: (propertyName: '_createdDate' | '_updatedDate', value: any[]) => NotesQueryBuilder;
644
- /** @documentationMaturity preview */
645
623
  in: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'contactId' | 'type', value: any) => NotesQueryBuilder;
646
- /** @documentationMaturity preview */
647
624
  exists: (propertyName: '_createdDate' | '_updatedDate', value: boolean) => NotesQueryBuilder;
648
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
649
- * @documentationMaturity preview
650
- */
625
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
651
626
  ascending: (...propertyNames: Array<'_createdDate' | '_updatedDate'>) => NotesQueryBuilder;
652
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
653
- * @documentationMaturity preview
654
- */
627
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
655
628
  descending: (...propertyNames: Array<'_createdDate' | '_updatedDate'>) => NotesQueryBuilder;
656
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
657
- * @documentationMaturity preview
658
- */
629
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
659
630
  limit: (limit: number) => NotesQueryBuilder;
660
- /** @param cursor - A pointer to specific record
661
- * @documentationMaturity preview
662
- */
631
+ /** @param cursor - A pointer to specific record */
663
632
  skipTo: (cursor: string) => NotesQueryBuilder;
664
- /** @documentationMaturity preview */
665
633
  find: () => Promise<NotesQueryResult>;
666
634
  }
667
635
 
@@ -87,6 +87,9 @@ function createNote(payload) {
87
87
  method: "POST",
88
88
  methodFqn: "wix.crm.notes.v2.Notes.CreateNote",
89
89
  packageName: PACKAGE_NAME,
90
+ migrationOptions: {
91
+ optInTransformResponse: true
92
+ },
90
93
  url: resolveWixCrmNotesV2NotesUrl({
91
94
  protoPath: "/v2/notes",
92
95
  data: serializedData,
@@ -111,6 +114,9 @@ function getNote(payload) {
111
114
  method: "GET",
112
115
  methodFqn: "wix.crm.notes.v2.Notes.GetNote",
113
116
  packageName: PACKAGE_NAME,
117
+ migrationOptions: {
118
+ optInTransformResponse: true
119
+ },
114
120
  url: resolveWixCrmNotesV2NotesUrl({
115
121
  protoPath: "/v2/notes/{noteId}",
116
122
  data: payload,
@@ -145,6 +151,9 @@ function updateNote(payload) {
145
151
  method: "PATCH",
146
152
  methodFqn: "wix.crm.notes.v2.Notes.UpdateNote",
147
153
  packageName: PACKAGE_NAME,
154
+ migrationOptions: {
155
+ optInTransformResponse: true
156
+ },
148
157
  url: resolveWixCrmNotesV2NotesUrl({
149
158
  protoPath: "/v2/notes/{note.id}",
150
159
  data: serializedData,
@@ -169,6 +178,9 @@ function deleteNote(payload) {
169
178
  method: "DELETE",
170
179
  methodFqn: "wix.crm.notes.v2.Notes.DeleteNote",
171
180
  packageName: PACKAGE_NAME,
181
+ migrationOptions: {
182
+ optInTransformResponse: true
183
+ },
172
184
  url: resolveWixCrmNotesV2NotesUrl({
173
185
  protoPath: "/v2/notes/{noteId}",
174
186
  data: payload,
@@ -187,6 +199,9 @@ function queryNotes(payload) {
187
199
  method: "POST",
188
200
  methodFqn: "wix.crm.notes.v2.Notes.QueryNotes",
189
201
  packageName: PACKAGE_NAME,
202
+ migrationOptions: {
203
+ optInTransformResponse: true
204
+ },
190
205
  url: resolveWixCrmNotesV2NotesUrl({
191
206
  protoPath: "/v2/notes/query",
192
207
  data: payload,