@juhuu/sdk-ts 1.2.323 → 1.2.325
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/index.d.mts +42 -3
- package/dist/index.d.ts +42 -3
- package/dist/index.js +38 -1
- package/dist/index.mjs +38 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -179,9 +179,9 @@ interface SessionSettings {
|
|
|
179
179
|
interface EnvironmentSettings {
|
|
180
180
|
}
|
|
181
181
|
type PaymentMethod = "card" | "stripe_account" | "klarna" | "bancontact" | "eps" | "giropay" | "ideal" | "p24" | "sofort" | "unknown";
|
|
182
|
-
type PaymentReason = "session";
|
|
182
|
+
type PaymentReason = "custom" | "session";
|
|
183
183
|
type PaymentRefundReason = "requestedByUser" | "expiredUncapturedCharge" | "fraudulent" | "duplicate" | "unknown";
|
|
184
|
-
type SessionStatus = "waitingForPayment" | "ready" | "completed";
|
|
184
|
+
type SessionStatus = "waitingForPayment" | "waitingForReady" | "ready" | "completed";
|
|
185
185
|
type AutoRenewMode = "off" | "optIn" | "optOut" | "on";
|
|
186
186
|
type RefundStatus = "inTransitToUser" | "succeeded";
|
|
187
187
|
type SessionTerminatedByType = "user" | "system" | "propertyAdmin" | "nodeArray" | "flow" | "apiKey";
|
|
@@ -215,6 +215,7 @@ interface PostingRow {
|
|
|
215
215
|
quantity: number;
|
|
216
216
|
unitPrice: number;
|
|
217
217
|
unitPriceIsFlexible: boolean;
|
|
218
|
+
taxPercentage?: number;
|
|
218
219
|
total: number;
|
|
219
220
|
}
|
|
220
221
|
interface Person {
|
|
@@ -1731,6 +1732,7 @@ declare class SessionService extends Service {
|
|
|
1731
1732
|
detachUser(SessionDetachUserParams: JUHUU.Session.DetachUser.Params, SessionDetachUserOptions?: JUHUU.Session.DetachUser.Options): Promise<JUHUU.HttpResponse<JUHUU.Session.DetachUser.Response>>;
|
|
1732
1733
|
delete(SessionDeleteUserParams: JUHUU.Session.Delete.Params, SessionDeleteUserOptions?: JUHUU.Session.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.Session.Delete.Response>>;
|
|
1733
1734
|
listen(SessionRealtimeParams: JUHUU.Session.Realtime.Params, SessionRealtimeOptions?: JUHUU.Session.Realtime.Options): JUHUU.Session.Realtime.Response;
|
|
1735
|
+
checkAvailability(SessionCheckAvailabilityParams: JUHUU.Session.CheckAvailability.Params, SessionCheckAvailabilityOptions?: JUHUU.Session.CheckAvailability.Options): Promise<JUHUU.HttpResponse<JUHUU.Session.CheckAvailability.Response>>;
|
|
1734
1736
|
}
|
|
1735
1737
|
|
|
1736
1738
|
declare class LinkService extends Service {
|
|
@@ -1761,6 +1763,7 @@ declare class UsersService extends Service {
|
|
|
1761
1763
|
|
|
1762
1764
|
declare class PaymentsService extends Service {
|
|
1763
1765
|
constructor(config: JUHUU.SetupConfig);
|
|
1766
|
+
create(PaymentCreateParams: JUHUU.Payment.Create.Params, PaymentCreateOptions?: JUHUU.Payment.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.Create.Response>>;
|
|
1764
1767
|
list(PaymentListParams: JUHUU.Payment.List.Params, PaymentListOptions?: JUHUU.Payment.List.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.List.Response>>;
|
|
1765
1768
|
retrieve(PaymentRetrieveParams: JUHUU.Payment.Retrieve.Params, PaymentRetrieveOptions?: JUHUU.Payment.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.Retrieve.Response>>;
|
|
1766
1769
|
search(PaymentSearchParams: JUHUU.Payment.Search.Params, PaymentSearchOptions?: JUHUU.Payment.Search.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.Search.Response>>;
|
|
@@ -2462,7 +2465,7 @@ declare namespace JUHUU {
|
|
|
2462
2465
|
namespace Session {
|
|
2463
2466
|
type Base = {
|
|
2464
2467
|
id: string;
|
|
2465
|
-
status:
|
|
2468
|
+
status: SessionStatus;
|
|
2466
2469
|
paymentId: string | null;
|
|
2467
2470
|
userId: string | null;
|
|
2468
2471
|
propertyId: string;
|
|
@@ -2488,6 +2491,9 @@ declare namespace JUHUU {
|
|
|
2488
2491
|
locationName: string | null;
|
|
2489
2492
|
locationGroupId: string | null;
|
|
2490
2493
|
locationGroupName: string | null;
|
|
2494
|
+
scheduledReadyAt: Date;
|
|
2495
|
+
readyAt: Date | null;
|
|
2496
|
+
metadata: Record<string, any>;
|
|
2491
2497
|
};
|
|
2492
2498
|
export interface Rent extends Base {
|
|
2493
2499
|
type: "rent";
|
|
@@ -2511,6 +2517,8 @@ declare namespace JUHUU {
|
|
|
2511
2517
|
isOffSession: boolean;
|
|
2512
2518
|
userId: string;
|
|
2513
2519
|
propertyId?: string;
|
|
2520
|
+
scheduledReadyAt?: Date;
|
|
2521
|
+
metadata: Record<string, any>;
|
|
2514
2522
|
};
|
|
2515
2523
|
type Options = JUHUU.RequestOptions;
|
|
2516
2524
|
type Response = {
|
|
@@ -2637,6 +2645,18 @@ declare namespace JUHUU {
|
|
|
2637
2645
|
close: () => void;
|
|
2638
2646
|
};
|
|
2639
2647
|
}
|
|
2648
|
+
export namespace CheckAvailability {
|
|
2649
|
+
type Params = {
|
|
2650
|
+
locationId: string;
|
|
2651
|
+
tariffId: string;
|
|
2652
|
+
autoRenew: boolean;
|
|
2653
|
+
};
|
|
2654
|
+
type Options = JUHUU.RequestOptions;
|
|
2655
|
+
type Response = {
|
|
2656
|
+
available: boolean;
|
|
2657
|
+
conflictingSessions: JUHUU.Session.Object[];
|
|
2658
|
+
};
|
|
2659
|
+
}
|
|
2640
2660
|
export { };
|
|
2641
2661
|
}
|
|
2642
2662
|
namespace User {
|
|
@@ -3682,6 +3702,9 @@ declare namespace JUHUU {
|
|
|
3682
3702
|
automaticPayoutsEnabled: boolean;
|
|
3683
3703
|
payoutCurrencyCode: CurrencyCode;
|
|
3684
3704
|
timeZone: TimeZone;
|
|
3705
|
+
defaultServiceFeeMax: number;
|
|
3706
|
+
defaultServiceFeeMin: number;
|
|
3707
|
+
defaultServiceFeePercentage: number;
|
|
3685
3708
|
/**
|
|
3686
3709
|
* Used to charge the property
|
|
3687
3710
|
*/
|
|
@@ -4001,6 +4024,22 @@ declare namespace JUHUU {
|
|
|
4001
4024
|
property?: JUHUU.Property.Object;
|
|
4002
4025
|
};
|
|
4003
4026
|
}
|
|
4027
|
+
namespace Create {
|
|
4028
|
+
type Params = {
|
|
4029
|
+
accountingAreaId: string;
|
|
4030
|
+
amountWithoutServiceFee: number;
|
|
4031
|
+
currencyCode: string;
|
|
4032
|
+
propertyId: string;
|
|
4033
|
+
isOffSession: boolean;
|
|
4034
|
+
salesTaxPercentage: number;
|
|
4035
|
+
userId: string;
|
|
4036
|
+
postingRowArray: PostingRow[];
|
|
4037
|
+
};
|
|
4038
|
+
type Options = JUHUU.RequestOptions;
|
|
4039
|
+
type Response = {
|
|
4040
|
+
payout: JUHUU.Payment.Object;
|
|
4041
|
+
};
|
|
4042
|
+
}
|
|
4004
4043
|
namespace Search {
|
|
4005
4044
|
type Params = {
|
|
4006
4045
|
providerPaymentId?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -179,9 +179,9 @@ interface SessionSettings {
|
|
|
179
179
|
interface EnvironmentSettings {
|
|
180
180
|
}
|
|
181
181
|
type PaymentMethod = "card" | "stripe_account" | "klarna" | "bancontact" | "eps" | "giropay" | "ideal" | "p24" | "sofort" | "unknown";
|
|
182
|
-
type PaymentReason = "session";
|
|
182
|
+
type PaymentReason = "custom" | "session";
|
|
183
183
|
type PaymentRefundReason = "requestedByUser" | "expiredUncapturedCharge" | "fraudulent" | "duplicate" | "unknown";
|
|
184
|
-
type SessionStatus = "waitingForPayment" | "ready" | "completed";
|
|
184
|
+
type SessionStatus = "waitingForPayment" | "waitingForReady" | "ready" | "completed";
|
|
185
185
|
type AutoRenewMode = "off" | "optIn" | "optOut" | "on";
|
|
186
186
|
type RefundStatus = "inTransitToUser" | "succeeded";
|
|
187
187
|
type SessionTerminatedByType = "user" | "system" | "propertyAdmin" | "nodeArray" | "flow" | "apiKey";
|
|
@@ -215,6 +215,7 @@ interface PostingRow {
|
|
|
215
215
|
quantity: number;
|
|
216
216
|
unitPrice: number;
|
|
217
217
|
unitPriceIsFlexible: boolean;
|
|
218
|
+
taxPercentage?: number;
|
|
218
219
|
total: number;
|
|
219
220
|
}
|
|
220
221
|
interface Person {
|
|
@@ -1731,6 +1732,7 @@ declare class SessionService extends Service {
|
|
|
1731
1732
|
detachUser(SessionDetachUserParams: JUHUU.Session.DetachUser.Params, SessionDetachUserOptions?: JUHUU.Session.DetachUser.Options): Promise<JUHUU.HttpResponse<JUHUU.Session.DetachUser.Response>>;
|
|
1732
1733
|
delete(SessionDeleteUserParams: JUHUU.Session.Delete.Params, SessionDeleteUserOptions?: JUHUU.Session.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.Session.Delete.Response>>;
|
|
1733
1734
|
listen(SessionRealtimeParams: JUHUU.Session.Realtime.Params, SessionRealtimeOptions?: JUHUU.Session.Realtime.Options): JUHUU.Session.Realtime.Response;
|
|
1735
|
+
checkAvailability(SessionCheckAvailabilityParams: JUHUU.Session.CheckAvailability.Params, SessionCheckAvailabilityOptions?: JUHUU.Session.CheckAvailability.Options): Promise<JUHUU.HttpResponse<JUHUU.Session.CheckAvailability.Response>>;
|
|
1734
1736
|
}
|
|
1735
1737
|
|
|
1736
1738
|
declare class LinkService extends Service {
|
|
@@ -1761,6 +1763,7 @@ declare class UsersService extends Service {
|
|
|
1761
1763
|
|
|
1762
1764
|
declare class PaymentsService extends Service {
|
|
1763
1765
|
constructor(config: JUHUU.SetupConfig);
|
|
1766
|
+
create(PaymentCreateParams: JUHUU.Payment.Create.Params, PaymentCreateOptions?: JUHUU.Payment.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.Create.Response>>;
|
|
1764
1767
|
list(PaymentListParams: JUHUU.Payment.List.Params, PaymentListOptions?: JUHUU.Payment.List.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.List.Response>>;
|
|
1765
1768
|
retrieve(PaymentRetrieveParams: JUHUU.Payment.Retrieve.Params, PaymentRetrieveOptions?: JUHUU.Payment.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.Retrieve.Response>>;
|
|
1766
1769
|
search(PaymentSearchParams: JUHUU.Payment.Search.Params, PaymentSearchOptions?: JUHUU.Payment.Search.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.Search.Response>>;
|
|
@@ -2462,7 +2465,7 @@ declare namespace JUHUU {
|
|
|
2462
2465
|
namespace Session {
|
|
2463
2466
|
type Base = {
|
|
2464
2467
|
id: string;
|
|
2465
|
-
status:
|
|
2468
|
+
status: SessionStatus;
|
|
2466
2469
|
paymentId: string | null;
|
|
2467
2470
|
userId: string | null;
|
|
2468
2471
|
propertyId: string;
|
|
@@ -2488,6 +2491,9 @@ declare namespace JUHUU {
|
|
|
2488
2491
|
locationName: string | null;
|
|
2489
2492
|
locationGroupId: string | null;
|
|
2490
2493
|
locationGroupName: string | null;
|
|
2494
|
+
scheduledReadyAt: Date;
|
|
2495
|
+
readyAt: Date | null;
|
|
2496
|
+
metadata: Record<string, any>;
|
|
2491
2497
|
};
|
|
2492
2498
|
export interface Rent extends Base {
|
|
2493
2499
|
type: "rent";
|
|
@@ -2511,6 +2517,8 @@ declare namespace JUHUU {
|
|
|
2511
2517
|
isOffSession: boolean;
|
|
2512
2518
|
userId: string;
|
|
2513
2519
|
propertyId?: string;
|
|
2520
|
+
scheduledReadyAt?: Date;
|
|
2521
|
+
metadata: Record<string, any>;
|
|
2514
2522
|
};
|
|
2515
2523
|
type Options = JUHUU.RequestOptions;
|
|
2516
2524
|
type Response = {
|
|
@@ -2637,6 +2645,18 @@ declare namespace JUHUU {
|
|
|
2637
2645
|
close: () => void;
|
|
2638
2646
|
};
|
|
2639
2647
|
}
|
|
2648
|
+
export namespace CheckAvailability {
|
|
2649
|
+
type Params = {
|
|
2650
|
+
locationId: string;
|
|
2651
|
+
tariffId: string;
|
|
2652
|
+
autoRenew: boolean;
|
|
2653
|
+
};
|
|
2654
|
+
type Options = JUHUU.RequestOptions;
|
|
2655
|
+
type Response = {
|
|
2656
|
+
available: boolean;
|
|
2657
|
+
conflictingSessions: JUHUU.Session.Object[];
|
|
2658
|
+
};
|
|
2659
|
+
}
|
|
2640
2660
|
export { };
|
|
2641
2661
|
}
|
|
2642
2662
|
namespace User {
|
|
@@ -3682,6 +3702,9 @@ declare namespace JUHUU {
|
|
|
3682
3702
|
automaticPayoutsEnabled: boolean;
|
|
3683
3703
|
payoutCurrencyCode: CurrencyCode;
|
|
3684
3704
|
timeZone: TimeZone;
|
|
3705
|
+
defaultServiceFeeMax: number;
|
|
3706
|
+
defaultServiceFeeMin: number;
|
|
3707
|
+
defaultServiceFeePercentage: number;
|
|
3685
3708
|
/**
|
|
3686
3709
|
* Used to charge the property
|
|
3687
3710
|
*/
|
|
@@ -4001,6 +4024,22 @@ declare namespace JUHUU {
|
|
|
4001
4024
|
property?: JUHUU.Property.Object;
|
|
4002
4025
|
};
|
|
4003
4026
|
}
|
|
4027
|
+
namespace Create {
|
|
4028
|
+
type Params = {
|
|
4029
|
+
accountingAreaId: string;
|
|
4030
|
+
amountWithoutServiceFee: number;
|
|
4031
|
+
currencyCode: string;
|
|
4032
|
+
propertyId: string;
|
|
4033
|
+
isOffSession: boolean;
|
|
4034
|
+
salesTaxPercentage: number;
|
|
4035
|
+
userId: string;
|
|
4036
|
+
postingRowArray: PostingRow[];
|
|
4037
|
+
};
|
|
4038
|
+
type Options = JUHUU.RequestOptions;
|
|
4039
|
+
type Response = {
|
|
4040
|
+
payout: JUHUU.Payment.Object;
|
|
4041
|
+
};
|
|
4042
|
+
}
|
|
4004
4043
|
namespace Search {
|
|
4005
4044
|
type Params = {
|
|
4006
4045
|
providerPaymentId?: string;
|
package/dist/index.js
CHANGED
|
@@ -531,7 +531,9 @@ var SessionService = class extends Service {
|
|
|
531
531
|
type: SessionCreateParams.sessionType,
|
|
532
532
|
isOffSession: SessionCreateParams.isOffSession,
|
|
533
533
|
userId: SessionCreateParams.userId,
|
|
534
|
-
propertyId: SessionCreateParams.propertyId
|
|
534
|
+
propertyId: SessionCreateParams.propertyId,
|
|
535
|
+
scheduledReadyAt: SessionCreateParams.scheduledReadyAt,
|
|
536
|
+
metadata: SessionCreateParams.metadata
|
|
535
537
|
},
|
|
536
538
|
authenticationNotOptional: true
|
|
537
539
|
},
|
|
@@ -710,6 +712,21 @@ var SessionService = class extends Service {
|
|
|
710
712
|
}
|
|
711
713
|
};
|
|
712
714
|
}
|
|
715
|
+
async checkAvailability(SessionCheckAvailabilityParams, SessionCheckAvailabilityOptions) {
|
|
716
|
+
return await super.sendRequest(
|
|
717
|
+
{
|
|
718
|
+
method: "POST",
|
|
719
|
+
url: "sessions/checkAvailability",
|
|
720
|
+
body: {
|
|
721
|
+
locationId: SessionCheckAvailabilityParams.locationId,
|
|
722
|
+
tariffId: SessionCheckAvailabilityParams.tariffId,
|
|
723
|
+
autoRenew: SessionCheckAvailabilityParams.autoRenew
|
|
724
|
+
},
|
|
725
|
+
authenticationNotOptional: false
|
|
726
|
+
},
|
|
727
|
+
SessionCheckAvailabilityOptions
|
|
728
|
+
);
|
|
729
|
+
}
|
|
713
730
|
};
|
|
714
731
|
|
|
715
732
|
// src/links/links.service.ts
|
|
@@ -1007,6 +1024,26 @@ var PaymentsService = class extends Service {
|
|
|
1007
1024
|
constructor(config) {
|
|
1008
1025
|
super(config);
|
|
1009
1026
|
}
|
|
1027
|
+
async create(PaymentCreateParams, PaymentCreateOptions) {
|
|
1028
|
+
return await super.sendRequest(
|
|
1029
|
+
{
|
|
1030
|
+
method: "POST",
|
|
1031
|
+
url: "payments",
|
|
1032
|
+
body: {
|
|
1033
|
+
accountingAreaId: PaymentCreateParams.accountingAreaId,
|
|
1034
|
+
amountWithoutServiceFee: PaymentCreateParams.amountWithoutServiceFee,
|
|
1035
|
+
currencyCode: PaymentCreateParams.currencyCode,
|
|
1036
|
+
propertyId: PaymentCreateParams.propertyId,
|
|
1037
|
+
isOffSession: PaymentCreateParams.isOffSession,
|
|
1038
|
+
salesTaxPercentage: PaymentCreateParams.salesTaxPercentage,
|
|
1039
|
+
userId: PaymentCreateParams.userId,
|
|
1040
|
+
postingRowArray: PaymentCreateParams.postingRowArray
|
|
1041
|
+
},
|
|
1042
|
+
authenticationNotOptional: true
|
|
1043
|
+
},
|
|
1044
|
+
PaymentCreateOptions
|
|
1045
|
+
);
|
|
1046
|
+
}
|
|
1010
1047
|
async list(PaymentListParams, PaymentListOptions) {
|
|
1011
1048
|
const queryArray = [];
|
|
1012
1049
|
if (PaymentListParams.userId !== void 0) {
|
package/dist/index.mjs
CHANGED
|
@@ -487,7 +487,9 @@ var SessionService = class extends Service {
|
|
|
487
487
|
type: SessionCreateParams.sessionType,
|
|
488
488
|
isOffSession: SessionCreateParams.isOffSession,
|
|
489
489
|
userId: SessionCreateParams.userId,
|
|
490
|
-
propertyId: SessionCreateParams.propertyId
|
|
490
|
+
propertyId: SessionCreateParams.propertyId,
|
|
491
|
+
scheduledReadyAt: SessionCreateParams.scheduledReadyAt,
|
|
492
|
+
metadata: SessionCreateParams.metadata
|
|
491
493
|
},
|
|
492
494
|
authenticationNotOptional: true
|
|
493
495
|
},
|
|
@@ -666,6 +668,21 @@ var SessionService = class extends Service {
|
|
|
666
668
|
}
|
|
667
669
|
};
|
|
668
670
|
}
|
|
671
|
+
async checkAvailability(SessionCheckAvailabilityParams, SessionCheckAvailabilityOptions) {
|
|
672
|
+
return await super.sendRequest(
|
|
673
|
+
{
|
|
674
|
+
method: "POST",
|
|
675
|
+
url: "sessions/checkAvailability",
|
|
676
|
+
body: {
|
|
677
|
+
locationId: SessionCheckAvailabilityParams.locationId,
|
|
678
|
+
tariffId: SessionCheckAvailabilityParams.tariffId,
|
|
679
|
+
autoRenew: SessionCheckAvailabilityParams.autoRenew
|
|
680
|
+
},
|
|
681
|
+
authenticationNotOptional: false
|
|
682
|
+
},
|
|
683
|
+
SessionCheckAvailabilityOptions
|
|
684
|
+
);
|
|
685
|
+
}
|
|
669
686
|
};
|
|
670
687
|
|
|
671
688
|
// src/links/links.service.ts
|
|
@@ -963,6 +980,26 @@ var PaymentsService = class extends Service {
|
|
|
963
980
|
constructor(config) {
|
|
964
981
|
super(config);
|
|
965
982
|
}
|
|
983
|
+
async create(PaymentCreateParams, PaymentCreateOptions) {
|
|
984
|
+
return await super.sendRequest(
|
|
985
|
+
{
|
|
986
|
+
method: "POST",
|
|
987
|
+
url: "payments",
|
|
988
|
+
body: {
|
|
989
|
+
accountingAreaId: PaymentCreateParams.accountingAreaId,
|
|
990
|
+
amountWithoutServiceFee: PaymentCreateParams.amountWithoutServiceFee,
|
|
991
|
+
currencyCode: PaymentCreateParams.currencyCode,
|
|
992
|
+
propertyId: PaymentCreateParams.propertyId,
|
|
993
|
+
isOffSession: PaymentCreateParams.isOffSession,
|
|
994
|
+
salesTaxPercentage: PaymentCreateParams.salesTaxPercentage,
|
|
995
|
+
userId: PaymentCreateParams.userId,
|
|
996
|
+
postingRowArray: PaymentCreateParams.postingRowArray
|
|
997
|
+
},
|
|
998
|
+
authenticationNotOptional: true
|
|
999
|
+
},
|
|
1000
|
+
PaymentCreateOptions
|
|
1001
|
+
);
|
|
1002
|
+
}
|
|
966
1003
|
async list(PaymentListParams, PaymentListOptions) {
|
|
967
1004
|
const queryArray = [];
|
|
968
1005
|
if (PaymentListParams.userId !== void 0) {
|