@iblai/iblai-api 4.59.3-core → 4.60.0-core

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.
Files changed (39) hide show
  1. package/dist/index.cjs.js +187 -18
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +188 -19
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +187 -18
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +12 -1
  8. package/dist/types/models/ConsumerChannel.d.ts +7 -0
  9. package/dist/types/models/NotificationSource.d.ts +2 -2
  10. package/dist/types/models/{TypeEnum.d.ts → NotificationSourceTypeEnum.d.ts} +1 -1
  11. package/dist/types/models/NotificationTemplateDetail.d.ts +86 -0
  12. package/dist/types/models/NotificationTemplateList.d.ts +59 -0
  13. package/dist/types/models/NotificationTemplateTest.d.ts +13 -0
  14. package/dist/types/models/NotificationTemplateTestResponse.d.ts +17 -0
  15. package/dist/types/models/NotificationToggle.d.ts +6 -0
  16. package/dist/types/models/NullEnum.d.ts +1 -0
  17. package/dist/types/models/PatchedNotificationTemplateDetail.d.ts +86 -0
  18. package/dist/types/models/PatchedNotificationToggle.d.ts +6 -0
  19. package/dist/types/models/Spa.d.ts +14 -0
  20. package/dist/types/models/TypeA81Enum.d.ts +42 -0
  21. package/dist/types/services/NotificationsService.d.ts +72 -0
  22. package/package.json +1 -1
  23. package/sdk_schema.yml +688 -17
  24. package/src/core/OpenAPI.ts +1 -1
  25. package/src/index.ts +12 -1
  26. package/src/models/ConsumerChannel.ts +12 -0
  27. package/src/models/NotificationSource.ts +2 -2
  28. package/src/models/{TypeEnum.ts → NotificationSourceTypeEnum.ts} +1 -1
  29. package/src/models/NotificationTemplateDetail.ts +91 -0
  30. package/src/models/NotificationTemplateList.ts +64 -0
  31. package/src/models/NotificationTemplateTest.ts +18 -0
  32. package/src/models/NotificationTemplateTestResponse.ts +22 -0
  33. package/src/models/NotificationToggle.ts +11 -0
  34. package/src/models/NullEnum.ts +7 -0
  35. package/src/models/PatchedNotificationTemplateDetail.ts +91 -0
  36. package/src/models/PatchedNotificationToggle.ts +11 -0
  37. package/src/models/Spa.ts +19 -0
  38. package/src/models/TypeA81Enum.ts +46 -0
  39. package/src/services/NotificationsService.ts +151 -0
