import { QueryAccountCertificationsRequest as QueryAccountCertificationsRequest$1, QueryAccountCertificationsResponse as QueryAccountCertificationsResponse$1, ListAccountCertificationsRequest as ListAccountCertificationsRequest$1, ListAccountCertificationsResponse as ListAccountCertificationsResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; /** * An account certification represents a Wix Academy certification held by an account, * such as the Velo, Web Designer, or Wix Studio Developer certification. * * An account holds a certification when one or more of its team members hold the corresponding * user certification. Each account has at most one account certification per certification type, * aggregating all of the account's certified team members for that type. * * To read certifications at the individual user level, see the User Certifications API. */ interface AccountCertification { /** * Account certification ID. * @format GUID * @readonly */ id?: string | null; /** * Revision number, which increments by 1 each time the account certification is updated. * To prevent conflicting changes, * the current revision must be passed when updating the account certification. * * Ignored when creating an account certification. * @readonly */ revision?: string | null; /** * Date and time the account certification was created. * @readonly */ createdDate?: Date | null; /** * Date and time the account certification was last updated. * @readonly */ updatedDate?: Date | null; /** * IDs of the user certification records, held by the account's team members, that qualify the * account for its `certificationType`. Up to 100. The list contains no duplicates, and its order isn't guaranteed. * @format GUID * @maxSize 100 */ userCertificationIds?: string[]; /** * Type of certification the account holds. Set when the certification is created and can't be changed afterward. * @immutable */ certificationType?: CertificationTypeWithLiterals; } declare enum CertificationType { /** Velo certification: proficiency in building with Velo, Wix's full-stack development platform. */ VELO = "VELO", /** Web Designer certification: proficiency in designing and building Wix websites. */ WEB_DESIGNER = "WEB_DESIGNER", /** Accessibility certification: proficiency in building accessible Wix websites. */ ACCESSIBILITY = "ACCESSIBILITY", /** Wix Studio Developer certification: proficiency in developing with Wix Studio. */ STUDIO_DEVELOPER = "STUDIO_DEVELOPER", /** Wix Studio Design League certification, awarded through the Wix Studio Design League program. */ STUDIO_DESIGN_LEAGUE = "STUDIO_DESIGN_LEAGUE", /** Wix Studio Developer Websites League certification, awarded through the Wix Studio Developer Websites League program. */ STUDIO_DEV_WEBSITES_LEAGUE = "STUDIO_DEV_WEBSITES_LEAGUE" } /** @enumType */ type CertificationTypeWithLiterals = CertificationType | 'VELO' | 'WEB_DESIGNER' | 'ACCESSIBILITY' | 'STUDIO_DEVELOPER' | 'STUDIO_DESIGN_LEAGUE' | 'STUDIO_DEV_WEBSITES_LEAGUE'; interface CertifyAccountRequest { /** * ID of the user certification to add to the account. * @format GUID */ userCertificationId?: string; /** * ID of the account to certify. * @format GUID */ accountId?: string; } interface CertifyAccountResponse { /** The created or updated account certification. */ accountCertification?: AccountCertification; } interface DecertifyAccountRequest { /** * ID of the user certification to remove from the account. * @format GUID */ userCertificationId?: string; /** * ID of the account to decertify. * @format GUID */ accountId?: string; } interface DecertifyAccountResponse { /** Updated account certification. Empty when the last user certification of that type was removed and the account certification was deleted. */ accountCertification?: AccountCertification; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * 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. * 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. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; /** * Optional domain-specific metadata defined by the API owner, encoded as JSON. * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * Map of fully qualified field paths to their previous values for fields that changed. * For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format) * @internal */ modifiedFields?: Record; /** * Optional domain-specific metadata defined by the API owner, encoded as JSON. * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted. */ deletedEntityAsJson?: string | null; /** * Optional domain-specific metadata defined by the API owner, encoded as JSON. * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface Empty { } interface QueryAccountCertificationsRequest { /** Query options. See [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language) for more information. */ query?: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** 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`. */ cursorPaging?: CursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` * @maxSize 4 */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** 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`. */ cursorPaging?: CursorPaging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 50 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface CursorPaging { /** * Number of items to load. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * You can get the relevant cursor token * from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface QueryAccountCertificationsResponse { /** List of account certifications. */ accountCertifications?: AccountCertification[]; /** Paging metadata. */ pagingMetadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ cursors?: Cursors; /** * Indicates if there are more results after the current page. * If `true`, another page of results can be retrieved. * If `false`, this is the last page. */ hasNext?: boolean | null; } interface Cursors { /** * Cursor pointing to next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface ListAccountCertificationsRequest { /** * ID of the account to get certifications for. * @format GUID */ accountId: string; } interface ListAccountCertificationsResponse { /** The account's certifications, as a public, visitor-safe projection. */ certifications?: Certification[]; } /** A public, visitor-safe view of a certification held by an account. */ interface Certification { /** Type of certification the account holds. */ certificationType?: CertificationTypeWithLiterals; /** * Date and time the account certification was created. * @readonly */ createdDate?: Date | null; } interface TeamMemberRemovedEvent { /** * ID of the account the user was removed from. * @format GUID */ accountId?: string; /** * ID of the user (team member) that was removed from the account. Same identifier as `UserCertification.userId`. * @format GUID */ teamMemberId?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function queryAccountCertifications(): __PublicMethodMetaInfo<'POST', {}, QueryAccountCertificationsRequest$1, QueryAccountCertificationsRequest, QueryAccountCertificationsResponse$1, QueryAccountCertificationsResponse>; declare function listAccountCertifications(): __PublicMethodMetaInfo<'GET', { accountId: string; }, ListAccountCertificationsRequest$1, ListAccountCertificationsRequest, ListAccountCertificationsResponse$1, ListAccountCertificationsResponse>; export { type AccountCertification as AccountCertificationOriginal, type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type Certification as CertificationOriginal, CertificationType as CertificationTypeOriginal, type CertificationTypeWithLiterals as CertificationTypeWithLiteralsOriginal, type CertifyAccountRequest as CertifyAccountRequestOriginal, type CertifyAccountResponse as CertifyAccountResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DecertifyAccountRequest as DecertifyAccountRequestOriginal, type DecertifyAccountResponse as DecertifyAccountResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ListAccountCertificationsRequest as ListAccountCertificationsRequestOriginal, type ListAccountCertificationsResponse as ListAccountCertificationsResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type QueryAccountCertificationsRequest as QueryAccountCertificationsRequestOriginal, type QueryAccountCertificationsResponse as QueryAccountCertificationsResponseOriginal, type RestoreInfo as RestoreInfoOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type TeamMemberRemovedEvent as TeamMemberRemovedEventOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, listAccountCertifications, queryAccountCertifications };