@simonarcher/fika-types 1.3.0 → 1.5.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/shop.d.ts CHANGED
@@ -256,7 +256,21 @@ export type ShopData = {
256
256
  completedAt?: AdminTimestamp;
257
257
  lastUpdated?: AdminTimestamp;
258
258
  };
259
+ ownerSectionVerifications?: OwnerSectionVerifications;
259
260
  };
261
+ /** Stable section keys exposed in the owner portal and surfaced as "verified
262
+ * by owner" badges on user-facing apps. */
263
+ export type OwnerSectionKey = 'hours' | 'about' | 'photos' | 'contact' | 'socials' | 'brew_methods' | 'roasters' | 'amenities' | 'specialties' | 'specialty_flags';
264
+ export interface OwnerSectionVerification {
265
+ /** ISO-8601 timestamp of when the owner last attested this section. */
266
+ verifiedAt: string;
267
+ /** staff_invites.id of the token used (null if attributed to the
268
+ * signed-in accepted_by user, post-claim). */
269
+ tokenId: string | null;
270
+ /** Email captured from the invite at attestation time. */
271
+ actorEmail: string | null;
272
+ }
273
+ export type OwnerSectionVerifications = Partial<Record<OwnerSectionKey, OwnerSectionVerification>>;
260
274
  export interface ShopCommunityStats {
261
275
  totalCheckIns: number;
262
276
  uniqueVisitors: number;
@@ -301,6 +315,17 @@ export interface ShopContactDetails {
301
315
  contactNumber: string;
302
316
  email: string;
303
317
  website: string;
318
+ /**
319
+ * Social media handles. Stored alongside other contact data so a shop has a
320
+ * single source of truth for "how to reach this place". Bare handles only —
321
+ * no `@` prefix, no URL — clients construct platform URLs at render time.
322
+ * Optional/nullable to keep records sparse for shops that don't publish a
323
+ * given platform.
324
+ */
325
+ instagram?: string | null;
326
+ facebook?: string | null;
327
+ tiktok?: string | null;
328
+ twitter?: string | null;
304
329
  address: {
305
330
  formattedAddress: string;
306
331
  shortFormattedAddress: string;
@@ -1529,6 +1529,165 @@ export type Database = {
1529
1529
  }
1530
1530
  ];
1531
1531
  };
1532
+ owner_edit_log: {
1533
+ Row: {
1534
+ actor_email: string | null;
1535
+ after_value: Json | null;
1536
+ before_value: Json | null;
1537
+ created_at: string;
1538
+ field_path: string;
1539
+ id: string;
1540
+ ip_address: string | null;
1541
+ shop_id: string;
1542
+ token_id: string | null;
1543
+ user_agent: string | null;
1544
+ };
1545
+ Insert: {
1546
+ actor_email?: string | null;
1547
+ after_value?: Json | null;
1548
+ before_value?: Json | null;
1549
+ created_at?: string;
1550
+ field_path: string;
1551
+ id?: string;
1552
+ ip_address?: string | null;
1553
+ shop_id: string;
1554
+ token_id?: string | null;
1555
+ user_agent?: string | null;
1556
+ };
1557
+ Update: {
1558
+ actor_email?: string | null;
1559
+ after_value?: Json | null;
1560
+ before_value?: Json | null;
1561
+ created_at?: string;
1562
+ field_path?: string;
1563
+ id?: string;
1564
+ ip_address?: string | null;
1565
+ shop_id?: string;
1566
+ token_id?: string | null;
1567
+ user_agent?: string | null;
1568
+ };
1569
+ Relationships: [
1570
+ {
1571
+ foreignKeyName: "owner_edit_log_shop_id_fkey";
1572
+ columns: ["shop_id"];
1573
+ isOneToOne: false;
1574
+ referencedRelation: "shops";
1575
+ referencedColumns: ["id"];
1576
+ }
1577
+ ];
1578
+ };
1579
+ owner_listing_reports: {
1580
+ Row: {
1581
+ actor_email: string | null;
1582
+ created_at: string;
1583
+ id: string;
1584
+ ip_address: string | null;
1585
+ message: string | null;
1586
+ reason: string;
1587
+ resolution_note: string | null;
1588
+ resolved_at: string | null;
1589
+ resolved_by: string | null;
1590
+ shop_id: string;
1591
+ token_id: string | null;
1592
+ user_agent: string | null;
1593
+ };
1594
+ Insert: {
1595
+ actor_email?: string | null;
1596
+ created_at?: string;
1597
+ id?: string;
1598
+ ip_address?: string | null;
1599
+ message?: string | null;
1600
+ reason: string;
1601
+ resolution_note?: string | null;
1602
+ resolved_at?: string | null;
1603
+ resolved_by?: string | null;
1604
+ shop_id: string;
1605
+ token_id?: string | null;
1606
+ user_agent?: string | null;
1607
+ };
1608
+ Update: {
1609
+ actor_email?: string | null;
1610
+ created_at?: string;
1611
+ id?: string;
1612
+ ip_address?: string | null;
1613
+ message?: string | null;
1614
+ reason?: string;
1615
+ resolution_note?: string | null;
1616
+ resolved_at?: string | null;
1617
+ resolved_by?: string | null;
1618
+ shop_id?: string;
1619
+ token_id?: string | null;
1620
+ user_agent?: string | null;
1621
+ };
1622
+ Relationships: [
1623
+ {
1624
+ foreignKeyName: "owner_listing_reports_shop_id_fkey";
1625
+ columns: ["shop_id"];
1626
+ isOneToOne: false;
1627
+ referencedRelation: "shops";
1628
+ referencedColumns: ["id"];
1629
+ }
1630
+ ];
1631
+ };
1632
+ owner_pending_field_changes: {
1633
+ Row: {
1634
+ actor_email: string | null;
1635
+ created_at: string;
1636
+ current_value: Json | null;
1637
+ field_path: string;
1638
+ id: string;
1639
+ ip_address: string | null;
1640
+ proposed_value: Json | null;
1641
+ rejection_reason: string | null;
1642
+ reviewed_at: string | null;
1643
+ reviewed_by: string | null;
1644
+ shop_id: string;
1645
+ status: string;
1646
+ token_id: string | null;
1647
+ user_agent: string | null;
1648
+ };
1649
+ Insert: {
1650
+ actor_email?: string | null;
1651
+ created_at?: string;
1652
+ current_value?: Json | null;
1653
+ field_path: string;
1654
+ id?: string;
1655
+ ip_address?: string | null;
1656
+ proposed_value?: Json | null;
1657
+ rejection_reason?: string | null;
1658
+ reviewed_at?: string | null;
1659
+ reviewed_by?: string | null;
1660
+ shop_id: string;
1661
+ status?: string;
1662
+ token_id?: string | null;
1663
+ user_agent?: string | null;
1664
+ };
1665
+ Update: {
1666
+ actor_email?: string | null;
1667
+ created_at?: string;
1668
+ current_value?: Json | null;
1669
+ field_path?: string;
1670
+ id?: string;
1671
+ ip_address?: string | null;
1672
+ proposed_value?: Json | null;
1673
+ rejection_reason?: string | null;
1674
+ reviewed_at?: string | null;
1675
+ reviewed_by?: string | null;
1676
+ shop_id?: string;
1677
+ status?: string;
1678
+ token_id?: string | null;
1679
+ user_agent?: string | null;
1680
+ };
1681
+ Relationships: [
1682
+ {
1683
+ foreignKeyName: "owner_pending_field_changes_shop_id_fkey";
1684
+ columns: ["shop_id"];
1685
+ isOneToOne: false;
1686
+ referencedRelation: "shops";
1687
+ referencedColumns: ["id"];
1688
+ }
1689
+ ];
1690
+ };
1532
1691
  points: {
1533
1692
  Row: {
1534
1693
  action: string;
@@ -2865,6 +3024,8 @@ export type Database = {
2865
3024
  custom_roasters: string[] | null;
2866
3025
  features: Json | null;
2867
3026
  fika_rating: number | null;
3027
+ flag_for_review: boolean;
3028
+ flag_reason: string | null;
2868
3029
  geo_point: Json | null;
2869
3030
  google_rating: number | null;
2870
3031
  id: string;
@@ -2873,6 +3034,7 @@ export type Database = {
2873
3034
  logo_image: string | null;
2874
3035
  name: string;
2875
3036
  onboarding: Json | null;
3037
+ owner_section_verifications: Json;
2876
3038
  payment_options: Json | null;
2877
3039
  place_id: string | null;
2878
3040
  platform_loyalty_rewards: Json | null;
@@ -2905,6 +3067,8 @@ export type Database = {
2905
3067
  custom_roasters?: string[] | null;
2906
3068
  features?: Json | null;
2907
3069
  fika_rating?: number | null;
3070
+ flag_for_review?: boolean;
3071
+ flag_reason?: string | null;
2908
3072
  geo_point?: Json | null;
2909
3073
  google_rating?: number | null;
2910
3074
  id: string;
@@ -2913,6 +3077,7 @@ export type Database = {
2913
3077
  logo_image?: string | null;
2914
3078
  name: string;
2915
3079
  onboarding?: Json | null;
3080
+ owner_section_verifications?: Json;
2916
3081
  payment_options?: Json | null;
2917
3082
  place_id?: string | null;
2918
3083
  platform_loyalty_rewards?: Json | null;
@@ -2945,6 +3110,8 @@ export type Database = {
2945
3110
  custom_roasters?: string[] | null;
2946
3111
  features?: Json | null;
2947
3112
  fika_rating?: number | null;
3113
+ flag_for_review?: boolean;
3114
+ flag_reason?: string | null;
2948
3115
  geo_point?: Json | null;
2949
3116
  google_rating?: number | null;
2950
3117
  id?: string;
@@ -2953,6 +3120,7 @@ export type Database = {
2953
3120
  logo_image?: string | null;
2954
3121
  name?: string;
2955
3122
  onboarding?: Json | null;
3123
+ owner_section_verifications?: Json;
2956
3124
  payment_options?: Json | null;
2957
3125
  place_id?: string | null;
2958
3126
  platform_loyalty_rewards?: Json | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonarcher/fika-types",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "Shared TypeScript types for Fika projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",