import { Q as CreateBillableItemRequest$1, V as CreateBillableItemResponse$1, X as GetBillableItemRequest$1, Y as GetBillableItemResponse$1, Z as UpdateBillableItemRequest$1, _ as UpdateBillableItemResponse$1, $ as DeleteBillableItemRequest$1, a0 as DeleteBillableItemResponse$1, a1 as QueryBillableItemsRequest$1, a6 as QueryBillableItemsResponse$1, ae as BulkCreateBillableItemsRequest$1, b as BulkCreateBillableItemsResponse$1, aj as BulkUpdateBillableItemsRequest$1, d as BulkUpdateBillableItemsResponse$1, al as BulkDeleteBillableItemsRequest$1, e as BulkDeleteBillableItemsResponse$1, an as BulkUpdateBillableItemTagsRequest$1, g as BulkUpdateBillableItemTagsResponse$1, ap as BulkUpdateBillableItemTagsByFilterRequest$1, j as BulkUpdateBillableItemTagsByFilterResponse$1, aq as SearchBillableItemsRequest$1, S as SearchBillableItemsResponse$1 } from './billable-items-v1-billable-item-billable-items.universal-CL50BvcU.js'; import '@wix/sdk-types'; /** * A billable item represents a billable product or service that can be added to invoices. * You can create, manage, and organize these items to streamline your billing process. * Billable items include details like name, description, price, and tax information. */ interface BillableItem { /** * Billable item ID. * @format GUID * @readonly */ id?: string | null; /** * Revision number, which increments by 1 each time the billable item is updated. * To prevent conflicting changes, * the current revision must be passed when updating the billable item. * * Ignored when creating a billable item. * @readonly */ revision?: string | null; /** * Date and time the billable item was created. * @readonly */ createdDate?: Date | null; /** * Date and time the billable item was last updated. * @readonly */ updatedDate?: Date | null; /** * Billable item name, for display on invoices. * @minLength 1 * @maxLength 200 */ name?: string; /** * Detailed description of the billable item. Provides additional information about the product or service. * @minLength 1 * @maxLength 600 */ description?: string | null; /** * Price of the billable item in decimal format with up to 4 decimal places. * Represents the base cost before taxes are applied. This is a required field when creating a new billable item. * @format DECIMAL_VALUE * @decimalValue options { gte:-1000000000000000, lte:1000000000000000, maxScale:4 } */ price?: string; /** * Reference to a tax group that defines the tax rules applicable to this billable item. * Use the Tax Groups API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/billing/tax-groups/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/tax/tax-groups/introduction)) to retrieve available tax groups for the business. * The tax group determines how taxes are calculated when this item is added to an invoice. * If not specified, the default tax rules for the business will apply. * @format GUID */ taxGroupId?: string | null; /** * Billable item image, stored in the Wix Media Manager. * Upload an image with the Media Manager API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/introduction) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/introduction)) or the site dashboard before associating it to a billable item. */ image?: Image; /** * Custom field data for the billable item. * Extended fields must be configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields; /** Tags. */ tags?: Tags; } interface Image { /** WixMedia image ID. */ id?: string; /** Image URL. */ url?: string; /** * Original image height. * @readonly */ height?: number; /** * Original image width. * @readonly */ width?: number; /** Image alt text. */ altText?: string | null; } interface ExtendedFields { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } /** * Common object for tags. * Should be use as in this example: * message Foo { * string id = 1; * ... * Tags tags = 5 * } * * example of taggable entity * { * id: "123" * tags: { * tags: { * tag_ids:["11","22"] * }, * private_tags: { * tag_ids: ["33", "44"] * } * } * } */ interface Tags { /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */ privateTags?: TagList; /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */ tags?: TagList; } interface TagList { /** * List of tag IDs * @maxSize 100 * @maxLength 5 */ tagIds?: string[]; } 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 */ restoreInfo?: RestoreInfo; } 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; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: 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; } interface CreateBillableItemRequest { /** Billable item to create. */ billableItem: BillableItem; } interface CreateBillableItemResponse { /** Created billable item. */ billableItem?: BillableItem; } interface GetBillableItemRequest { /** * Billable item ID. * @format GUID */ billableItemId: string; } interface GetBillableItemResponse { /** Requested billable item. */ billableItem?: BillableItem; } interface UpdateBillableItemRequest { /** Billable item to update. May be partial. */ billableItem: BillableItem; } interface UpdateBillableItemResponse { /** Updated billable item. */ billableItem?: BillableItem; } interface DeleteBillableItemRequest { /** * Billable item ID to delete. * @format GUID */ billableItemId: string; } interface DeleteBillableItemResponse { } interface QueryBillableItemsRequest { /** Query options. */ 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 5 */ 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 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass 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 QueryBillableItemsResponse { /** Requested billable items. */ billableItems?: BillableItem[]; /** Paging metadata. */ pagingMetadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface InternalQueryBillableItemsRequest { /** Query options. */ query?: InternalCursorQuery; } interface InternalCursorQuery extends InternalCursorQueryPagingMethodOneOf { /** 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?: InternalCursorPaging; /** * 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 5 */ sort?: Sorting[]; } /** @oneof */ interface InternalCursorQueryPagingMethodOneOf { /** 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?: InternalCursorPaging; } interface InternalCursorPaging { /** * Maximum number of items to return in the results. * @max 10000 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass 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 InternalQueryBillableItemsResponse { /** Requested billable items. */ billableItems?: BillableItem[]; /** Paging metadata. */ pagingMetadata?: CursorPagingMetadata; } interface BulkCreateBillableItemsRequest { /** * List of billable items to create. * @minSize 1 * @maxSize 100 */ billableItems: BillableItem[]; /** Whether to return the created billable items in the response. */ returnEntity?: boolean; } interface BulkCreateBillableItemsResponse { /** * List of billable items create operation results including metadata. * @minSize 1 * @maxSize 100 */ results?: BulkBillableItemResult[]; /** Metadata regarding the bulk create operation. */ bulkActionMetadata?: BulkActionMetadata; } interface ItemMetadata { /** * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). * @format GUID */ id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface BulkBillableItemResult { /** Billable item's create operation metadata. */ itemMetadata?: ItemMetadata; /** Created billable item if `returnEntity` was set `true` in the request. */ item?: BillableItem; } interface BulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface BulkUpdateBillableItemsRequest { /** * Billable items to update. * @minSize 1 * @maxSize 100 */ billableItems: MaskedBillableItem[]; /** Return updated billable items in the response. */ returnEntity?: boolean; } interface MaskedBillableItem { /** Billable items to update. May be partial. */ billableItem?: BillableItem; } interface BulkUpdateBillableItemsResponse { /** * Billable items update operation results including metadata. * @minSize 1 * @maxSize 100 */ results?: BulkUpdateBillableItemsResponseBulkBillableItemResult[]; /** Metadata regarding the bulk update operation. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkUpdateBillableItemsResponseBulkBillableItemResult { /** Billable item's update operation metadata. */ itemMetadata?: ItemMetadata; /** Updated billable item if `returnEntity` was set `true` in the request. */ item?: BillableItem; } interface BulkDeleteBillableItemsRequest { /** * Billable item IDs to delete. * @minSize 1 * @maxSize 100 * @format GUID */ billableItemIds: string[]; } interface BulkDeleteBillableItemsResponse { /** * Billable items delete operation results including metadata. * @minSize 1 * @maxSize 100 */ results?: BulkDeleteBillableItemsResponseBulkBillableItemResult[]; /** Metadata regarding the bulk delete operation. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkDeleteBillableItemsResponseBulkBillableItemResult { /** Billable item's delete operation metadata. */ itemMetadata?: ItemMetadata; } interface BulkUpdateBillableItemTagsRequest { /** * IDs of billable items which tags will be updated. * @minSize 1 * @maxSize 100 * @format GUID */ billableItemIds: string[]; /** List of tags to assign. */ assignTags?: Tags; /** List of tags to unassign. */ unassignTags?: Tags; } interface BulkUpdateBillableItemTagsResponse { /** * Billable items update tags results including metadata. * @minSize 1 * @maxSize 100 */ results?: BulkUpdateBillableItemTagsResult[]; /** Bulk update tags metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkUpdateBillableItemTagsResult { /** Billable item's update tags operation metadata. */ itemMetadata?: ItemMetadata; } interface BulkUpdateBillableItemTagsByFilterRequest { /** Filter to select relevant billable items. */ filter: Record | null; /** List of tags to assign. */ assignTags?: Tags; /** List of tags to unassign. */ unassignTags?: Tags; } interface BulkUpdateBillableItemTagsByFilterResponse { /** * Job ID. Pass this ID to Get Async Job ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/get-async-job) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/get-async-job)) to track the job's status. * @format GUID */ jobId?: string; } interface SearchBillableItemsRequest { /** Search options. */ search?: CursorSearch; } interface CursorSearch extends CursorSearchPagingMethodOneOf { /** * Cursor pointing to page of results. * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided. */ cursorPaging?: CursorPaging; /** A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) */ filter?: Record | null; /** * Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] * @maxSize 10 */ sort?: Sorting[]; /** * Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition. * @maxSize 10 */ aggregations?: Aggregation[]; /** Free text to match in searchable fields */ search?: SearchDetails; /** * UTC offset or IANA time zone. Valid values are * ISO 8601 UTC offsets, such as +02:00 or -06:00, * and IANA time zone IDs, such as Europe/Rome * * Affects all filters and aggregations returned values. * You may override this behavior in a specific filter by providing * timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"` * @maxLength 50 */ timeZone?: string | null; } /** @oneof */ interface CursorSearchPagingMethodOneOf { /** * Cursor pointing to page of results. * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided. */ cursorPaging?: CursorPaging; } interface Aggregation extends AggregationKindOneOf { /** Value aggregation */ value?: ValueAggregation; /** Range aggregation */ range?: RangeAggregation; /** Scalar aggregation */ scalar?: ScalarAggregation; /** Date histogram aggregation */ dateHistogram?: DateHistogramAggregation; /** Nested aggregation */ nested?: NestedAggregation; /** * User-defined name of aggregation, should be unique, will appear in aggregation results * @maxLength 100 */ name?: string | null; /** Type of aggregation, client must provide matching aggregation field below */ type?: AggregationTypeWithLiterals; /** * Field to aggregate by, use dot notation to specify json path * @maxLength 200 */ fieldPath?: string; } /** @oneof */ interface AggregationKindOneOf { /** Value aggregation */ value?: ValueAggregation; /** Range aggregation */ range?: RangeAggregation; /** Scalar aggregation */ scalar?: ScalarAggregation; /** Date histogram aggregation */ dateHistogram?: DateHistogramAggregation; /** Nested aggregation */ nested?: NestedAggregation; } interface RangeBucket { /** Inclusive lower bound of the range. Required if to is not given */ from?: number | null; /** Exclusive upper bound of the range. Required if from is not given */ to?: number | null; } declare enum SortType { /** Should sort by number of matches */ COUNT = "COUNT", /** Should sort by value of the field alphabetically */ VALUE = "VALUE" } /** @enumType */ type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE'; declare enum SortDirection { /** Should sort in descending order */ DESC = "DESC", /** Should sort in ascending order */ ASC = "ASC" } /** @enumType */ type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC'; declare enum MissingValues { /** Should missing values be excluded from the aggregation results */ EXCLUDE = "EXCLUDE", /** Should missing values be included in the aggregation results */ INCLUDE = "INCLUDE" } /** @enumType */ type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE'; interface IncludeMissingValuesOptions { /** * Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ... * @maxLength 20 */ addToBucket?: string; } declare enum ScalarType { /** Count of distinct values */ COUNT_DISTINCT = "COUNT_DISTINCT", /** Minimum value */ MIN = "MIN", /** Maximum value */ MAX = "MAX" } /** @enumType */ type ScalarTypeWithLiterals = ScalarType | 'COUNT_DISTINCT' | 'MIN' | 'MAX'; interface ValueAggregation extends ValueAggregationOptionsOneOf { /** Options for including missing values */ includeOptions?: IncludeMissingValuesOptions; /** Should sort by number of matches or value of the field */ sortType?: SortTypeWithLiterals; /** Should sort in ascending or descending order */ sortDirection?: SortDirectionWithLiterals; /** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */ limit?: number | null; /** Should missing values be included or excluded from the aggregation results. Default is EXCLUDE */ missingValues?: MissingValuesWithLiterals; } /** @oneof */ interface ValueAggregationOptionsOneOf { /** Options for including missing values */ includeOptions?: IncludeMissingValuesOptions; } declare enum NestedAggregationType { /** An aggregation where result buckets are dynamically built - one per unique value */ VALUE = "VALUE", /** An aggregation, where user can define set of ranges - each representing a bucket */ RANGE = "RANGE", /** A single-value metric aggregation - e.g. min, max, sum, avg */ SCALAR = "SCALAR", /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */ DATE_HISTOGRAM = "DATE_HISTOGRAM" } /** @enumType */ type NestedAggregationTypeWithLiterals = NestedAggregationType | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM'; interface RangeAggregation { /** * List of range buckets, where during aggregation each entity will be placed in the first bucket where its value falls into based on provided range bounds * @maxSize 50 */ buckets?: RangeBucket[]; } interface ScalarAggregation { /** Define the operator for the scalar aggregation */ type?: ScalarTypeWithLiterals; } interface DateHistogramAggregation { /** Interval for date histogram aggregation */ interval?: IntervalWithLiterals; } declare enum Interval { /** Yearly interval */ YEAR = "YEAR", /** Monthly interval */ MONTH = "MONTH", /** Weekly interval */ WEEK = "WEEK", /** Daily interval */ DAY = "DAY", /** Hourly interval */ HOUR = "HOUR", /** Minute interval */ MINUTE = "MINUTE", /** Second interval */ SECOND = "SECOND" } /** @enumType */ type IntervalWithLiterals = Interval | 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND'; interface NestedAggregationItem extends NestedAggregationItemKindOneOf { /** Value aggregation */ value?: ValueAggregation; /** Range aggregation */ range?: RangeAggregation; /** Scalar aggregation */ scalar?: ScalarAggregation; /** Date histogram aggregation */ dateHistogram?: DateHistogramAggregation; /** * User-defined name of aggregation, should be unique, will appear in aggregation results * @maxLength 100 */ name?: string | null; /** Type of aggregation, client must provide matching aggregation field below */ type?: NestedAggregationTypeWithLiterals; /** * Field to aggregate by, use dont notation to specify json path * @maxLength 200 */ fieldPath?: string; } /** @oneof */ interface NestedAggregationItemKindOneOf { /** Value aggregation */ value?: ValueAggregation; /** Range aggregation */ range?: RangeAggregation; /** Scalar aggregation */ scalar?: ScalarAggregation; /** Date histogram aggregation */ dateHistogram?: DateHistogramAggregation; } declare enum AggregationType { /** An aggregation where result buckets are dynamically built - one per unique value */ VALUE = "VALUE", /** An aggregation, where user can define set of ranges - each representing a bucket */ RANGE = "RANGE", /** A single-value metric aggregation - e.g. min, max, sum, avg */ SCALAR = "SCALAR", /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */ DATE_HISTOGRAM = "DATE_HISTOGRAM", /** Multi-level aggregation, where each next aggregation is nested within previous one */ NESTED = "NESTED" } /** @enumType */ type AggregationTypeWithLiterals = AggregationType | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM' | 'NESTED'; /** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */ interface NestedAggregation { /** * Flattened list of aggregations, where each next aggregation is nested within previous one * @minSize 2 * @maxSize 3 */ nestedAggregations?: NestedAggregationItem[]; } interface SearchDetails { /** Defines how separate search terms in `expression` are combined */ mode?: ModeWithLiterals; /** * Search term or expression * @maxLength 100 */ expression?: string | null; /** * Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path * @maxLength 200 * @maxSize 20 */ fields?: string[]; /** Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */ fuzzy?: boolean; } declare enum Mode { /** Any of the search terms must be present */ OR = "OR", /** All search terms must be present */ AND = "AND" } /** @enumType */ type ModeWithLiterals = Mode | 'OR' | 'AND'; interface SearchBillableItemsResponse { /** Requested billable items. */ billableItems?: BillableItem[]; /** Paging metadata. */ pagingMetadata?: PagingMetadataV2; /** Response aggregation data. */ aggregationData?: AggregationData; } interface PagingMetadataV2 { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: Cursors; } interface AggregationData { /** * key = aggregation name (as derived from search request) * @maxSize 10000 */ results?: AggregationResults[]; } interface ValueAggregationResult { /** * Value of the field * @maxLength 100 */ value?: string; /** Count of entities with this value */ count?: number; } interface RangeAggregationResult { /** Inclusive lower bound of the range */ from?: number | null; /** Exclusive upper bound of the range */ to?: number | null; /** Count of entities in this range */ count?: number; } interface NestedAggregationResults extends NestedAggregationResultsResultOneOf { /** Value aggregation results */ values?: ValueResults; /** Range aggregation results */ ranges?: RangeResults; /** Scalar aggregation results */ scalar?: AggregationResultsScalarResult; /** * User-defined name of aggregation, matches the one provided in request * @maxLength 100 */ name?: string; /** Type of aggregation that matches result */ type?: AggregationTypeWithLiterals; /** * Field to aggregate by, matches the one provided in request * @maxLength 200 */ fieldPath?: string; } /** @oneof */ interface NestedAggregationResultsResultOneOf { /** Value aggregation results */ values?: ValueResults; /** Range aggregation results */ ranges?: RangeResults; /** Scalar aggregation results */ scalar?: AggregationResultsScalarResult; } interface ValueResults { /** * List of value aggregations * @maxSize 250 */ results?: ValueAggregationResult[]; } interface RangeResults { /** * List of ranges returned in same order as requested * @maxSize 50 */ results?: RangeAggregationResult[]; } interface AggregationResultsScalarResult { /** Type of scalar aggregation */ type?: ScalarTypeWithLiterals; /** Value of the scalar aggregation */ value?: number; } interface NestedValueAggregationResult { /** * Value of the field * @maxLength 1000 */ value?: string; /** Nested aggregations */ nestedResults?: NestedAggregationResults; } interface ValueResult { /** * Value of the field * @maxLength 1000 */ value?: string; /** Count of entities with this value */ count?: number | null; } interface RangeResult { /** Inclusive lower bound of the range */ from?: number | null; /** Exclusive upper bound of the range */ to?: number | null; /** Count of entities in this range */ count?: number | null; } interface ScalarResult { /** Value of the scalar aggregation */ value?: number; } interface NestedResultValue extends NestedResultValueResultOneOf { /** Value aggregation result */ value?: ValueResult; /** Range aggregation result */ range?: RangeResult; /** Scalar aggregation result */ scalar?: ScalarResult; /** Date histogram aggregation result */ dateHistogram?: ValueResult; } /** @oneof */ interface NestedResultValueResultOneOf { /** Value aggregation result */ value?: ValueResult; /** Range aggregation result */ range?: RangeResult; /** Scalar aggregation result */ scalar?: ScalarResult; /** Date histogram aggregation result */ dateHistogram?: ValueResult; } interface Results { /** List of nested aggregations */ results?: Record; } interface DateHistogramResult { /** * Date in ISO 8601 format * @maxLength 100 */ value?: string; /** Count of documents in the bucket */ count?: number; } interface GroupByValueResults { /** * List of value aggregations * @maxSize 1000 */ results?: NestedValueAggregationResult[]; } interface DateHistogramResults { /** * List of date histogram aggregations * @maxSize 200 */ results?: DateHistogramResult[]; } /** * Results of `NESTED` aggregation type in a flattened form * aggregations in resulting array are keyed by requested aggregation `name`. */ interface NestedResults { /** * List of nested aggregations * @maxSize 1000 */ results?: Results[]; } interface AggregationResults extends AggregationResultsResultOneOf { /** Value aggregation results */ values?: ValueResults; /** Range aggregation results */ ranges?: RangeResults; /** Scalar aggregation results */ scalar?: AggregationResultsScalarResult; /** Group by value aggregation results */ groupedByValue?: GroupByValueResults; /** Date histogram aggregation results */ dateHistogram?: DateHistogramResults; /** Nested aggregation results */ nested?: NestedResults; /** * User-defined name of aggregation as derived from search request * @maxLength 100 */ name?: string; /** Type of aggregation that must match provided kind as derived from search request */ type?: AggregationTypeWithLiterals; /** * Field to aggregate by as derived from search request * @maxLength 200 */ fieldPath?: string; } /** @oneof */ interface AggregationResultsResultOneOf { /** Value aggregation results */ values?: ValueResults; /** Range aggregation results */ ranges?: RangeResults; /** Scalar aggregation results */ scalar?: AggregationResultsScalarResult; /** Group by value aggregation results */ groupedByValue?: GroupByValueResults; /** Date histogram aggregation results */ dateHistogram?: DateHistogramResults; /** Nested aggregation results */ nested?: NestedResults; } /** @docsIgnore */ type CreateBillableItemApplicationErrors = { code?: 'APP_INSTALLATION_FAILED'; description?: string; data?: Record; } | { code?: 'NO_META_SITE'; description?: string; data?: Record; } | { code?: 'TAX_GROUP_ID_NOT_FOUND'; description?: string; data?: Record; }; /** @docsIgnore */ type BulkUpdateBillableItemTagsApplicationErrors = { code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS'; description?: string; data?: Record; }; /** @docsIgnore */ type BulkUpdateBillableItemTagsByFilterApplicationErrors = { code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS'; description?: string; data?: Record; }; type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function createBillableItem(): __PublicMethodMetaInfo<'POST', {}, CreateBillableItemRequest$1, CreateBillableItemRequest, CreateBillableItemResponse$1, CreateBillableItemResponse>; declare function getBillableItem(): __PublicMethodMetaInfo<'GET', { billableItemId: string; }, GetBillableItemRequest$1, GetBillableItemRequest, GetBillableItemResponse$1, GetBillableItemResponse>; declare function updateBillableItem(): __PublicMethodMetaInfo<'PATCH', { billableItemId: string; }, UpdateBillableItemRequest$1, UpdateBillableItemRequest, UpdateBillableItemResponse$1, UpdateBillableItemResponse>; declare function deleteBillableItem(): __PublicMethodMetaInfo<'DELETE', { billableItemId: string; }, DeleteBillableItemRequest$1, DeleteBillableItemRequest, DeleteBillableItemResponse$1, DeleteBillableItemResponse>; declare function queryBillableItems(): __PublicMethodMetaInfo<'GET', {}, QueryBillableItemsRequest$1, QueryBillableItemsRequest, QueryBillableItemsResponse$1, QueryBillableItemsResponse>; declare function bulkCreateBillableItems(): __PublicMethodMetaInfo<'POST', {}, BulkCreateBillableItemsRequest$1, BulkCreateBillableItemsRequest, BulkCreateBillableItemsResponse$1, BulkCreateBillableItemsResponse>; declare function bulkUpdateBillableItems(): __PublicMethodMetaInfo<'POST', {}, BulkUpdateBillableItemsRequest$1, BulkUpdateBillableItemsRequest, BulkUpdateBillableItemsResponse$1, BulkUpdateBillableItemsResponse>; declare function bulkDeleteBillableItems(): __PublicMethodMetaInfo<'POST', {}, BulkDeleteBillableItemsRequest$1, BulkDeleteBillableItemsRequest, BulkDeleteBillableItemsResponse$1, BulkDeleteBillableItemsResponse>; declare function bulkUpdateBillableItemTags(): __PublicMethodMetaInfo<'POST', {}, BulkUpdateBillableItemTagsRequest$1, BulkUpdateBillableItemTagsRequest, BulkUpdateBillableItemTagsResponse$1, BulkUpdateBillableItemTagsResponse>; declare function bulkUpdateBillableItemTagsByFilter(): __PublicMethodMetaInfo<'POST', {}, BulkUpdateBillableItemTagsByFilterRequest$1, BulkUpdateBillableItemTagsByFilterRequest, BulkUpdateBillableItemTagsByFilterResponse$1, BulkUpdateBillableItemTagsByFilterResponse>; declare function searchBillableItems(): __PublicMethodMetaInfo<'POST', {}, SearchBillableItemsRequest$1, SearchBillableItemsRequest, SearchBillableItemsResponse$1, SearchBillableItemsResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type AggregationData as AggregationDataOriginal, type AggregationKindOneOf as AggregationKindOneOfOriginal, type Aggregation as AggregationOriginal, type AggregationResults as AggregationResultsOriginal, type AggregationResultsResultOneOf as AggregationResultsResultOneOfOriginal, type AggregationResultsScalarResult as AggregationResultsScalarResultOriginal, AggregationType as AggregationTypeOriginal, type AggregationTypeWithLiterals as AggregationTypeWithLiteralsOriginal, type ApplicationError as ApplicationErrorOriginal, type BillableItem as BillableItemOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkBillableItemResult as BulkBillableItemResultOriginal, type BulkCreateBillableItemsRequest as BulkCreateBillableItemsRequestOriginal, type BulkCreateBillableItemsResponse as BulkCreateBillableItemsResponseOriginal, type BulkDeleteBillableItemsRequest as BulkDeleteBillableItemsRequestOriginal, type BulkDeleteBillableItemsResponseBulkBillableItemResult as BulkDeleteBillableItemsResponseBulkBillableItemResultOriginal, type BulkDeleteBillableItemsResponse as BulkDeleteBillableItemsResponseOriginal, type BulkUpdateBillableItemTagsApplicationErrors as BulkUpdateBillableItemTagsApplicationErrorsOriginal, type BulkUpdateBillableItemTagsByFilterApplicationErrors as BulkUpdateBillableItemTagsByFilterApplicationErrorsOriginal, type BulkUpdateBillableItemTagsByFilterRequest as BulkUpdateBillableItemTagsByFilterRequestOriginal, type BulkUpdateBillableItemTagsByFilterResponse as BulkUpdateBillableItemTagsByFilterResponseOriginal, type BulkUpdateBillableItemTagsRequest as BulkUpdateBillableItemTagsRequestOriginal, type BulkUpdateBillableItemTagsResponse as BulkUpdateBillableItemTagsResponseOriginal, type BulkUpdateBillableItemTagsResult as BulkUpdateBillableItemTagsResultOriginal, type BulkUpdateBillableItemsRequest as BulkUpdateBillableItemsRequestOriginal, type BulkUpdateBillableItemsResponseBulkBillableItemResult as BulkUpdateBillableItemsResponseBulkBillableItemResultOriginal, type BulkUpdateBillableItemsResponse as BulkUpdateBillableItemsResponseOriginal, type CreateBillableItemApplicationErrors as CreateBillableItemApplicationErrorsOriginal, type CreateBillableItemRequest as CreateBillableItemRequestOriginal, type CreateBillableItemResponse as CreateBillableItemResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type CursorSearch as CursorSearchOriginal, type CursorSearchPagingMethodOneOf as CursorSearchPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DateHistogramAggregation as DateHistogramAggregationOriginal, type DateHistogramResult as DateHistogramResultOriginal, type DateHistogramResults as DateHistogramResultsOriginal, type DeleteBillableItemRequest as DeleteBillableItemRequestOriginal, type DeleteBillableItemResponse as DeleteBillableItemResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type ExtendedFields as ExtendedFieldsOriginal, type GetBillableItemRequest as GetBillableItemRequestOriginal, type GetBillableItemResponse as GetBillableItemResponseOriginal, type GroupByValueResults as GroupByValueResultsOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type Image as ImageOriginal, type IncludeMissingValuesOptions as IncludeMissingValuesOptionsOriginal, type InternalCursorPaging as InternalCursorPagingOriginal, type InternalCursorQuery as InternalCursorQueryOriginal, type InternalCursorQueryPagingMethodOneOf as InternalCursorQueryPagingMethodOneOfOriginal, type InternalQueryBillableItemsRequest as InternalQueryBillableItemsRequestOriginal, type InternalQueryBillableItemsResponse as InternalQueryBillableItemsResponseOriginal, Interval as IntervalOriginal, type IntervalWithLiterals as IntervalWithLiteralsOriginal, type ItemMetadata as ItemMetadataOriginal, type MaskedBillableItem as MaskedBillableItemOriginal, type MessageEnvelope as MessageEnvelopeOriginal, MissingValues as MissingValuesOriginal, type MissingValuesWithLiterals as MissingValuesWithLiteralsOriginal, Mode as ModeOriginal, type ModeWithLiterals as ModeWithLiteralsOriginal, type NestedAggregationItemKindOneOf as NestedAggregationItemKindOneOfOriginal, type NestedAggregationItem as NestedAggregationItemOriginal, type NestedAggregation as NestedAggregationOriginal, type NestedAggregationResults as NestedAggregationResultsOriginal, type NestedAggregationResultsResultOneOf as NestedAggregationResultsResultOneOfOriginal, NestedAggregationType as NestedAggregationTypeOriginal, type NestedAggregationTypeWithLiterals as NestedAggregationTypeWithLiteralsOriginal, type NestedResultValue as NestedResultValueOriginal, type NestedResultValueResultOneOf as NestedResultValueResultOneOfOriginal, type NestedResults as NestedResultsOriginal, type NestedValueAggregationResult as NestedValueAggregationResultOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type QueryBillableItemsRequest as QueryBillableItemsRequestOriginal, type QueryBillableItemsResponse as QueryBillableItemsResponseOriginal, type RangeAggregation as RangeAggregationOriginal, type RangeAggregationResult as RangeAggregationResultOriginal, type RangeBucket as RangeBucketOriginal, type RangeResult as RangeResultOriginal, type RangeResults as RangeResultsOriginal, type RestoreInfo as RestoreInfoOriginal, type Results as ResultsOriginal, type ScalarAggregation as ScalarAggregationOriginal, type ScalarResult as ScalarResultOriginal, ScalarType as ScalarTypeOriginal, type ScalarTypeWithLiterals as ScalarTypeWithLiteralsOriginal, type SearchBillableItemsRequest as SearchBillableItemsRequestOriginal, type SearchBillableItemsResponse as SearchBillableItemsResponseOriginal, type SearchDetails as SearchDetailsOriginal, SortDirection as SortDirectionOriginal, type SortDirectionWithLiterals as SortDirectionWithLiteralsOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, SortType as SortTypeOriginal, type SortTypeWithLiterals as SortTypeWithLiteralsOriginal, type Sorting as SortingOriginal, type TagList as TagListOriginal, type Tags as TagsOriginal, type UpdateBillableItemRequest as UpdateBillableItemRequestOriginal, type UpdateBillableItemResponse as UpdateBillableItemResponseOriginal, type ValueAggregationOptionsOneOf as ValueAggregationOptionsOneOfOriginal, type ValueAggregation as ValueAggregationOriginal, type ValueAggregationResult as ValueAggregationResultOriginal, type ValueResult as ValueResultOriginal, type ValueResults as ValueResultsOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, bulkCreateBillableItems, bulkDeleteBillableItems, bulkUpdateBillableItemTags, bulkUpdateBillableItemTagsByFilter, bulkUpdateBillableItems, createBillableItem, deleteBillableItem, getBillableItem, queryBillableItems, searchBillableItems, updateBillableItem };