@bareena/eagle-eye v0.32.0
Eagle Eye SDK
Installation
Eagle Eye SDK can be installed by running:
npm install @bareena/eagle-eye
Set up environments
You can setup your environment by provisioning following environment variables:
export EES_AUTH_CLIENT_ID="your_client_id"
export EES_AUTH_CLIENT_SECRET="your_client_secret"
export EES_API_PREFIX="/2.0"
export EES_POS_API_HOST="pos.uk.eagleeye.com"
export EES_WALLET_API_HOST="wallet.uk.eagleeye.com"
export EES_RESOURCES_API_HOST="resources.uk.eagleeye.com"
Using CLI tool to make calls
ee pos open-wallet @test/open-wallet/1.json
Making calls to Eagle Eye with SDK
The following example shows how you can make calls with Eagle Eye SDK.
$ node
> const { EagleEyePos, EagleEyeWallet } = require('@bareena/eagle-eye');
> const wallet = new EagleEyeWallet('wallet.uk.eagleeye.com', '/2.0', 'my_client_id', 'my_secret');
> const pos = new EagleEyePos('pos.uk.eagleeye.com', '/2.0', 'my_client_id', 'my_secret');
> pos.openWallet({ identity: { identityValue: '393274732' } })
... .then(data => console.log(data));
{
wallet: {
walletId: '42313415',
friendlyName: 'Test Wallet',
status: 'ACTIVE',
type: 'MEMBER',
state: 'EARNBURN',
meta: { sample: 'metadata', key: 'value' },
dateCreated: '2021-03-18T22:26:38+00:00',
lastUpdated: '2021-03-18T22:26:38+00:00',
relationships: null
},
identity: {
...
},
accounts: [],
additionalEntities: null,
walletTransactions: [],
accountTransactions: [],
analyseBasketResults: {
basket: {
type: 'ENRICHED',
summary: [Object],
contents: [Array],
analysedDateTime: '2021-04-01T23:22:37+01:00'
}
},
basketAdjudicationResult: null,
spendAdjudicationResults: {
pointsValue: 0,
pointsRemainder: 0,
monetaryValue: 0,
operations: []
},
transactionCapabilities: { loyalty: { spend: true, earn: true } }
}
> wallet.getWalletAccountsByIdentityValue({
... query: { 'identity-value': '42313415' }
... }).then(data => console.log(data));
Models
Models in the source code are defined based on swagger/openapi input. The general guidelines are:
- Models from
definitions[*]
are defined as named models - Models from
components.requestBodies[*]
are defined as named models - Models from
components.responses[*]
are defined as named models - Inline models defined embedded inside other named models can be optionally defined as named models
- Inline composition models are defined as named models
- When choosing name for inline models, the attribute name to which it belongs should be used as the model name
Named models in POS openapi specification
Model Name in spec | line number | |
---|---|---|
accountBalancesEntity | AccountBalancesEntity | 5645 |
accountEnrichmentEntity | AccountEnrichmentEntity | 4959 |
accountEntity | AccountEntity | 4472 |
accountOverridesEntity | AccountOverridesEntity | 4576 |
accountTransactionBalancesHistoryEntity | AccountTransactionBalancesHistoryEntity | 5707 |
accountTransactionEntity | AccountTransactionEntity | 5175 |
activateAccountPayload | ActivateAccountPayload | 8395 |
activateAccountResponse | ActivateAccountResponse | 2292 |
activateAccountResponsePayload | ActivateAccountResponsePayload | 8980 |
adjustmentResultsEntity | AdjustmentResultsEntity | 5502 |
adjustmentRulesEntity | AdjustmentRulesEntity | 5485 |
amendSettlePayload | AmendSettlePayload | 7689 |
basketEntity | BasketEntity | 5787 |
bounceBackEntity | BounceBackEntity | 6112 |
bounceBackResultsEntity | BounceBackResultsEntity | 6205 |
campaignAccountEnrichment | CampaignAccountEnrichment | 4743 |
couponAccountOverridesEntity | CouponAccountOverridesEntity | 4598 |
createAccountResponse | CreateAccountResponse | 2990 |
createAccountResponsePayload | CreateAccountResponsePayload | 9088 |
createAccounts207Response | CreateAccounts207Response | 3064 |
createAccounts207ResponsePayload | CreateAccounts207ResponsePayload | 9098 |
createAccountsPayload | CreateAccountsPayload | 8036 |
createAccountTransactionsPayload | CreateAccountTransactionsPayload | 8122 |
createAccountTransactionsResponse | CreateAccountTransactionsResponse | 3219 |
createAccountTransactionsResponsePayload | CreateAccountTransactionsResponsePayload | 9109 |
creditAccountPayload | CreditAccountPayload | 8590 |
creditAccountResponse | CreditAccountResponse | 2731 |
creditAccountResponsePayload | CreditAccountResponsePayload | 9047 |
customBasketEntity | CustomBasketEntity | 6740 |
datesEntity | DatesEntity | 5636 |
debitAccountPayload | DebitAccountPayload | 8539 |
debitAccountResponse | DebitAccountResponse | 2667 |
debitAccountResponsePayload | DebitAccountResponsePayload | 9037 |
defaultErrorEntity | DefaultErrorEntity | 6750 |
defaultErrorResponse | DefaultErrorResponse | 10796 |
earnAccountPayload | EarnAccountPayload | 8643 |
earnAccountResponse | EarnAccountResponse | 2794 |
earnAccountResponsePayload | EarnAccountResponsePayload | 9057 |
earnTierEntity | EarnTierEntity | 4242 |
encrichedExamineEntity | EnrichedExamineEntity | 5136 |
enrichedBasketEntity | EnrichedBasketEntity | 6422 |
enrichedPaymentEntity | EnrichedPaymentEntity | 6005 |
error400Response | Error400Response | 10629 |
error401Response | Error401Response | 10647 |
error403Response | Error403Response | 10666 |
error404Response | Error404Response | 10683 |
error409Response | Error409Response | 10699 |
error415Response | Error415Response | 10716 |
error429Response | Error429Response | 10732 |
error500Response | Error500Response | 10748 |
error503Response | Error503Response | 10764 |
error504Response | Error504Response | 10780 |
examineEntity | ExamineEntity | 6038 |
exclusionWindowEntity | ExclusionWindowEntity | 5009 |
loadAccountPayload | LoadAccountPayload | 8438 |
loadAccountResponse | LoadAccountResponse | 2353 |
loadAccountResponsePayload | LoadAccountResponsePayload | 8990 |
locationEntity | LocationEntity | 5769 |
lockAccountPayload | LockAccountPayload | 7973 |
lockAccountResponse | LockAccountResponse | 2924 |
lockAccountResponsePayload | LockAccountResponsePayload | 9078 |
metaEntity | MetaEntity | 5476 |
multiStatus207Response | MultiStatus207Response | 10578 |
openWalletEntity | OpenWalletEntity | 3560 |
openWalletPayload | OpenWalletPayload | 6936 |
openWalletResponse | OpenWalletResponse | 1481 |
openWalletResponsePayload | OpenWalletResponsePayload | 9475 |
planAccountOverridesEntity | PlanAccountOverridesEntity | 4593 |
pointAccountEnrichment | PointAccountEnrichment | 4907 |
pointsEntity | PointsEntity | 6059 |
programmeAccountEnrichment | ProgrammeAccountEnrichment | 4855 |
programmeAccountOverridesEntity | ProgrammeAccountOverridesEntity | 4583 |
redeemAccountPayload | RedeemAccountPayload | 8220 |
redeemAccountResponse | RedeemAccountResponse | 2413 |
redeemAccountResponsePayload | RedeemAccountResponsePayload | 9000 |
refundAccountPayload | RefundAccountPayload | 8349 |
refundAccountResponse | RefundAccountResponse | 2543 |
refundAccountResponsePayload | RefundAccountResponsePayload | 9027 |
refundPayload | RefundPayload | 7820 |
refundResponse | RefundResponse | 2138 |
refundResponsePayload | RefundResponsePayload | 9465 |
schemeAccountOverridesEntity | SchemeAccountOverridesEntity | 4588 |
settlePayload | SettlePayload | 7356 |
settleResponsePayload | SettleResponsePayload | 9139 |
spendAccountPayload | SpendAccountPayload | 8693 |
spendAccountResponse | SpendAccountResponse | 3300 |
spendAccountResponsePayload | SpendAccountResponsePayload | 9119 |
spendAdjudicationResultsEntity | SpendAdjudicationResultsEntity | 3454 |
spendCalculatePayload | SpendCalculatePayload | 7882 |
spendCalculateResponse | SpendCalculateResponse | 3442 |
spendCalculateResponsePayload | SpendCalculateResponsePayload | 10548 |
spendOperationsEntity | SpendOperationsEntity | 3478 |
spendPayload | SpendPayload | 7946 |
spendResponsePayload | SpendResponsePayload | 10558 |
spendTierEntity | SpendTierEntity | 4187 |
spendVoidPayload | SpendVoidPayload | 8013 |
spendVoidResponsePayload | SpendVoidResponsePayload | 10568 |
stampAccountEnrichment | StampAccountEnrichment | 4884 |
stampAccountPayload | StampAccountPayload | 8743 |
stampAccountResponse | StampAccountResponse | 2864 |
stampAccountResponsePayload | StampAccountResponsePayload | 9068 |
standardBasketEntity | StandardBasketEntity | 6255 |
standardPaymentEntity | StandardPaymentEntity | 5978 |
tenderResultsEntity | TenderResultsEntity | 5573 |
tokenAccountEntity | TokenAccountEntity | 5027 |
transactionCapabilitiesEntity | TransactionCapabilitiesEntity | 3541 |
unlockAccountPayload | UnlockAccountPayload | 8178 |
unlockAccountResponse | UnlockAccountResponse | 3376 |
unlockAccountResponsePayload | UnlockAccountResponsePayload | 9129 |
unlockWalletPayload | UnlockWalletPayload | 7332 |
unredeemAccountPayload | UnredeemAccountPayload | 8263 |
unredeemAccountResponse | UnredeemAccountResponse | 2479 |
unredeemAccountResponsePayload | UnredeemAccountResponsePayload | 9010 |
verifyAccountPayload | [VerifyAccountPayload | 8489 |
verifyAccountResponse | [VerifyAccountResponse | 2221 |
verifyAccountResponsePayload | VerifyAccountResponsePayload | 8970 |
voidAccountPayload | VoidAccountPayload | 8307 |
voidAccountResponse | VoidAccountResponse | 2605 |
voidAccountResponsePayload | VoidAccountResponsePayload | 9020 |
walletAccountEntity | WalletAccountEntity | 4657 |
walletAndAccountTransactionResponse | WalletAndAccountTransactionResponse | 1993 |
walletConsumerEntity | WalletConsumerEntity | 4403 |
walletEntity | WalletEntity | 4272 |
walletIdentityEntity | WalletIdentityEntity | 4331 |
walletRelationshipsEntity | WalletRelationshipsEntity | 5436 |
walletTransactionBasketEntity | WalletTransactionBasketEntity | 5747 |
walletTransactionEntity | WalletTransactionEntity | 5277 |
walletTransactionOverrideEntity | WalletTransactionOverrideEntity | 5755 |
windowEntity | WindowEntity | 4966 |
Named models in Wallet swagger specification
Name used in spec | Model Name | Line number |
---|---|---|
accountBalancesCreateEntity | AccountBalancesCreateEntity | 18163 |
accountBalancesEntity | AccountBalancesEntity | 18046 |
accountBalancesTransactionPayload | AccountBalancesTransactionPayload | 18556 |
accountCreditTransactionPayload | AccountCreditTransactionPayload | 18276 |
accountDebitTransactionPayload | AccountDebitTransactionPayload | 18399 |
accountEarnTransactionPayload | AccountEarnTransactionPayload | 18313 |
accountLoadTransactionPayload | AccountLoadTransactionPayload | 18448 |
accountRedemptionStatistics | AccountRedemptionStatistics | 19130 |
accountSpendTransactionPayload | AccountSpendTransactionPayload | 18432 |
accountTransactionBalancesHistoryEntity | AccountTransactionBalancesHistoryEntity | 18095 |
accountVerifyTransactionPayload | AccountVerifyTransactionPayload | 18377 |
amendRewardBankWalletLinkPayload | AmendRewardBankWalletLinkPayload | 17106 |
campaignMaxRedemptionsPerPeriodRule | CampaignMaxRedemptionsPerPeriodRule | 19111 |
createRewardBankWalletLinkPayload | CreateRewardBankWalletLinkPayload | 17153 |
datesEntity | DatesEntity | 17403 |
defaultErrorEntity | DefaultErrorEntity | 18842 |
donatePayload | DonatePayload | 18683 |
exchangePayload | ExchangePayload | 18595 |
goodwillPayload | GoodwillPayload | 16865 |
include | Include | 19077 |
includedItem | IncludedItem | 19090 |
locationEntity | LocationEntity | 17860 |
metaEntity | MetaEntity | 17874 |
multiStatus207Entity | MultiStatus207Entity | 19033 |
periodStatistic | PeriodStatistic | 19138 |
pointsrewardBankWalletLinkEntity | PointsRewardBankWalletLinkEntity | 17200 |
recommendationEntity | RecommendationEntity | 18775 |
statePatchPayload | StatePatchPayload | 17094 |
tokenEntity | TokenEntity | 17998 |
walletAccountCreationPayload | WalletAccountCreationPayload | 18130 |
walletAccountEntity | WalletAccountEntity | 17924 |
walletAccountPatchPayload | WalletAccountPatchPayload | 18209 |
walletAccountRefreshPayload | WalletAccountRefreshPayload | 18580 |
walletAccountRelationEntity | WalletAccountRelationEntity | 17909 |
walletAccountTransactionEntity | WalletAccountTransactionEntity | 18219 |
walletConsumerCreatePayload | WalletConsumerCreatePayload | 16903 |
walletConsumerEntity | WalletConsumerEntity | 17271 |
walletConsumerOperationPatchPayload | WalletConsumerOperationPatchPayload | 16422 |
walletConsumerPatchPayload | WalletConsumerPatchPayload | 16882 |
walletCouponAccountCreationPayload | WalletCouponAccountCreationPayload | 18153 |
walletCouponAccountEntity | WalletCouponAccountEntity | 17989 |
walletCouponAccountMetaEntity | WalletCouponAccountMetaEntity | 17886 |
walletCreatePayload | WalletCreatePayload | 16931 |
walletEntity | WalletEntity | 17510 |
walletIdentitiesEntity | WalletIdentitiesEntity | 17362 |
walletIdentityCreatePayload | WalletIdentityCreatePayload | 17036 |
walletIdentityEntity | WalletIdentityEntity | 17415 |
walletIdentityMovePatchPayload | WalletIdentityMovePatchPayload | 17026 |
walletIdentityPatchPayload | WalletIdentityPatchPayload | 17071 |
walletInviteCreatePayload | WalletInviteCreatePayload | 16976 |
walletInviteEntity | WalletInviteEntity | 17461 |
walletInvitePatchPayload | WalletInvitePatchPayload | 17004 |
walletInvitesEntity | WalletInvitesEntity | 17317 |
walletPatchPayload | WalletPatchPayload | 16961 |
walletRelationshipsEntity | WalletRelationshipsEntity | 17834 |
walletServicesCreatePayload | WalletServicesCreatePayload | 18495 |
walletServicesEntity | WalletServicesEntity | 18544 |
walletTransactionAccountsEntity | WalletTransactionAccountsEntity | 17801 |
walletTransactionBaskeContentstEntity | WalletTransactionBasketContentsEntity | 17794 |
walletTransactionBaskeContentstItemEntity | WalletTransactionBasketContentsItemEntity | 17815 |
walletTransactionBasketEntity | WalletTransactionBasketEntity | 17779 |
walletTransactionCreationPayload | WalletTransactionCreationPayload | 17562 |
walletTransactionEntity | WalletTransactionEntity | 17652 |
walletTransactionExpandedEntity | WalletTransactionExpandedEntity | 17719 |
walletTransactionPatchPayload | WalletTransactionPatchPayload | 17634 |
walletTransactionServicesAccountTransactionEntity | WalletTransactionServicesAccountTransactionEntity | 16843 |
walletTransactionServicesCancelPayload | WalletTransactionServicesCancelPayload | 17626 |
walletTransactionServicesCreationPayload | WalletTransactionServicesCreationPayload | 16445 |
walletTransactionServicesCreditPayload | WalletTransactionServicesCreditPayload | 16484 |
walletTransactionServicesDebitPayload | WalletTransactionServicesDebitPayload | 16768 |
walletTransactionServicesGoodwillPayload | WalletTransactionServicesGoodwillPayload | 16701 |
walletTransactionServicesRedeemCreditPayload | WalletTransactionServicesRedeemCreditPayload | 16549 |
walletTransactionServicesReleasePayload | WalletTransactionServicesReleasePayload | 17618 |
walletTransactionServicesSettlePayload | WalletTransactionServicesSettlePayload | 17610 |
walletTransactionServicesUnredeemPayload | WalletTransactionServicesUnredeemPayload | 16646 |
walletTransactionServicesUpdatePayload | WalletTransactionServicesUpdatePayload | 18469 |
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago