@aifeatures/admin-react 0.24.0 → 0.25.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.cjs +6 -6
- package/dist/index.d.cts +9 -13
- package/dist/index.d.ts +9 -13
- package/dist/index.js +6 -6
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -134,23 +134,24 @@ interface EmailDraftPreview {
|
|
|
134
134
|
text: string;
|
|
135
135
|
version: number;
|
|
136
136
|
}
|
|
137
|
-
type EmailTemplateStatus = '
|
|
137
|
+
type EmailTemplateStatus = 'active' | 'archived';
|
|
138
138
|
/** The template an email renders and sends in; `null` on a draft is the built-in Standard template. */
|
|
139
139
|
interface EmailTemplateRef {
|
|
140
140
|
id: string;
|
|
141
141
|
name: string;
|
|
142
142
|
}
|
|
143
143
|
/**
|
|
144
|
-
* One of the site's email templates (email templates
|
|
145
|
-
*
|
|
146
|
-
*
|
|
144
|
+
* One of the site's email templates (email templates KTD26, KTD37): active
|
|
145
|
+
* (choosable for an email, editable until locked) or archived (kept for
|
|
146
|
+
* emails already sent). Standard has no entry.
|
|
147
147
|
*/
|
|
148
148
|
interface EmailTemplateSummary extends EmailTemplateRef {
|
|
149
149
|
status: EmailTemplateStatus;
|
|
150
|
-
/** The version
|
|
150
|
+
/** The template's version: changes on every save. */
|
|
151
151
|
updated_at: string;
|
|
152
|
+
/** A scheduled or sent email uses it: it can't change; copy it instead (KTD37). */
|
|
153
|
+
locked: boolean;
|
|
152
154
|
created_at: string;
|
|
153
|
-
published_at: string | null;
|
|
154
155
|
archived_at: string | null;
|
|
155
156
|
/** Test sends never count. */
|
|
156
157
|
usage: {
|
|
@@ -160,7 +161,7 @@ interface EmailTemplateSummary extends EmailTemplateRef {
|
|
|
160
161
|
};
|
|
161
162
|
/** No email has ever used it (R35). */
|
|
162
163
|
can_delete: boolean;
|
|
163
|
-
/**
|
|
164
|
+
/** Active, with no unsent email and nothing scheduled or sending using it (R36). */
|
|
164
165
|
can_archive: boolean;
|
|
165
166
|
}
|
|
166
167
|
/** A sample email (or a given draft) rendered through one template. */
|
|
@@ -3054,7 +3055,7 @@ type PickImage = () => Promise<PickedImage | null>;
|
|
|
3054
3055
|
* - `exportContacts` answers with CSV text, not JSON; resolve with the text.
|
|
3055
3056
|
* - On an aifeatures error, reject with an Error whose `code` is the
|
|
3056
3057
|
* aifeatures error `code` (`version_conflict`, `over_allowance`,
|
|
3057
|
-
* `
|
|
3058
|
+
* `template_in_use`, `template_archived`, …): the view keys its recovery on it.
|
|
3058
3059
|
*/
|
|
3059
3060
|
declare const EMAIL_ORG_ACTIONS: {
|
|
3060
3061
|
readonly commitBroadcast: {
|
|
@@ -3100,11 +3101,6 @@ declare const EMAIL_ORG_ACTIONS: {
|
|
|
3100
3101
|
readonly path: "/sites/{siteId}/marketing/templates/{templateId}/copy";
|
|
3101
3102
|
readonly params: readonly ["templateId"];
|
|
3102
3103
|
};
|
|
3103
|
-
readonly publishEmailTemplate: {
|
|
3104
|
-
readonly method: "POST";
|
|
3105
|
-
readonly path: "/sites/{siteId}/marketing/templates/{templateId}/publish";
|
|
3106
|
-
readonly params: readonly ["templateId"];
|
|
3107
|
-
};
|
|
3108
3104
|
readonly archiveEmailTemplate: {
|
|
3109
3105
|
readonly method: "POST";
|
|
3110
3106
|
readonly path: "/sites/{siteId}/marketing/templates/{templateId}/archive";
|
package/dist/index.d.ts
CHANGED
|
@@ -134,23 +134,24 @@ interface EmailDraftPreview {
|
|
|
134
134
|
text: string;
|
|
135
135
|
version: number;
|
|
136
136
|
}
|
|
137
|
-
type EmailTemplateStatus = '
|
|
137
|
+
type EmailTemplateStatus = 'active' | 'archived';
|
|
138
138
|
/** The template an email renders and sends in; `null` on a draft is the built-in Standard template. */
|
|
139
139
|
interface EmailTemplateRef {
|
|
140
140
|
id: string;
|
|
141
141
|
name: string;
|
|
142
142
|
}
|
|
143
143
|
/**
|
|
144
|
-
* One of the site's email templates (email templates
|
|
145
|
-
*
|
|
146
|
-
*
|
|
144
|
+
* One of the site's email templates (email templates KTD26, KTD37): active
|
|
145
|
+
* (choosable for an email, editable until locked) or archived (kept for
|
|
146
|
+
* emails already sent). Standard has no entry.
|
|
147
147
|
*/
|
|
148
148
|
interface EmailTemplateSummary extends EmailTemplateRef {
|
|
149
149
|
status: EmailTemplateStatus;
|
|
150
|
-
/** The version
|
|
150
|
+
/** The template's version: changes on every save. */
|
|
151
151
|
updated_at: string;
|
|
152
|
+
/** A scheduled or sent email uses it: it can't change; copy it instead (KTD37). */
|
|
153
|
+
locked: boolean;
|
|
152
154
|
created_at: string;
|
|
153
|
-
published_at: string | null;
|
|
154
155
|
archived_at: string | null;
|
|
155
156
|
/** Test sends never count. */
|
|
156
157
|
usage: {
|
|
@@ -160,7 +161,7 @@ interface EmailTemplateSummary extends EmailTemplateRef {
|
|
|
160
161
|
};
|
|
161
162
|
/** No email has ever used it (R35). */
|
|
162
163
|
can_delete: boolean;
|
|
163
|
-
/**
|
|
164
|
+
/** Active, with no unsent email and nothing scheduled or sending using it (R36). */
|
|
164
165
|
can_archive: boolean;
|
|
165
166
|
}
|
|
166
167
|
/** A sample email (or a given draft) rendered through one template. */
|
|
@@ -3054,7 +3055,7 @@ type PickImage = () => Promise<PickedImage | null>;
|
|
|
3054
3055
|
* - `exportContacts` answers with CSV text, not JSON; resolve with the text.
|
|
3055
3056
|
* - On an aifeatures error, reject with an Error whose `code` is the
|
|
3056
3057
|
* aifeatures error `code` (`version_conflict`, `over_allowance`,
|
|
3057
|
-
* `
|
|
3058
|
+
* `template_in_use`, `template_archived`, …): the view keys its recovery on it.
|
|
3058
3059
|
*/
|
|
3059
3060
|
declare const EMAIL_ORG_ACTIONS: {
|
|
3060
3061
|
readonly commitBroadcast: {
|
|
@@ -3100,11 +3101,6 @@ declare const EMAIL_ORG_ACTIONS: {
|
|
|
3100
3101
|
readonly path: "/sites/{siteId}/marketing/templates/{templateId}/copy";
|
|
3101
3102
|
readonly params: readonly ["templateId"];
|
|
3102
3103
|
};
|
|
3103
|
-
readonly publishEmailTemplate: {
|
|
3104
|
-
readonly method: "POST";
|
|
3105
|
-
readonly path: "/sites/{siteId}/marketing/templates/{templateId}/publish";
|
|
3106
|
-
readonly params: readonly ["templateId"];
|
|
3107
|
-
};
|
|
3108
3104
|
readonly archiveEmailTemplate: {
|
|
3109
3105
|
readonly method: "POST";
|
|
3110
3106
|
readonly path: "/sites/{siteId}/marketing/templates/{templateId}/archive";
|