@diffsome/sdk 3.3.2 → 3.4.0
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 +50 -1
- package/dist/index.d.ts +50 -1
- package/dist/index.js +25 -0
- package/dist/index.mjs +25 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -13582,11 +13582,48 @@ interface PaymentStatusResponse {
|
|
|
13582
13582
|
toss: {
|
|
13583
13583
|
available: boolean;
|
|
13584
13584
|
};
|
|
13585
|
+
nice: {
|
|
13586
|
+
available: boolean;
|
|
13587
|
+
client_key?: string | null;
|
|
13588
|
+
};
|
|
13585
13589
|
stripe: {
|
|
13586
13590
|
available: boolean;
|
|
13587
13591
|
publishable_key?: string;
|
|
13588
13592
|
};
|
|
13589
13593
|
}
|
|
13594
|
+
interface NicePaymentReadyData {
|
|
13595
|
+
order_number: string;
|
|
13596
|
+
return_url: string;
|
|
13597
|
+
}
|
|
13598
|
+
interface NicePaymentReadyResponse {
|
|
13599
|
+
success: boolean;
|
|
13600
|
+
payment_id: number;
|
|
13601
|
+
order_id: string;
|
|
13602
|
+
order_name: string;
|
|
13603
|
+
amount: number;
|
|
13604
|
+
customer_name: string;
|
|
13605
|
+
customer_email: string;
|
|
13606
|
+
return_url: string;
|
|
13607
|
+
client_key: string;
|
|
13608
|
+
}
|
|
13609
|
+
interface NicePaymentConfirmData {
|
|
13610
|
+
tid: string;
|
|
13611
|
+
order_id: string;
|
|
13612
|
+
amount: number;
|
|
13613
|
+
}
|
|
13614
|
+
interface NicePaymentConfirmResponse {
|
|
13615
|
+
order_number: string;
|
|
13616
|
+
status: string;
|
|
13617
|
+
status_label: string;
|
|
13618
|
+
payment_status: string;
|
|
13619
|
+
payment?: {
|
|
13620
|
+
method: string;
|
|
13621
|
+
method_label: string;
|
|
13622
|
+
method_detail?: string;
|
|
13623
|
+
receipt_url?: string;
|
|
13624
|
+
approved_at?: string;
|
|
13625
|
+
};
|
|
13626
|
+
}
|
|
13590
13627
|
interface ProductReviewAuthor {
|
|
13591
13628
|
id: number;
|
|
13592
13629
|
name: string;
|
|
@@ -14522,6 +14559,18 @@ declare class ShopResource {
|
|
|
14522
14559
|
* Cancel Toss payment
|
|
14523
14560
|
*/
|
|
14524
14561
|
tossPaymentCancel(orderNumber: string, cancelReason: string, cancelAmount?: number): Promise<void>;
|
|
14562
|
+
/**
|
|
14563
|
+
* Prepare NicePay payment (get client key and payment info)
|
|
14564
|
+
*/
|
|
14565
|
+
nicePaymentReady(data: NicePaymentReadyData): Promise<NicePaymentReadyResponse>;
|
|
14566
|
+
/**
|
|
14567
|
+
* Confirm NicePay payment (after JS SDK authentication)
|
|
14568
|
+
*/
|
|
14569
|
+
nicePaymentConfirm(data: NicePaymentConfirmData): Promise<NicePaymentConfirmResponse>;
|
|
14570
|
+
/**
|
|
14571
|
+
* Cancel NicePay payment
|
|
14572
|
+
*/
|
|
14573
|
+
nicePaymentCancel(orderNumber: string, cancelReason: string, cancelAmount?: number): Promise<void>;
|
|
14525
14574
|
/**
|
|
14526
14575
|
* Create Stripe Checkout Session
|
|
14527
14576
|
*/
|
|
@@ -15332,4 +15381,4 @@ declare class Diffsome {
|
|
|
15332
15381
|
getApiKey(): string | null;
|
|
15333
15382
|
}
|
|
15334
15383
|
|
|
15335
|
-
export { type $defs, type AddToCartData, type AddToWishlistData, type ApiError, type ApplyCouponData, type AuthResponse, type AvailableDatesParams, type AvailableSlotsParams, type BlogCategory, type BlogListParams, type BlogPost, type BlogPostCollection, type Board, type BoardCollection, type BoardComment, type BoardListParams, type BoardPost, type BoardPostCollection, type BoardPostListParams, type BundleItem, type BundlePricing, type CanReviewResponse, type Cart, type CartItem, type CartShippingInfo, type ChatAvailability, type ChatConversation, type ChatMessage, type Comment, type CommentCollection, type CommentListParams$1 as CommentListParams, type Coupon, type CouponType, type CouponValidation, type CreateBoardPostData, type CreateCommentData, type CreateEntityData, type CreateEntityRecordData, type CreateOrderData, type CreatePostData, type CreateProductReviewData, type CreateReservationData, type CreateReservationResult, type CreateSubscriptionData, type CreateSubscriptionResult, type CurrencyInfo, type CustomEntity, Diffsome, type DiffsomeConfig, DiffsomeError, type DigitalDownloadLink, type DigitalFile, type Entity, type EntityField, type EntityListParams, type EntityRecord, type EntitySchema, type ForgotPasswordData, type Form, type FormListParams, type FormSubmission, type FormSubmissionData, type ListParams, type ListResponse, type LoginCredentials, type Media, type Member, type MemberSubscription, type Order, type OrderItem, type OrderListParams, type OrderOrderer, type OrderShipping, type OrderStatus, type PaginatedResponse, type PaginationMeta, type Payment, type PaymentCancelData, type PaymentConfirmData, type PaymentMethod, type PaymentReadyData, type PaymentStatus, type PaymentStatusResponse, type PollResponse, type PostListParams, type Product, type ProductAttribute, type ProductAttributeValue, type ProductCategory, type ProductCategoryCollection, type ProductCollection, type ProductListParams, type ProductListParamsExtended, type ProductOption, type ProductOptionValue, type ProductReview, type ProductReviewAuthor, type ProductReviewListParams, type ProductReviewStats, type ProductStatus, type ProductType, type ProductVariant, Diffsome as Promptly, type PromptlyConfig, DiffsomeError as PromptlyError, type RegisterData, type Reservation, type ReservationListParams, type ReservationService, type ReservationServiceStaff, type ReservationSettings, type ReservationSlot, type ReservationStaff, type ResetPasswordData, type ReverbConfig, type SendMessageData, type SetupIntentResult, type SiteInfo, type SocialAuthUrl, type SocialProvider, type StartConversationData, type StripeCheckoutData, type StripeCheckoutResponse, type StripeVerifyData, type StripeVerifyResponse, type SubmissionListParams, type SubmitFormData, type SubscriptionInterval, type SubscriptionPlan, type SubscriptionStatus, type TossPaymentConfirmData, type TossPaymentConfirmResponse, type TossPaymentReadyData, type TossPaymentReadyResponse, type UpdateBoardPostData, type UpdateCartItemData, type UpdateCommentData, type UpdateEntityData, type UpdateEntityRecordData, type UpdatePostData, type UpdateProductReviewData, type UpdateProfileData, type WishlistCheckBulkResult, type WishlistCheckResult, type WishlistItem, type WishlistListParams, type WishlistMoveToCartResult, type WishlistToggleResult, type components, Diffsome as default, type operations, type paths, type webhooks };
|
|
15384
|
+
export { type $defs, type AddToCartData, type AddToWishlistData, type ApiError, type ApplyCouponData, type AuthResponse, type AvailableDatesParams, type AvailableSlotsParams, type BlogCategory, type BlogListParams, type BlogPost, type BlogPostCollection, type Board, type BoardCollection, type BoardComment, type BoardListParams, type BoardPost, type BoardPostCollection, type BoardPostListParams, type BundleItem, type BundlePricing, type CanReviewResponse, type Cart, type CartItem, type CartShippingInfo, type ChatAvailability, type ChatConversation, type ChatMessage, type Comment, type CommentCollection, type CommentListParams$1 as CommentListParams, type Coupon, type CouponType, type CouponValidation, type CreateBoardPostData, type CreateCommentData, type CreateEntityData, type CreateEntityRecordData, type CreateOrderData, type CreatePostData, type CreateProductReviewData, type CreateReservationData, type CreateReservationResult, type CreateSubscriptionData, type CreateSubscriptionResult, type CurrencyInfo, type CustomEntity, Diffsome, type DiffsomeConfig, DiffsomeError, type DigitalDownloadLink, type DigitalFile, type Entity, type EntityField, type EntityListParams, type EntityRecord, type EntitySchema, type ForgotPasswordData, type Form, type FormListParams, type FormSubmission, type FormSubmissionData, type ListParams, type ListResponse, type LoginCredentials, type Media, type Member, type MemberSubscription, type NicePaymentConfirmData, type NicePaymentConfirmResponse, type NicePaymentReadyData, type NicePaymentReadyResponse, type Order, type OrderItem, type OrderListParams, type OrderOrderer, type OrderShipping, type OrderStatus, type PaginatedResponse, type PaginationMeta, type Payment, type PaymentCancelData, type PaymentConfirmData, type PaymentMethod, type PaymentReadyData, type PaymentStatus, type PaymentStatusResponse, type PollResponse, type PostListParams, type Product, type ProductAttribute, type ProductAttributeValue, type ProductCategory, type ProductCategoryCollection, type ProductCollection, type ProductListParams, type ProductListParamsExtended, type ProductOption, type ProductOptionValue, type ProductReview, type ProductReviewAuthor, type ProductReviewListParams, type ProductReviewStats, type ProductStatus, type ProductType, type ProductVariant, Diffsome as Promptly, type PromptlyConfig, DiffsomeError as PromptlyError, type RegisterData, type Reservation, type ReservationListParams, type ReservationService, type ReservationServiceStaff, type ReservationSettings, type ReservationSlot, type ReservationStaff, type ResetPasswordData, type ReverbConfig, type SendMessageData, type SetupIntentResult, type SiteInfo, type SocialAuthUrl, type SocialProvider, type StartConversationData, type StripeCheckoutData, type StripeCheckoutResponse, type StripeVerifyData, type StripeVerifyResponse, type SubmissionListParams, type SubmitFormData, type SubscriptionInterval, type SubscriptionPlan, type SubscriptionStatus, type TossPaymentConfirmData, type TossPaymentConfirmResponse, type TossPaymentReadyData, type TossPaymentReadyResponse, type UpdateBoardPostData, type UpdateCartItemData, type UpdateCommentData, type UpdateEntityData, type UpdateEntityRecordData, type UpdatePostData, type UpdateProductReviewData, type UpdateProfileData, type WishlistCheckBulkResult, type WishlistCheckResult, type WishlistItem, type WishlistListParams, type WishlistMoveToCartResult, type WishlistToggleResult, type components, Diffsome as default, type operations, type paths, type webhooks };
|
package/dist/index.d.ts
CHANGED
|
@@ -13582,11 +13582,48 @@ interface PaymentStatusResponse {
|
|
|
13582
13582
|
toss: {
|
|
13583
13583
|
available: boolean;
|
|
13584
13584
|
};
|
|
13585
|
+
nice: {
|
|
13586
|
+
available: boolean;
|
|
13587
|
+
client_key?: string | null;
|
|
13588
|
+
};
|
|
13585
13589
|
stripe: {
|
|
13586
13590
|
available: boolean;
|
|
13587
13591
|
publishable_key?: string;
|
|
13588
13592
|
};
|
|
13589
13593
|
}
|
|
13594
|
+
interface NicePaymentReadyData {
|
|
13595
|
+
order_number: string;
|
|
13596
|
+
return_url: string;
|
|
13597
|
+
}
|
|
13598
|
+
interface NicePaymentReadyResponse {
|
|
13599
|
+
success: boolean;
|
|
13600
|
+
payment_id: number;
|
|
13601
|
+
order_id: string;
|
|
13602
|
+
order_name: string;
|
|
13603
|
+
amount: number;
|
|
13604
|
+
customer_name: string;
|
|
13605
|
+
customer_email: string;
|
|
13606
|
+
return_url: string;
|
|
13607
|
+
client_key: string;
|
|
13608
|
+
}
|
|
13609
|
+
interface NicePaymentConfirmData {
|
|
13610
|
+
tid: string;
|
|
13611
|
+
order_id: string;
|
|
13612
|
+
amount: number;
|
|
13613
|
+
}
|
|
13614
|
+
interface NicePaymentConfirmResponse {
|
|
13615
|
+
order_number: string;
|
|
13616
|
+
status: string;
|
|
13617
|
+
status_label: string;
|
|
13618
|
+
payment_status: string;
|
|
13619
|
+
payment?: {
|
|
13620
|
+
method: string;
|
|
13621
|
+
method_label: string;
|
|
13622
|
+
method_detail?: string;
|
|
13623
|
+
receipt_url?: string;
|
|
13624
|
+
approved_at?: string;
|
|
13625
|
+
};
|
|
13626
|
+
}
|
|
13590
13627
|
interface ProductReviewAuthor {
|
|
13591
13628
|
id: number;
|
|
13592
13629
|
name: string;
|
|
@@ -14522,6 +14559,18 @@ declare class ShopResource {
|
|
|
14522
14559
|
* Cancel Toss payment
|
|
14523
14560
|
*/
|
|
14524
14561
|
tossPaymentCancel(orderNumber: string, cancelReason: string, cancelAmount?: number): Promise<void>;
|
|
14562
|
+
/**
|
|
14563
|
+
* Prepare NicePay payment (get client key and payment info)
|
|
14564
|
+
*/
|
|
14565
|
+
nicePaymentReady(data: NicePaymentReadyData): Promise<NicePaymentReadyResponse>;
|
|
14566
|
+
/**
|
|
14567
|
+
* Confirm NicePay payment (after JS SDK authentication)
|
|
14568
|
+
*/
|
|
14569
|
+
nicePaymentConfirm(data: NicePaymentConfirmData): Promise<NicePaymentConfirmResponse>;
|
|
14570
|
+
/**
|
|
14571
|
+
* Cancel NicePay payment
|
|
14572
|
+
*/
|
|
14573
|
+
nicePaymentCancel(orderNumber: string, cancelReason: string, cancelAmount?: number): Promise<void>;
|
|
14525
14574
|
/**
|
|
14526
14575
|
* Create Stripe Checkout Session
|
|
14527
14576
|
*/
|
|
@@ -15332,4 +15381,4 @@ declare class Diffsome {
|
|
|
15332
15381
|
getApiKey(): string | null;
|
|
15333
15382
|
}
|
|
15334
15383
|
|
|
15335
|
-
export { type $defs, type AddToCartData, type AddToWishlistData, type ApiError, type ApplyCouponData, type AuthResponse, type AvailableDatesParams, type AvailableSlotsParams, type BlogCategory, type BlogListParams, type BlogPost, type BlogPostCollection, type Board, type BoardCollection, type BoardComment, type BoardListParams, type BoardPost, type BoardPostCollection, type BoardPostListParams, type BundleItem, type BundlePricing, type CanReviewResponse, type Cart, type CartItem, type CartShippingInfo, type ChatAvailability, type ChatConversation, type ChatMessage, type Comment, type CommentCollection, type CommentListParams$1 as CommentListParams, type Coupon, type CouponType, type CouponValidation, type CreateBoardPostData, type CreateCommentData, type CreateEntityData, type CreateEntityRecordData, type CreateOrderData, type CreatePostData, type CreateProductReviewData, type CreateReservationData, type CreateReservationResult, type CreateSubscriptionData, type CreateSubscriptionResult, type CurrencyInfo, type CustomEntity, Diffsome, type DiffsomeConfig, DiffsomeError, type DigitalDownloadLink, type DigitalFile, type Entity, type EntityField, type EntityListParams, type EntityRecord, type EntitySchema, type ForgotPasswordData, type Form, type FormListParams, type FormSubmission, type FormSubmissionData, type ListParams, type ListResponse, type LoginCredentials, type Media, type Member, type MemberSubscription, type Order, type OrderItem, type OrderListParams, type OrderOrderer, type OrderShipping, type OrderStatus, type PaginatedResponse, type PaginationMeta, type Payment, type PaymentCancelData, type PaymentConfirmData, type PaymentMethod, type PaymentReadyData, type PaymentStatus, type PaymentStatusResponse, type PollResponse, type PostListParams, type Product, type ProductAttribute, type ProductAttributeValue, type ProductCategory, type ProductCategoryCollection, type ProductCollection, type ProductListParams, type ProductListParamsExtended, type ProductOption, type ProductOptionValue, type ProductReview, type ProductReviewAuthor, type ProductReviewListParams, type ProductReviewStats, type ProductStatus, type ProductType, type ProductVariant, Diffsome as Promptly, type PromptlyConfig, DiffsomeError as PromptlyError, type RegisterData, type Reservation, type ReservationListParams, type ReservationService, type ReservationServiceStaff, type ReservationSettings, type ReservationSlot, type ReservationStaff, type ResetPasswordData, type ReverbConfig, type SendMessageData, type SetupIntentResult, type SiteInfo, type SocialAuthUrl, type SocialProvider, type StartConversationData, type StripeCheckoutData, type StripeCheckoutResponse, type StripeVerifyData, type StripeVerifyResponse, type SubmissionListParams, type SubmitFormData, type SubscriptionInterval, type SubscriptionPlan, type SubscriptionStatus, type TossPaymentConfirmData, type TossPaymentConfirmResponse, type TossPaymentReadyData, type TossPaymentReadyResponse, type UpdateBoardPostData, type UpdateCartItemData, type UpdateCommentData, type UpdateEntityData, type UpdateEntityRecordData, type UpdatePostData, type UpdateProductReviewData, type UpdateProfileData, type WishlistCheckBulkResult, type WishlistCheckResult, type WishlistItem, type WishlistListParams, type WishlistMoveToCartResult, type WishlistToggleResult, type components, Diffsome as default, type operations, type paths, type webhooks };
|
|
15384
|
+
export { type $defs, type AddToCartData, type AddToWishlistData, type ApiError, type ApplyCouponData, type AuthResponse, type AvailableDatesParams, type AvailableSlotsParams, type BlogCategory, type BlogListParams, type BlogPost, type BlogPostCollection, type Board, type BoardCollection, type BoardComment, type BoardListParams, type BoardPost, type BoardPostCollection, type BoardPostListParams, type BundleItem, type BundlePricing, type CanReviewResponse, type Cart, type CartItem, type CartShippingInfo, type ChatAvailability, type ChatConversation, type ChatMessage, type Comment, type CommentCollection, type CommentListParams$1 as CommentListParams, type Coupon, type CouponType, type CouponValidation, type CreateBoardPostData, type CreateCommentData, type CreateEntityData, type CreateEntityRecordData, type CreateOrderData, type CreatePostData, type CreateProductReviewData, type CreateReservationData, type CreateReservationResult, type CreateSubscriptionData, type CreateSubscriptionResult, type CurrencyInfo, type CustomEntity, Diffsome, type DiffsomeConfig, DiffsomeError, type DigitalDownloadLink, type DigitalFile, type Entity, type EntityField, type EntityListParams, type EntityRecord, type EntitySchema, type ForgotPasswordData, type Form, type FormListParams, type FormSubmission, type FormSubmissionData, type ListParams, type ListResponse, type LoginCredentials, type Media, type Member, type MemberSubscription, type NicePaymentConfirmData, type NicePaymentConfirmResponse, type NicePaymentReadyData, type NicePaymentReadyResponse, type Order, type OrderItem, type OrderListParams, type OrderOrderer, type OrderShipping, type OrderStatus, type PaginatedResponse, type PaginationMeta, type Payment, type PaymentCancelData, type PaymentConfirmData, type PaymentMethod, type PaymentReadyData, type PaymentStatus, type PaymentStatusResponse, type PollResponse, type PostListParams, type Product, type ProductAttribute, type ProductAttributeValue, type ProductCategory, type ProductCategoryCollection, type ProductCollection, type ProductListParams, type ProductListParamsExtended, type ProductOption, type ProductOptionValue, type ProductReview, type ProductReviewAuthor, type ProductReviewListParams, type ProductReviewStats, type ProductStatus, type ProductType, type ProductVariant, Diffsome as Promptly, type PromptlyConfig, DiffsomeError as PromptlyError, type RegisterData, type Reservation, type ReservationListParams, type ReservationService, type ReservationServiceStaff, type ReservationSettings, type ReservationSlot, type ReservationStaff, type ResetPasswordData, type ReverbConfig, type SendMessageData, type SetupIntentResult, type SiteInfo, type SocialAuthUrl, type SocialProvider, type StartConversationData, type StripeCheckoutData, type StripeCheckoutResponse, type StripeVerifyData, type StripeVerifyResponse, type SubmissionListParams, type SubmitFormData, type SubscriptionInterval, type SubscriptionPlan, type SubscriptionStatus, type TossPaymentConfirmData, type TossPaymentConfirmResponse, type TossPaymentReadyData, type TossPaymentReadyResponse, type UpdateBoardPostData, type UpdateCartItemData, type UpdateCommentData, type UpdateEntityData, type UpdateEntityRecordData, type UpdatePostData, type UpdateProductReviewData, type UpdateProfileData, type WishlistCheckBulkResult, type WishlistCheckResult, type WishlistItem, type WishlistListParams, type WishlistMoveToCartResult, type WishlistToggleResult, type components, Diffsome as default, type operations, type paths, type webhooks };
|
package/dist/index.js
CHANGED
|
@@ -913,6 +913,31 @@ var ShopResource = class {
|
|
|
913
913
|
});
|
|
914
914
|
}
|
|
915
915
|
// ============================================
|
|
916
|
+
// NicePay Payments
|
|
917
|
+
// ============================================
|
|
918
|
+
/**
|
|
919
|
+
* Prepare NicePay payment (get client key and payment info)
|
|
920
|
+
*/
|
|
921
|
+
async nicePaymentReady(data) {
|
|
922
|
+
return this.http.post("/payments/nice/ready", data);
|
|
923
|
+
}
|
|
924
|
+
/**
|
|
925
|
+
* Confirm NicePay payment (after JS SDK authentication)
|
|
926
|
+
*/
|
|
927
|
+
async nicePaymentConfirm(data) {
|
|
928
|
+
return this.http.post("/payments/nice/confirm", data);
|
|
929
|
+
}
|
|
930
|
+
/**
|
|
931
|
+
* Cancel NicePay payment
|
|
932
|
+
*/
|
|
933
|
+
async nicePaymentCancel(orderNumber, cancelReason, cancelAmount) {
|
|
934
|
+
await this.http.post("/payments/nice/cancel", {
|
|
935
|
+
order_number: orderNumber,
|
|
936
|
+
cancel_reason: cancelReason,
|
|
937
|
+
cancel_amount: cancelAmount
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
// ============================================
|
|
916
941
|
// Stripe Payments
|
|
917
942
|
// ============================================
|
|
918
943
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -883,6 +883,31 @@ var ShopResource = class {
|
|
|
883
883
|
});
|
|
884
884
|
}
|
|
885
885
|
// ============================================
|
|
886
|
+
// NicePay Payments
|
|
887
|
+
// ============================================
|
|
888
|
+
/**
|
|
889
|
+
* Prepare NicePay payment (get client key and payment info)
|
|
890
|
+
*/
|
|
891
|
+
async nicePaymentReady(data) {
|
|
892
|
+
return this.http.post("/payments/nice/ready", data);
|
|
893
|
+
}
|
|
894
|
+
/**
|
|
895
|
+
* Confirm NicePay payment (after JS SDK authentication)
|
|
896
|
+
*/
|
|
897
|
+
async nicePaymentConfirm(data) {
|
|
898
|
+
return this.http.post("/payments/nice/confirm", data);
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* Cancel NicePay payment
|
|
902
|
+
*/
|
|
903
|
+
async nicePaymentCancel(orderNumber, cancelReason, cancelAmount) {
|
|
904
|
+
await this.http.post("/payments/nice/cancel", {
|
|
905
|
+
order_number: orderNumber,
|
|
906
|
+
cancel_reason: cancelReason,
|
|
907
|
+
cancel_amount: cancelAmount
|
|
908
|
+
});
|
|
909
|
+
}
|
|
910
|
+
// ============================================
|
|
886
911
|
// Stripe Payments
|
|
887
912
|
// ============================================
|
|
888
913
|
/**
|