@@ -21,7 +21,7 @@ export type OpenAPIConfig = {
21
21
 
22
22
  export const OpenAPI: OpenAPIConfig = {
23
23
  BASE: 'https://base.manager.iblai.app',
24
- VERSION: '4.59.3-core',
24
+ VERSION: '4.60.0-core',
25
25
  WITH_CREDENTIALS: false,
26
26
  CREDENTIALS: 'include',
27
27
  TOKEN: undefined,
package/src/index.ts CHANGED
@@ -55,6 +55,7 @@ export { CeleryHeartbeatFailStatusEnum } from './models/CeleryHeartbeatFailStatu
55
55
  export { CeleryHeartbeatStatusEnum } from './models/CeleryHeartbeatStatusEnum';
56
56
  export type { Company } from './models/Company';
57
57
  export type { ConfigurationItem } from './models/ConfigurationItem';
58
+ export type { ConsumerChannel } from './models/ConsumerChannel';
58
59
  export type { ContentAnalytics } from './models/ContentAnalytics';
59
60
  export type { ContentAverages } from './models/ContentAverages';
60
61
  export type { ContentDetailsContentInfo } from './models/ContentDetailsContentInfo';
@@ -183,8 +184,15 @@ export type { Notification } from './models/Notification';
183
184
  export type { NotificationCount } from './models/NotificationCount';
184
185
  export type { NotificationPreview } from './models/NotificationPreview';
185
186
  export type { NotificationSource } from './models/NotificationSource';
187
+ export { NotificationSourceTypeEnum } from './models/NotificationSourceTypeEnum';
186
188
  export { NotificationStatusEnum } from './models/NotificationStatusEnum';
187
189
  export type { NotificationTemplateData } from './models/NotificationTemplateData';
190
+ export type { NotificationTemplateDetail } from './models/NotificationTemplateDetail';
191
+ export type { NotificationTemplateList } from './models/NotificationTemplateList';
192
+ export type { NotificationTemplateTest } from './models/NotificationTemplateTest';
193
+ export type { NotificationTemplateTestResponse } from './models/NotificationTemplateTestResponse';
194
+ export type { NotificationToggle } from './models/NotificationToggle';
195
+ export type { NullEnum } from './models/NullEnum';
188
196
  export type { OnboardingStatusUpdate } from './models/OnboardingStatusUpdate';
189
197
  export type { OverTime } from './models/OverTime';
190
198
  export type { OvertimeDataPoint } from './models/OvertimeDataPoint';
@@ -220,6 +228,8 @@ export type { PaginatedUserLicenseGroupAssignment } from './models/PaginatedUser
220
228
  export type { Pagination } from './models/Pagination';
221
229
  export type { PatchedMediaResource } from './models/PatchedMediaResource';
222
230
  export type { PatchedNotification } from './models/PatchedNotification';
231
+ export type { PatchedNotificationTemplateDetail } from './models/PatchedNotificationTemplateDetail';
232
+ export type { PatchedNotificationToggle } from './models/PatchedNotificationToggle';
223
233
  export type { PatchedPlatformPublicMetadata } from './models/PatchedPlatformPublicMetadata';
224
234
  export type { PatchedRbacGroup } from './models/PatchedRbacGroup';
225
235
  export type { PatchedRbacPolicy } from './models/PatchedRbacPolicy';
@@ -376,6 +386,7 @@ export type { SkillInfo } from './models/SkillInfo';
376
386
  export type { SkillsDetail } from './models/SkillsDetail';
377
387
  export type { SkillsMetric } from './models/SkillsMetric';
378
388
  export type { SkillThreshold } from './models/SkillThreshold';
389
+ export type { Spa } from './models/Spa';
379
390
  export { StateEnum } from './models/StateEnum';
380
391
  export type { StripeBillingPageIdentifierResponse } from './models/StripeBillingPageIdentifierResponse';
381
392
  export type { StripeCheckoutSessionRequest } from './models/StripeCheckoutSessionRequest';
@@ -414,7 +425,7 @@ export type { TokenProxyOutput } from './models/TokenProxyOutput';
414
425
  export type { TokenProxyOutputSerializerData } from './models/TokenProxyOutputSerializerData';
415
426
  export type { TokenProxyUser } from './models/TokenProxyUser';
416
427
  export type { TopContent } from './models/TopContent';
417
- export { TypeEnum } from './models/TypeEnum';
428
+ export { TypeA81Enum } from './models/TypeA81Enum';
418
429
  export type { UploadedImage } from './models/UploadedImage';
419
430
  export type { UserApp } from './models/UserApp';
420
431
  export type { UserDeleteAPIError } from './models/UserDeleteAPIError';
@@ -0,0 +1,12 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * Serializer for channel
7
+ */
8
+ export type ConsumerChannel = {
9
+ readonly id: number;
10
+ name?: string;
11
+ };
12
+
@@ -2,12 +2,12 @@
2
2
  /* istanbul ignore file */
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
- import type { TypeEnum } from './TypeEnum';
5
+ import type { NotificationSourceTypeEnum } from './NotificationSourceTypeEnum';
6
6
  /**
7
7
  * Request serializer for source validation
8
8
  */
9
9
  export type NotificationSource = {
10
- type: TypeEnum;
10
+ type: NotificationSourceTypeEnum;
11
11
  data: any;
12
12
  };
13
13
 
@@ -11,7 +11,7 @@
11
11
  * * `pathway` - pathway
12
12
  * * `program` - program
13
13
  */
14
- export enum TypeEnum {
14
+ export enum NotificationSourceTypeEnum {
15
15
  EMAIL = 'email',
16
16
  USERNAME = 'username',
17
17
  PLATFORM = 'platform',
@@ -0,0 +1,91 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ import type { ConsumerChannel } from './ConsumerChannel';
6
+ import type { NullEnum } from './NullEnum';
7
+ import type { Spa } from './Spa';
8
+ import type { TypeA81Enum } from './TypeA81Enum';
9
+ /**
10
+ * Serializer for detailed template view and editing
11
+ */
12
+ export type NotificationTemplateDetail = {
13
+ /**
14
+ * Unique identifier for this notification template.
15
+ */
16
+ readonly id: string;
17
+ /**
18
+ * Select the type of notification from the available options.
19
+ *
20
+ * * `APP_REGISTRATION` - App Registration
21
+ * * `USER_NOTIF_USER_REGISTRATION` - User Notif User Registration
22
+ * * `USER_NOTIF_COURSE_ENROLLMENT` - User Notif Course Enrollment
23
+ * * `ADMIN_NOTIF_COURSE_ENROLLMENT` - Admin Notif Course Enrollment
24
+ * * `USER_NOTIF_USER_INACTIVITY` - User Notif User Inactivity
25
+ * * `USER_NOTIF_COURSE_COMPLETION` - User Notif Course Completion
26
+ * * `USER_NOTIF_CREDENTIALS` - User Notif Credentials
27
+ * * `CUSTOM_NOTIFICATION` - Custom Notification
28
+ * * `PLATFORM_INVITATION` - Platform Invitation
29
+ * * `PROGRAM_INVITATION` - Program Invitation
30
+ * * `COURSE_INVITATION` - Course Invitation
31
+ * * `USER_NOTIF_LEARNER_PROGRESS` - User Notif Learner Progress
32
+ * * `ROLE_CHANGE` - Role Change
33
+ * * `COURSE_LICENSE_ASSIGNMENT` - Course License Assignment
34
+ * * `COURSE_LICENSE_GROUP_ASSIGNMENT` - Course License Group Assignment
35
+ * * `PROGRAM_LICENSE_ASSIGNMENT` - Program License Assignment
36
+ * * `PROGRAM_LICENSE_GROUP_ASSIGNMENT` - Program License Group Assignment
37
+ * * `USER_LICENSE_ASSIGNMENT` - User License Assignment
38
+ * * `USER_LICENSE_GROUP_ASSIGNMENT` - User License Group Assignment
39
+ */
40
+ readonly type: (TypeA81Enum | NullEnum) | null;
41
+ /**
42
+ * A friendly name for the notification template.
43
+ */
44
+ name?: string | null;
45
+ /**
46
+ * Admin-friendly description of what this notification does, when it triggers, and what data it needs
47
+ */
48
+ description?: string;
49
+ /**
50
+ * The title for the notification message.
51
+ */
52
+ message_title?: string | null;
53
+ /**
54
+ * The full notification message body.
55
+ */
56
+ message_body?: string;
57
+ /**
58
+ * A short version of the notification message body.
59
+ */
60
+ short_message_body?: string;
61
+ /**
62
+ * Email subject line (supports Django template syntax)
63
+ */
64
+ email_subject?: string | null;
65
+ /**
66
+ * Sender email address (default: IBL <noreply@ibl.ai>)
67
+ */
68
+ email_from_address?: string | null;
69
+ /**
70
+ * Full HTML template for email body
71
+ */
72
+ email_html_template?: string | null;
73
+ readonly spas_detail: Array<Spa>;
74
+ readonly allowed_channels_detail: Array<ConsumerChannel>;
75
+ spa_ids?: Array<number>;
76
+ channel_ids?: Array<number>;
77
+ readonly is_inherited: boolean;
78
+ readonly is_enabled: boolean;
79
+ readonly source_platform: string;
80
+ metadata?: any;
81
+ readonly available_context: string;
82
+ /**
83
+ * Timestamp when this template was created
84
+ */
85
+ readonly created_at: string;
86
+ /**
87
+ * Timestamp when this template was last updated
88
+ */
89
+ readonly updated_at: string;
90
+ };
91
+
@@ -0,0 +1,64 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ import type { BlankEnum } from './BlankEnum';
6
+ import type { NullEnum } from './NullEnum';
7
+ import type { TypeA81Enum } from './TypeA81Enum';
8
+ /**
9
+ * Serializer for listing notification templates with inheritance info
10
+ */
11
+ export type NotificationTemplateList = {
12
+ /**
13
+ * Unique identifier for this notification template.
14
+ */
15
+ readonly id: string;
16
+ /**
17
+ * Select the type of notification from the available options.
18
+ *
19
+ * * `APP_REGISTRATION` - App Registration
20
+ * * `USER_NOTIF_USER_REGISTRATION` - User Notif User Registration
21
+ * * `USER_NOTIF_COURSE_ENROLLMENT` - User Notif Course Enrollment
22
+ * * `ADMIN_NOTIF_COURSE_ENROLLMENT` - Admin Notif Course Enrollment
23
+ * * `USER_NOTIF_USER_INACTIVITY` - User Notif User Inactivity
24
+ * * `USER_NOTIF_COURSE_COMPLETION` - User Notif Course Completion
25
+ * * `USER_NOTIF_CREDENTIALS` - User Notif Credentials
26
+ * * `CUSTOM_NOTIFICATION` - Custom Notification
27
+ * * `PLATFORM_INVITATION` - Platform Invitation
28
+ * * `PROGRAM_INVITATION` - Program Invitation
29
+ * * `COURSE_INVITATION` - Course Invitation
30
+ * * `USER_NOTIF_LEARNER_PROGRESS` - User Notif Learner Progress
31
+ * * `ROLE_CHANGE` - Role Change
32
+ * * `COURSE_LICENSE_ASSIGNMENT` - Course License Assignment
33
+ * * `COURSE_LICENSE_GROUP_ASSIGNMENT` - Course License Group Assignment
34
+ * * `PROGRAM_LICENSE_ASSIGNMENT` - Program License Assignment
35
+ * * `PROGRAM_LICENSE_GROUP_ASSIGNMENT` - Program License Group Assignment
36
+ * * `USER_LICENSE_ASSIGNMENT` - User License Assignment
37
+ * * `USER_LICENSE_GROUP_ASSIGNMENT` - User License Group Assignment
38
+ */
39
+ type?: (TypeA81Enum | BlankEnum | NullEnum) | null;
40
+ /**
41
+ * A friendly name for the notification template.
42
+ */
43
+ name?: string | null;
44
+ /**
45
+ * Admin-friendly description of what this notification does, when it triggers, and what data it needs
46
+ */
47
+ description?: string;
48
+ readonly is_inherited: boolean;
49
+ readonly source_platform: string;
50
+ readonly is_enabled: boolean;
51
+ readonly can_customize: boolean;
52
+ /**
53
+ * The title for the notification message.
54
+ */
55
+ message_title?: string | null;
56
+ /**
57
+ * Email subject line (supports Django template syntax)
58
+ */
59
+ email_subject?: string | null;
60
+ readonly spas: string;
61
+ readonly allowed_channels: string;
62
+ readonly available_context: string;
63
+ };
64
+
@@ -0,0 +1,18 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * Serializer for testing notification template
7
+ */
8
+ export type NotificationTemplateTest = {
9
+ /**
10
+ * Email address to send test notification to. Defaults to requesting user's email.
11
+ */
12
+ test_email?: string;
13
+ /**
14
+ * Optional context variables for template rendering (e.g., {'course_name': 'Test Course'})
15
+ */
16
+ context?: any;
17
+ };
18
+
@@ -0,0 +1,22 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * Serializer for test notification response
7
+ */
8
+ export type NotificationTemplateTestResponse = {
9
+ /**
10
+ * Whether the test email was sent successfully
11
+ */
12
+ success: boolean;
13
+ /**
14
+ * Description of the result
15
+ */
16
+ message: string;
17
+ /**
18
+ * Email address the test was sent to
19
+ */
20
+ recipient: string;
21
+ };
22
+
@@ -0,0 +1,11 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * Serializer for toggling notification preference
7
+ */
8
+ export type NotificationToggle = {
9
+ allow_notification: boolean;
10
+ };
11
+
@@ -0,0 +1,7 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ export type NullEnum = {
6
+ };
7
+
@@ -0,0 +1,91 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ import type { ConsumerChannel } from './ConsumerChannel';
6
+ import type { NullEnum } from './NullEnum';
7
+ import type { Spa } from './Spa';
8
+ import type { TypeA81Enum } from './TypeA81Enum';
9
+ /**
10
+ * Serializer for detailed template view and editing
11
+ */
12
+ export type PatchedNotificationTemplateDetail = {
13
+ /**
14
+ * Unique identifier for this notification template.
15
+ */
16
+ readonly id?: string;
17
+ /**
18
+ * Select the type of notification from the available options.
19
+ *
20
+ * * `APP_REGISTRATION` - App Registration
21
+ * * `USER_NOTIF_USER_REGISTRATION` - User Notif User Registration
22
+ * * `USER_NOTIF_COURSE_ENROLLMENT` - User Notif Course Enrollment
23
+ * * `ADMIN_NOTIF_COURSE_ENROLLMENT` - Admin Notif Course Enrollment
24
+ * * `USER_NOTIF_USER_INACTIVITY` - User Notif User Inactivity
25
+ * * `USER_NOTIF_COURSE_COMPLETION` - User Notif Course Completion
26
+ * * `USER_NOTIF_CREDENTIALS` - User Notif Credentials
27
+ * * `CUSTOM_NOTIFICATION` - Custom Notification
28
+ * * `PLATFORM_INVITATION` - Platform Invitation
29
+ * * `PROGRAM_INVITATION` - Program Invitation
30
+ * * `COURSE_INVITATION` - Course Invitation
31
+ * * `USER_NOTIF_LEARNER_PROGRESS` - User Notif Learner Progress
32
+ * * `ROLE_CHANGE` - Role Change
33
+ * * `COURSE_LICENSE_ASSIGNMENT` - Course License Assignment
34
+ * * `COURSE_LICENSE_GROUP_ASSIGNMENT` - Course License Group Assignment
35
+ * * `PROGRAM_LICENSE_ASSIGNMENT` - Program License Assignment
36
+ * * `PROGRAM_LICENSE_GROUP_ASSIGNMENT` - Program License Group Assignment
37
+ * * `USER_LICENSE_ASSIGNMENT` - User License Assignment
38
+ * * `USER_LICENSE_GROUP_ASSIGNMENT` - User License Group Assignment
39
+ */
40
+ readonly type?: (TypeA81Enum | NullEnum) | null;
41
+ /**
42
+ * A friendly name for the notification template.
43
+ */
44
+ name?: string | null;
45
+ /**
46
+ * Admin-friendly description of what this notification does, when it triggers, and what data it needs
47
+ */
48
+ description?: string;
49
+ /**
50
+ * The title for the notification message.
51
+ */
52
+ message_title?: string | null;
53
+ /**
54
+ * The full notification message body.
55
+ */
56
+ message_body?: string;
57
+ /**
58
+ * A short version of the notification message body.
59
+ */
60
+ short_message_body?: string;
61
+ /**
62
+ * Email subject line (supports Django template syntax)
63
+ */
64
+ email_subject?: string | null;
65
+ /**
66
+ * Sender email address (default: IBL <noreply@ibl.ai>)
67
+ */
68
+ email_from_address?: string | null;
69
+ /**
70
+ * Full HTML template for email body
71
+ */
72
+ email_html_template?: string | null;
73
+ readonly spas_detail?: Array<Spa>;
74
+ readonly allowed_channels_detail?: Array<ConsumerChannel>;
75
+ spa_ids?: Array<number>;
76
+ channel_ids?: Array<number>;
77
+ readonly is_inherited?: boolean;
78
+ readonly is_enabled?: boolean;
79
+ readonly source_platform?: string;
80
+ metadata?: any;
81
+ readonly available_context?: string;
82
+ /**
83
+ * Timestamp when this template was created
84
+ */
85
+ readonly created_at?: string;
86
+ /**
87
+ * Timestamp when this template was last updated
88
+ */
89
+ readonly updated_at?: string;
90
+ };
91
+
@@ -0,0 +1,11 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * Serializer for toggling notification preference
7
+ */
8
+ export type PatchedNotificationToggle = {
9
+ allow_notification?: boolean;
10
+ };
11
+
@@ -0,0 +1,19 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * Serializer for SPA
7
+ */
8
+ export type Spa = {
9
+ readonly id: number;
10
+ /**
11
+ * Unique identifier for the SPA (e.g., 'skills', 'mentor', 'admin', 'mobile')
12
+ */
13
+ name: string;
14
+ /**
15
+ * Human-friendly description of this SPA
16
+ */
17
+ description?: string;
18
+ };
19
+
@@ -0,0 +1,46 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * * `APP_REGISTRATION` - App Registration
7
+ * * `USER_NOTIF_USER_REGISTRATION` - User Notif User Registration
8
+ * * `USER_NOTIF_COURSE_ENROLLMENT` - User Notif Course Enrollment
9
+ * * `ADMIN_NOTIF_COURSE_ENROLLMENT` - Admin Notif Course Enrollment
10
+ * * `USER_NOTIF_USER_INACTIVITY` - User Notif User Inactivity
11
+ * * `USER_NOTIF_COURSE_COMPLETION` - User Notif Course Completion
12
+ * * `USER_NOTIF_CREDENTIALS` - User Notif Credentials
13
+ * * `CUSTOM_NOTIFICATION` - Custom Notification
14
+ * * `PLATFORM_INVITATION` - Platform Invitation
15
+ * * `PROGRAM_INVITATION` - Program Invitation
16
+ * * `COURSE_INVITATION` - Course Invitation
17
+ * * `USER_NOTIF_LEARNER_PROGRESS` - User Notif Learner Progress
18
+ * * `ROLE_CHANGE` - Role Change
19
+ * * `COURSE_LICENSE_ASSIGNMENT` - Course License Assignment
20
+ * * `COURSE_LICENSE_GROUP_ASSIGNMENT` - Course License Group Assignment
21
+ * * `PROGRAM_LICENSE_ASSIGNMENT` - Program License Assignment
22
+ * * `PROGRAM_LICENSE_GROUP_ASSIGNMENT` - Program License Group Assignment
23
+ * * `USER_LICENSE_ASSIGNMENT` - User License Assignment
24
+ * * `USER_LICENSE_GROUP_ASSIGNMENT` - User License Group Assignment
25
+ */
26
+ export enum TypeA81Enum {
27
+ APP_REGISTRATION = 'APP_REGISTRATION',
28
+ USER_NOTIF_USER_REGISTRATION = 'USER_NOTIF_USER_REGISTRATION',
29
+ USER_NOTIF_COURSE_ENROLLMENT = 'USER_NOTIF_COURSE_ENROLLMENT',
30
+ ADMIN_NOTIF_COURSE_ENROLLMENT = 'ADMIN_NOTIF_COURSE_ENROLLMENT',
31
+ USER_NOTIF_USER_INACTIVITY = 'USER_NOTIF_USER_INACTIVITY',
32
+ USER_NOTIF_COURSE_COMPLETION = 'USER_NOTIF_COURSE_COMPLETION',
33
+ USER_NOTIF_CREDENTIALS = 'USER_NOTIF_CREDENTIALS',
34
+ CUSTOM_NOTIFICATION = 'CUSTOM_NOTIFICATION',
35
+ PLATFORM_INVITATION = 'PLATFORM_INVITATION',
36
+ PROGRAM_INVITATION = 'PROGRAM_INVITATION',
37
+ COURSE_INVITATION = 'COURSE_INVITATION',
38
+ USER_NOTIF_LEARNER_PROGRESS = 'USER_NOTIF_LEARNER_PROGRESS',
39
+ ROLE_CHANGE = 'ROLE_CHANGE',
40
+ COURSE_LICENSE_ASSIGNMENT = 'COURSE_LICENSE_ASSIGNMENT',
41
+ COURSE_LICENSE_GROUP_ASSIGNMENT = 'COURSE_LICENSE_GROUP_ASSIGNMENT',
42
+ PROGRAM_LICENSE_ASSIGNMENT = 'PROGRAM_LICENSE_ASSIGNMENT',
43
+ PROGRAM_LICENSE_GROUP_ASSIGNMENT = 'PROGRAM_LICENSE_GROUP_ASSIGNMENT',
44
+ USER_LICENSE_ASSIGNMENT = 'USER_LICENSE_ASSIGNMENT',
45
+ USER_LICENSE_GROUP_ASSIGNMENT = 'USER_LICENSE_GROUP_ASSIGNMENT',
46
+ }
@@ -11,7 +11,14 @@ import type { Notification } from '../models/Notification';
11
11
  import type { NotificationCount } from '../models/NotificationCount';
12
12
  import type { NotificationPreview } from '../models/NotificationPreview';
13
13
  import type { NotificationSource } from '../models/NotificationSource';
14
+ import type { NotificationTemplateDetail } from '../models/NotificationTemplateDetail';
15
+ import type { NotificationTemplateList } from '../models/NotificationTemplateList';
16
+ import type { NotificationTemplateTest } from '../models/NotificationTemplateTest';
17
+ import type { NotificationTemplateTestResponse } from '../models/NotificationTemplateTestResponse';
18
+ import type { NotificationToggle } from '../models/NotificationToggle';
14
19
  import type { PatchedNotification } from '../models/PatchedNotification';
20
+ import type { PatchedNotificationTemplateDetail } from '../models/PatchedNotificationTemplateDetail';
21
+ import type { PatchedNotificationToggle } from '../models/PatchedNotificationToggle';
15
22
  import type { PreviewResponse } from '../models/PreviewResponse';
16
23
  import type { Recipient } from '../models/Recipient';
17
24
  import type { SendNotification } from '../models/SendNotification';
@@ -489,4 +496,148 @@ export class NotificationsService {
489
496
  mediaType: 'application/json',
490
497
  });
491
498
  }
499
+ /**
500
+ * List notification templates
501
+ * Get all notification templates for the platform. Includes both platform-specific and inherited templates from main.
502
+ * @returns NotificationTemplateList
503
+ * @throws ApiError
504
+ */
505
+ public static notificationV1PlatformsTemplatesList({
506
+ platformKey,
507
+ }: {
508
+ platformKey: string,
509
+ }): CancelablePromise<Array<NotificationTemplateList>> {
510
+ return __request(OpenAPI, {
511
+ method: 'GET',
512
+ url: '/api/notification/v1/platforms/{platform_key}/templates/',
513
+ path: {
514
+ 'platform_key': platformKey,
515
+ },
516
+ });
517
+ }
518
+ /**
519
+ * Get notification template details
520
+ * Get detailed view of a notification template by type. Returns platform-specific template if exists, otherwise main template.
521
+ * @returns NotificationTemplateDetail
522
+ * @throws ApiError
523
+ */
524
+ public static notificationV1PlatformsTemplatesRetrieve({
525
+ notificationType,
526
+ platformKey,
527
+ }: {
528
+ notificationType: string,
529
+ platformKey: string,
530
+ }): CancelablePromise<NotificationTemplateDetail> {
531
+ return __request(OpenAPI, {
532
+ method: 'GET',
533
+ url: '/api/notification/v1/platforms/{platform_key}/templates/{notification_type}/',
534
+ path: {
535
+ 'notification_type': notificationType,
536
+ 'platform_key': platformKey,
537
+ },
538
+ });
539
+ }
540
+ /**
541
+ * Update notification template
542
+ * Update notification template. Creates platform-specific copy on first edit.
543
+ * @returns NotificationTemplateDetail
544
+ * @throws ApiError
545
+ */
546
+ public static notificationV1PlatformsTemplatesPartialUpdate({
547
+ notificationType,
548
+ platformKey,
549
+ requestBody,
550
+ }: {
551
+ notificationType: string,
552
+ platformKey: string,
553
+ requestBody?: PatchedNotificationTemplateDetail,
554
+ }): CancelablePromise<NotificationTemplateDetail> {
555
+ return __request(OpenAPI, {
556
+ method: 'PATCH',
557
+ url: '/api/notification/v1/platforms/{platform_key}/templates/{notification_type}/',
558
+ path: {
559
+ 'notification_type': notificationType,
560
+ 'platform_key': platformKey,
561
+ },
562
+ body: requestBody,
563
+ mediaType: 'application/json',
564
+ });
565
+ }
566
+ /**
567
+ * Reset template to default
568
+ * Delete platform-specific template override and revert to main template. Notification preference (on/off) is preserved.
569
+ * @returns any
570
+ * @throws ApiError
571
+ */
572
+ public static notificationV1PlatformsTemplatesResetCreate({
573
+ notificationType,
574
+ platformKey,
575
+ }: {
576
+ notificationType: string,
577
+ platformKey: string,
578
+ }): CancelablePromise<{
579
+ message?: string;
580
+ deleted?: boolean;
581
+ }> {
582
+ return __request(OpenAPI, {
583
+ method: 'POST',
584
+ url: '/api/notification/v1/platforms/{platform_key}/templates/{notification_type}/reset/',
585
+ path: {
586
+ 'notification_type': notificationType,
587
+ 'platform_key': platformKey,
588
+ },
589
+ });
590
+ }
591
+ /**
592
+ * Send test notification
593
+ * Send a test notification to verify template rendering and delivery. Sends to the requesting admin's email or a specified test email.
594
+ * @returns NotificationTemplateTestResponse
595
+ * @throws ApiError
596
+ */
597
+ public static notificationV1PlatformsTemplatesTestCreate({
598
+ notificationType,
599
+ platformKey,
600
+ requestBody,
601
+ }: {
602
+ notificationType: string,
603
+ platformKey: string,
604
+ requestBody?: NotificationTemplateTest,
605
+ }): CancelablePromise<NotificationTemplateTestResponse> {
606
+ return __request(OpenAPI, {
607
+ method: 'POST',
608
+ url: '/api/notification/v1/platforms/{platform_key}/templates/{notification_type}/test/',
609
+ path: {
610
+ 'notification_type': notificationType,
611
+ 'platform_key': platformKey,
612
+ },
613
+ body: requestBody,
614
+ mediaType: 'application/json',
615
+ });
616
+ }
617
+ /**
618
+ * Toggle notification preference
619
+ * Enable or disable a notification type for the platform. This sets the NotificationPreference, not the template.
620
+ * @returns NotificationToggle
621
+ * @throws ApiError
622
+ */
623
+ public static notificationV1PlatformsTemplatesTogglePartialUpdate({
624
+ notificationType,
625
+ platformKey,
626
+ requestBody,
627
+ }: {
628
+ notificationType: string,
629
+ platformKey: string,
630
+ requestBody?: PatchedNotificationToggle,
631
+ }): CancelablePromise<NotificationToggle> {
632
+ return __request(OpenAPI, {
633
+ method: 'PATCH',
634
+ url: '/api/notification/v1/platforms/{platform_key}/templates/{notification_type}/toggle/',
635
+ path: {
636
+ 'notification_type': notificationType,
637
+ 'platform_key': platformKey,
638
+ },
639
+ body: requestBody,
640
+ mediaType: 'application/json',
641
+ });
642
+ }
492
643
  }