Merged in feat/LOY-431-profile-v2 (pull request #3202)
Feat/LOY-431: Switch to V2 of Profile endpoint * feat(LOY-431): switch to v2 of profile endpoint * feat(LOY-431): use CreditCard * feat(LOY-431): remove hotelinformation from friendTransaction schema * chore(LOY-431): add hotel data request to transactions * fix(LOY-431): use v1 of friendTransactions Approved-by: Linus Flood Approved-by: Erik Tiekstra Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -18,6 +18,7 @@ export namespace endpoints {
|
||||
Breakfast = "breakfast",
|
||||
Cities = "Cities",
|
||||
Countries = "Countries",
|
||||
CreditCard = "CreditCard",
|
||||
Hotels = "Hotels",
|
||||
Locations = "Locations",
|
||||
Packages = "packages",
|
||||
@@ -173,42 +174,6 @@ export namespace endpoints {
|
||||
* https://tstapi.scandichotels.com/profile/swagger/v1/index.html
|
||||
*/
|
||||
export namespace Profile {
|
||||
export const invalidateSessions = `${base.path.profile}/${version}/${base.enitity.Profile}/invalidateSessions`
|
||||
export const membership = `${base.path.profile}/${version}/${base.enitity.Profile}/membership`
|
||||
export const profile = `${base.path.profile}/${version}/${base.enitity.Profile}`
|
||||
export const subscriberId = `${base.path.profile}/${version}/${base.enitity.Profile}/SubscriberId`
|
||||
export const link = `${base.path.profile}/${version}/${base.enitity.Profile}/link`
|
||||
export const unlink = `${base.path.profile}/${version}/${base.enitity.Profile}/Unlink`
|
||||
export const matchTier = `${base.path.profile}/${version}/${base.enitity.Profile}/MatchTier`
|
||||
export const pointTransfer = `${base.path.profile}/${version}/${base.enitity.Profile}/PointTransfer/Partner`
|
||||
|
||||
export function deleteProfile(profileId: string) {
|
||||
return `${profile}/${profileId}`
|
||||
}
|
||||
|
||||
export const creditCards = `${base.path.profile}/${version}/${base.enitity.Profile}/creditCards`
|
||||
export namespace CreditCards {
|
||||
export const initiateSaveCard = `${creditCards}/initiateSaveCard`
|
||||
|
||||
export function deleteCreditCard(creditCardId: string) {
|
||||
return `${creditCards}/${creditCardId}`
|
||||
}
|
||||
export function transaction(transactionId: string) {
|
||||
return `${creditCards}/${transactionId}`
|
||||
}
|
||||
}
|
||||
|
||||
export namespace Reward {
|
||||
export const allTiers = `${base.path.profile}/${version}/${base.enitity.Reward}/allTiers`
|
||||
export const reward = `${base.path.profile}/${version}/${base.enitity.Reward}`
|
||||
export const redeem = `${base.path.profile}/${version}/${base.enitity.Reward}/redeem`
|
||||
export const unwrap = `${base.path.profile}/${version}/${base.enitity.Reward}/unwrap`
|
||||
|
||||
export function claim(rewardId: string) {
|
||||
return `${base.path.profile}/${version}/${base.enitity.Reward}/Claim/${rewardId}`
|
||||
}
|
||||
}
|
||||
|
||||
export const enum Transaction {
|
||||
friendTransactions = `${base.path.profile}/${version}/${base.enitity.Transaction}/friendTransactions`,
|
||||
}
|
||||
@@ -224,14 +189,60 @@ export namespace endpoints {
|
||||
*/
|
||||
export namespace Profile {
|
||||
export const profile = `${base.path.profile}/${version}/${base.enitity.Profile}`
|
||||
|
||||
export const basicProfile = `${profile}/BasicInfo`
|
||||
export const promoCampaign = `${profile}/Promotion`
|
||||
|
||||
export const membership = `${profile}/membership`
|
||||
export const subscriberId = `${profile}/SubscriberId`
|
||||
|
||||
export const invalidateSessions = `${profile}/invalidateSessions`
|
||||
|
||||
export const link = `${profile}/link`
|
||||
export const unlink = `${profile}/Unlink`
|
||||
export const matchTier = `${profile}/MatchTier`
|
||||
export const pointTransfer = `${profile}/PointTransfer/Partner`
|
||||
|
||||
export function deleteProfile(profileId: string) {
|
||||
return `${profile}/${profileId}`
|
||||
}
|
||||
|
||||
export function teamMemberCard(employeeId: string) {
|
||||
return `${profile}/${employeeId}/TeamMemberCard`
|
||||
}
|
||||
|
||||
export namespace CreditCard {
|
||||
export const creditCard = `${base.path.profile}/${version}/${base.enitity.CreditCard}`
|
||||
|
||||
export const initiateSaveCard = `${creditCard}/initiateSaveCard`
|
||||
|
||||
export function deleteCreditCard(creditCardId: string) {
|
||||
return `${creditCard}/${creditCardId}`
|
||||
}
|
||||
|
||||
export function transaction(transactionId: string) {
|
||||
return `${creditCard}/${transactionId}`
|
||||
}
|
||||
}
|
||||
|
||||
export namespace Reward {
|
||||
export const reward = `${base.path.profile}/${version}/${base.enitity.Reward}`
|
||||
|
||||
export const allTiers = `${reward}/allTiers`
|
||||
|
||||
export const redeem = `${reward}/redeem`
|
||||
export const unwrap = `${reward}/unwrap`
|
||||
|
||||
export function claim(rewardId: string) {
|
||||
return `${reward}/Claim/${rewardId}`
|
||||
}
|
||||
}
|
||||
|
||||
/* Currently no hotelInformation in v2 */
|
||||
export const enum Transaction {
|
||||
friendTransactions = `${base.path.profile}/${version}/${base.enitity.Transaction}/friendTransactions`,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export type Endpoint = string
|
||||
|
||||
Reference in New Issue
Block a user