@aifeatures/admin-react 0.20.0 → 0.21.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.cts CHANGED
@@ -18,6 +18,8 @@ interface Form {
18
18
  name: string;
19
19
  endpoint_url: string;
20
20
  email_recipients: string[];
21
+ /** When false, submissions do not email `email_recipients` (they stay saved). */
22
+ email_notifications: boolean;
21
23
  redirect_url: string | null;
22
24
  turnstile_sitekey: string | null;
23
25
  created_at: string;
@@ -78,6 +80,7 @@ interface FormsListResponse {
78
80
  interface CreateFormInput {
79
81
  name: string;
80
82
  email_recipients?: string[];
83
+ email_notifications?: boolean;
81
84
  redirect_url?: string;
82
85
  }
83
86
  /**
@@ -86,6 +89,7 @@ interface CreateFormInput {
86
89
  interface UpdateFormInput {
87
90
  name?: string;
88
91
  email_recipients?: string[];
92
+ email_notifications?: boolean;
89
93
  redirect_url?: string | null;
90
94
  }
91
95
  /**
@@ -2011,8 +2015,10 @@ declare function FormSettings({ form, onSaved, className }: FormSettingsProps):
2011
2015
  interface SubmissionDetailProps {
2012
2016
  submission: Submission;
2013
2017
  onBack: () => void;
2018
+ /** Shows a delete action when provided; the host navigates away once it resolves */
2019
+ onDelete?: () => Promise<void>;
2014
2020
  }
2015
- declare function SubmissionDetail({ submission, onBack, }: SubmissionDetailProps): react_jsx_runtime.JSX.Element;
2021
+ declare function SubmissionDetail({ submission, onBack, onDelete, }: SubmissionDetailProps): react_jsx_runtime.JSX.Element;
2016
2022
 
2017
2023
  /**
2018
2024
  * What the merchant chose to refund — the body of POST /orders/:id/refund,
@@ -2935,6 +2941,12 @@ interface UsePeopleReturn {
2935
2941
  source: PeopleSource | undefined;
2936
2942
  setSource: (source: PeopleSource | undefined) => void;
2937
2943
  refetch: () => Promise<void>;
2944
+ /**
2945
+ * Refetch after a person may have been removed (e.g. a deleted submission).
2946
+ * If that emptied a later page, step back one page instead of showing it.
2947
+ * Plain paging keeps the accepted empty page after an exactly-full one.
2948
+ */
2949
+ refetchAfterRemoval: () => Promise<void>;
2938
2950
  }
2939
2951
  /**
2940
2952
  * The merged people list (customers ∪ form leads, grouped by email — display
package/dist/index.d.ts CHANGED
@@ -18,6 +18,8 @@ interface Form {
18
18
  name: string;
19
19
  endpoint_url: string;
20
20
  email_recipients: string[];
21
+ /** When false, submissions do not email `email_recipients` (they stay saved). */
22
+ email_notifications: boolean;
21
23
  redirect_url: string | null;
22
24
  turnstile_sitekey: string | null;
23
25
  created_at: string;
@@ -78,6 +80,7 @@ interface FormsListResponse {
78
80
  interface CreateFormInput {
79
81
  name: string;
80
82
  email_recipients?: string[];
83
+ email_notifications?: boolean;
81
84
  redirect_url?: string;
82
85
  }
83
86
  /**
@@ -86,6 +89,7 @@ interface CreateFormInput {
86
89
  interface UpdateFormInput {
87
90
  name?: string;
88
91
  email_recipients?: string[];
92
+ email_notifications?: boolean;
89
93
  redirect_url?: string | null;
90
94
  }
91
95
  /**
@@ -2011,8 +2015,10 @@ declare function FormSettings({ form, onSaved, className }: FormSettingsProps):
2011
2015
  interface SubmissionDetailProps {
2012
2016
  submission: Submission;
2013
2017
  onBack: () => void;
2018
+ /** Shows a delete action when provided; the host navigates away once it resolves */
2019
+ onDelete?: () => Promise<void>;
2014
2020
  }
2015
- declare function SubmissionDetail({ submission, onBack, }: SubmissionDetailProps): react_jsx_runtime.JSX.Element;
2021
+ declare function SubmissionDetail({ submission, onBack, onDelete, }: SubmissionDetailProps): react_jsx_runtime.JSX.Element;
2016
2022
 
2017
2023
  /**
2018
2024
  * What the merchant chose to refund — the body of POST /orders/:id/refund,
@@ -2935,6 +2941,12 @@ interface UsePeopleReturn {
2935
2941
  source: PeopleSource | undefined;
2936
2942
  setSource: (source: PeopleSource | undefined) => void;
2937
2943
  refetch: () => Promise<void>;
2944
+ /**
2945
+ * Refetch after a person may have been removed (e.g. a deleted submission).
2946
+ * If that emptied a later page, step back one page instead of showing it.
2947
+ * Plain paging keeps the accepted empty page after an exactly-full one.
2948
+ */
2949
+ refetchAfterRemoval: () => Promise<void>;
2938
2950
  }
2939
2951
  /**
2940
2952
  * The merged people list (customers ∪ form leads, grouped by email — display