@xoxno/types 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cache/keys.d.ts +642 -0
- package/dist/cache/keys.js +654 -0
- package/dist/cache/ttl.d.ts +13 -0
- package/dist/cache/ttl.js +16 -0
- package/dist/common/enums.d.ts +52 -0
- package/dist/common/enums.js +61 -0
- package/dist/common/kusto/kusto-db.enum.d.ts +7 -0
- package/dist/common/kusto/kusto-db.enum.js +12 -0
- package/dist/common/kusto/lending-market-analytics.d.ts +19 -0
- package/dist/common/kusto/lending-market-analytics.js +171 -0
- package/dist/common/kusto/lending-overall-stats.d.ts +11 -0
- package/dist/common/kusto/lending-overall-stats.js +72 -0
- package/dist/common/kusto/lending-position-status.d.ts +10 -0
- package/dist/common/kusto/lending-position-status.js +63 -0
- package/dist/common/kusto/order-by-column.enum.d.ts +8 -0
- package/dist/common/kusto/order-by-column.enum.js +13 -0
- package/dist/common/kusto/order-direction.enum.d.ts +4 -0
- package/dist/common/kusto/order-direction.enum.js +8 -0
- package/dist/common/kusto/trading-stats.d.ts +28 -0
- package/dist/common/kusto/trading-stats.js +35 -0
- package/dist/common/kusto/user-trading-summary.d.ts +20 -0
- package/dist/common/kusto/user-trading-summary.js +6 -0
- package/dist/common/kusto/volume-graph.d.ts +16 -0
- package/dist/common/kusto/volume-graph.js +57 -0
- package/dist/common/kusto/wallet-stats.d.ts +36 -0
- package/dist/common/kusto/wallet-stats.js +66 -0
- package/dist/common/owner.dto.d.ts +14 -0
- package/dist/common/owner.dto.js +37 -0
- package/dist/common/socials.d.ts +11 -0
- package/dist/common/socials.js +53 -0
- package/dist/common/statistics.d.ts +11 -0
- package/dist/common/statistics.js +49 -0
- package/dist/common/tokenPayent.d.ts +9 -0
- package/dist/common/tokenPayent.js +50 -0
- package/dist/cosmos-db/cosmos-db-container.enum.d.ts +13 -0
- package/dist/cosmos-db/cosmos-db-container.enum.js +17 -0
- package/dist/cosmos-db/cosmos-db-generic-filter.d.ts +16 -0
- package/dist/cosmos-db/cosmos-db-generic-filter.js +72 -0
- package/dist/cosmos-db/cosmos-db-paginated-response.dto.d.ts +13 -0
- package/dist/cosmos-db/cosmos-db-paginated-response.dto.js +62 -0
- package/dist/cosmos-db/cosmos-db-query.d.ts +81 -0
- package/dist/cosmos-db/cosmos-db-query.js +435 -0
- package/dist/cosmos-db/documents/activity/chain-activity.enum.d.ts +4 -0
- package/dist/cosmos-db/documents/activity/chain-activity.enum.js +5 -0
- package/dist/cosmos-db/documents/activity/event-source.enum.d.ts +15 -0
- package/dist/cosmos-db/documents/activity/event-source.enum.js +19 -0
- package/dist/cosmos-db/documents/activity/nft-activity-data.d.ts +22 -0
- package/dist/cosmos-db/documents/activity/nft-activity-data.js +2 -0
- package/dist/cosmos-db/documents/activity/nft-activity-type.enum.d.ts +28 -0
- package/dist/cosmos-db/documents/activity/nft-activity-type.enum.js +36 -0
- package/dist/cosmos-db/documents/activity/nft-activity.doc.d.ts +20 -0
- package/dist/cosmos-db/documents/activity/nft-activity.doc.js +121 -0
- package/dist/cosmos-db/documents/chat/block-user.dto.d.ts +3 -0
- package/dist/cosmos-db/documents/chat/block-user.dto.js +20 -0
- package/dist/cosmos-db/documents/chat/blocked-user.dto.d.ts +14 -0
- package/dist/cosmos-db/documents/chat/blocked-user.dto.js +57 -0
- package/dist/cosmos-db/documents/chat/chat-conversation.d.ts +39 -0
- package/dist/cosmos-db/documents/chat/chat-conversation.js +109 -0
- package/dist/cosmos-db/documents/chat/chat-data-type.enum.d.ts +6 -0
- package/dist/cosmos-db/documents/chat/chat-data-type.enum.js +10 -0
- package/dist/cosmos-db/documents/chat/chat-message-content-type.enum.d.ts +6 -0
- package/dist/cosmos-db/documents/chat/chat-message-content-type.enum.js +10 -0
- package/dist/cosmos-db/documents/chat/chat-message-content.dto.d.ts +6 -0
- package/dist/cosmos-db/documents/chat/chat-message-content.dto.js +42 -0
- package/dist/cosmos-db/documents/chat/chat-message-reply.dto.d.ts +7 -0
- package/dist/cosmos-db/documents/chat/chat-message-reply.dto.js +41 -0
- package/dist/cosmos-db/documents/chat/chat-message.doc.d.ts +44 -0
- package/dist/cosmos-db/documents/chat/chat-message.doc.js +17 -0
- package/dist/cosmos-db/documents/chat/chat-message.dto.d.ts +47 -0
- package/dist/cosmos-db/documents/chat/chat-message.dto.js +160 -0
- package/dist/cosmos-db/documents/chat/global-conversation-summary.dto.d.ts +10 -0
- package/dist/cosmos-db/documents/chat/global-conversation-summary.dto.js +38 -0
- package/dist/cosmos-db/documents/chat/group-chat-profile.doc.d.ts +13 -0
- package/dist/cosmos-db/documents/chat/group-chat-profile.doc.js +14 -0
- package/dist/cosmos-db/documents/chat/user-block.doc.d.ts +10 -0
- package/dist/cosmos-db/documents/chat/user-block.doc.js +14 -0
- package/dist/cosmos-db/documents/chat/user-conversation.doc.d.ts +16 -0
- package/dist/cosmos-db/documents/chat/user-conversation.doc.js +13 -0
- package/dist/cosmos-db/documents/collection/collectionConfig.d.ts +15 -0
- package/dist/cosmos-db/documents/collection/collectionConfig.js +19 -0
- package/dist/cosmos-db/documents/collection/dataTypes.d.ts +8 -0
- package/dist/cosmos-db/documents/collection/dataTypes.js +12 -0
- package/dist/cosmos-db/documents/collection/globalOffer.d.ts +27 -0
- package/dist/cosmos-db/documents/collection/globalOffer.js +174 -0
- package/dist/cosmos-db/documents/collection/mintProfile.d.ts +36 -0
- package/dist/cosmos-db/documents/collection/mintProfile.js +241 -0
- package/dist/cosmos-db/documents/collection/mintStage.d.ts +20 -0
- package/dist/cosmos-db/documents/collection/mintStage.js +13 -0
- package/dist/cosmos-db/documents/collection/profile.d.ts +52 -0
- package/dist/cosmos-db/documents/collection/profile.js +330 -0
- package/dist/cosmos-db/documents/collection/stats.d.ts +45 -0
- package/dist/cosmos-db/documents/collection/stats.js +286 -0
- package/dist/cosmos-db/documents/collection/verification.d.ts +11 -0
- package/dist/cosmos-db/documents/collection/verification.js +72 -0
- package/dist/cosmos-db/documents/external-payment/binance-hook.d.ts +46 -0
- package/dist/cosmos-db/documents/external-payment/binance-hook.js +16 -0
- package/dist/cosmos-db/documents/external-payment/binance-request.d.ts +30 -0
- package/dist/cosmos-db/documents/external-payment/binance-request.js +36 -0
- package/dist/cosmos-db/documents/external-payment/external-payment-request.d.ts +52 -0
- package/dist/cosmos-db/documents/external-payment/external-payment-request.js +236 -0
- package/dist/cosmos-db/documents/external-payment/external-payment-status.enum.d.ts +18 -0
- package/dist/cosmos-db/documents/external-payment/external-payment-status.enum.js +22 -0
- package/dist/cosmos-db/documents/external-payment/external-payment.doc.d.ts +42 -0
- package/dist/cosmos-db/documents/external-payment/external-payment.doc.js +10 -0
- package/dist/cosmos-db/documents/external-payment/payment-provider.enum.d.ts +6 -0
- package/dist/cosmos-db/documents/external-payment/payment-provider.enum.js +10 -0
- package/dist/cosmos-db/documents/external-payment/purchase-type.enum.d.ts +14 -0
- package/dist/cosmos-db/documents/external-payment/purchase-type.enum.js +18 -0
- package/dist/cosmos-db/documents/external-payment/stripe-charge-event.d.ts +126 -0
- package/dist/cosmos-db/documents/external-payment/stripe-charge-event.js +2 -0
- package/dist/cosmos-db/documents/external-payment/twispay-cart.d.ts +13 -0
- package/dist/cosmos-db/documents/external-payment/twispay-cart.js +8 -0
- package/dist/cosmos-db/documents/external-payment/twispay-customer.d.ts +14 -0
- package/dist/cosmos-db/documents/external-payment/twispay-customer.js +2 -0
- package/dist/cosmos-db/documents/external-payment/twispay-payment-form.d.ts +15 -0
- package/dist/cosmos-db/documents/external-payment/twispay-payment-form.js +2 -0
- package/dist/cosmos-db/documents/external-payment/twispay-transaction.d.ts +50 -0
- package/dist/cosmos-db/documents/external-payment/twispay-transaction.js +48 -0
- package/dist/cosmos-db/documents/lending/lending-account-profile.d.ts +35 -0
- package/dist/cosmos-db/documents/lending/lending-account-profile.js +258 -0
- package/dist/cosmos-db/documents/lending/lending-data-type.enum.d.ts +6 -0
- package/dist/cosmos-db/documents/lending/lending-data-type.enum.js +10 -0
- package/dist/cosmos-db/documents/lending/lending-emode-category-profile.doc.d.ts +20 -0
- package/dist/cosmos-db/documents/lending/lending-emode-category-profile.doc.js +66 -0
- package/dist/cosmos-db/documents/lending/lending-market-profile.doc.d.ts +82 -0
- package/dist/cosmos-db/documents/lending/lending-market-profile.doc.js +372 -0
- package/dist/cosmos-db/documents/lending/lending-nft-attributes.d.ts +16 -0
- package/dist/cosmos-db/documents/lending/lending-nft-attributes.js +17 -0
- package/dist/cosmos-db/documents/lending/lending-position-type.enum.d.ts +5 -0
- package/dist/cosmos-db/documents/lending/lending-position-type.enum.js +9 -0
- package/dist/cosmos-db/documents/lending/lending-token-emode-profile.doc.d.ts +13 -0
- package/dist/cosmos-db/documents/lending/lending-token-emode-profile.doc.js +59 -0
- package/dist/cosmos-db/documents/notification/notification-asset-type.enum.d.ts +4 -0
- package/dist/cosmos-db/documents/notification/notification-asset-type.enum.js +8 -0
- package/dist/cosmos-db/documents/notification/notification-data-type.enum.d.ts +3 -0
- package/dist/cosmos-db/documents/notification/notification-data-type.enum.js +7 -0
- package/dist/cosmos-db/documents/notification/notification.doc.d.ts +35 -0
- package/dist/cosmos-db/documents/notification/notification.doc.js +13 -0
- package/dist/cosmos-db/documents/staking/staking-creator.d.ts +11 -0
- package/dist/cosmos-db/documents/staking/staking-creator.js +13 -0
- package/dist/cosmos-db/documents/staking/staking-data-type.enum.d.ts +5 -0
- package/dist/cosmos-db/documents/staking/staking-data-type.enum.js +9 -0
- package/dist/cosmos-db/documents/staking/staking-delegator-doc.d.ts +15 -0
- package/dist/cosmos-db/documents/staking/staking-delegator-doc.js +15 -0
- package/dist/cosmos-db/documents/staking/staking-issuing-type-string.enum.d.ts +5 -0
- package/dist/cosmos-db/documents/staking/staking-issuing-type-string.enum.js +9 -0
- package/dist/cosmos-db/documents/staking/staking-pool-doc.d.ts +93 -0
- package/dist/cosmos-db/documents/staking/staking-pool-doc.js +265 -0
- package/dist/cosmos-db/documents/staking/staking-pool-type-string.enum.d.ts +6 -0
- package/dist/cosmos-db/documents/staking/staking-pool-type-string.enum.js +10 -0
- package/dist/cosmos-db/documents/ticketing/discount-code-validation-response.d.ts +6 -0
- package/dist/cosmos-db/documents/ticketing/discount-code-validation-response.js +38 -0
- package/dist/cosmos-db/documents/ticketing/entities/discount-code-validation-response.d.ts +6 -0
- package/dist/cosmos-db/documents/ticketing/entities/discount-code-validation-response.js +38 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-category.enum.d.ts +90 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-category.enum.js +99 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-guest-approve.dto.d.ts +4 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-guest-approve.dto.js +32 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-guest-doc.filter.d.ts +25 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-guest-doc.filter.js +91 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-guest-registration.dto.d.ts +23 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-guest-registration.dto.js +196 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-guest-status.enum.d.ts +10 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-guest-status.enum.js +14 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-guest.doc.d.ts +64 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-guest.doc.js +387 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-invitation-create.dto.d.ts +12 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-invitation-create.dto.js +74 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-invitation-doc.filter.d.ts +31 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-invitation-doc.filter.js +99 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-invitation-status.enum.d.ts +6 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-invitation-status.enum.js +10 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-invitation.doc.d.ts +32 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-invitation.doc.js +206 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-location.d.ts +14 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-location.js +68 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-profile-create.dto.d.ts +47 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-profile-create.dto.js +269 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-profile-doc.filter.d.ts +41 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-profile-doc.filter.js +129 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-profile-edit.dto.d.ts +14 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-profile-edit.dto.js +108 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-profile.doc.d.ts +93 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-profile.doc.js +544 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-question-answer-type.enum.d.ts +9 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-question-answer-type.enum.js +13 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-question-answer.doc.d.ts +23 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-question-answer.doc.js +127 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-question-create.dto.d.ts +8 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-question-create.dto.js +61 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-question-edit.dto.d.ts +8 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-question-edit.dto.js +65 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-question-validator.d.ts +4 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-question-validator.js +32 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-question.doc.d.ts +15 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-question.doc.js +87 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config-create.dto.d.ts +8 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config-create.dto.js +58 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config-edit.dto.d.ts +5 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config-edit.dto.js +8 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config-filter.doc.d.ts +23 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config-filter.doc.js +116 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config-query.doc.d.ts +6 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config-query.doc.js +38 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config.doc.d.ts +27 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config.doc.js +148 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-create.dto.d.ts +4 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-create.dto.js +31 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-edit.dto.d.ts +4 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-edit.dto.js +36 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-filter.doc.d.ts +31 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-filter.doc.js +161 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-query.doc.d.ts +6 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-query.doc.js +38 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-usage.doc.d.ts +16 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-usage.doc.js +100 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral.doc.d.ts +14 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-referral.doc.js +92 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-scan-status.enum.d.ts +24 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-scan-status.enum.js +46 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-stage-profile-create.dto.d.ts +13 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-stage-profile-create.dto.js +109 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-stage-profile-edit.dto.d.ts +8 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-stage-profile-edit.dto.js +48 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-stage-profile.doc.d.ts +21 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-stage-profile.doc.js +168 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-ticket-profile-create.dto.d.ts +8 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-ticket-profile-create.dto.js +74 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-ticket-profile-edit.dto.d.ts +7 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-ticket-profile-edit.dto.js +31 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-ticket-profile.doc.d.ts +25 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-ticket-profile.doc.js +166 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-ticket-qr-type.enum.d.ts +43 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-ticket-qr-type.enum.js +201 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-user-role-create.dto.d.ts +9 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-user-role-create.dto.js +69 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-user-role.doc.d.ts +25 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-user-role.doc.js +130 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-user-roles.enum.d.ts +15 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-user-roles.enum.js +20 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-voucher-create.dto.d.ts +15 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-voucher-create.dto.js +116 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-voucher-edit.dto.d.ts +8 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-voucher-edit.dto.js +48 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-voucher-filter.doc.d.ts +33 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-voucher-filter.doc.js +173 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-voucher.doc.d.ts +33 -0
- package/dist/cosmos-db/documents/ticketing/entities/event-voucher.doc.js +189 -0
- package/dist/cosmos-db/documents/ticketing/entities/manual-check-in.dto.d.ts +5 -0
- package/dist/cosmos-db/documents/ticketing/entities/manual-check-in.dto.js +38 -0
- package/dist/cosmos-db/documents/ticketing/entities/ticket-calculation-request.dto.d.ts +6 -0
- package/dist/cosmos-db/documents/ticketing/entities/ticket-calculation-request.dto.js +38 -0
- package/dist/cosmos-db/documents/ticketing/entities/ticket-prices-response.d.ts +14 -0
- package/dist/cosmos-db/documents/ticketing/entities/ticket-prices-response.js +74 -0
- package/dist/cosmos-db/documents/ticketing/entities/ticketing-data-type.enum.d.ts +14 -0
- package/dist/cosmos-db/documents/ticketing/entities/ticketing-data-type.enum.js +18 -0
- package/dist/cosmos-db/documents/ticketing/event-category.enum.d.ts +90 -0
- package/dist/cosmos-db/documents/ticketing/event-category.enum.js +99 -0
- package/dist/cosmos-db/documents/ticketing/event-guest-approve.dto.d.ts +4 -0
- package/dist/cosmos-db/documents/ticketing/event-guest-approve.dto.js +33 -0
- package/dist/cosmos-db/documents/ticketing/event-guest-doc.filter.d.ts +25 -0
- package/dist/cosmos-db/documents/ticketing/event-guest-doc.filter.js +91 -0
- package/dist/cosmos-db/documents/ticketing/event-guest-registration.dto.d.ts +28 -0
- package/dist/cosmos-db/documents/ticketing/event-guest-registration.dto.js +217 -0
- package/dist/cosmos-db/documents/ticketing/event-guest-status.enum.d.ts +10 -0
- package/dist/cosmos-db/documents/ticketing/event-guest-status.enum.js +14 -0
- package/dist/cosmos-db/documents/ticketing/event-guest.doc.d.ts +71 -0
- package/dist/cosmos-db/documents/ticketing/event-guest.doc.js +395 -0
- package/dist/cosmos-db/documents/ticketing/event-invitation-create.dto.d.ts +12 -0
- package/dist/cosmos-db/documents/ticketing/event-invitation-create.dto.js +74 -0
- package/dist/cosmos-db/documents/ticketing/event-invitation-doc.filter.d.ts +31 -0
- package/dist/cosmos-db/documents/ticketing/event-invitation-doc.filter.js +99 -0
- package/dist/cosmos-db/documents/ticketing/event-invitation-status.enum.d.ts +6 -0
- package/dist/cosmos-db/documents/ticketing/event-invitation-status.enum.js +10 -0
- package/dist/cosmos-db/documents/ticketing/event-invitation.doc.d.ts +38 -0
- package/dist/cosmos-db/documents/ticketing/event-invitation.doc.js +206 -0
- package/dist/cosmos-db/documents/ticketing/event-location.d.ts +14 -0
- package/dist/cosmos-db/documents/ticketing/event-location.js +68 -0
- package/dist/cosmos-db/documents/ticketing/event-profile-create.dto.d.ts +47 -0
- package/dist/cosmos-db/documents/ticketing/event-profile-create.dto.js +269 -0
- package/dist/cosmos-db/documents/ticketing/event-profile-doc.filter.d.ts +42 -0
- package/dist/cosmos-db/documents/ticketing/event-profile-doc.filter.js +130 -0
- package/dist/cosmos-db/documents/ticketing/event-profile-edit.dto.d.ts +14 -0
- package/dist/cosmos-db/documents/ticketing/event-profile-edit.dto.js +108 -0
- package/dist/cosmos-db/documents/ticketing/event-profile.doc.d.ts +104 -0
- package/dist/cosmos-db/documents/ticketing/event-profile.doc.js +541 -0
- package/dist/cosmos-db/documents/ticketing/event-question-answer-type.enum.d.ts +9 -0
- package/dist/cosmos-db/documents/ticketing/event-question-answer-type.enum.js +13 -0
- package/dist/cosmos-db/documents/ticketing/event-question-answer.doc.d.ts +23 -0
- package/dist/cosmos-db/documents/ticketing/event-question-answer.doc.js +127 -0
- package/dist/cosmos-db/documents/ticketing/event-question-create.dto.d.ts +8 -0
- package/dist/cosmos-db/documents/ticketing/event-question-create.dto.js +61 -0
- package/dist/cosmos-db/documents/ticketing/event-question-edit.dto.d.ts +8 -0
- package/dist/cosmos-db/documents/ticketing/event-question-edit.dto.js +66 -0
- package/dist/cosmos-db/documents/ticketing/event-question-validator.d.ts +4 -0
- package/dist/cosmos-db/documents/ticketing/event-question-validator.js +33 -0
- package/dist/cosmos-db/documents/ticketing/event-question.doc.d.ts +15 -0
- package/dist/cosmos-db/documents/ticketing/event-question.doc.js +88 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-config-create.dto.d.ts +8 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-config-create.dto.js +58 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-config-edit.dto.d.ts +5 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-config-edit.dto.js +8 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-config-filter.doc.d.ts +23 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-config-filter.doc.js +116 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-config-query.doc.d.ts +6 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-config-query.doc.js +38 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-config.doc.d.ts +27 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-config.doc.js +149 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-create.dto.d.ts +4 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-create.dto.js +31 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-edit.dto.d.ts +4 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-edit.dto.js +36 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-filter.doc.d.ts +31 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-filter.doc.js +162 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-query.doc.d.ts +6 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-query.doc.js +41 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-usage.doc.d.ts +16 -0
- package/dist/cosmos-db/documents/ticketing/event-referral-usage.doc.js +100 -0
- package/dist/cosmos-db/documents/ticketing/event-referral.doc.d.ts +14 -0
- package/dist/cosmos-db/documents/ticketing/event-referral.doc.js +92 -0
- package/dist/cosmos-db/documents/ticketing/event-scan-status.enum.d.ts +24 -0
- package/dist/cosmos-db/documents/ticketing/event-scan-status.enum.js +46 -0
- package/dist/cosmos-db/documents/ticketing/event-stage-profile-create.dto.d.ts +13 -0
- package/dist/cosmos-db/documents/ticketing/event-stage-profile-create.dto.js +109 -0
- package/dist/cosmos-db/documents/ticketing/event-stage-profile-edit.dto.d.ts +8 -0
- package/dist/cosmos-db/documents/ticketing/event-stage-profile-edit.dto.js +48 -0
- package/dist/cosmos-db/documents/ticketing/event-stage-profile.doc.d.ts +21 -0
- package/dist/cosmos-db/documents/ticketing/event-stage-profile.doc.js +168 -0
- package/dist/cosmos-db/documents/ticketing/event-ticket-profile-create.dto.d.ts +8 -0
- package/dist/cosmos-db/documents/ticketing/event-ticket-profile-create.dto.js +74 -0
- package/dist/cosmos-db/documents/ticketing/event-ticket-profile-edit.dto.d.ts +7 -0
- package/dist/cosmos-db/documents/ticketing/event-ticket-profile-edit.dto.js +31 -0
- package/dist/cosmos-db/documents/ticketing/event-ticket-profile.doc.d.ts +25 -0
- package/dist/cosmos-db/documents/ticketing/event-ticket-profile.doc.js +164 -0
- package/dist/cosmos-db/documents/ticketing/event-ticket-qr-type.enum.d.ts +43 -0
- package/dist/cosmos-db/documents/ticketing/event-ticket-qr-type.enum.js +202 -0
- package/dist/cosmos-db/documents/ticketing/event-user-role-create.dto.d.ts +9 -0
- package/dist/cosmos-db/documents/ticketing/event-user-role-create.dto.js +69 -0
- package/dist/cosmos-db/documents/ticketing/event-user-role.doc.d.ts +25 -0
- package/dist/cosmos-db/documents/ticketing/event-user-role.doc.js +131 -0
- package/dist/cosmos-db/documents/ticketing/event-user-roles.enum.d.ts +15 -0
- package/dist/cosmos-db/documents/ticketing/event-user-roles.enum.js +20 -0
- package/dist/cosmos-db/documents/ticketing/event-voucher-create.dto.d.ts +15 -0
- package/dist/cosmos-db/documents/ticketing/event-voucher-create.dto.js +117 -0
- package/dist/cosmos-db/documents/ticketing/event-voucher-edit.dto.d.ts +8 -0
- package/dist/cosmos-db/documents/ticketing/event-voucher-edit.dto.js +48 -0
- package/dist/cosmos-db/documents/ticketing/event-voucher-filter.doc.d.ts +33 -0
- package/dist/cosmos-db/documents/ticketing/event-voucher-filter.doc.js +167 -0
- package/dist/cosmos-db/documents/ticketing/event-voucher.doc.d.ts +39 -0
- package/dist/cosmos-db/documents/ticketing/event-voucher.doc.js +191 -0
- package/dist/cosmos-db/documents/ticketing/manual-check-in.dto.d.ts +5 -0
- package/dist/cosmos-db/documents/ticketing/manual-check-in.dto.js +38 -0
- package/dist/cosmos-db/documents/ticketing/ticket-calculation-request.dto.d.ts +6 -0
- package/dist/cosmos-db/documents/ticketing/ticket-calculation-request.dto.js +41 -0
- package/dist/cosmos-db/documents/ticketing/ticket-prices-response.d.ts +14 -0
- package/dist/cosmos-db/documents/ticketing/ticket-prices-response.js +74 -0
- package/dist/cosmos-db/documents/ticketing/ticketing-data-type.enum.d.ts +14 -0
- package/dist/cosmos-db/documents/ticketing/ticketing-data-type.enum.js +18 -0
- package/dist/cosmos-db/documents/token/nft-details.doc.d.ts +79 -0
- package/dist/cosmos-db/documents/token/nft-details.doc.js +436 -0
- package/dist/cosmos-db/documents/token/nft-extra-attributes.type.d.ts +3 -0
- package/dist/cosmos-db/documents/token/nft-extra-attributes.type.js +7 -0
- package/dist/cosmos-db/documents/token/nft-extra-metadata.doc.d.ts +11 -0
- package/dist/cosmos-db/documents/token/nft-extra-metadata.doc.js +12 -0
- package/dist/cosmos-db/documents/token/nft-metadata-attributes.d.ts +6 -0
- package/dist/cosmos-db/documents/token/nft-metadata-attributes.js +28 -0
- package/dist/cosmos-db/documents/token/nft-metadata.d.ts +13 -0
- package/dist/cosmos-db/documents/token/nft-metadata.js +62 -0
- package/dist/cosmos-db/documents/token/nft-offer.doc.d.ts +34 -0
- package/dist/cosmos-db/documents/token/nft-offer.doc.js +220 -0
- package/dist/cosmos-db/documents/token/nft-sale-info.d.ts +23 -0
- package/dist/cosmos-db/documents/token/nft-sale-info.js +109 -0
- package/dist/cosmos-db/documents/token/sft-owner-doc.d.ts +13 -0
- package/dist/cosmos-db/documents/token/sft-owner-doc.js +18 -0
- package/dist/cosmos-db/documents/token/token-data.enum.d.ts +8 -0
- package/dist/cosmos-db/documents/token/token-data.enum.js +12 -0
- package/dist/cosmos-db/documents/token-data/nft-details.doc.d.ts +56 -0
- package/dist/cosmos-db/documents/token-data/nft-details.doc.js +31 -0
- package/dist/cosmos-db/documents/user/account-on-network.d.ts +21 -0
- package/dist/cosmos-db/documents/user/account-on-network.js +36 -0
- package/dist/cosmos-db/documents/user/notification-preferences.dto.d.ts +8 -0
- package/dist/cosmos-db/documents/user/notification-preferences.dto.js +73 -0
- package/dist/cosmos-db/documents/user/user-creator-profile.doc.d.ts +18 -0
- package/dist/cosmos-db/documents/user/user-creator-profile.doc.js +105 -0
- package/dist/cosmos-db/documents/user/user-data.type.d.ts +6 -0
- package/dist/cosmos-db/documents/user/user-data.type.js +10 -0
- package/dist/cosmos-db/documents/user/user-deposit.d.ts +9 -0
- package/dist/cosmos-db/documents/user/user-deposit.js +54 -0
- package/dist/cosmos-db/documents/user/user-favorite-type.enum.d.ts +5 -0
- package/dist/cosmos-db/documents/user/user-favorite-type.enum.js +9 -0
- package/dist/cosmos-db/documents/user/user-favorite.doc.d.ts +18 -0
- package/dist/cosmos-db/documents/user/user-favorite.doc.js +56 -0
- package/dist/cosmos-db/documents/user/user-profile.doc.d.ts +25 -0
- package/dist/cosmos-db/documents/user/user-profile.doc.js +133 -0
- package/dist/cosmos-db/documents/user/user-settings.doc.d.ts +63 -0
- package/dist/cosmos-db/documents/user/user-settings.doc.js +267 -0
- package/dist/index.d.ts +273 -0
- package/dist/index.js +300 -0
- package/dist/redis/keys.d.ts +11 -0
- package/dist/redis/keys.js +12 -0
- package/dist/redis/ttl.d.ts +10 -0
- package/dist/redis/ttl.js +11 -0
- package/dist/requests/aggregator/ar-da-swap-result.dto.d.ts +9 -0
- package/dist/requests/aggregator/ar-da-swap-result.dto.js +80 -0
- package/dist/requests/aggregator/swap.d.ts +65 -0
- package/dist/requests/aggregator/swap.js +240 -0
- package/dist/requests/chat/azure-ws-event-name.enum.d.ts +5 -0
- package/dist/requests/chat/azure-ws-event-name.enum.js +9 -0
- package/dist/requests/chat/azure-ws-hub-name.enum.d.ts +4 -0
- package/dist/requests/chat/azure-ws-hub-name.enum.js +8 -0
- package/dist/requests/chat/chat-token.d.ts +3 -0
- package/dist/requests/chat/chat-token.js +22 -0
- package/dist/requests/collection/attributes.d.ts +22 -0
- package/dist/requests/collection/attributes.js +80 -0
- package/dist/requests/collection/collection-attributes-fp.d.ts +12 -0
- package/dist/requests/collection/collection-attributes-fp.js +2 -0
- package/dist/requests/collection/collection-attributes-map.d.ts +24 -0
- package/dist/requests/collection/collection-attributes-map.js +6 -0
- package/dist/requests/collection/collection-holders.d.ts +25 -0
- package/dist/requests/collection/collection-holders.js +35 -0
- package/dist/requests/collection/collection-info.dto.d.ts +6 -0
- package/dist/requests/collection/collection-info.dto.js +33 -0
- package/dist/requests/collection/collection-mint-profile.filter.d.ts +19 -0
- package/dist/requests/collection/collection-mint-profile.filter.js +40 -0
- package/dist/requests/collection/collection-mint-stage.doc.d.ts +19 -0
- package/dist/requests/collection/collection-mint-stage.doc.js +12 -0
- package/dist/requests/collection/collection-offers.filter.d.ts +28 -0
- package/dist/requests/collection/collection-offers.filter.js +99 -0
- package/dist/requests/collection/collection-owner.dto.d.ts +3 -0
- package/dist/requests/collection/collection-owner.dto.js +24 -0
- package/dist/requests/collection/collection-pinned-status.dto.d.ts +4 -0
- package/dist/requests/collection/collection-pinned-status.dto.js +30 -0
- package/dist/requests/collection/collection-profile.filter.d.ts +18 -0
- package/dist/requests/collection/collection-profile.filter.js +28 -0
- package/dist/requests/collection/collection-stats.d.ts +3 -0
- package/dist/requests/collection/collection-stats.filter.d.ts +22 -0
- package/dist/requests/collection/collection-stats.filter.js +98 -0
- package/dist/requests/collection/collection-stats.js +8 -0
- package/dist/requests/collection/collections.d.ts +7 -0
- package/dist/requests/collection/collections.js +16 -0
- package/dist/requests/collection/creator-details.dto.d.ts +12 -0
- package/dist/requests/collection/creator-details.dto.js +34 -0
- package/dist/requests/collection/creator-drop-info.d.ts +48 -0
- package/dist/requests/collection/creator-drop-info.js +189 -0
- package/dist/requests/collection/drops-query.d.ts +27 -0
- package/dist/requests/collection/drops-query.js +98 -0
- package/dist/requests/collection/floor.d.ts +5 -0
- package/dist/requests/collection/floor.js +28 -0
- package/dist/requests/collection/globalOfferSign.d.ts +4 -0
- package/dist/requests/collection/globalOfferSign.js +38 -0
- package/dist/requests/collection/holders.dto.d.ts +36 -0
- package/dist/requests/collection/holders.dto.js +96 -0
- package/dist/requests/collection/listings.d.ts +32 -0
- package/dist/requests/collection/listings.js +101 -0
- package/dist/requests/collection/pinned-collections.d.ts +10 -0
- package/dist/requests/collection/pinned-collections.js +56 -0
- package/dist/requests/collection/query-activity.d.ts +41 -0
- package/dist/requests/collection/query-activity.js +140 -0
- package/dist/requests/collection/query-global-offers.d.ts +15 -0
- package/dist/requests/collection/query-global-offers.js +57 -0
- package/dist/requests/collection/ranks.d.ts +5 -0
- package/dist/requests/collection/ranks.js +28 -0
- package/dist/requests/collection/stats-query.d.ts +5 -0
- package/dist/requests/collection/stats-query.js +26 -0
- package/dist/requests/lending/lending-market-profile.filter.d.ts +43 -0
- package/dist/requests/lending/lending-market-profile.filter.js +156 -0
- package/dist/requests/nft-activity-data/analytics-overview.d.ts +24 -0
- package/dist/requests/nft-activity-data/analytics-overview.js +151 -0
- package/dist/requests/nft-activity-data/analytics-volume.d.ts +13 -0
- package/dist/requests/nft-activity-data/analytics-volume.js +58 -0
- package/dist/requests/nft-activity-data/bober-battle-activity.enum.d.ts +69 -0
- package/dist/requests/nft-activity-data/bober-battle-activity.enum.js +16 -0
- package/dist/requests/nft-activity-data/event-source.enum.d.ts +15 -0
- package/dist/requests/nft-activity-data/event-source.enum.js +19 -0
- package/dist/requests/nft-activity-data/marketplace-activity.enum.d.ts +20 -0
- package/dist/requests/nft-activity-data/marketplace-activity.enum.js +24 -0
- package/dist/requests/nft-activity-data/nft-activity-data.d.ts +21 -0
- package/dist/requests/nft-activity-data/nft-activity-data.js +2 -0
- package/dist/requests/nft-activity-data/nft-activity-type.enum.d.ts +28 -0
- package/dist/requests/nft-activity-data/nft-activity-type.enum.js +36 -0
- package/dist/requests/nft-activity-data/nft-activity.filter.d.ts +39 -0
- package/dist/requests/nft-activity-data/nft-activity.filter.js +143 -0
- package/dist/requests/nft-activity-data/user-analytics.dto.d.ts +21 -0
- package/dist/requests/nft-activity-data/user-analytics.dto.js +72 -0
- package/dist/requests/nft-activity-data/user-stats.d.ts +53 -0
- package/dist/requests/nft-activity-data/user-stats.js +247 -0
- package/dist/requests/nft-activity-data/xoxno-egld-ls-activity.enum.d.ts +10 -0
- package/dist/requests/nft-activity-data/xoxno-egld-ls-activity.enum.js +14 -0
- package/dist/requests/nft-activity-data/xoxno-ls-activity.enum.d.ts +5 -0
- package/dist/requests/nft-activity-data/xoxno-ls-activity.enum.js +9 -0
- package/dist/requests/nft-data/inventory-summary.d.ts +12 -0
- package/dist/requests/nft-data/inventory-summary.js +67 -0
- package/dist/requests/nft-data/like-nft.dto.d.ts +5 -0
- package/dist/requests/nft-data/like-nft.dto.js +32 -0
- package/dist/requests/nft-data/nft-doc.filter.d.ts +65 -0
- package/dist/requests/nft-data/nft-doc.filter.js +211 -0
- package/dist/requests/nft-data/nft-extra-attributes.type.d.ts +3 -0
- package/dist/requests/nft-data/nft-extra-attributes.type.js +7 -0
- package/dist/requests/nft-data/nft-offer-doc.filter.d.ts +24 -0
- package/dist/requests/nft-data/nft-offer-doc.filter.js +97 -0
- package/dist/requests/nft-data/nft-offers.d.ts +26 -0
- package/dist/requests/nft-data/nft-offers.js +96 -0
- package/dist/requests/nft-data/sign-data.dto.d.ts +4 -0
- package/dist/requests/nft-data/sign-data.dto.js +24 -0
- package/dist/requests/nft-data/sign-mintdto.d.ts +4 -0
- package/dist/requests/nft-data/sign-mintdto.js +33 -0
- package/dist/requests/nft-data/sign-withdraw.dto.d.ts +3 -0
- package/dist/requests/nft-data/sign-withdraw.dto.js +29 -0
- package/dist/requests/nft-data/user-offers.d.ts +40 -0
- package/dist/requests/nft-data/user-offers.js +186 -0
- package/dist/requests/user-data/creator-profile.dto.d.ts +8 -0
- package/dist/requests/user-data/creator-profile.dto.js +28 -0
- package/dist/requests/user-data/edit-creator-profile.dto.d.ts +6 -0
- package/dist/requests/user-data/edit-creator-profile.dto.js +46 -0
- package/dist/requests/user-data/edit-user-profile.dto.d.ts +6 -0
- package/dist/requests/user-data/edit-user-profile.dto.js +44 -0
- package/dist/requests/user-data/follow-collection.dto.d.ts +4 -0
- package/dist/requests/user-data/follow-collection.dto.js +31 -0
- package/dist/requests/user-data/follow-user.dto.d.ts +4 -0
- package/dist/requests/user-data/follow-user.dto.js +30 -0
- package/dist/requests/user-data/is-favorite.d.ts +3 -0
- package/dist/requests/user-data/is-favorite.js +20 -0
- package/dist/requests/user-data/login-access.dto.d.ts +4 -0
- package/dist/requests/user-data/login-access.dto.js +30 -0
- package/dist/requests/user-data/me-profile.d.ts +16 -0
- package/dist/requests/user-data/me-profile.js +55 -0
- package/dist/requests/user-data/set-email.dto.d.ts +4 -0
- package/dist/requests/user-data/set-email.dto.js +34 -0
- package/dist/requests/user-data/set-phone.dto.d.ts +4 -0
- package/dist/requests/user-data/set-phone.dto.js +34 -0
- package/dist/requests/user-data/token-inventory.d.ts +43 -0
- package/dist/requests/user-data/token-inventory.js +143 -0
- package/dist/requests/user-data/tradesilvania.dto.d.ts +3 -0
- package/dist/requests/user-data/tradesilvania.dto.js +23 -0
- package/dist/requests/user-data/user-network.d.ts +22 -0
- package/dist/requests/user-data/user-network.js +98 -0
- package/dist/requests/user-data/verify-email.dto.d.ts +3 -0
- package/dist/requests/user-data/verify-email.dto.js +28 -0
- package/dist/types/common.d.ts +12 -0
- package/dist/types/common.js +12 -0
- package/dist/utils/generic.d.ts +1 -0
- package/dist/utils/generic.js +6 -0
- package/package.json +54 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { SqlQuerySpec } from '@azure/cosmos';
|
|
2
|
+
import { CosmosDbGenericFilter } from './cosmos-db-generic-filter';
|
|
3
|
+
import { NftMetadataAttributes, NftMetadataAttributesType } from './documents/token/nft-metadata-attributes';
|
|
4
|
+
export declare enum QueryConditionOperator {
|
|
5
|
+
EQUAL = "EQUAL",
|
|
6
|
+
NOT_EQUAL = "NOT_EQUAL",
|
|
7
|
+
GREATER_THAN = "GREATER_THAN",
|
|
8
|
+
LESS_THAN = "LESS_THAN",
|
|
9
|
+
GREATER_THAN_OR_EQUAL = "GREATER_THAN_OR_EQUAL",
|
|
10
|
+
LESS_THAN_OR_EQUAL = "LESS_THAN_OR_EQUAL",
|
|
11
|
+
IN = "IN",
|
|
12
|
+
NOT_IN = "NOT_IN"
|
|
13
|
+
}
|
|
14
|
+
export declare enum QueryLogicalOperator {
|
|
15
|
+
AND = "AND",
|
|
16
|
+
OR = "OR"
|
|
17
|
+
}
|
|
18
|
+
export declare enum QueryOrderDirection {
|
|
19
|
+
ASC = "asc",
|
|
20
|
+
DESC = "desc"
|
|
21
|
+
}
|
|
22
|
+
export interface QueryCondition {
|
|
23
|
+
field: string;
|
|
24
|
+
value: string | number | boolean | string[] | number[];
|
|
25
|
+
operator: QueryConditionOperator;
|
|
26
|
+
logicalOperator?: QueryLogicalOperator;
|
|
27
|
+
}
|
|
28
|
+
export interface QueryCustomCondition {
|
|
29
|
+
condition: string;
|
|
30
|
+
logicalOperator?: QueryLogicalOperator;
|
|
31
|
+
parameters?: {
|
|
32
|
+
[key: string]: string | number | boolean | string[] | number[];
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface CosmosDbQuery {
|
|
36
|
+
selectFields?: string[];
|
|
37
|
+
conditions: QueryCondition[];
|
|
38
|
+
groupedConditions?: QueryConditionGroup[];
|
|
39
|
+
customConditions?: QueryCustomCondition[];
|
|
40
|
+
orderBy?: {
|
|
41
|
+
field: string;
|
|
42
|
+
direction: QueryOrderDirection;
|
|
43
|
+
};
|
|
44
|
+
skip?: number;
|
|
45
|
+
top?: number;
|
|
46
|
+
}
|
|
47
|
+
export interface QueryConditionGroup {
|
|
48
|
+
conditions: QueryCondition[];
|
|
49
|
+
logicalOperator: QueryLogicalOperator;
|
|
50
|
+
}
|
|
51
|
+
export declare class CosmosDbQueryBuilder {
|
|
52
|
+
private query;
|
|
53
|
+
private parameters;
|
|
54
|
+
private isCountQuery;
|
|
55
|
+
constructor();
|
|
56
|
+
where(field: string, value: string | number | boolean | string[] | number[], operator: QueryConditionOperator, logicalOperator?: QueryLogicalOperator): CosmosDbQueryBuilder;
|
|
57
|
+
whereCustom(condition: string, logicalOperator?: QueryLogicalOperator, parameters?: Record<string, string | number | boolean | string[] | number[]>): CosmosDbQueryBuilder;
|
|
58
|
+
whereRange(field: string, lower: number, upper: number, logicalOperator?: QueryLogicalOperator): CosmosDbQueryBuilder;
|
|
59
|
+
whereGroup(conditions: QueryCondition[], logicalOperator?: QueryLogicalOperator): CosmosDbQueryBuilder;
|
|
60
|
+
orderBy(field: string, direction: QueryOrderDirection): CosmosDbQueryBuilder;
|
|
61
|
+
setOffset(offset: number): CosmosDbQueryBuilder;
|
|
62
|
+
setLimit(limit: number): CosmosDbQueryBuilder;
|
|
63
|
+
selectFields(fields: string[]): CosmosDbQueryBuilder;
|
|
64
|
+
count(): this;
|
|
65
|
+
buildSqlQuery(applyPagination?: boolean): SqlQuerySpec;
|
|
66
|
+
private buildCustomProjection;
|
|
67
|
+
private getSqlOperator;
|
|
68
|
+
fromFilter(filter: CosmosDbGenericFilter): CosmosDbQueryBuilder;
|
|
69
|
+
getMintProfilePricesQueryAndParams(mintToken: string[]): {
|
|
70
|
+
filterString: string;
|
|
71
|
+
parameters: Record<string, string>;
|
|
72
|
+
};
|
|
73
|
+
getAttributesQueryAndParams(key: string, attributes: NftMetadataAttributes[], traitLogicalOperator?: QueryLogicalOperator): {
|
|
74
|
+
filterString: string;
|
|
75
|
+
parameters: Record<string, string>;
|
|
76
|
+
};
|
|
77
|
+
groupAttributesByTrait(attributes: NftMetadataAttributesType[]): {
|
|
78
|
+
trait_type: string;
|
|
79
|
+
values: string[];
|
|
80
|
+
}[];
|
|
81
|
+
}
|
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CosmosDbQueryBuilder = exports.QueryOrderDirection = exports.QueryLogicalOperator = exports.QueryConditionOperator = void 0;
|
|
4
|
+
const enums_1 = require("../common/enums");
|
|
5
|
+
var QueryConditionOperator;
|
|
6
|
+
(function (QueryConditionOperator) {
|
|
7
|
+
QueryConditionOperator["EQUAL"] = "EQUAL";
|
|
8
|
+
QueryConditionOperator["NOT_EQUAL"] = "NOT_EQUAL";
|
|
9
|
+
QueryConditionOperator["GREATER_THAN"] = "GREATER_THAN";
|
|
10
|
+
QueryConditionOperator["LESS_THAN"] = "LESS_THAN";
|
|
11
|
+
QueryConditionOperator["GREATER_THAN_OR_EQUAL"] = "GREATER_THAN_OR_EQUAL";
|
|
12
|
+
QueryConditionOperator["LESS_THAN_OR_EQUAL"] = "LESS_THAN_OR_EQUAL";
|
|
13
|
+
QueryConditionOperator["IN"] = "IN";
|
|
14
|
+
QueryConditionOperator["NOT_IN"] = "NOT_IN";
|
|
15
|
+
})(QueryConditionOperator || (exports.QueryConditionOperator = QueryConditionOperator = {}));
|
|
16
|
+
var QueryLogicalOperator;
|
|
17
|
+
(function (QueryLogicalOperator) {
|
|
18
|
+
QueryLogicalOperator["AND"] = "AND";
|
|
19
|
+
QueryLogicalOperator["OR"] = "OR";
|
|
20
|
+
})(QueryLogicalOperator || (exports.QueryLogicalOperator = QueryLogicalOperator = {}));
|
|
21
|
+
var QueryOrderDirection;
|
|
22
|
+
(function (QueryOrderDirection) {
|
|
23
|
+
QueryOrderDirection["ASC"] = "asc";
|
|
24
|
+
QueryOrderDirection["DESC"] = "desc";
|
|
25
|
+
})(QueryOrderDirection || (exports.QueryOrderDirection = QueryOrderDirection = {}));
|
|
26
|
+
class CosmosDbQueryBuilder {
|
|
27
|
+
constructor() {
|
|
28
|
+
this.parameters = {};
|
|
29
|
+
this.isCountQuery = false;
|
|
30
|
+
this.query = {
|
|
31
|
+
conditions: [],
|
|
32
|
+
groupedConditions: [],
|
|
33
|
+
customConditions: [],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
where(field, value, operator, logicalOperator = QueryLogicalOperator.AND) {
|
|
37
|
+
this.query.conditions.push({ field, value, operator, logicalOperator });
|
|
38
|
+
return this;
|
|
39
|
+
}
|
|
40
|
+
whereCustom(condition, logicalOperator = QueryLogicalOperator.AND, parameters = {}) {
|
|
41
|
+
if (!this.query.customConditions) {
|
|
42
|
+
this.query.customConditions = [];
|
|
43
|
+
}
|
|
44
|
+
this.query.customConditions.push({
|
|
45
|
+
condition,
|
|
46
|
+
logicalOperator,
|
|
47
|
+
parameters,
|
|
48
|
+
});
|
|
49
|
+
return this;
|
|
50
|
+
}
|
|
51
|
+
whereRange(field, lower, upper, logicalOperator = QueryLogicalOperator.AND) {
|
|
52
|
+
field = field.replace('Range', '');
|
|
53
|
+
this.query.conditions.push({
|
|
54
|
+
field,
|
|
55
|
+
value: lower,
|
|
56
|
+
operator: QueryConditionOperator.GREATER_THAN_OR_EQUAL,
|
|
57
|
+
logicalOperator,
|
|
58
|
+
});
|
|
59
|
+
this.query.conditions.push({
|
|
60
|
+
field,
|
|
61
|
+
value: upper,
|
|
62
|
+
operator: QueryConditionOperator.LESS_THAN_OR_EQUAL,
|
|
63
|
+
logicalOperator,
|
|
64
|
+
});
|
|
65
|
+
return this;
|
|
66
|
+
}
|
|
67
|
+
whereGroup(conditions, logicalOperator = QueryLogicalOperator.AND) {
|
|
68
|
+
this.query.groupedConditions = this.query.groupedConditions || [];
|
|
69
|
+
this.query.groupedConditions.push({ conditions, logicalOperator });
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
orderBy(field, direction) {
|
|
73
|
+
this.query.orderBy = { field, direction };
|
|
74
|
+
return this;
|
|
75
|
+
}
|
|
76
|
+
setOffset(offset) {
|
|
77
|
+
this.query.skip = offset;
|
|
78
|
+
return this;
|
|
79
|
+
}
|
|
80
|
+
setLimit(limit) {
|
|
81
|
+
// if (limit > 100) {
|
|
82
|
+
// throw new Error('Limit cannot be greater than 100');
|
|
83
|
+
// }
|
|
84
|
+
// think about how to handle this to protect external calls
|
|
85
|
+
// at the same time allow internal calls to have higher limits
|
|
86
|
+
this.query.top = limit;
|
|
87
|
+
return this;
|
|
88
|
+
}
|
|
89
|
+
selectFields(fields) {
|
|
90
|
+
this.query.selectFields = fields;
|
|
91
|
+
return this;
|
|
92
|
+
}
|
|
93
|
+
count() {
|
|
94
|
+
this.isCountQuery = true;
|
|
95
|
+
return this;
|
|
96
|
+
}
|
|
97
|
+
buildSqlQuery(applyPagination = true) {
|
|
98
|
+
let sqlQuery = 'SELECT * FROM c';
|
|
99
|
+
let paramIndex = 0;
|
|
100
|
+
if (this.isCountQuery) {
|
|
101
|
+
sqlQuery = 'SELECT VALUE COUNT(1) FROM c';
|
|
102
|
+
}
|
|
103
|
+
else if (this.query.selectFields) {
|
|
104
|
+
const dynamicProjection = this.buildCustomProjection(this.query.selectFields);
|
|
105
|
+
sqlQuery = sqlQuery.replace('SELECT *', `SELECT VALUE ${dynamicProjection}`);
|
|
106
|
+
}
|
|
107
|
+
if (this.query.conditions.length > 0) {
|
|
108
|
+
sqlQuery += ' WHERE';
|
|
109
|
+
for (const condition of this.query.conditions) {
|
|
110
|
+
// 'from' is a reserved word in Cosmos DB, so we need to use bracket notation
|
|
111
|
+
if (condition.field === 'from') {
|
|
112
|
+
condition.field = `['from']`;
|
|
113
|
+
}
|
|
114
|
+
// we use IN operator for arrays and = for single values
|
|
115
|
+
if (condition.operator === QueryConditionOperator.IN) {
|
|
116
|
+
// If the value is an array with a single element, use the equal operator
|
|
117
|
+
if (Array.isArray(condition.value) && condition.value.length === 1) {
|
|
118
|
+
sqlQuery += ` c.${condition.field} = @p${paramIndex}`;
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
sqlQuery += ` ARRAY_CONTAINS(@p${paramIndex}, c.${condition.field})`;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
else if (condition.operator === QueryConditionOperator.NOT_IN) {
|
|
125
|
+
// If the value is an array with a single element, use the not equal operator
|
|
126
|
+
if (Array.isArray(condition.value) && condition.value.length === 1) {
|
|
127
|
+
sqlQuery += ` c.${condition.field} != @p${paramIndex}`;
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
sqlQuery += ` NOT ARRAY_CONTAINS(@p${paramIndex}, c.${condition.field})`;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
sqlQuery += ` c.${condition.field} ${this.getSqlOperator(condition.operator)} @p${paramIndex}`;
|
|
135
|
+
}
|
|
136
|
+
if (condition !== this.query.conditions[this.query.conditions.length - 1]) {
|
|
137
|
+
sqlQuery += ` ${condition.logicalOperator}`;
|
|
138
|
+
}
|
|
139
|
+
// If the value is an array with a single element, use the equal operator
|
|
140
|
+
if (Array.isArray(condition.value) && condition.value.length === 1) {
|
|
141
|
+
this.parameters[`@p${paramIndex}`] = condition.value[0];
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
this.parameters[`@p${paramIndex}`] = condition.value;
|
|
145
|
+
}
|
|
146
|
+
paramIndex++;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if (this.query.groupedConditions &&
|
|
150
|
+
this.query.groupedConditions.length > 0) {
|
|
151
|
+
let groupedConditionsSql = '';
|
|
152
|
+
for (const groupedCondition of this.query.groupedConditions) {
|
|
153
|
+
let groupSql = '';
|
|
154
|
+
for (const condition of groupedCondition.conditions) {
|
|
155
|
+
if (condition.operator === QueryConditionOperator.IN) {
|
|
156
|
+
groupSql += ` ARRAY_CONTAINS(@p${paramIndex}, c.${condition.field})`;
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
groupSql += ` c.${condition.field} ${this.getSqlOperator(condition.operator)} @p${paramIndex} `;
|
|
160
|
+
}
|
|
161
|
+
if (condition !==
|
|
162
|
+
groupedCondition.conditions[groupedCondition.conditions.length - 1]) {
|
|
163
|
+
groupSql += ` ${condition.logicalOperator}`;
|
|
164
|
+
}
|
|
165
|
+
this.parameters[`@p${paramIndex}`] = condition.value;
|
|
166
|
+
paramIndex++;
|
|
167
|
+
}
|
|
168
|
+
groupedConditionsSql += ` (${groupSql})`;
|
|
169
|
+
if (groupedCondition !==
|
|
170
|
+
this.query.groupedConditions[this.query.groupedConditions.length - 1]) {
|
|
171
|
+
groupedConditionsSql += ` ${groupedCondition.logicalOperator}`;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if (groupedConditionsSql !== '') {
|
|
175
|
+
sqlQuery += ` AND${groupedConditionsSql}`;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
if (this.query.customConditions) {
|
|
179
|
+
// If there are already conditions in the query, add an AND operator
|
|
180
|
+
if (this.query.conditions.length > 0 ||
|
|
181
|
+
(this.query.groupedConditions &&
|
|
182
|
+
this.query.groupedConditions.length > 0)) {
|
|
183
|
+
sqlQuery += ' AND';
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
sqlQuery += ' WHERE';
|
|
187
|
+
}
|
|
188
|
+
for (const customCondition of this.query.customConditions) {
|
|
189
|
+
sqlQuery += ` ${customCondition.condition}`;
|
|
190
|
+
// If this isn't the last custom condition, add the logical operator
|
|
191
|
+
if (customCondition !==
|
|
192
|
+
this.query.customConditions[this.query.customConditions.length - 1]) {
|
|
193
|
+
sqlQuery += ` ${customCondition.logicalOperator}`;
|
|
194
|
+
}
|
|
195
|
+
// Add the custom condition's parameters to this.parameters
|
|
196
|
+
if (customCondition.parameters) {
|
|
197
|
+
for (const [key, value] of Object.entries(customCondition.parameters)) {
|
|
198
|
+
this.parameters[key] = value;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
if (this.query.orderBy) {
|
|
204
|
+
sqlQuery += ` ORDER BY c.${this.query.orderBy.field} ${this.query.orderBy.direction}`;
|
|
205
|
+
}
|
|
206
|
+
// Default values
|
|
207
|
+
const defaultOffset = 0;
|
|
208
|
+
const defaultLimit = 25;
|
|
209
|
+
if (this.query.skip !== undefined || this.query.top !== undefined) {
|
|
210
|
+
const offset = this.query.skip !== undefined ? this.query.skip : defaultOffset;
|
|
211
|
+
const limit = this.query.top !== undefined ? this.query.top : defaultLimit;
|
|
212
|
+
if (applyPagination) {
|
|
213
|
+
sqlQuery += ` OFFSET ${offset} LIMIT ${limit}`;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
const parameters = Object.entries(this.parameters).map(([name, value]) => ({ name, value }));
|
|
217
|
+
sqlQuery = sqlQuery.replace(/\.\[/g, '[');
|
|
218
|
+
return { query: sqlQuery, parameters };
|
|
219
|
+
}
|
|
220
|
+
buildCustomProjection(selectClauses) {
|
|
221
|
+
const result = {};
|
|
222
|
+
for (const str of selectClauses) {
|
|
223
|
+
const parts = str.split('.');
|
|
224
|
+
let currentObject = result;
|
|
225
|
+
for (let i = 0; i < parts.length; i++) {
|
|
226
|
+
const part = parts[i];
|
|
227
|
+
if (i === parts.length - 1) {
|
|
228
|
+
// If it's the last part, it's a property with the modified value
|
|
229
|
+
currentObject[part] = 'c.' + str;
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
// If it's not the last part, create an object if it doesn't exist
|
|
233
|
+
if (!currentObject[part] || typeof currentObject[part] !== 'object') {
|
|
234
|
+
currentObject[part] = {};
|
|
235
|
+
}
|
|
236
|
+
currentObject = currentObject[part];
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return JSON.stringify(result).replace(/"/g, '');
|
|
241
|
+
}
|
|
242
|
+
getSqlOperator(operator) {
|
|
243
|
+
switch (operator) {
|
|
244
|
+
case QueryConditionOperator.EQUAL:
|
|
245
|
+
return '=';
|
|
246
|
+
case QueryConditionOperator.NOT_EQUAL:
|
|
247
|
+
return '!=';
|
|
248
|
+
case QueryConditionOperator.GREATER_THAN:
|
|
249
|
+
return '>';
|
|
250
|
+
case QueryConditionOperator.LESS_THAN:
|
|
251
|
+
return '<';
|
|
252
|
+
case QueryConditionOperator.GREATER_THAN_OR_EQUAL:
|
|
253
|
+
return '>=';
|
|
254
|
+
case QueryConditionOperator.LESS_THAN_OR_EQUAL:
|
|
255
|
+
return '<=';
|
|
256
|
+
case QueryConditionOperator.IN:
|
|
257
|
+
return 'IN';
|
|
258
|
+
case QueryConditionOperator.NOT_IN:
|
|
259
|
+
return 'NOT IN';
|
|
260
|
+
default:
|
|
261
|
+
throw new Error(`Unsupported operator: ${operator}`);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
fromFilter(filter) {
|
|
265
|
+
const defaultMin = 0;
|
|
266
|
+
const defaultMax = Number.MAX_SAFE_INTEGER;
|
|
267
|
+
const handleFilter = (key, value) => {
|
|
268
|
+
if (Array.isArray(value) && value.length > 0) {
|
|
269
|
+
// check if the array is a RangeFilter
|
|
270
|
+
// check with endsWith to support nested properties
|
|
271
|
+
if (key.endsWith('range')) {
|
|
272
|
+
for (const rangeFilter of value) {
|
|
273
|
+
const min = rangeFilter.min !== undefined ? rangeFilter.min : defaultMin;
|
|
274
|
+
const max = rangeFilter.max !== undefined ? rangeFilter.max : defaultMax;
|
|
275
|
+
// check if the range filter is nested
|
|
276
|
+
// if it is, replace the field with the nested field
|
|
277
|
+
if (key.endsWith('.range')) {
|
|
278
|
+
rangeFilter.field = key.replace('.range', `.${rangeFilter.field}`);
|
|
279
|
+
}
|
|
280
|
+
this.whereRange(rangeFilter.field, min, max);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
else if (key.endsWith('attributes')) {
|
|
284
|
+
let traitLogicalOperator = QueryLogicalOperator.AND;
|
|
285
|
+
if (key === 'attributes') {
|
|
286
|
+
traitLogicalOperator = QueryLogicalOperator.OR;
|
|
287
|
+
}
|
|
288
|
+
const { filterString, parameters } = this.getAttributesQueryAndParams(key, value, traitLogicalOperator);
|
|
289
|
+
this.whereCustom(filterString, QueryLogicalOperator.AND, parameters);
|
|
290
|
+
}
|
|
291
|
+
else if (key === 'activityAddress') {
|
|
292
|
+
// // used for nft activity to filter by from or to
|
|
293
|
+
if (value.length > 1) {
|
|
294
|
+
this.whereCustom(`(ARRAY_CONTAINS(@activityAddress, c.to) OR ARRAY_CONTAINS(@activityAddress, c['from']))`, QueryLogicalOperator.AND, { '@activityAddress': value });
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
this.whereCustom(`(c.to = @activityAddress OR c['from'] = @activityAddress)`, QueryLogicalOperator.AND, { '@activityAddress': value[0] });
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
else if (key === 'mintToken') {
|
|
301
|
+
// used for mint profile to filter specific mint tokens
|
|
302
|
+
const { filterString, parameters } = this.getMintProfilePricesQueryAndParams(value);
|
|
303
|
+
this.whereCustom(filterString, QueryLogicalOperator.AND, parameters);
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
this.where(key, value, QueryConditionOperator.IN);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
else if (typeof value === 'boolean' ||
|
|
310
|
+
typeof value === 'string' ||
|
|
311
|
+
typeof value === 'number') {
|
|
312
|
+
// handle special filter cases
|
|
313
|
+
switch (key) {
|
|
314
|
+
// filter for collection offers docs
|
|
315
|
+
case 'withAttributes':
|
|
316
|
+
if (value === true) {
|
|
317
|
+
this.whereCustom('ARRAY_LENGTH(c.attributes) > 0');
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
this.whereCustom('ARRAY_LENGTH(c.attributes) = 0');
|
|
321
|
+
}
|
|
322
|
+
break;
|
|
323
|
+
// filter for nft docs
|
|
324
|
+
case 'activeAuction':
|
|
325
|
+
if (value === true) {
|
|
326
|
+
this.whereCustom(`(c.saleInfo.deadline = 0 OR c.saleInfo.deadline > ${Math.floor(Date.now() / 1000)})`);
|
|
327
|
+
}
|
|
328
|
+
else {
|
|
329
|
+
this.whereCustom(`(c.saleInfo.deadline != 0 AND c.saleInfo.deadline <= ${Math.floor(Date.now() / 1000)})`);
|
|
330
|
+
}
|
|
331
|
+
break;
|
|
332
|
+
// special case to filter out SFTs that are on sale(as duplicates of the original SFTs)
|
|
333
|
+
case 'sftOriginalDoc':
|
|
334
|
+
if (value === true) {
|
|
335
|
+
this.whereCustom(`(c.type = '${enums_1.EsdtTokenType.NonFungibleESDT}' OR (c.cp_staked = false AND c.onSale = false AND (c.type = '${enums_1.EsdtTokenType.SemiFungibleESDT}' OR c.type = '${enums_1.EsdtTokenType.MetaESDT}')))`);
|
|
336
|
+
}
|
|
337
|
+
break;
|
|
338
|
+
// filter for mint profile docs
|
|
339
|
+
case 'activeMint':
|
|
340
|
+
if (value === true) {
|
|
341
|
+
this.whereCustom(`(c.endTime = 0 OR c.endTime > ${Math.floor(Date.now() / 1000)})`);
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
this.whereCustom(`(c.endTime != 0 AND c.endTime <= ${Math.floor(Date.now() / 1000)})`);
|
|
345
|
+
}
|
|
346
|
+
break;
|
|
347
|
+
// special case to filter out markets that have debt ceiling reached
|
|
348
|
+
case 'isDebtCeilingReached':
|
|
349
|
+
if (value === true) {
|
|
350
|
+
this.whereCustom(`(c.debtCeilingShort >= c.maxDebtUsdShort)`);
|
|
351
|
+
}
|
|
352
|
+
else if (value === false) {
|
|
353
|
+
this.whereCustom(`(c.debtCeilingShort < c.maxDebtUsdShort)`);
|
|
354
|
+
}
|
|
355
|
+
break;
|
|
356
|
+
default:
|
|
357
|
+
this.where(key, value, QueryConditionOperator.EQUAL);
|
|
358
|
+
break;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
else if (typeof value === 'object' && value !== null) {
|
|
362
|
+
// Handle nested properties
|
|
363
|
+
for (const [nestedKey, nestedValue] of Object.entries(value)) {
|
|
364
|
+
handleFilter(`${key}.${nestedKey}`, nestedValue);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
for (const [key, value] of Object.entries(filter.filters)) {
|
|
369
|
+
handleFilter(key, value);
|
|
370
|
+
}
|
|
371
|
+
if (filter.includeCount === true) {
|
|
372
|
+
this.count();
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
if (filter.select && filter.select.length > 0) {
|
|
376
|
+
this.selectFields(filter.select);
|
|
377
|
+
}
|
|
378
|
+
if (filter.orderBy && filter.orderBy.length > 0) {
|
|
379
|
+
for (const order of filter.orderBy) {
|
|
380
|
+
const [field, direction] = order.split(' ');
|
|
381
|
+
this.orderBy(field, direction);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
this.setOffset(filter.skip ?? 0);
|
|
385
|
+
this.setLimit(filter.top ?? 25);
|
|
386
|
+
}
|
|
387
|
+
return this;
|
|
388
|
+
}
|
|
389
|
+
getMintProfilePricesQueryAndParams(mintToken) {
|
|
390
|
+
const pricesFilter = [];
|
|
391
|
+
const parameters = {};
|
|
392
|
+
mintToken.forEach((token, index) => {
|
|
393
|
+
pricesFilter.push(`ARRAY_CONTAINS(c.prices, ({'tokenIdentifier': @tokenIdentifier${index}}), true)`);
|
|
394
|
+
parameters[`@tokenIdentifier${index}`] = token;
|
|
395
|
+
});
|
|
396
|
+
const filterString = `(${pricesFilter.join(' OR ')})`;
|
|
397
|
+
return { filterString, parameters };
|
|
398
|
+
}
|
|
399
|
+
getAttributesQueryAndParams(key, attributes, traitLogicalOperator = QueryLogicalOperator.AND) {
|
|
400
|
+
const groupedByTrait = this.groupAttributesByTrait(attributes);
|
|
401
|
+
const attributesFilters = [];
|
|
402
|
+
const parameters = {};
|
|
403
|
+
groupedByTrait.forEach((pair, traitIndex) => {
|
|
404
|
+
const { trait_type, values } = pair;
|
|
405
|
+
const valuesFilter = [];
|
|
406
|
+
values.forEach((value, valueIndex) => {
|
|
407
|
+
valuesFilter.push(`ARRAY_CONTAINS(c.${key}, ({'trait_type': @trait${traitIndex}, 'value': @trait${traitIndex}value${valueIndex}}), true)`);
|
|
408
|
+
parameters[`@trait${traitIndex}`] = trait_type;
|
|
409
|
+
parameters[`@trait${traitIndex}value${valueIndex}`] = value;
|
|
410
|
+
});
|
|
411
|
+
attributesFilters.push(`(${valuesFilter.join(' OR ')})`);
|
|
412
|
+
});
|
|
413
|
+
const filterString = `(${attributesFilters.join(` ${traitLogicalOperator} `)})`;
|
|
414
|
+
return { filterString, parameters };
|
|
415
|
+
}
|
|
416
|
+
groupAttributesByTrait(attributes) {
|
|
417
|
+
return attributes.reduce((accumulator, current) => {
|
|
418
|
+
// Find the index of the object with the same trait_type
|
|
419
|
+
const index = accumulator.findIndex((item) => item.trait_type === current.trait_type);
|
|
420
|
+
if (index >= 0) {
|
|
421
|
+
// If found, append the current value to the values array of the found object
|
|
422
|
+
accumulator[index].values.push(current.value);
|
|
423
|
+
}
|
|
424
|
+
else {
|
|
425
|
+
// If not found, create a new object and add it to the accumulator
|
|
426
|
+
accumulator.push({
|
|
427
|
+
trait_type: current.trait_type,
|
|
428
|
+
values: [current.value],
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
return accumulator;
|
|
432
|
+
}, []);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
exports.CosmosDbQueryBuilder = CosmosDbQueryBuilder;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum NftActivityEventSource {
|
|
2
|
+
MVX_BUILT_IN = "mvxBuiltIn",
|
|
3
|
+
XOXNO_MARKETPLACE = "xoxno",
|
|
4
|
+
FRAMEIT_MARKETPLACE = "frameit",
|
|
5
|
+
DEADRARE_MARKETPLACE = "deadrare",
|
|
6
|
+
KROGAN_MARKETPLACE = "krogan",
|
|
7
|
+
XOXNO_LAUNCHPAD = "xoxnoLaunchpad",
|
|
8
|
+
XOXNO_STAKING = "xoxnoStaking",
|
|
9
|
+
XOXNO_P2P = "xoxnoP2P",
|
|
10
|
+
XOXNO_LS = "xoxnoLs",
|
|
11
|
+
XOXNO_EGLD_LS = "xoxnoEgldLs",
|
|
12
|
+
XOXNO_LENDING = "xoxnoLending",
|
|
13
|
+
BOBER_BATTLE = "boberBattle",
|
|
14
|
+
BOBER_WHEEL = "boberWheel"
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NftActivityEventSource = void 0;
|
|
4
|
+
var NftActivityEventSource;
|
|
5
|
+
(function (NftActivityEventSource) {
|
|
6
|
+
NftActivityEventSource["MVX_BUILT_IN"] = "mvxBuiltIn";
|
|
7
|
+
NftActivityEventSource["XOXNO_MARKETPLACE"] = "xoxno";
|
|
8
|
+
NftActivityEventSource["FRAMEIT_MARKETPLACE"] = "frameit";
|
|
9
|
+
NftActivityEventSource["DEADRARE_MARKETPLACE"] = "deadrare";
|
|
10
|
+
NftActivityEventSource["KROGAN_MARKETPLACE"] = "krogan";
|
|
11
|
+
NftActivityEventSource["XOXNO_LAUNCHPAD"] = "xoxnoLaunchpad";
|
|
12
|
+
NftActivityEventSource["XOXNO_STAKING"] = "xoxnoStaking";
|
|
13
|
+
NftActivityEventSource["XOXNO_P2P"] = "xoxnoP2P";
|
|
14
|
+
NftActivityEventSource["XOXNO_LS"] = "xoxnoLs";
|
|
15
|
+
NftActivityEventSource["XOXNO_EGLD_LS"] = "xoxnoEgldLs";
|
|
16
|
+
NftActivityEventSource["XOXNO_LENDING"] = "xoxnoLending";
|
|
17
|
+
NftActivityEventSource["BOBER_BATTLE"] = "boberBattle";
|
|
18
|
+
NftActivityEventSource["BOBER_WHEEL"] = "boberWheel";
|
|
19
|
+
})(NftActivityEventSource || (exports.NftActivityEventSource = NftActivityEventSource = {}));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { NftDoc } from '../token/nft-details.doc';
|
|
2
|
+
export interface NftActivityData {
|
|
3
|
+
collection: string;
|
|
4
|
+
identifier?: string;
|
|
5
|
+
price: number;
|
|
6
|
+
paymentToken: string;
|
|
7
|
+
quantity: number;
|
|
8
|
+
scId: number;
|
|
9
|
+
usdValue: number;
|
|
10
|
+
egldValue: number;
|
|
11
|
+
auctionType?: string;
|
|
12
|
+
deadline?: number;
|
|
13
|
+
originalPayment?: {
|
|
14
|
+
paymentToken: string;
|
|
15
|
+
price: number;
|
|
16
|
+
};
|
|
17
|
+
nftInfo?: Partial<NftDoc>;
|
|
18
|
+
}
|
|
19
|
+
export interface NftMvxBuiltIn {
|
|
20
|
+
collection: string;
|
|
21
|
+
identifier: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare enum NftActivityType {
|
|
2
|
+
NFT_CREATE = "nftCreate",
|
|
3
|
+
NFT_BURN = "nftBurn",
|
|
4
|
+
NFT_UPDATE = "nftUpdate",
|
|
5
|
+
NFT_TRANSFER = "nftTransfer",
|
|
6
|
+
LISTING_CREATE = "listingCreate",
|
|
7
|
+
LISTING_WITHDRAW = "listingWithdraw",
|
|
8
|
+
LISTING_UPDATE = "listingUpdate",
|
|
9
|
+
AUCTION_BID = "auctionBid",
|
|
10
|
+
AUCTION_OUT_BID = "auctionOutBid",
|
|
11
|
+
OFFER_CREATE = "offerCreate",
|
|
12
|
+
OFFER_WITHDRAW = "offerWithdraw",
|
|
13
|
+
OFFER_REJECT = "offerReject",
|
|
14
|
+
GLOBAL_OFFER_CREATE = "globalOfferCreate",
|
|
15
|
+
GLOBAL_OFFER_WITHDRAW = "globalOfferWithdraw",
|
|
16
|
+
TRADE = "trade",
|
|
17
|
+
BULK_TRADE = "bulkTrade",
|
|
18
|
+
AUCTION_TRADE = "auctionTrade",
|
|
19
|
+
OTHER_TRADE = "otherTrade",// fiat or binance buy
|
|
20
|
+
OFFER_TRADE = "offerTrade",
|
|
21
|
+
GLOBAL_OFFER_TRADE = "globalOfferTrade",
|
|
22
|
+
STAKE = "stake",
|
|
23
|
+
UN_STAKE = "unStake",
|
|
24
|
+
CREATE_GAME = "createGame",
|
|
25
|
+
JOIN_GAME = "joinGame",
|
|
26
|
+
CANCEL_GAME = "cancelGame",
|
|
27
|
+
END_GAME = "endGame"
|
|
28
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NftActivityType = void 0;
|
|
4
|
+
var NftActivityType;
|
|
5
|
+
(function (NftActivityType) {
|
|
6
|
+
// MVX Built-in
|
|
7
|
+
NftActivityType["NFT_CREATE"] = "nftCreate";
|
|
8
|
+
NftActivityType["NFT_BURN"] = "nftBurn";
|
|
9
|
+
NftActivityType["NFT_UPDATE"] = "nftUpdate";
|
|
10
|
+
NftActivityType["NFT_TRANSFER"] = "nftTransfer";
|
|
11
|
+
// Marketplace
|
|
12
|
+
NftActivityType["LISTING_CREATE"] = "listingCreate";
|
|
13
|
+
NftActivityType["LISTING_WITHDRAW"] = "listingWithdraw";
|
|
14
|
+
NftActivityType["LISTING_UPDATE"] = "listingUpdate";
|
|
15
|
+
NftActivityType["AUCTION_BID"] = "auctionBid";
|
|
16
|
+
NftActivityType["AUCTION_OUT_BID"] = "auctionOutBid";
|
|
17
|
+
NftActivityType["OFFER_CREATE"] = "offerCreate";
|
|
18
|
+
NftActivityType["OFFER_WITHDRAW"] = "offerWithdraw";
|
|
19
|
+
NftActivityType["OFFER_REJECT"] = "offerReject";
|
|
20
|
+
NftActivityType["GLOBAL_OFFER_CREATE"] = "globalOfferCreate";
|
|
21
|
+
NftActivityType["GLOBAL_OFFER_WITHDRAW"] = "globalOfferWithdraw";
|
|
22
|
+
NftActivityType["TRADE"] = "trade";
|
|
23
|
+
NftActivityType["BULK_TRADE"] = "bulkTrade";
|
|
24
|
+
NftActivityType["AUCTION_TRADE"] = "auctionTrade";
|
|
25
|
+
NftActivityType["OTHER_TRADE"] = "otherTrade";
|
|
26
|
+
NftActivityType["OFFER_TRADE"] = "offerTrade";
|
|
27
|
+
NftActivityType["GLOBAL_OFFER_TRADE"] = "globalOfferTrade";
|
|
28
|
+
// Staking
|
|
29
|
+
NftActivityType["STAKE"] = "stake";
|
|
30
|
+
NftActivityType["UN_STAKE"] = "unStake";
|
|
31
|
+
// Coin Flip Games
|
|
32
|
+
NftActivityType["CREATE_GAME"] = "createGame";
|
|
33
|
+
NftActivityType["JOIN_GAME"] = "joinGame";
|
|
34
|
+
NftActivityType["CANCEL_GAME"] = "cancelGame";
|
|
35
|
+
NftActivityType["END_GAME"] = "endGame";
|
|
36
|
+
})(NftActivityType || (exports.NftActivityType = NftActivityType = {}));
|