@anker-in/ui 0.3.0 → 0.3.2

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
@@ -254,6 +254,7 @@ interface DemoRoomContract {
254
254
  manager_id?: string;
255
255
  host_email?: string;
256
256
  host_name?: string;
257
+ manager_hash?: string;
257
258
  }
258
259
  interface DemoRoomPodConfig {
259
260
  questionnaire_id?: number;
@@ -397,6 +398,11 @@ interface CheckinBookingRequest {
397
398
  interface CheckinBookingResponse {
398
399
  booking: Booking;
399
400
  }
401
+ interface GetBookingDesignRequest {
402
+ booking_token?: string;
403
+ demoroom_code?: string;
404
+ session_id?: string;
405
+ }
400
406
  interface BookingDesign {
401
407
  id: number;
402
408
  project_id: string;
@@ -501,10 +507,12 @@ declare class DemoRoomApiClient {
501
507
  */
502
508
  checkinBooking(data: CheckinBookingRequest): Promise<Booking>;
503
509
  /**
504
- * 查询 POD 作品信息(模式1:精确查询)
505
- * @param bookingToken 预约凭证
510
+ * 查询 POD 作品信息
511
+ * 模式1(优先):通过 booking_token 精确查询
512
+ * 模式2:通过 demoroom_code + session_id 查询(MIR 跳回时预约尚未创建的场景)
513
+ * @param params 查询参数
506
514
  */
507
- getBookingDesign(bookingToken: string): Promise<BookingDesign>;
515
+ getBookingDesign(params: GetBookingDesignRequest): Promise<BookingDesign>;
508
516
  }
509
517
  declare function createDemoRoomApi(config: DemoRoomApiConfig): DemoRoomApiClient;
510
518
 
@@ -533,6 +541,12 @@ interface BookingPurposePodContent {
533
541
  btnText?: string;
534
542
  buttonLink?: string;
535
543
  btnIcon?: string;
544
+ /** 编辑设计按钮文案(URL 中存在 design_id 时使用,即访客已在 MIR 完成过设计) */
545
+ btnEditText?: string;
546
+ /** 编辑设计按钮图标(URL 中存在 design_id 时使用) */
547
+ btnEditIcon?: string;
548
+ /** 编辑设计跳转链接(URL 中存在 design_id 时使用) */
549
+ buttonEditLink?: string;
536
550
  }
537
551
  interface BookingPurposeDataItem {
538
552
  type?: string;
@@ -684,6 +698,7 @@ interface BookingSuccessPageData {
684
698
  QRCodeSubTitle?: string;
685
699
  /** 添加到钱包按钮文案 */
686
700
  btnToWallet?: string;
701
+ QRCodeUrl?: string;
687
702
  /** 打印按钮文案 */
688
703
  btnToPrint?: string;
689
704
  };
@@ -730,6 +745,7 @@ declare const BookingFormO2O: React.FC<BookingFormO2OProps>;
730
745
  interface BookingSuccessO2OProps {
731
746
  bookingData?: Booking;
732
747
  token?: string;
748
+ isStoreUser?: string;
733
749
  apiConfig?: DemoRoomApiConfig;
734
750
  onScheduleAgain?: (demoRoomCode: string) => void;
735
751
  onCancelSuccess?: (booking: Booking) => void;
@@ -831,14 +847,14 @@ declare function useCheckinBooking(client: DemoRoomApiClient): {
831
847
  error: ApiError | null;
832
848
  };
833
849
  /**
834
- * 查询 POD 作品信息 Hook(模式1:精确查询)
850
+ * 查询 POD 作品信息 Hook
851
+ * 模式1(优先):通过 booking_token 精确查询
852
+ * 模式2:通过 demoroom_code + session_id 查询(MIR 跳回时预约尚未创建的场景)
835
853
  */
836
- declare function useBookingDesign(client: DemoRoomApiClient, params: {
837
- booking_token: string;
838
- }, options?: {
854
+ declare function useBookingDesign(client: DemoRoomApiClient, params: GetBookingDesignRequest, options?: {
839
855
  enabled?: boolean;
840
856
  }): UseApiState<BookingDesign>;
841
857
 
842
858
  declare function cn(...inputs: ClassValue[]): string;
843
859
 
844
- export { ApiError, ApiErrorCode, type ApiResponse, type Booking, type BookingDesign, BookingForm, BookingFormO2O, type BookingFormO2OProps, type BookingFormProps, type BookingStatus, BookingSuccess, BookingSuccessO2O, type BookingSuccessO2OProps, type BookingSuccessProps, type CancelBookingResponse, type CheckinBookingRequest, type CheckinBookingResponse, type CreateBookingRequest, type CreateBookingResponse, DemoRoomApiClient, type DemoRoomApiConfig, type DemoRoom as DemoRoomData, DemoRoomO2O, type DemoRoomO2OProps, type DemoRoomStatus, type DemoRoomType, type EditBookingRequest, type GetBookingResponse, type GetDemoRoomsResponse, type GetTimeslotsResponse, type Question, type QuestionOption, type QuestionType, type Questionnaire, type Timeslot, type TimeslotStatus, cn, createDemoRoomApi, useBooking, useBookingDesign, useCancelBooking, useCheckinBooking, useCreateBooking, useDemoRoom, useDemoRooms, useEditBooking, useQuestionnaire, useTimeslots };
860
+ export { ApiError, ApiErrorCode, type ApiResponse, type Booking, type BookingDesign, BookingForm, BookingFormO2O, type BookingFormO2OProps, type BookingFormProps, type BookingStatus, BookingSuccess, BookingSuccessO2O, type BookingSuccessO2OProps, type BookingSuccessProps, type CancelBookingResponse, type CheckinBookingRequest, type CheckinBookingResponse, type CreateBookingRequest, type CreateBookingResponse, DemoRoomApiClient, type DemoRoomApiConfig, type DemoRoom as DemoRoomData, DemoRoomO2O, type DemoRoomO2OProps, type DemoRoomStatus, type DemoRoomType, type EditBookingRequest, type GetBookingDesignRequest, type GetBookingResponse, type GetDemoRoomsResponse, type GetTimeslotsResponse, type Question, type QuestionOption, type QuestionType, type Questionnaire, type Timeslot, type TimeslotStatus, cn, createDemoRoomApi, useBooking, useBookingDesign, useCancelBooking, useCheckinBooking, useCreateBooking, useDemoRoom, useDemoRooms, useEditBooking, useQuestionnaire, useTimeslots };
package/dist/index.d.ts CHANGED
@@ -254,6 +254,7 @@ interface DemoRoomContract {
254
254
  manager_id?: string;
255
255
  host_email?: string;
256
256
  host_name?: string;
257
+ manager_hash?: string;
257
258
  }
258
259
  interface DemoRoomPodConfig {
259
260
  questionnaire_id?: number;
@@ -397,6 +398,11 @@ interface CheckinBookingRequest {
397
398
  interface CheckinBookingResponse {
398
399
  booking: Booking;
399
400
  }
401
+ interface GetBookingDesignRequest {
402
+ booking_token?: string;
403
+ demoroom_code?: string;
404
+ session_id?: string;
405
+ }
400
406
  interface BookingDesign {
401
407
  id: number;
402
408
  project_id: string;
@@ -501,10 +507,12 @@ declare class DemoRoomApiClient {
501
507
  */
502
508
  checkinBooking(data: CheckinBookingRequest): Promise<Booking>;
503
509
  /**
504
- * 查询 POD 作品信息(模式1:精确查询)
505
- * @param bookingToken 预约凭证
510
+ * 查询 POD 作品信息
511
+ * 模式1(优先):通过 booking_token 精确查询
512
+ * 模式2:通过 demoroom_code + session_id 查询(MIR 跳回时预约尚未创建的场景)
513
+ * @param params 查询参数
506
514
  */
507
- getBookingDesign(bookingToken: string): Promise<BookingDesign>;
515
+ getBookingDesign(params: GetBookingDesignRequest): Promise<BookingDesign>;
508
516
  }
509
517
  declare function createDemoRoomApi(config: DemoRoomApiConfig): DemoRoomApiClient;
510
518
 
@@ -533,6 +541,12 @@ interface BookingPurposePodContent {
533
541
  btnText?: string;
534
542
  buttonLink?: string;
535
543
  btnIcon?: string;
544
+ /** 编辑设计按钮文案(URL 中存在 design_id 时使用,即访客已在 MIR 完成过设计) */
545
+ btnEditText?: string;
546
+ /** 编辑设计按钮图标(URL 中存在 design_id 时使用) */
547
+ btnEditIcon?: string;
548
+ /** 编辑设计跳转链接(URL 中存在 design_id 时使用) */
549
+ buttonEditLink?: string;
536
550
  }
537
551
  interface BookingPurposeDataItem {
538
552
  type?: string;
@@ -684,6 +698,7 @@ interface BookingSuccessPageData {
684
698
  QRCodeSubTitle?: string;
685
699
  /** 添加到钱包按钮文案 */
686
700
  btnToWallet?: string;
701
+ QRCodeUrl?: string;
687
702
  /** 打印按钮文案 */
688
703
  btnToPrint?: string;
689
704
  };
@@ -730,6 +745,7 @@ declare const BookingFormO2O: React.FC<BookingFormO2OProps>;
730
745
  interface BookingSuccessO2OProps {
731
746
  bookingData?: Booking;
732
747
  token?: string;
748
+ isStoreUser?: string;
733
749
  apiConfig?: DemoRoomApiConfig;
734
750
  onScheduleAgain?: (demoRoomCode: string) => void;
735
751
  onCancelSuccess?: (booking: Booking) => void;
@@ -831,14 +847,14 @@ declare function useCheckinBooking(client: DemoRoomApiClient): {
831
847
  error: ApiError | null;
832
848
  };
833
849
  /**
834
- * 查询 POD 作品信息 Hook(模式1:精确查询)
850
+ * 查询 POD 作品信息 Hook
851
+ * 模式1(优先):通过 booking_token 精确查询
852
+ * 模式2:通过 demoroom_code + session_id 查询(MIR 跳回时预约尚未创建的场景)
835
853
  */
836
- declare function useBookingDesign(client: DemoRoomApiClient, params: {
837
- booking_token: string;
838
- }, options?: {
854
+ declare function useBookingDesign(client: DemoRoomApiClient, params: GetBookingDesignRequest, options?: {
839
855
  enabled?: boolean;
840
856
  }): UseApiState<BookingDesign>;
841
857
 
842
858
  declare function cn(...inputs: ClassValue[]): string;
843
859
 
844
- export { ApiError, ApiErrorCode, type ApiResponse, type Booking, type BookingDesign, BookingForm, BookingFormO2O, type BookingFormO2OProps, type BookingFormProps, type BookingStatus, BookingSuccess, BookingSuccessO2O, type BookingSuccessO2OProps, type BookingSuccessProps, type CancelBookingResponse, type CheckinBookingRequest, type CheckinBookingResponse, type CreateBookingRequest, type CreateBookingResponse, DemoRoomApiClient, type DemoRoomApiConfig, type DemoRoom as DemoRoomData, DemoRoomO2O, type DemoRoomO2OProps, type DemoRoomStatus, type DemoRoomType, type EditBookingRequest, type GetBookingResponse, type GetDemoRoomsResponse, type GetTimeslotsResponse, type Question, type QuestionOption, type QuestionType, type Questionnaire, type Timeslot, type TimeslotStatus, cn, createDemoRoomApi, useBooking, useBookingDesign, useCancelBooking, useCheckinBooking, useCreateBooking, useDemoRoom, useDemoRooms, useEditBooking, useQuestionnaire, useTimeslots };
860
+ export { ApiError, ApiErrorCode, type ApiResponse, type Booking, type BookingDesign, BookingForm, BookingFormO2O, type BookingFormO2OProps, type BookingFormProps, type BookingStatus, BookingSuccess, BookingSuccessO2O, type BookingSuccessO2OProps, type BookingSuccessProps, type CancelBookingResponse, type CheckinBookingRequest, type CheckinBookingResponse, type CreateBookingRequest, type CreateBookingResponse, DemoRoomApiClient, type DemoRoomApiConfig, type DemoRoom as DemoRoomData, DemoRoomO2O, type DemoRoomO2OProps, type DemoRoomStatus, type DemoRoomType, type EditBookingRequest, type GetBookingDesignRequest, type GetBookingResponse, type GetDemoRoomsResponse, type GetTimeslotsResponse, type Question, type QuestionOption, type QuestionType, type Questionnaire, type Timeslot, type TimeslotStatus, cn, createDemoRoomApi, useBooking, useBookingDesign, useCancelBooking, useCheckinBooking, useCreateBooking, useDemoRoom, useDemoRooms, useEditBooking, useQuestionnaire, useTimeslots };