@hobenakicoffee/libraries 6.3.0 → 6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hobenakicoffee/libraries",
3
- "version": "6.3.0",
3
+ "version": "6.4.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "types": "src/index.ts",
@@ -1717,6 +1717,56 @@ export type Database = {
1717
1717
  };
1718
1718
  Relationships: [];
1719
1719
  };
1720
+ reviews: {
1721
+ Row: {
1722
+ content: string | null;
1723
+ created_at: string;
1724
+ entity_id: string;
1725
+ entity_type: string;
1726
+ id: string;
1727
+ is_deleted: boolean;
1728
+ is_hidden: boolean;
1729
+ is_verified_purchase: boolean;
1730
+ profile_id: string;
1731
+ rating: number;
1732
+ updated_at: string;
1733
+ };
1734
+ Insert: {
1735
+ content?: string | null;
1736
+ created_at?: string;
1737
+ entity_id: string;
1738
+ entity_type: string;
1739
+ id?: string;
1740
+ is_deleted?: boolean;
1741
+ is_hidden?: boolean;
1742
+ is_verified_purchase?: boolean;
1743
+ profile_id: string;
1744
+ rating: number;
1745
+ updated_at?: string;
1746
+ };
1747
+ Update: {
1748
+ content?: string | null;
1749
+ created_at?: string;
1750
+ entity_id?: string;
1751
+ entity_type?: string;
1752
+ id?: string;
1753
+ is_deleted?: boolean;
1754
+ is_hidden?: boolean;
1755
+ is_verified_purchase?: boolean;
1756
+ profile_id?: string;
1757
+ rating?: number;
1758
+ updated_at?: string;
1759
+ };
1760
+ Relationships: [
1761
+ {
1762
+ foreignKeyName: "reviews_profile_id_fkey";
1763
+ columns: ["profile_id"];
1764
+ isOneToOne: false;
1765
+ referencedRelation: "profiles";
1766
+ referencedColumns: ["id"];
1767
+ },
1768
+ ];
1769
+ };
1720
1770
  service_requests: {
1721
1771
  Row: {
1722
1772
  admin_note: string | null;
@@ -2383,6 +2433,8 @@ export type Database = {
2383
2433
  processing_min_days: number | null;
2384
2434
  product_type: Database["public"]["Enums"]["shop_product_type_enum"];
2385
2435
  profile_id: string;
2436
+ rating_avg: number | null;
2437
+ rating_count: number;
2386
2438
  requires_shipping: boolean;
2387
2439
  sales_count: number;
2388
2440
  shipping_fee_inside_dhaka: number;
@@ -2417,6 +2469,8 @@ export type Database = {
2417
2469
  processing_min_days?: number | null;
2418
2470
  product_type: Database["public"]["Enums"]["shop_product_type_enum"];
2419
2471
  profile_id: string;
2472
+ rating_avg?: number | null;
2473
+ rating_count?: number;
2420
2474
  requires_shipping?: boolean;
2421
2475
  sales_count?: number;
2422
2476
  shipping_fee_inside_dhaka?: number;
@@ -2451,6 +2505,8 @@ export type Database = {
2451
2505
  processing_min_days?: number | null;
2452
2506
  product_type?: Database["public"]["Enums"]["shop_product_type_enum"];
2453
2507
  profile_id?: string;
2508
+ rating_avg?: number | null;
2509
+ rating_count?: number;
2454
2510
  requires_shipping?: boolean;
2455
2511
  sales_count?: number;
2456
2512
  shipping_fee_inside_dhaka?: number;
@@ -3194,6 +3250,7 @@ export type Database = {
3194
3250
  Args: { p_comment_id: number };
3195
3251
  Returns: undefined;
3196
3252
  };
3253
+ delete_review: { Args: { p_review_id: string }; Returns: Json };
3197
3254
  delete_shop_category: { Args: { p_category_id: string }; Returns: Json };
3198
3255
  delete_shop_policy: {
3199
3256
  Args: {
@@ -3474,6 +3531,19 @@ export type Database = {
3474
3531
  Args: { p_product_slug: string; p_username: string };
3475
3532
  Returns: Json;
3476
3533
  };
3534
+ get_product_reviews: {
3535
+ Args: { p_cursor?: string; p_entity_id: string; p_limit?: number };
3536
+ Returns: {
3537
+ content: string;
3538
+ created_at: string;
3539
+ is_verified_purchase: boolean;
3540
+ rating: number;
3541
+ review_id: string;
3542
+ reviewer_avatar_url: string;
3543
+ reviewer_username: string;
3544
+ updated_at: string;
3545
+ }[];
3546
+ };
3477
3547
  get_reader_feed: {
3478
3548
  Args: {
3479
3549
  p_cursor?: string;
@@ -3702,6 +3772,7 @@ export type Database = {
3702
3772
  };
3703
3773
  Returns: boolean;
3704
3774
  };
3775
+ hide_review: { Args: { p_review_id: string }; Returns: Json };
3705
3776
  increment_creator_subscription_usage: {
3706
3777
  Args: {
3707
3778
  p_amount: number;
@@ -3930,6 +4001,15 @@ export type Database = {
3930
4001
  };
3931
4002
  Returns: Json;
3932
4003
  };
4004
+ upsert_review: {
4005
+ Args: {
4006
+ p_content?: string;
4007
+ p_entity_id: string;
4008
+ p_entity_type: string;
4009
+ p_rating: number;
4010
+ };
4011
+ Returns: Json;
4012
+ };
3933
4013
  upsert_shop_category: {
3934
4014
  Args: {
3935
4015
  p_category_id?: string;