@inneropen/marvin-sdk 2.0.0-next.5 → 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 +104 -1
- package/dist/platform.d.ts +104 -1
- 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
|
@@ -3838,6 +3838,108 @@ declare class ThemeModule {
|
|
|
3838
3838
|
getTheme(): Promise<AppTheme>;
|
|
3839
3839
|
}
|
|
3840
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
|
+
|
|
3841
3943
|
/**
|
|
3842
3944
|
* Platform API Client
|
|
3843
3945
|
*
|
|
@@ -3866,6 +3968,7 @@ declare class PlatformClient extends HttpClient {
|
|
|
3866
3968
|
eventLog: EventLogModule;
|
|
3867
3969
|
session: AuthModule;
|
|
3868
3970
|
theme: ThemeModule;
|
|
3971
|
+
emailTemplates: EmailTemplatesClient;
|
|
3869
3972
|
adminUsers: AdminUsersModule;
|
|
3870
3973
|
adminSystem: AdminSystemModule;
|
|
3871
3974
|
adminMaintenance: AdminMaintenanceModule;
|
|
@@ -3876,4 +3979,4 @@ declare class PlatformClient extends HttpClient {
|
|
|
3876
3979
|
*/
|
|
3877
3980
|
declare function createPlatformClient(config: PlatformClientConfig): PlatformClient;
|
|
3878
3981
|
|
|
3879
|
-
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
|
@@ -3838,6 +3838,108 @@ declare class ThemeModule {
|
|
|
3838
3838
|
getTheme(): Promise<AppTheme>;
|
|
3839
3839
|
}
|
|
3840
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
|
+
|
|
3841
3943
|
/**
|
|
3842
3944
|
* Platform API Client
|
|
3843
3945
|
*
|
|
@@ -3866,6 +3968,7 @@ declare class PlatformClient extends HttpClient {
|
|
|
3866
3968
|
eventLog: EventLogModule;
|
|
3867
3969
|
session: AuthModule;
|
|
3868
3970
|
theme: ThemeModule;
|
|
3971
|
+
emailTemplates: EmailTemplatesClient;
|
|
3869
3972
|
adminUsers: AdminUsersModule;
|
|
3870
3973
|
adminSystem: AdminSystemModule;
|
|
3871
3974
|
adminMaintenance: AdminMaintenanceModule;
|
|
@@ -3876,4 +3979,4 @@ declare class PlatformClient extends HttpClient {
|
|
|
3876
3979
|
*/
|
|
3877
3980
|
declare function createPlatformClient(config: PlatformClientConfig): PlatformClient;
|
|
3878
3981
|
|
|
3879
|
-
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,
|