@diffsome/sdk 3.2.1 → 3.2.5

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 CHANGED
@@ -11043,25 +11043,37 @@ interface CreateEntityRecordData {
11043
11043
  interface UpdateEntityRecordData {
11044
11044
  [key: string]: any;
11045
11045
  }
11046
+ interface ReservationServiceStaff {
11047
+ id: number;
11048
+ name: string;
11049
+ avatar?: string;
11050
+ }
11046
11051
  interface ReservationService {
11047
11052
  id: number;
11048
11053
  name: string;
11049
11054
  slug: string;
11050
11055
  description?: string;
11056
+ thumbnail?: string;
11051
11057
  duration: number;
11052
11058
  price: number;
11053
- is_active: boolean;
11054
- created_at: string;
11055
- updated_at: string;
11059
+ requires_staff: boolean;
11060
+ requires_payment: boolean;
11061
+ deposit?: number;
11062
+ staffs: ReservationServiceStaff[];
11063
+ is_active?: boolean;
11064
+ created_at?: string;
11065
+ updated_at?: string;
11056
11066
  }
11057
11067
  interface ReservationStaff {
11058
11068
  id: number;
11059
11069
  name: string;
11070
+ avatar?: string;
11071
+ bio?: string;
11060
11072
  email?: string;
11061
11073
  phone?: string;
11062
- is_active: boolean;
11063
- created_at: string;
11064
- updated_at: string;
11074
+ is_active?: boolean;
11075
+ created_at?: string;
11076
+ updated_at?: string;
11065
11077
  }
11066
11078
  interface ReservationSlot {
11067
11079
  id: number;
@@ -11336,6 +11348,10 @@ declare class HttpClient {
11336
11348
  * Get the base URL with tenant path
11337
11349
  */
11338
11350
  getBaseUrl(): string;
11351
+ /**
11352
+ * Get the download URL for a digital file
11353
+ */
11354
+ getDownloadUrl(token: string): string;
11339
11355
  /**
11340
11356
  * Set cart session ID (for guest cart persistence)
11341
11357
  */
@@ -11887,10 +11903,10 @@ declare class ShopResource {
11887
11903
  getOrderDownloads(orderNumber: string): Promise<DigitalDownloadLink[]>;
11888
11904
  /**
11889
11905
  * Get download file URL
11890
- * Returns the direct download URL for the file
11891
- * Requires authentication
11906
+ * Returns the web download URL that handles server-side authentication
11907
+ * User must be logged in via session (not just API token)
11892
11908
  */
11893
- downloadFile(token: string): Promise<string>;
11909
+ getDownloadUrl(token: string): string;
11894
11910
  /**
11895
11911
  * Get download link info (without triggering download)
11896
11912
  * Requires authentication
@@ -12329,4 +12345,4 @@ declare class Diffsome {
12329
12345
  getApiKey(): string | null;
12330
12346
  }
12331
12347
 
12332
- 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 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 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 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 ReservationSettings, type ReservationSlot, type ReservationStaff, type ResetPasswordData, type SetupIntentResult, type SocialAuthUrl, type SocialProvider, 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 };
12348
+ 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 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 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 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 SetupIntentResult, type SocialAuthUrl, type SocialProvider, 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
@@ -11043,25 +11043,37 @@ interface CreateEntityRecordData {
11043
11043
  interface UpdateEntityRecordData {
11044
11044
  [key: string]: any;
11045
11045
  }
11046
+ interface ReservationServiceStaff {
11047
+ id: number;
11048
+ name: string;
11049
+ avatar?: string;
11050
+ }
11046
11051
  interface ReservationService {
11047
11052
  id: number;
11048
11053
  name: string;
11049
11054
  slug: string;
11050
11055
  description?: string;
11056
+ thumbnail?: string;
11051
11057
  duration: number;
11052
11058
  price: number;
11053
- is_active: boolean;
11054
- created_at: string;
11055
- updated_at: string;
11059
+ requires_staff: boolean;
11060
+ requires_payment: boolean;
11061
+ deposit?: number;
11062
+ staffs: ReservationServiceStaff[];
11063
+ is_active?: boolean;
11064
+ created_at?: string;
11065
+ updated_at?: string;
11056
11066
  }
11057
11067
  interface ReservationStaff {
11058
11068
  id: number;
11059
11069
  name: string;
11070
+ avatar?: string;
11071
+ bio?: string;
11060
11072
  email?: string;
11061
11073
  phone?: string;
11062
- is_active: boolean;
11063
- created_at: string;
11064
- updated_at: string;
11074
+ is_active?: boolean;
11075
+ created_at?: string;
11076
+ updated_at?: string;
11065
11077
  }
11066
11078
  interface ReservationSlot {
11067
11079
  id: number;
@@ -11336,6 +11348,10 @@ declare class HttpClient {
11336
11348
  * Get the base URL with tenant path
11337
11349
  */
11338
11350
  getBaseUrl(): string;
11351
+ /**
11352
+ * Get the download URL for a digital file
11353
+ */
11354
+ getDownloadUrl(token: string): string;
11339
11355
  /**
11340
11356
  * Set cart session ID (for guest cart persistence)
11341
11357
  */
@@ -11887,10 +11903,10 @@ declare class ShopResource {
11887
11903
  getOrderDownloads(orderNumber: string): Promise<DigitalDownloadLink[]>;
11888
11904
  /**
11889
11905
  * Get download file URL
11890
- * Returns the direct download URL for the file
11891
- * Requires authentication
11906
+ * Returns the web download URL that handles server-side authentication
11907
+ * User must be logged in via session (not just API token)
11892
11908
  */
11893
- downloadFile(token: string): Promise<string>;
11909
+ getDownloadUrl(token: string): string;
11894
11910
  /**
11895
11911
  * Get download link info (without triggering download)
11896
11912
  * Requires authentication
@@ -12329,4 +12345,4 @@ declare class Diffsome {
12329
12345
  getApiKey(): string | null;
12330
12346
  }
12331
12347
 
12332
- 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 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 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 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 ReservationSettings, type ReservationSlot, type ReservationStaff, type ResetPasswordData, type SetupIntentResult, type SocialAuthUrl, type SocialProvider, 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 };
12348
+ 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 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 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 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 SetupIntentResult, type SocialAuthUrl, type SocialProvider, 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
@@ -159,6 +159,12 @@ var HttpClient = class {
159
159
  getBaseUrl() {
160
160
  return `${this.baseUrl}/api/${this.tenantId}`;
161
161
  }
162
+ /**
163
+ * Get the download URL for a digital file
164
+ */
165
+ getDownloadUrl(token) {
166
+ return `${this.baseUrl}/download/${this.tenantId}/${token}`;
167
+ }
162
168
  /**
163
169
  * Set cart session ID (for guest cart persistence)
164
170
  */
@@ -1134,11 +1140,11 @@ var ShopResource = class {
1134
1140
  }
1135
1141
  /**
1136
1142
  * Get download file URL
1137
- * Returns the direct download URL for the file
1138
- * Requires authentication
1143
+ * Returns the web download URL that handles server-side authentication
1144
+ * User must be logged in via session (not just API token)
1139
1145
  */
1140
- async downloadFile(token) {
1141
- return `${this.http.getBaseUrl()}/downloads/${token}`;
1146
+ getDownloadUrl(token) {
1147
+ return this.http.getDownloadUrl(token);
1142
1148
  }
1143
1149
  /**
1144
1150
  * Get download link info (without triggering download)
package/dist/index.mjs CHANGED
@@ -129,6 +129,12 @@ var HttpClient = class {
129
129
  getBaseUrl() {
130
130
  return `${this.baseUrl}/api/${this.tenantId}`;
131
131
  }
132
+ /**
133
+ * Get the download URL for a digital file
134
+ */
135
+ getDownloadUrl(token) {
136
+ return `${this.baseUrl}/download/${this.tenantId}/${token}`;
137
+ }
132
138
  /**
133
139
  * Set cart session ID (for guest cart persistence)
134
140
  */
@@ -1104,11 +1110,11 @@ var ShopResource = class {
1104
1110
  }
1105
1111
  /**
1106
1112
  * Get download file URL
1107
- * Returns the direct download URL for the file
1108
- * Requires authentication
1113
+ * Returns the web download URL that handles server-side authentication
1114
+ * User must be logged in via session (not just API token)
1109
1115
  */
1110
- async downloadFile(token) {
1111
- return `${this.http.getBaseUrl()}/downloads/${token}`;
1116
+ getDownloadUrl(token) {
1117
+ return this.http.getDownloadUrl(token);
1112
1118
  }
1113
1119
  /**
1114
1120
  * Get download link info (without triggering download)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diffsome/sdk",
3
- "version": "3.2.1",
3
+ "version": "3.2.5",
4
4
  "description": "Diffsome SDK for JavaScript/TypeScript - Different + Awesome",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",