@inneropen/marvin-sdk 2.0.0-next.4 → 2.0.0-next.6
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/platform.cjs +63 -0
- package/dist/platform.d.cts +127 -43
- package/dist/platform.d.ts +127 -43
- package/dist/platform.js +62 -0
- package/package.json +1 -1
package/dist/platform.cjs
CHANGED
|
@@ -27,6 +27,7 @@ __export(platform_exports, {
|
|
|
27
27
|
AssetsModule: () => AssetsModule,
|
|
28
28
|
AuthModule: () => AuthModule,
|
|
29
29
|
CollectionsModule: () => CollectionsModule,
|
|
30
|
+
EmailTemplatesClient: () => EmailTemplatesClient,
|
|
30
31
|
EntriesModule: () => EntriesModule,
|
|
31
32
|
EntryTypesModule: () => EntryTypesModule,
|
|
32
33
|
EventLogModule: () => EventLogModule,
|
|
@@ -1151,6 +1152,65 @@ var ThemeModule = class {
|
|
|
1151
1152
|
}
|
|
1152
1153
|
};
|
|
1153
1154
|
|
|
1155
|
+
// src/platform/emailTemplates.ts
|
|
1156
|
+
var EmailTemplatesClient = class {
|
|
1157
|
+
constructor(http) {
|
|
1158
|
+
this.http = http;
|
|
1159
|
+
}
|
|
1160
|
+
http;
|
|
1161
|
+
/**
|
|
1162
|
+
* List all email templates for the workspace
|
|
1163
|
+
* @param groupId - Workspace ID
|
|
1164
|
+
*/
|
|
1165
|
+
async list(groupId) {
|
|
1166
|
+
return this.http.get(`/groups/${groupId}/email-templates`);
|
|
1167
|
+
}
|
|
1168
|
+
/**
|
|
1169
|
+
* Get a specific email template
|
|
1170
|
+
* @param groupId - Workspace ID
|
|
1171
|
+
* @param templateId - Template ID
|
|
1172
|
+
*/
|
|
1173
|
+
async get(groupId, templateId) {
|
|
1174
|
+
return this.http.get(`/groups/${groupId}/email-templates/${templateId}`);
|
|
1175
|
+
}
|
|
1176
|
+
/**
|
|
1177
|
+
* Create a new email template
|
|
1178
|
+
* @param groupId - Workspace ID
|
|
1179
|
+
* @param data - Template data
|
|
1180
|
+
*/
|
|
1181
|
+
async create(groupId, data) {
|
|
1182
|
+
return this.http.post(`/groups/${groupId}/email-templates`, data);
|
|
1183
|
+
}
|
|
1184
|
+
/**
|
|
1185
|
+
* Update an email template
|
|
1186
|
+
* @param groupId - Workspace ID
|
|
1187
|
+
* @param templateId - Template ID
|
|
1188
|
+
* @param data - Updated template data
|
|
1189
|
+
*/
|
|
1190
|
+
async update(groupId, templateId, data) {
|
|
1191
|
+
return this.http.patch(`/groups/${groupId}/email-templates/${templateId}`, data);
|
|
1192
|
+
}
|
|
1193
|
+
/**
|
|
1194
|
+
* Delete an email template
|
|
1195
|
+
* @param groupId - Workspace ID
|
|
1196
|
+
* @param templateId - Template ID
|
|
1197
|
+
*/
|
|
1198
|
+
async delete(groupId, templateId) {
|
|
1199
|
+
await this.http.delete(`/groups/${groupId}/email-templates/${templateId}`);
|
|
1200
|
+
}
|
|
1201
|
+
/**
|
|
1202
|
+
* Send a test email using a template
|
|
1203
|
+
* @param groupId - Workspace ID
|
|
1204
|
+
* @param templateId - Template ID
|
|
1205
|
+
* @param recipientEmail - Test recipient email address
|
|
1206
|
+
*/
|
|
1207
|
+
async sendTest(groupId, templateId, recipientEmail) {
|
|
1208
|
+
return this.http.post(`/groups/${groupId}/email-templates/${templateId}/test`, {
|
|
1209
|
+
recipient_email: recipientEmail
|
|
1210
|
+
});
|
|
1211
|
+
}
|
|
1212
|
+
};
|
|
1213
|
+
|
|
1154
1214
|
// src/platform/client.ts
|
|
1155
1215
|
var PlatformClient = class extends HttpClient {
|
|
1156
1216
|
entries;
|
|
@@ -1169,6 +1229,7 @@ var PlatformClient = class extends HttpClient {
|
|
|
1169
1229
|
eventLog;
|
|
1170
1230
|
session;
|
|
1171
1231
|
theme;
|
|
1232
|
+
emailTemplates;
|
|
1172
1233
|
// Admin modules
|
|
1173
1234
|
adminUsers;
|
|
1174
1235
|
adminSystem;
|
|
@@ -1196,6 +1257,7 @@ var PlatformClient = class extends HttpClient {
|
|
|
1196
1257
|
this.eventLog = new EventLogModule(this);
|
|
1197
1258
|
this.session = new AuthModule(this);
|
|
1198
1259
|
this.theme = new ThemeModule(this);
|
|
1260
|
+
this.emailTemplates = new EmailTemplatesClient(this);
|
|
1199
1261
|
this.adminUsers = new AdminUsersModule(this);
|
|
1200
1262
|
this.adminSystem = new AdminSystemModule(this);
|
|
1201
1263
|
this.adminMaintenance = new AdminMaintenanceModule(this);
|
|
@@ -1213,6 +1275,7 @@ function createPlatformClient(config) {
|
|
|
1213
1275
|
AssetsModule,
|
|
1214
1276
|
AuthModule,
|
|
1215
1277
|
CollectionsModule,
|
|
1278
|
+
EmailTemplatesClient,
|
|
1216
1279
|
EntriesModule,
|
|
1217
1280
|
EntryTypesModule,
|
|
1218
1281
|
EventLogModule,
|
package/dist/platform.d.cts
CHANGED
|
@@ -1684,15 +1684,10 @@ interface components {
|
|
|
1684
1684
|
description?: string | null;
|
|
1685
1685
|
/** Publicurl */
|
|
1686
1686
|
publicUrl: string;
|
|
1687
|
-
/**
|
|
1688
|
-
|
|
1687
|
+
/** Metadatajson */
|
|
1688
|
+
metadataJson?: {
|
|
1689
1689
|
[key: string]: unknown;
|
|
1690
1690
|
} | null;
|
|
1691
|
-
/**
|
|
1692
|
-
* Entries
|
|
1693
|
-
* @default []
|
|
1694
|
-
*/
|
|
1695
|
-
entries: string[];
|
|
1696
1691
|
};
|
|
1697
1692
|
/**
|
|
1698
1693
|
* PublishedAssetsResponse
|
|
@@ -1725,8 +1720,8 @@ interface components {
|
|
|
1725
1720
|
smartRules?: {
|
|
1726
1721
|
[key: string]: unknown;
|
|
1727
1722
|
} | null;
|
|
1728
|
-
/**
|
|
1729
|
-
|
|
1723
|
+
/** Metadatajson */
|
|
1724
|
+
metadataJson?: {
|
|
1730
1725
|
[key: string]: unknown;
|
|
1731
1726
|
} | null;
|
|
1732
1727
|
/** Entrycount */
|
|
@@ -1737,35 +1732,21 @@ interface components {
|
|
|
1737
1732
|
/**
|
|
1738
1733
|
* PublishedCollectionSummary
|
|
1739
1734
|
* @description Summary schema for published collections (for listing).
|
|
1735
|
+
*
|
|
1736
|
+
* Minimal collection info for entry contexts - only includes
|
|
1737
|
+
* essential fields for display and ordering.
|
|
1740
1738
|
*/
|
|
1741
1739
|
PublishedCollectionSummary: {
|
|
1742
1740
|
/** Slug */
|
|
1743
1741
|
slug: string;
|
|
1744
1742
|
/** Name */
|
|
1745
1743
|
name: string;
|
|
1746
|
-
/**
|
|
1747
|
-
|
|
1748
|
-
/**
|
|
1749
|
-
* Issmart
|
|
1750
|
-
* @default false
|
|
1751
|
-
*/
|
|
1752
|
-
isSmart: boolean;
|
|
1753
|
-
/** Smartrules */
|
|
1754
|
-
smartRules?: {
|
|
1755
|
-
[key: string]: unknown;
|
|
1756
|
-
} | null;
|
|
1757
|
-
/** Metadata */
|
|
1758
|
-
metadata?: {
|
|
1744
|
+
/** Metadatajson */
|
|
1745
|
+
metadataJson?: {
|
|
1759
1746
|
[key: string]: unknown;
|
|
1760
1747
|
} | null;
|
|
1761
|
-
/** Entrycount */
|
|
1762
|
-
entryCount: number;
|
|
1763
1748
|
/** Sortorder */
|
|
1764
1749
|
sortOrder: number;
|
|
1765
|
-
/** Icon */
|
|
1766
|
-
icon?: string | null;
|
|
1767
|
-
/** Color */
|
|
1768
|
-
color?: string | null;
|
|
1769
1750
|
};
|
|
1770
1751
|
/**
|
|
1771
1752
|
* PublishedCollectionsResponse
|
|
@@ -1811,17 +1792,17 @@ interface components {
|
|
|
1811
1792
|
*/
|
|
1812
1793
|
collections: string[];
|
|
1813
1794
|
/**
|
|
1814
|
-
*
|
|
1795
|
+
* Assetslugs
|
|
1815
1796
|
* @default []
|
|
1816
1797
|
*/
|
|
1817
|
-
|
|
1818
|
-
/** Order */
|
|
1819
|
-
order?: number | null;
|
|
1798
|
+
assetSlugs: string[];
|
|
1820
1799
|
/**
|
|
1821
|
-
*
|
|
1800
|
+
* Resourceslugs
|
|
1822
1801
|
* @default []
|
|
1823
1802
|
*/
|
|
1824
|
-
|
|
1803
|
+
resourceSlugs: string[];
|
|
1804
|
+
/** Order */
|
|
1805
|
+
order?: number | null;
|
|
1825
1806
|
};
|
|
1826
1807
|
/**
|
|
1827
1808
|
* PublishedEntryRead
|
|
@@ -1848,8 +1829,8 @@ interface components {
|
|
|
1848
1829
|
};
|
|
1849
1830
|
/** Publishedat */
|
|
1850
1831
|
publishedAt?: string | null;
|
|
1851
|
-
/**
|
|
1852
|
-
|
|
1832
|
+
/** Metadatajson */
|
|
1833
|
+
metadataJson?: {
|
|
1853
1834
|
[key: string]: unknown;
|
|
1854
1835
|
} | null;
|
|
1855
1836
|
/**
|
|
@@ -1889,8 +1870,8 @@ interface components {
|
|
|
1889
1870
|
url?: string | null;
|
|
1890
1871
|
/** Externalid */
|
|
1891
1872
|
externalId?: string | null;
|
|
1892
|
-
/**
|
|
1893
|
-
|
|
1873
|
+
/** Metadatajson */
|
|
1874
|
+
metadataJson?: {
|
|
1894
1875
|
[key: string]: unknown;
|
|
1895
1876
|
} | null;
|
|
1896
1877
|
/** Role */
|
|
@@ -1925,8 +1906,8 @@ interface components {
|
|
|
1925
1906
|
url?: string | null;
|
|
1926
1907
|
/** Externalid */
|
|
1927
1908
|
externalId?: string | null;
|
|
1928
|
-
/**
|
|
1929
|
-
|
|
1909
|
+
/** Metadatajson */
|
|
1910
|
+
metadataJson?: {
|
|
1930
1911
|
[key: string]: unknown;
|
|
1931
1912
|
} | null;
|
|
1932
1913
|
/**
|
|
@@ -2252,8 +2233,8 @@ interface components {
|
|
|
2252
2233
|
social?: {
|
|
2253
2234
|
[key: string]: unknown;
|
|
2254
2235
|
} | null;
|
|
2255
|
-
/**
|
|
2256
|
-
|
|
2236
|
+
/** Metadatajson */
|
|
2237
|
+
metadataJson?: {
|
|
2257
2238
|
[key: string]: unknown;
|
|
2258
2239
|
} | null;
|
|
2259
2240
|
};
|
|
@@ -3857,6 +3838,108 @@ declare class ThemeModule {
|
|
|
3857
3838
|
getTheme(): Promise<AppTheme>;
|
|
3858
3839
|
}
|
|
3859
3840
|
|
|
3841
|
+
/**
|
|
3842
|
+
* Email Templates Module - Platform API
|
|
3843
|
+
*
|
|
3844
|
+
* Manage workspace email templates
|
|
3845
|
+
*/
|
|
3846
|
+
|
|
3847
|
+
interface EmailTemplateSummary {
|
|
3848
|
+
id: string;
|
|
3849
|
+
template_type: string;
|
|
3850
|
+
group_id: string | null;
|
|
3851
|
+
name: string;
|
|
3852
|
+
description?: string;
|
|
3853
|
+
enabled: boolean;
|
|
3854
|
+
created_at: string;
|
|
3855
|
+
update_at: string;
|
|
3856
|
+
}
|
|
3857
|
+
interface EmailTemplateRead extends EmailTemplateSummary {
|
|
3858
|
+
subject: string;
|
|
3859
|
+
header_text?: string;
|
|
3860
|
+
message_top?: string;
|
|
3861
|
+
message_bottom?: string;
|
|
3862
|
+
button_text?: string;
|
|
3863
|
+
custom_html?: string;
|
|
3864
|
+
available_variables?: Record<string, string>;
|
|
3865
|
+
}
|
|
3866
|
+
interface EmailTemplateCreate {
|
|
3867
|
+
template_type: string;
|
|
3868
|
+
group_id?: string;
|
|
3869
|
+
name: string;
|
|
3870
|
+
description?: string;
|
|
3871
|
+
subject: string;
|
|
3872
|
+
header_text?: string;
|
|
3873
|
+
message_top?: string;
|
|
3874
|
+
message_bottom?: string;
|
|
3875
|
+
button_text?: string;
|
|
3876
|
+
custom_html?: string;
|
|
3877
|
+
available_variables?: Record<string, string>;
|
|
3878
|
+
enabled?: boolean;
|
|
3879
|
+
}
|
|
3880
|
+
interface EmailTemplateUpdate {
|
|
3881
|
+
name?: string;
|
|
3882
|
+
description?: string;
|
|
3883
|
+
subject?: string;
|
|
3884
|
+
header_text?: string;
|
|
3885
|
+
message_top?: string;
|
|
3886
|
+
message_bottom?: string;
|
|
3887
|
+
button_text?: string;
|
|
3888
|
+
custom_html?: string;
|
|
3889
|
+
available_variables?: Record<string, string>;
|
|
3890
|
+
enabled?: boolean;
|
|
3891
|
+
}
|
|
3892
|
+
interface TestEmailRequest {
|
|
3893
|
+
recipient_email: string;
|
|
3894
|
+
}
|
|
3895
|
+
interface TestEmailResponse {
|
|
3896
|
+
message: string;
|
|
3897
|
+
}
|
|
3898
|
+
/**
|
|
3899
|
+
* Email Templates API client for workspace-scoped templates
|
|
3900
|
+
*/
|
|
3901
|
+
declare class EmailTemplatesClient {
|
|
3902
|
+
private readonly http;
|
|
3903
|
+
constructor(http: HttpClient);
|
|
3904
|
+
/**
|
|
3905
|
+
* List all email templates for the workspace
|
|
3906
|
+
* @param groupId - Workspace ID
|
|
3907
|
+
*/
|
|
3908
|
+
list(groupId: string): Promise<EmailTemplateSummary[]>;
|
|
3909
|
+
/**
|
|
3910
|
+
* Get a specific email template
|
|
3911
|
+
* @param groupId - Workspace ID
|
|
3912
|
+
* @param templateId - Template ID
|
|
3913
|
+
*/
|
|
3914
|
+
get(groupId: string, templateId: string): Promise<EmailTemplateRead>;
|
|
3915
|
+
/**
|
|
3916
|
+
* Create a new email template
|
|
3917
|
+
* @param groupId - Workspace ID
|
|
3918
|
+
* @param data - Template data
|
|
3919
|
+
*/
|
|
3920
|
+
create(groupId: string, data: EmailTemplateCreate): Promise<EmailTemplateRead>;
|
|
3921
|
+
/**
|
|
3922
|
+
* Update an email template
|
|
3923
|
+
* @param groupId - Workspace ID
|
|
3924
|
+
* @param templateId - Template ID
|
|
3925
|
+
* @param data - Updated template data
|
|
3926
|
+
*/
|
|
3927
|
+
update(groupId: string, templateId: string, data: EmailTemplateUpdate): Promise<EmailTemplateRead>;
|
|
3928
|
+
/**
|
|
3929
|
+
* Delete an email template
|
|
3930
|
+
* @param groupId - Workspace ID
|
|
3931
|
+
* @param templateId - Template ID
|
|
3932
|
+
*/
|
|
3933
|
+
delete(groupId: string, templateId: string): Promise<void>;
|
|
3934
|
+
/**
|
|
3935
|
+
* Send a test email using a template
|
|
3936
|
+
* @param groupId - Workspace ID
|
|
3937
|
+
* @param templateId - Template ID
|
|
3938
|
+
* @param recipientEmail - Test recipient email address
|
|
3939
|
+
*/
|
|
3940
|
+
sendTest(groupId: string, templateId: string, recipientEmail: string): Promise<TestEmailResponse>;
|
|
3941
|
+
}
|
|
3942
|
+
|
|
3860
3943
|
/**
|
|
3861
3944
|
* Platform API Client
|
|
3862
3945
|
*
|
|
@@ -3885,6 +3968,7 @@ declare class PlatformClient extends HttpClient {
|
|
|
3885
3968
|
eventLog: EventLogModule;
|
|
3886
3969
|
session: AuthModule;
|
|
3887
3970
|
theme: ThemeModule;
|
|
3971
|
+
emailTemplates: EmailTemplatesClient;
|
|
3888
3972
|
adminUsers: AdminUsersModule;
|
|
3889
3973
|
adminSystem: AdminSystemModule;
|
|
3890
3974
|
adminMaintenance: AdminMaintenanceModule;
|
|
@@ -3895,4 +3979,4 @@ declare class PlatformClient extends HttpClient {
|
|
|
3895
3979
|
*/
|
|
3896
3980
|
declare function createPlatformClient(config: PlatformClientConfig): PlatformClient;
|
|
3897
3981
|
|
|
3898
|
-
export { APIClientsModule, type AdminAboutInfo, AdminMaintenanceModule, AdminSystemModule, AdminUsersModule, type ApiToken, type ApiTokenCreate, type ApiTokenWithToken, type AppTheme, AssetsModule, AuthModule, type AuthToken, CollectionsModule, type EmailInvitationRequest, type EmailSettings, EntriesModule, EntryTypesModule, type EventLogEntry, EventLogModule, type EventLogQueryParams, type EventLogSummary, type EventOption, EventsModule, type InviteTokenCreate, type InviteTokenPagination, type InviteTokenSummary, InvitesModule, type MaintenanceStorageDetails, type MaintenanceSummary, type Notification, type NotificationCreate, type NotificationUpdate, NotificationsModule, type PasswordChange, type PasswordResetTokenRequest, type PasswordResetTokenResponse, type PlatformAPIClient, type PlatformAPIClientCreate, type PlatformAPIClientUpdate, type PlatformAPIClientWithToken, type PlatformAsset, type PlatformAssetUpdate, PlatformClient, type PlatformClientConfig, type PlatformCollection, type PlatformCollectionCreate, type PlatformCollectionUpdate, type PlatformEntry, type PlatformEntryCreate, type PlatformEntryType, type PlatformEntryUpdate, type PlatformResource, type PlatformResourceCreate, type PlatformResourceUpdate, type PlatformWorkspaceMember, type PlatformWorkspaceMemberCreate, type PlatformWorkspaceMemberUpdate, ResourcesModule, type SystemStatistics, ThemeModule, type UnlockUserRequest, type User, type UserCreate, UserModule, type UserPagination, type UserProfile, type UserProfileUpdate, type UserSummary, type UserUpdate, type Webhook, type WebhookCreate, type WebhookMethod, type WebhookPagination, type WebhookUpdate, WebhooksModule, type Workspace, type WorkspaceActivationRequest, type WorkspaceCreate, WorkspaceMembersModule, type WorkspacePreferences, type WorkspacePreferencesUpdate, type WorkspaceUpdate, type WorkspaceWithMembership, WorkspacesModule, createPlatformClient };
|
|
3982
|
+
export { APIClientsModule, type AdminAboutInfo, AdminMaintenanceModule, AdminSystemModule, AdminUsersModule, type ApiToken, type ApiTokenCreate, type ApiTokenWithToken, type AppTheme, AssetsModule, AuthModule, type AuthToken, CollectionsModule, type EmailInvitationRequest, type EmailSettings, type EmailTemplateCreate, type EmailTemplateRead, type EmailTemplateSummary, type EmailTemplateUpdate, EmailTemplatesClient, EntriesModule, EntryTypesModule, type EventLogEntry, EventLogModule, type EventLogQueryParams, type EventLogSummary, type EventOption, EventsModule, type InviteTokenCreate, type InviteTokenPagination, type InviteTokenSummary, InvitesModule, type MaintenanceStorageDetails, type MaintenanceSummary, type Notification, type NotificationCreate, type NotificationUpdate, NotificationsModule, type PasswordChange, type PasswordResetTokenRequest, type PasswordResetTokenResponse, type PlatformAPIClient, type PlatformAPIClientCreate, type PlatformAPIClientUpdate, type PlatformAPIClientWithToken, type PlatformAsset, type PlatformAssetUpdate, PlatformClient, type PlatformClientConfig, type PlatformCollection, type PlatformCollectionCreate, type PlatformCollectionUpdate, type PlatformEntry, type PlatformEntryCreate, type PlatformEntryType, type PlatformEntryUpdate, type PlatformResource, type PlatformResourceCreate, type PlatformResourceUpdate, type PlatformWorkspaceMember, type PlatformWorkspaceMemberCreate, type PlatformWorkspaceMemberUpdate, ResourcesModule, type SystemStatistics, type TestEmailRequest, type TestEmailResponse, ThemeModule, type UnlockUserRequest, type User, type UserCreate, UserModule, type UserPagination, type UserProfile, type UserProfileUpdate, type UserSummary, type UserUpdate, type Webhook, type WebhookCreate, type WebhookMethod, type WebhookPagination, type WebhookUpdate, WebhooksModule, type Workspace, type WorkspaceActivationRequest, type WorkspaceCreate, WorkspaceMembersModule, type WorkspacePreferences, type WorkspacePreferencesUpdate, type WorkspaceUpdate, type WorkspaceWithMembership, WorkspacesModule, createPlatformClient };
|
package/dist/platform.d.ts
CHANGED
|
@@ -1684,15 +1684,10 @@ interface components {
|
|
|
1684
1684
|
description?: string | null;
|
|
1685
1685
|
/** Publicurl */
|
|
1686
1686
|
publicUrl: string;
|
|
1687
|
-
/**
|
|
1688
|
-
|
|
1687
|
+
/** Metadatajson */
|
|
1688
|
+
metadataJson?: {
|
|
1689
1689
|
[key: string]: unknown;
|
|
1690
1690
|
} | null;
|
|
1691
|
-
/**
|
|
1692
|
-
* Entries
|
|
1693
|
-
* @default []
|
|
1694
|
-
*/
|
|
1695
|
-
entries: string[];
|
|
1696
1691
|
};
|
|
1697
1692
|
/**
|
|
1698
1693
|
* PublishedAssetsResponse
|
|
@@ -1725,8 +1720,8 @@ interface components {
|
|
|
1725
1720
|
smartRules?: {
|
|
1726
1721
|
[key: string]: unknown;
|
|
1727
1722
|
} | null;
|
|
1728
|
-
/**
|
|
1729
|
-
|
|
1723
|
+
/** Metadatajson */
|
|
1724
|
+
metadataJson?: {
|
|
1730
1725
|
[key: string]: unknown;
|
|
1731
1726
|
} | null;
|
|
1732
1727
|
/** Entrycount */
|
|
@@ -1737,35 +1732,21 @@ interface components {
|
|
|
1737
1732
|
/**
|
|
1738
1733
|
* PublishedCollectionSummary
|
|
1739
1734
|
* @description Summary schema for published collections (for listing).
|
|
1735
|
+
*
|
|
1736
|
+
* Minimal collection info for entry contexts - only includes
|
|
1737
|
+
* essential fields for display and ordering.
|
|
1740
1738
|
*/
|
|
1741
1739
|
PublishedCollectionSummary: {
|
|
1742
1740
|
/** Slug */
|
|
1743
1741
|
slug: string;
|
|
1744
1742
|
/** Name */
|
|
1745
1743
|
name: string;
|
|
1746
|
-
/**
|
|
1747
|
-
|
|
1748
|
-
/**
|
|
1749
|
-
* Issmart
|
|
1750
|
-
* @default false
|
|
1751
|
-
*/
|
|
1752
|
-
isSmart: boolean;
|
|
1753
|
-
/** Smartrules */
|
|
1754
|
-
smartRules?: {
|
|
1755
|
-
[key: string]: unknown;
|
|
1756
|
-
} | null;
|
|
1757
|
-
/** Metadata */
|
|
1758
|
-
metadata?: {
|
|
1744
|
+
/** Metadatajson */
|
|
1745
|
+
metadataJson?: {
|
|
1759
1746
|
[key: string]: unknown;
|
|
1760
1747
|
} | null;
|
|
1761
|
-
/** Entrycount */
|
|
1762
|
-
entryCount: number;
|
|
1763
1748
|
/** Sortorder */
|
|
1764
1749
|
sortOrder: number;
|
|
1765
|
-
/** Icon */
|
|
1766
|
-
icon?: string | null;
|
|
1767
|
-
/** Color */
|
|
1768
|
-
color?: string | null;
|
|
1769
1750
|
};
|
|
1770
1751
|
/**
|
|
1771
1752
|
* PublishedCollectionsResponse
|
|
@@ -1811,17 +1792,17 @@ interface components {
|
|
|
1811
1792
|
*/
|
|
1812
1793
|
collections: string[];
|
|
1813
1794
|
/**
|
|
1814
|
-
*
|
|
1795
|
+
* Assetslugs
|
|
1815
1796
|
* @default []
|
|
1816
1797
|
*/
|
|
1817
|
-
|
|
1818
|
-
/** Order */
|
|
1819
|
-
order?: number | null;
|
|
1798
|
+
assetSlugs: string[];
|
|
1820
1799
|
/**
|
|
1821
|
-
*
|
|
1800
|
+
* Resourceslugs
|
|
1822
1801
|
* @default []
|
|
1823
1802
|
*/
|
|
1824
|
-
|
|
1803
|
+
resourceSlugs: string[];
|
|
1804
|
+
/** Order */
|
|
1805
|
+
order?: number | null;
|
|
1825
1806
|
};
|
|
1826
1807
|
/**
|
|
1827
1808
|
* PublishedEntryRead
|
|
@@ -1848,8 +1829,8 @@ interface components {
|
|
|
1848
1829
|
};
|
|
1849
1830
|
/** Publishedat */
|
|
1850
1831
|
publishedAt?: string | null;
|
|
1851
|
-
/**
|
|
1852
|
-
|
|
1832
|
+
/** Metadatajson */
|
|
1833
|
+
metadataJson?: {
|
|
1853
1834
|
[key: string]: unknown;
|
|
1854
1835
|
} | null;
|
|
1855
1836
|
/**
|
|
@@ -1889,8 +1870,8 @@ interface components {
|
|
|
1889
1870
|
url?: string | null;
|
|
1890
1871
|
/** Externalid */
|
|
1891
1872
|
externalId?: string | null;
|
|
1892
|
-
/**
|
|
1893
|
-
|
|
1873
|
+
/** Metadatajson */
|
|
1874
|
+
metadataJson?: {
|
|
1894
1875
|
[key: string]: unknown;
|
|
1895
1876
|
} | null;
|
|
1896
1877
|
/** Role */
|
|
@@ -1925,8 +1906,8 @@ interface components {
|
|
|
1925
1906
|
url?: string | null;
|
|
1926
1907
|
/** Externalid */
|
|
1927
1908
|
externalId?: string | null;
|
|
1928
|
-
/**
|
|
1929
|
-
|
|
1909
|
+
/** Metadatajson */
|
|
1910
|
+
metadataJson?: {
|
|
1930
1911
|
[key: string]: unknown;
|
|
1931
1912
|
} | null;
|
|
1932
1913
|
/**
|
|
@@ -2252,8 +2233,8 @@ interface components {
|
|
|
2252
2233
|
social?: {
|
|
2253
2234
|
[key: string]: unknown;
|
|
2254
2235
|
} | null;
|
|
2255
|
-
/**
|
|
2256
|
-
|
|
2236
|
+
/** Metadatajson */
|
|
2237
|
+
metadataJson?: {
|
|
2257
2238
|
[key: string]: unknown;
|
|
2258
2239
|
} | null;
|
|
2259
2240
|
};
|
|
@@ -3857,6 +3838,108 @@ declare class ThemeModule {
|
|
|
3857
3838
|
getTheme(): Promise<AppTheme>;
|
|
3858
3839
|
}
|
|
3859
3840
|
|
|
3841
|
+
/**
|
|
3842
|
+
* Email Templates Module - Platform API
|
|
3843
|
+
*
|
|
3844
|
+
* Manage workspace email templates
|
|
3845
|
+
*/
|
|
3846
|
+
|
|
3847
|
+
interface EmailTemplateSummary {
|
|
3848
|
+
id: string;
|
|
3849
|
+
template_type: string;
|
|
3850
|
+
group_id: string | null;
|
|
3851
|
+
name: string;
|
|
3852
|
+
description?: string;
|
|
3853
|
+
enabled: boolean;
|
|
3854
|
+
created_at: string;
|
|
3855
|
+
update_at: string;
|
|
3856
|
+
}
|
|
3857
|
+
interface EmailTemplateRead extends EmailTemplateSummary {
|
|
3858
|
+
subject: string;
|
|
3859
|
+
header_text?: string;
|
|
3860
|
+
message_top?: string;
|
|
3861
|
+
message_bottom?: string;
|
|
3862
|
+
button_text?: string;
|
|
3863
|
+
custom_html?: string;
|
|
3864
|
+
available_variables?: Record<string, string>;
|
|
3865
|
+
}
|
|
3866
|
+
interface EmailTemplateCreate {
|
|
3867
|
+
template_type: string;
|
|
3868
|
+
group_id?: string;
|
|
3869
|
+
name: string;
|
|
3870
|
+
description?: string;
|
|
3871
|
+
subject: string;
|
|
3872
|
+
header_text?: string;
|
|
3873
|
+
message_top?: string;
|
|
3874
|
+
message_bottom?: string;
|
|
3875
|
+
button_text?: string;
|
|
3876
|
+
custom_html?: string;
|
|
3877
|
+
available_variables?: Record<string, string>;
|
|
3878
|
+
enabled?: boolean;
|
|
3879
|
+
}
|
|
3880
|
+
interface EmailTemplateUpdate {
|
|
3881
|
+
name?: string;
|
|
3882
|
+
description?: string;
|
|
3883
|
+
subject?: string;
|
|
3884
|
+
header_text?: string;
|
|
3885
|
+
message_top?: string;
|
|
3886
|
+
message_bottom?: string;
|
|
3887
|
+
button_text?: string;
|
|
3888
|
+
custom_html?: string;
|
|
3889
|
+
available_variables?: Record<string, string>;
|
|
3890
|
+
enabled?: boolean;
|
|
3891
|
+
}
|
|
3892
|
+
interface TestEmailRequest {
|
|
3893
|
+
recipient_email: string;
|
|
3894
|
+
}
|
|
3895
|
+
interface TestEmailResponse {
|
|
3896
|
+
message: string;
|
|
3897
|
+
}
|
|
3898
|
+
/**
|
|
3899
|
+
* Email Templates API client for workspace-scoped templates
|
|
3900
|
+
*/
|
|
3901
|
+
declare class EmailTemplatesClient {
|
|
3902
|
+
private readonly http;
|
|
3903
|
+
constructor(http: HttpClient);
|
|
3904
|
+
/**
|
|
3905
|
+
* List all email templates for the workspace
|
|
3906
|
+
* @param groupId - Workspace ID
|
|
3907
|
+
*/
|
|
3908
|
+
list(groupId: string): Promise<EmailTemplateSummary[]>;
|
|
3909
|
+
/**
|
|
3910
|
+
* Get a specific email template
|
|
3911
|
+
* @param groupId - Workspace ID
|
|
3912
|
+
* @param templateId - Template ID
|
|
3913
|
+
*/
|
|
3914
|
+
get(groupId: string, templateId: string): Promise<EmailTemplateRead>;
|
|
3915
|
+
/**
|
|
3916
|
+
* Create a new email template
|
|
3917
|
+
* @param groupId - Workspace ID
|
|
3918
|
+
* @param data - Template data
|
|
3919
|
+
*/
|
|
3920
|
+
create(groupId: string, data: EmailTemplateCreate): Promise<EmailTemplateRead>;
|
|
3921
|
+
/**
|
|
3922
|
+
* Update an email template
|
|
3923
|
+
* @param groupId - Workspace ID
|
|
3924
|
+
* @param templateId - Template ID
|
|
3925
|
+
* @param data - Updated template data
|
|
3926
|
+
*/
|
|
3927
|
+
update(groupId: string, templateId: string, data: EmailTemplateUpdate): Promise<EmailTemplateRead>;
|
|
3928
|
+
/**
|
|
3929
|
+
* Delete an email template
|
|
3930
|
+
* @param groupId - Workspace ID
|
|
3931
|
+
* @param templateId - Template ID
|
|
3932
|
+
*/
|
|
3933
|
+
delete(groupId: string, templateId: string): Promise<void>;
|
|
3934
|
+
/**
|
|
3935
|
+
* Send a test email using a template
|
|
3936
|
+
* @param groupId - Workspace ID
|
|
3937
|
+
* @param templateId - Template ID
|
|
3938
|
+
* @param recipientEmail - Test recipient email address
|
|
3939
|
+
*/
|
|
3940
|
+
sendTest(groupId: string, templateId: string, recipientEmail: string): Promise<TestEmailResponse>;
|
|
3941
|
+
}
|
|
3942
|
+
|
|
3860
3943
|
/**
|
|
3861
3944
|
* Platform API Client
|
|
3862
3945
|
*
|
|
@@ -3885,6 +3968,7 @@ declare class PlatformClient extends HttpClient {
|
|
|
3885
3968
|
eventLog: EventLogModule;
|
|
3886
3969
|
session: AuthModule;
|
|
3887
3970
|
theme: ThemeModule;
|
|
3971
|
+
emailTemplates: EmailTemplatesClient;
|
|
3888
3972
|
adminUsers: AdminUsersModule;
|
|
3889
3973
|
adminSystem: AdminSystemModule;
|
|
3890
3974
|
adminMaintenance: AdminMaintenanceModule;
|
|
@@ -3895,4 +3979,4 @@ declare class PlatformClient extends HttpClient {
|
|
|
3895
3979
|
*/
|
|
3896
3980
|
declare function createPlatformClient(config: PlatformClientConfig): PlatformClient;
|
|
3897
3981
|
|
|
3898
|
-
export { APIClientsModule, type AdminAboutInfo, AdminMaintenanceModule, AdminSystemModule, AdminUsersModule, type ApiToken, type ApiTokenCreate, type ApiTokenWithToken, type AppTheme, AssetsModule, AuthModule, type AuthToken, CollectionsModule, type EmailInvitationRequest, type EmailSettings, EntriesModule, EntryTypesModule, type EventLogEntry, EventLogModule, type EventLogQueryParams, type EventLogSummary, type EventOption, EventsModule, type InviteTokenCreate, type InviteTokenPagination, type InviteTokenSummary, InvitesModule, type MaintenanceStorageDetails, type MaintenanceSummary, type Notification, type NotificationCreate, type NotificationUpdate, NotificationsModule, type PasswordChange, type PasswordResetTokenRequest, type PasswordResetTokenResponse, type PlatformAPIClient, type PlatformAPIClientCreate, type PlatformAPIClientUpdate, type PlatformAPIClientWithToken, type PlatformAsset, type PlatformAssetUpdate, PlatformClient, type PlatformClientConfig, type PlatformCollection, type PlatformCollectionCreate, type PlatformCollectionUpdate, type PlatformEntry, type PlatformEntryCreate, type PlatformEntryType, type PlatformEntryUpdate, type PlatformResource, type PlatformResourceCreate, type PlatformResourceUpdate, type PlatformWorkspaceMember, type PlatformWorkspaceMemberCreate, type PlatformWorkspaceMemberUpdate, ResourcesModule, type SystemStatistics, ThemeModule, type UnlockUserRequest, type User, type UserCreate, UserModule, type UserPagination, type UserProfile, type UserProfileUpdate, type UserSummary, type UserUpdate, type Webhook, type WebhookCreate, type WebhookMethod, type WebhookPagination, type WebhookUpdate, WebhooksModule, type Workspace, type WorkspaceActivationRequest, type WorkspaceCreate, WorkspaceMembersModule, type WorkspacePreferences, type WorkspacePreferencesUpdate, type WorkspaceUpdate, type WorkspaceWithMembership, WorkspacesModule, createPlatformClient };
|
|
3982
|
+
export { APIClientsModule, type AdminAboutInfo, AdminMaintenanceModule, AdminSystemModule, AdminUsersModule, type ApiToken, type ApiTokenCreate, type ApiTokenWithToken, type AppTheme, AssetsModule, AuthModule, type AuthToken, CollectionsModule, type EmailInvitationRequest, type EmailSettings, type EmailTemplateCreate, type EmailTemplateRead, type EmailTemplateSummary, type EmailTemplateUpdate, EmailTemplatesClient, EntriesModule, EntryTypesModule, type EventLogEntry, EventLogModule, type EventLogQueryParams, type EventLogSummary, type EventOption, EventsModule, type InviteTokenCreate, type InviteTokenPagination, type InviteTokenSummary, InvitesModule, type MaintenanceStorageDetails, type MaintenanceSummary, type Notification, type NotificationCreate, type NotificationUpdate, NotificationsModule, type PasswordChange, type PasswordResetTokenRequest, type PasswordResetTokenResponse, type PlatformAPIClient, type PlatformAPIClientCreate, type PlatformAPIClientUpdate, type PlatformAPIClientWithToken, type PlatformAsset, type PlatformAssetUpdate, PlatformClient, type PlatformClientConfig, type PlatformCollection, type PlatformCollectionCreate, type PlatformCollectionUpdate, type PlatformEntry, type PlatformEntryCreate, type PlatformEntryType, type PlatformEntryUpdate, type PlatformResource, type PlatformResourceCreate, type PlatformResourceUpdate, type PlatformWorkspaceMember, type PlatformWorkspaceMemberCreate, type PlatformWorkspaceMemberUpdate, ResourcesModule, type SystemStatistics, type TestEmailRequest, type TestEmailResponse, ThemeModule, type UnlockUserRequest, type User, type UserCreate, UserModule, type UserPagination, type UserProfile, type UserProfileUpdate, type UserSummary, type UserUpdate, type Webhook, type WebhookCreate, type WebhookMethod, type WebhookPagination, type WebhookUpdate, WebhooksModule, type Workspace, type WorkspaceActivationRequest, type WorkspaceCreate, WorkspaceMembersModule, type WorkspacePreferences, type WorkspacePreferencesUpdate, type WorkspaceUpdate, type WorkspaceWithMembership, WorkspacesModule, createPlatformClient };
|
package/dist/platform.js
CHANGED
|
@@ -930,6 +930,65 @@ var ThemeModule = class {
|
|
|
930
930
|
}
|
|
931
931
|
};
|
|
932
932
|
|
|
933
|
+
// src/platform/emailTemplates.ts
|
|
934
|
+
var EmailTemplatesClient = class {
|
|
935
|
+
constructor(http) {
|
|
936
|
+
this.http = http;
|
|
937
|
+
}
|
|
938
|
+
http;
|
|
939
|
+
/**
|
|
940
|
+
* List all email templates for the workspace
|
|
941
|
+
* @param groupId - Workspace ID
|
|
942
|
+
*/
|
|
943
|
+
async list(groupId) {
|
|
944
|
+
return this.http.get(`/groups/${groupId}/email-templates`);
|
|
945
|
+
}
|
|
946
|
+
/**
|
|
947
|
+
* Get a specific email template
|
|
948
|
+
* @param groupId - Workspace ID
|
|
949
|
+
* @param templateId - Template ID
|
|
950
|
+
*/
|
|
951
|
+
async get(groupId, templateId) {
|
|
952
|
+
return this.http.get(`/groups/${groupId}/email-templates/${templateId}`);
|
|
953
|
+
}
|
|
954
|
+
/**
|
|
955
|
+
* Create a new email template
|
|
956
|
+
* @param groupId - Workspace ID
|
|
957
|
+
* @param data - Template data
|
|
958
|
+
*/
|
|
959
|
+
async create(groupId, data) {
|
|
960
|
+
return this.http.post(`/groups/${groupId}/email-templates`, data);
|
|
961
|
+
}
|
|
962
|
+
/**
|
|
963
|
+
* Update an email template
|
|
964
|
+
* @param groupId - Workspace ID
|
|
965
|
+
* @param templateId - Template ID
|
|
966
|
+
* @param data - Updated template data
|
|
967
|
+
*/
|
|
968
|
+
async update(groupId, templateId, data) {
|
|
969
|
+
return this.http.patch(`/groups/${groupId}/email-templates/${templateId}`, data);
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* Delete an email template
|
|
973
|
+
* @param groupId - Workspace ID
|
|
974
|
+
* @param templateId - Template ID
|
|
975
|
+
*/
|
|
976
|
+
async delete(groupId, templateId) {
|
|
977
|
+
await this.http.delete(`/groups/${groupId}/email-templates/${templateId}`);
|
|
978
|
+
}
|
|
979
|
+
/**
|
|
980
|
+
* Send a test email using a template
|
|
981
|
+
* @param groupId - Workspace ID
|
|
982
|
+
* @param templateId - Template ID
|
|
983
|
+
* @param recipientEmail - Test recipient email address
|
|
984
|
+
*/
|
|
985
|
+
async sendTest(groupId, templateId, recipientEmail) {
|
|
986
|
+
return this.http.post(`/groups/${groupId}/email-templates/${templateId}/test`, {
|
|
987
|
+
recipient_email: recipientEmail
|
|
988
|
+
});
|
|
989
|
+
}
|
|
990
|
+
};
|
|
991
|
+
|
|
933
992
|
// src/platform/client.ts
|
|
934
993
|
var PlatformClient = class extends HttpClient {
|
|
935
994
|
entries;
|
|
@@ -948,6 +1007,7 @@ var PlatformClient = class extends HttpClient {
|
|
|
948
1007
|
eventLog;
|
|
949
1008
|
session;
|
|
950
1009
|
theme;
|
|
1010
|
+
emailTemplates;
|
|
951
1011
|
// Admin modules
|
|
952
1012
|
adminUsers;
|
|
953
1013
|
adminSystem;
|
|
@@ -975,6 +1035,7 @@ var PlatformClient = class extends HttpClient {
|
|
|
975
1035
|
this.eventLog = new EventLogModule(this);
|
|
976
1036
|
this.session = new AuthModule(this);
|
|
977
1037
|
this.theme = new ThemeModule(this);
|
|
1038
|
+
this.emailTemplates = new EmailTemplatesClient(this);
|
|
978
1039
|
this.adminUsers = new AdminUsersModule(this);
|
|
979
1040
|
this.adminSystem = new AdminSystemModule(this);
|
|
980
1041
|
this.adminMaintenance = new AdminMaintenanceModule(this);
|
|
@@ -991,6 +1052,7 @@ export {
|
|
|
991
1052
|
AssetsModule,
|
|
992
1053
|
AuthModule,
|
|
993
1054
|
CollectionsModule,
|
|
1055
|
+
EmailTemplatesClient,
|
|
994
1056
|
EntriesModule,
|
|
995
1057
|
EntryTypesModule,
|
|
996
1058
|
EventLogModule,
|