@iblai/data-layer 1.12.4 → 1.12.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/index.d.ts +843 -16
- package/dist/index.esm.js +133 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +141 -3
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/features/audit-logs/__tests__/api-slice.test.d.ts +1 -0
- package/dist/src/features/audit-logs/__tests__/types.test.d.ts +1 -0
- package/dist/src/features/audit-logs/api-slice.d.ts +265 -1
- package/dist/src/features/audit-logs/constants.d.ts +5 -0
- package/dist/src/features/audit-logs/types.d.ts +63 -0
- package/dist/src/features/notifications/__tests__/notifications-templates.test.d.ts +1 -0
- package/dist/src/features/notifications/constants.d.ts +9 -0
- package/dist/src/features/notifications/custom-api-slice.d.ts +391 -0
- package/dist/src/features/notifications/types.d.ts +96 -5
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -17,6 +17,23 @@ export declare const notificationsCustomApiSlice: import("@reduxjs/toolkit/query
|
|
|
17
17
|
notificationType: string;
|
|
18
18
|
allow_notification: boolean;
|
|
19
19
|
}, import("@reduxjs/toolkit/query").BaseQueryFn<import("@data-layer/features/utils").CustomQueryArgs, unknown, import("@data-layer/features/utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, string, Partial<NotificationTemplateDetail>, "notificationsCustomApiSlice", unknown>;
|
|
20
|
+
/**
|
|
21
|
+
* Discards the platform-specific copy of the template and reverts to the
|
|
22
|
+
* platform default.
|
|
23
|
+
*/
|
|
24
|
+
resetTemplate: import("@reduxjs/toolkit/query").MutationDefinition<{
|
|
25
|
+
platformKey: string;
|
|
26
|
+
notificationType: string;
|
|
27
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<import("@data-layer/features/utils").CustomQueryArgs, unknown, import("@data-layer/features/utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, string, Partial<NotificationTemplateDetail>, "notificationsCustomApiSlice", unknown>;
|
|
28
|
+
/** Sends a one-off rendering of the template to `testEmail`. */
|
|
29
|
+
sendTestTemplateEmail: import("@reduxjs/toolkit/query").MutationDefinition<{
|
|
30
|
+
platformKey: string;
|
|
31
|
+
notificationType: string;
|
|
32
|
+
testEmail: string;
|
|
33
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<import("@data-layer/features/utils").CustomQueryArgs, unknown, import("@data-layer/features/utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, string, {
|
|
34
|
+
status?: string;
|
|
35
|
+
detail?: string;
|
|
36
|
+
}, "notificationsCustomApiSlice", unknown>;
|
|
20
37
|
}, "notificationsCustomApiSlice", string, typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/dist/query/react").reactHooksModuleName>;
|
|
21
38
|
export declare const useGetTemplatesQuery: <R extends Record<string, any> = import("@reduxjs/toolkit/query").TSHelpersId<(Omit<{
|
|
22
39
|
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
@@ -993,4 +1010,378 @@ export declare const useGetTemplatesQuery: <R extends Record<string, any> = impo
|
|
|
993
1010
|
allow_notification: boolean;
|
|
994
1011
|
} | undefined;
|
|
995
1012
|
reset: () => void;
|
|
1013
|
+
}], useResetTemplateMutation: <R extends Record<string, any> = ({
|
|
1014
|
+
requestId?: undefined;
|
|
1015
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
1016
|
+
data?: undefined;
|
|
1017
|
+
error?: undefined;
|
|
1018
|
+
endpointName?: string;
|
|
1019
|
+
startedTimeStamp?: undefined;
|
|
1020
|
+
fulfilledTimeStamp?: undefined;
|
|
1021
|
+
} & {
|
|
1022
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
1023
|
+
isUninitialized: true;
|
|
1024
|
+
isLoading: false;
|
|
1025
|
+
isSuccess: false;
|
|
1026
|
+
isError: false;
|
|
1027
|
+
}) | ({
|
|
1028
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
|
|
1029
|
+
} & Omit<{
|
|
1030
|
+
requestId: string;
|
|
1031
|
+
data?: Partial<NotificationTemplateDetail> | undefined;
|
|
1032
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1033
|
+
endpointName: string;
|
|
1034
|
+
startedTimeStamp: number;
|
|
1035
|
+
fulfilledTimeStamp?: number;
|
|
1036
|
+
}, "data" | "fulfilledTimeStamp"> & Required<Pick<{
|
|
1037
|
+
requestId: string;
|
|
1038
|
+
data?: Partial<NotificationTemplateDetail> | undefined;
|
|
1039
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1040
|
+
endpointName: string;
|
|
1041
|
+
startedTimeStamp: number;
|
|
1042
|
+
fulfilledTimeStamp?: number;
|
|
1043
|
+
}, "data" | "fulfilledTimeStamp">> & {
|
|
1044
|
+
error: undefined;
|
|
1045
|
+
} & {
|
|
1046
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
|
|
1047
|
+
isUninitialized: false;
|
|
1048
|
+
isLoading: false;
|
|
1049
|
+
isSuccess: true;
|
|
1050
|
+
isError: false;
|
|
1051
|
+
}) | ({
|
|
1052
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.pending;
|
|
1053
|
+
} & {
|
|
1054
|
+
requestId: string;
|
|
1055
|
+
data?: Partial<NotificationTemplateDetail> | undefined;
|
|
1056
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1057
|
+
endpointName: string;
|
|
1058
|
+
startedTimeStamp: number;
|
|
1059
|
+
fulfilledTimeStamp?: number;
|
|
1060
|
+
} & {
|
|
1061
|
+
data?: undefined;
|
|
1062
|
+
} & {
|
|
1063
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.pending;
|
|
1064
|
+
isUninitialized: false;
|
|
1065
|
+
isLoading: true;
|
|
1066
|
+
isSuccess: false;
|
|
1067
|
+
isError: false;
|
|
1068
|
+
}) | ({
|
|
1069
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
1070
|
+
} & Omit<{
|
|
1071
|
+
requestId: string;
|
|
1072
|
+
data?: Partial<NotificationTemplateDetail> | undefined;
|
|
1073
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1074
|
+
endpointName: string;
|
|
1075
|
+
startedTimeStamp: number;
|
|
1076
|
+
fulfilledTimeStamp?: number;
|
|
1077
|
+
}, "error"> & Required<Pick<{
|
|
1078
|
+
requestId: string;
|
|
1079
|
+
data?: Partial<NotificationTemplateDetail> | undefined;
|
|
1080
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1081
|
+
endpointName: string;
|
|
1082
|
+
startedTimeStamp: number;
|
|
1083
|
+
fulfilledTimeStamp?: number;
|
|
1084
|
+
}, "error">> & {
|
|
1085
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
1086
|
+
isUninitialized: false;
|
|
1087
|
+
isLoading: false;
|
|
1088
|
+
isSuccess: false;
|
|
1089
|
+
isError: true;
|
|
1090
|
+
})>(options?: {
|
|
1091
|
+
selectFromResult?: ((state: ({
|
|
1092
|
+
requestId?: undefined;
|
|
1093
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
1094
|
+
data?: undefined;
|
|
1095
|
+
error?: undefined;
|
|
1096
|
+
endpointName?: string;
|
|
1097
|
+
startedTimeStamp?: undefined;
|
|
1098
|
+
fulfilledTimeStamp?: undefined;
|
|
1099
|
+
} & {
|
|
1100
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
1101
|
+
isUninitialized: true;
|
|
1102
|
+
isLoading: false;
|
|
1103
|
+
isSuccess: false;
|
|
1104
|
+
isError: false;
|
|
1105
|
+
}) | ({
|
|
1106
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
|
|
1107
|
+
} & Omit<{
|
|
1108
|
+
requestId: string;
|
|
1109
|
+
data?: Partial<NotificationTemplateDetail> | undefined;
|
|
1110
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1111
|
+
endpointName: string;
|
|
1112
|
+
startedTimeStamp: number;
|
|
1113
|
+
fulfilledTimeStamp?: number;
|
|
1114
|
+
}, "data" | "fulfilledTimeStamp"> & Required<Pick<{
|
|
1115
|
+
requestId: string;
|
|
1116
|
+
data?: Partial<NotificationTemplateDetail> | undefined;
|
|
1117
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1118
|
+
endpointName: string;
|
|
1119
|
+
startedTimeStamp: number;
|
|
1120
|
+
fulfilledTimeStamp?: number;
|
|
1121
|
+
}, "data" | "fulfilledTimeStamp">> & {
|
|
1122
|
+
error: undefined;
|
|
1123
|
+
} & {
|
|
1124
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
|
|
1125
|
+
isUninitialized: false;
|
|
1126
|
+
isLoading: false;
|
|
1127
|
+
isSuccess: true;
|
|
1128
|
+
isError: false;
|
|
1129
|
+
}) | ({
|
|
1130
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.pending;
|
|
1131
|
+
} & {
|
|
1132
|
+
requestId: string;
|
|
1133
|
+
data?: Partial<NotificationTemplateDetail> | undefined;
|
|
1134
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1135
|
+
endpointName: string;
|
|
1136
|
+
startedTimeStamp: number;
|
|
1137
|
+
fulfilledTimeStamp?: number;
|
|
1138
|
+
} & {
|
|
1139
|
+
data?: undefined;
|
|
1140
|
+
} & {
|
|
1141
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.pending;
|
|
1142
|
+
isUninitialized: false;
|
|
1143
|
+
isLoading: true;
|
|
1144
|
+
isSuccess: false;
|
|
1145
|
+
isError: false;
|
|
1146
|
+
}) | ({
|
|
1147
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
1148
|
+
} & Omit<{
|
|
1149
|
+
requestId: string;
|
|
1150
|
+
data?: Partial<NotificationTemplateDetail> | undefined;
|
|
1151
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1152
|
+
endpointName: string;
|
|
1153
|
+
startedTimeStamp: number;
|
|
1154
|
+
fulfilledTimeStamp?: number;
|
|
1155
|
+
}, "error"> & Required<Pick<{
|
|
1156
|
+
requestId: string;
|
|
1157
|
+
data?: Partial<NotificationTemplateDetail> | undefined;
|
|
1158
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1159
|
+
endpointName: string;
|
|
1160
|
+
startedTimeStamp: number;
|
|
1161
|
+
fulfilledTimeStamp?: number;
|
|
1162
|
+
}, "error">> & {
|
|
1163
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
1164
|
+
isUninitialized: false;
|
|
1165
|
+
isLoading: false;
|
|
1166
|
+
isSuccess: false;
|
|
1167
|
+
isError: true;
|
|
1168
|
+
})) => R) | undefined;
|
|
1169
|
+
fixedCacheKey?: string;
|
|
1170
|
+
} | undefined) => readonly [(arg: {
|
|
1171
|
+
platformKey: string;
|
|
1172
|
+
notificationType: string;
|
|
1173
|
+
}) => import("@reduxjs/toolkit/query").MutationActionCreatorResult<import("@reduxjs/toolkit/query").MutationDefinition<{
|
|
1174
|
+
platformKey: string;
|
|
1175
|
+
notificationType: string;
|
|
1176
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<import("@data-layer/features/utils").CustomQueryArgs, unknown, import("@data-layer/features/utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, string, Partial<NotificationTemplateDetail>, "notificationsCustomApiSlice", unknown>>, import("@reduxjs/toolkit/query").TSHelpersNoInfer<R> & {
|
|
1177
|
+
originalArgs?: {
|
|
1178
|
+
platformKey: string;
|
|
1179
|
+
notificationType: string;
|
|
1180
|
+
} | undefined;
|
|
1181
|
+
reset: () => void;
|
|
1182
|
+
}], useSendTestTemplateEmailMutation: <R extends Record<string, any> = ({
|
|
1183
|
+
requestId?: undefined;
|
|
1184
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
1185
|
+
data?: undefined;
|
|
1186
|
+
error?: undefined;
|
|
1187
|
+
endpointName?: string;
|
|
1188
|
+
startedTimeStamp?: undefined;
|
|
1189
|
+
fulfilledTimeStamp?: undefined;
|
|
1190
|
+
} & {
|
|
1191
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
1192
|
+
isUninitialized: true;
|
|
1193
|
+
isLoading: false;
|
|
1194
|
+
isSuccess: false;
|
|
1195
|
+
isError: false;
|
|
1196
|
+
}) | ({
|
|
1197
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
|
|
1198
|
+
} & Omit<{
|
|
1199
|
+
requestId: string;
|
|
1200
|
+
data?: {
|
|
1201
|
+
status?: string;
|
|
1202
|
+
detail?: string;
|
|
1203
|
+
} | undefined;
|
|
1204
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1205
|
+
endpointName: string;
|
|
1206
|
+
startedTimeStamp: number;
|
|
1207
|
+
fulfilledTimeStamp?: number;
|
|
1208
|
+
}, "data" | "fulfilledTimeStamp"> & Required<Pick<{
|
|
1209
|
+
requestId: string;
|
|
1210
|
+
data?: {
|
|
1211
|
+
status?: string;
|
|
1212
|
+
detail?: string;
|
|
1213
|
+
} | undefined;
|
|
1214
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1215
|
+
endpointName: string;
|
|
1216
|
+
startedTimeStamp: number;
|
|
1217
|
+
fulfilledTimeStamp?: number;
|
|
1218
|
+
}, "data" | "fulfilledTimeStamp">> & {
|
|
1219
|
+
error: undefined;
|
|
1220
|
+
} & {
|
|
1221
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
|
|
1222
|
+
isUninitialized: false;
|
|
1223
|
+
isLoading: false;
|
|
1224
|
+
isSuccess: true;
|
|
1225
|
+
isError: false;
|
|
1226
|
+
}) | ({
|
|
1227
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.pending;
|
|
1228
|
+
} & {
|
|
1229
|
+
requestId: string;
|
|
1230
|
+
data?: {
|
|
1231
|
+
status?: string;
|
|
1232
|
+
detail?: string;
|
|
1233
|
+
} | undefined;
|
|
1234
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1235
|
+
endpointName: string;
|
|
1236
|
+
startedTimeStamp: number;
|
|
1237
|
+
fulfilledTimeStamp?: number;
|
|
1238
|
+
} & {
|
|
1239
|
+
data?: undefined;
|
|
1240
|
+
} & {
|
|
1241
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.pending;
|
|
1242
|
+
isUninitialized: false;
|
|
1243
|
+
isLoading: true;
|
|
1244
|
+
isSuccess: false;
|
|
1245
|
+
isError: false;
|
|
1246
|
+
}) | ({
|
|
1247
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
1248
|
+
} & Omit<{
|
|
1249
|
+
requestId: string;
|
|
1250
|
+
data?: {
|
|
1251
|
+
status?: string;
|
|
1252
|
+
detail?: string;
|
|
1253
|
+
} | undefined;
|
|
1254
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1255
|
+
endpointName: string;
|
|
1256
|
+
startedTimeStamp: number;
|
|
1257
|
+
fulfilledTimeStamp?: number;
|
|
1258
|
+
}, "error"> & Required<Pick<{
|
|
1259
|
+
requestId: string;
|
|
1260
|
+
data?: {
|
|
1261
|
+
status?: string;
|
|
1262
|
+
detail?: string;
|
|
1263
|
+
} | undefined;
|
|
1264
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1265
|
+
endpointName: string;
|
|
1266
|
+
startedTimeStamp: number;
|
|
1267
|
+
fulfilledTimeStamp?: number;
|
|
1268
|
+
}, "error">> & {
|
|
1269
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
1270
|
+
isUninitialized: false;
|
|
1271
|
+
isLoading: false;
|
|
1272
|
+
isSuccess: false;
|
|
1273
|
+
isError: true;
|
|
1274
|
+
})>(options?: {
|
|
1275
|
+
selectFromResult?: ((state: ({
|
|
1276
|
+
requestId?: undefined;
|
|
1277
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
1278
|
+
data?: undefined;
|
|
1279
|
+
error?: undefined;
|
|
1280
|
+
endpointName?: string;
|
|
1281
|
+
startedTimeStamp?: undefined;
|
|
1282
|
+
fulfilledTimeStamp?: undefined;
|
|
1283
|
+
} & {
|
|
1284
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
1285
|
+
isUninitialized: true;
|
|
1286
|
+
isLoading: false;
|
|
1287
|
+
isSuccess: false;
|
|
1288
|
+
isError: false;
|
|
1289
|
+
}) | ({
|
|
1290
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
|
|
1291
|
+
} & Omit<{
|
|
1292
|
+
requestId: string;
|
|
1293
|
+
data?: {
|
|
1294
|
+
status?: string;
|
|
1295
|
+
detail?: string;
|
|
1296
|
+
} | undefined;
|
|
1297
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1298
|
+
endpointName: string;
|
|
1299
|
+
startedTimeStamp: number;
|
|
1300
|
+
fulfilledTimeStamp?: number;
|
|
1301
|
+
}, "data" | "fulfilledTimeStamp"> & Required<Pick<{
|
|
1302
|
+
requestId: string;
|
|
1303
|
+
data?: {
|
|
1304
|
+
status?: string;
|
|
1305
|
+
detail?: string;
|
|
1306
|
+
} | undefined;
|
|
1307
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1308
|
+
endpointName: string;
|
|
1309
|
+
startedTimeStamp: number;
|
|
1310
|
+
fulfilledTimeStamp?: number;
|
|
1311
|
+
}, "data" | "fulfilledTimeStamp">> & {
|
|
1312
|
+
error: undefined;
|
|
1313
|
+
} & {
|
|
1314
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
|
|
1315
|
+
isUninitialized: false;
|
|
1316
|
+
isLoading: false;
|
|
1317
|
+
isSuccess: true;
|
|
1318
|
+
isError: false;
|
|
1319
|
+
}) | ({
|
|
1320
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.pending;
|
|
1321
|
+
} & {
|
|
1322
|
+
requestId: string;
|
|
1323
|
+
data?: {
|
|
1324
|
+
status?: string;
|
|
1325
|
+
detail?: string;
|
|
1326
|
+
} | undefined;
|
|
1327
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1328
|
+
endpointName: string;
|
|
1329
|
+
startedTimeStamp: number;
|
|
1330
|
+
fulfilledTimeStamp?: number;
|
|
1331
|
+
} & {
|
|
1332
|
+
data?: undefined;
|
|
1333
|
+
} & {
|
|
1334
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.pending;
|
|
1335
|
+
isUninitialized: false;
|
|
1336
|
+
isLoading: true;
|
|
1337
|
+
isSuccess: false;
|
|
1338
|
+
isError: false;
|
|
1339
|
+
}) | ({
|
|
1340
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
1341
|
+
} & Omit<{
|
|
1342
|
+
requestId: string;
|
|
1343
|
+
data?: {
|
|
1344
|
+
status?: string;
|
|
1345
|
+
detail?: string;
|
|
1346
|
+
} | undefined;
|
|
1347
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1348
|
+
endpointName: string;
|
|
1349
|
+
startedTimeStamp: number;
|
|
1350
|
+
fulfilledTimeStamp?: number;
|
|
1351
|
+
}, "error"> & Required<Pick<{
|
|
1352
|
+
requestId: string;
|
|
1353
|
+
data?: {
|
|
1354
|
+
status?: string;
|
|
1355
|
+
detail?: string;
|
|
1356
|
+
} | undefined;
|
|
1357
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
1358
|
+
endpointName: string;
|
|
1359
|
+
startedTimeStamp: number;
|
|
1360
|
+
fulfilledTimeStamp?: number;
|
|
1361
|
+
}, "error">> & {
|
|
1362
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
1363
|
+
isUninitialized: false;
|
|
1364
|
+
isLoading: false;
|
|
1365
|
+
isSuccess: false;
|
|
1366
|
+
isError: true;
|
|
1367
|
+
})) => R) | undefined;
|
|
1368
|
+
fixedCacheKey?: string;
|
|
1369
|
+
} | undefined) => readonly [(arg: {
|
|
1370
|
+
platformKey: string;
|
|
1371
|
+
notificationType: string;
|
|
1372
|
+
testEmail: string;
|
|
1373
|
+
}) => import("@reduxjs/toolkit/query").MutationActionCreatorResult<import("@reduxjs/toolkit/query").MutationDefinition<{
|
|
1374
|
+
platformKey: string;
|
|
1375
|
+
notificationType: string;
|
|
1376
|
+
testEmail: string;
|
|
1377
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<import("@data-layer/features/utils").CustomQueryArgs, unknown, import("@data-layer/features/utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, string, {
|
|
1378
|
+
status?: string;
|
|
1379
|
+
detail?: string;
|
|
1380
|
+
}, "notificationsCustomApiSlice", unknown>>, import("@reduxjs/toolkit/query").TSHelpersNoInfer<R> & {
|
|
1381
|
+
originalArgs?: {
|
|
1382
|
+
platformKey: string;
|
|
1383
|
+
notificationType: string;
|
|
1384
|
+
testEmail: string;
|
|
1385
|
+
} | undefined;
|
|
1386
|
+
reset: () => void;
|
|
996
1387
|
}];
|
|
@@ -1,3 +1,73 @@
|
|
|
1
|
+
/** Notification type of the "User Progress Summary" template. */
|
|
2
|
+
export declare const USER_PROGRESS_SUMMARY_TYPE = "COURSES_PROGRESS_SUMMARY";
|
|
3
|
+
export type NotificationTemplateFrequency = 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'CUSTOM';
|
|
4
|
+
/**
|
|
5
|
+
* Read-only `{ variable: description }` map returned by the template `GET`.
|
|
6
|
+
* Render it as the "variables you can insert" helper instead of hardcoding a
|
|
7
|
+
* list — the API stays authoritative as available variables change.
|
|
8
|
+
*
|
|
9
|
+
* Some deployments serialize it as a JSON string, hence the union.
|
|
10
|
+
*/
|
|
11
|
+
export type NotificationTemplateContext = Record<string, string> | string;
|
|
12
|
+
export declare const USER_PROGRESS_DATA_POINTS: readonly ["courses_progressed", "courses_completed", "credentials_earned", "time_spent", "active_days", "mentors_accessed"];
|
|
13
|
+
export type UserProgressDataPoint = (typeof USER_PROGRESS_DATA_POINTS)[number];
|
|
14
|
+
export interface NotificationTemplateUserProgressSchedule {
|
|
15
|
+
frequency?: NotificationTemplateFrequency;
|
|
16
|
+
execution_time?: string;
|
|
17
|
+
timezone?: string;
|
|
18
|
+
/** Only honored when `frequency` is `CUSTOM`. */
|
|
19
|
+
custom_interval_days?: number;
|
|
20
|
+
/** Read-only scheduling telemetry. */
|
|
21
|
+
last_execution_date?: string | null;
|
|
22
|
+
next_execution_date?: string | null;
|
|
23
|
+
execution_history?: unknown[];
|
|
24
|
+
}
|
|
25
|
+
/** Nested read-back shape of the flat `user_progress_*` write fields. */
|
|
26
|
+
export interface NotificationTemplateUserProgressConfig {
|
|
27
|
+
schedule?: NotificationTemplateUserProgressSchedule;
|
|
28
|
+
/** Reporting window in days — independent of the send cadence. */
|
|
29
|
+
lookback_days?: number;
|
|
30
|
+
enabled_data_points?: UserProgressDataPoint[];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Flat `user_progress_*` fields. Write these on `PATCH`; read them back nested
|
|
34
|
+
* under `user_progress_config`.
|
|
35
|
+
*/
|
|
36
|
+
export interface NotificationTemplateUserProgressSettings {
|
|
37
|
+
user_progress_frequency?: NotificationTemplateFrequency;
|
|
38
|
+
/** `"HH:MM"`, 24h. */
|
|
39
|
+
user_progress_execution_time?: string;
|
|
40
|
+
/** IANA name, e.g. `Europe/London`. */
|
|
41
|
+
user_progress_timezone?: string;
|
|
42
|
+
/** 1–365, only honored when the frequency is `CUSTOM`. */
|
|
43
|
+
user_progress_custom_interval_days?: number;
|
|
44
|
+
/** 1–365. */
|
|
45
|
+
user_progress_lookback_days?: number;
|
|
46
|
+
user_progress_enabled_data_points?: UserProgressDataPoint[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Deprecated `courses_progress_*` aliases of the fields above.
|
|
50
|
+
*
|
|
51
|
+
* Still what deployed backends actually return (and, on older builds, the only
|
|
52
|
+
* prefix they accept), so reads must fall back to these and writes mirror onto
|
|
53
|
+
* them. `user_progress_*` wins when both are sent.
|
|
54
|
+
*/
|
|
55
|
+
export interface NotificationTemplateCoursesProgressSettings {
|
|
56
|
+
courses_progress_frequency?: NotificationTemplateFrequency;
|
|
57
|
+
courses_progress_execution_time?: string;
|
|
58
|
+
courses_progress_timezone?: string;
|
|
59
|
+
courses_progress_custom_interval_days?: number;
|
|
60
|
+
courses_progress_lookback_days?: number;
|
|
61
|
+
courses_progress_enabled_data_points?: UserProgressDataPoint[];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Free-form template metadata. Returned as an object by current backends and as
|
|
65
|
+
* a JSON string by older ones; it can carry its own copy of the progress config.
|
|
66
|
+
*/
|
|
67
|
+
export type NotificationTemplateMetadata = string | ({
|
|
68
|
+
courses_progress_config?: NotificationTemplateUserProgressConfig;
|
|
69
|
+
user_progress_config?: NotificationTemplateUserProgressConfig;
|
|
70
|
+
} & Record<string, unknown>);
|
|
1
71
|
export interface NotificationTemplatePeriodicSettings {
|
|
2
72
|
periodic_learner_scope?: 'ALL_LEARNERS' | 'ACTIVE_LEARNERS';
|
|
3
73
|
periodic_report_period_days?: number;
|
|
@@ -7,7 +77,7 @@ export interface NotificationTemplatePeriodicSettings {
|
|
|
7
77
|
periodic_timezone?: string;
|
|
8
78
|
periodic_mentors?: NotificationTemplatePeriodicMentor[];
|
|
9
79
|
}
|
|
10
|
-
export interface NotificationTemplate extends NotificationTemplatePeriodicSettings {
|
|
80
|
+
export interface NotificationTemplate extends NotificationTemplatePeriodicSettings, NotificationTemplateUserProgressSettings, NotificationTemplateCoursesProgressSettings {
|
|
11
81
|
id: string;
|
|
12
82
|
type: string;
|
|
13
83
|
name: string;
|
|
@@ -21,7 +91,9 @@ export interface NotificationTemplate extends NotificationTemplatePeriodicSettin
|
|
|
21
91
|
email_html_template: string;
|
|
22
92
|
spas: string;
|
|
23
93
|
allowed_channels: string;
|
|
24
|
-
available_context:
|
|
94
|
+
available_context: NotificationTemplateContext;
|
|
95
|
+
/** e.g. `content:course`, `audience:user`, `audience:watcher`. */
|
|
96
|
+
tags?: string[];
|
|
25
97
|
}
|
|
26
98
|
export interface NotificationSpaDetail {
|
|
27
99
|
id: number;
|
|
@@ -44,7 +116,7 @@ export interface NotificationTemplatePeriodicConfig {
|
|
|
44
116
|
timezone?: string;
|
|
45
117
|
mentors: NotificationTemplatePeriodicMentor[];
|
|
46
118
|
}
|
|
47
|
-
export interface NotificationTemplateDetail extends NotificationTemplatePeriodicSettings {
|
|
119
|
+
export interface NotificationTemplateDetail extends NotificationTemplatePeriodicSettings, NotificationTemplateUserProgressSettings, NotificationTemplateCoursesProgressSettings {
|
|
48
120
|
id: string;
|
|
49
121
|
type: string;
|
|
50
122
|
name: string;
|
|
@@ -60,10 +132,29 @@ export interface NotificationTemplateDetail extends NotificationTemplatePeriodic
|
|
|
60
132
|
is_inherited: boolean;
|
|
61
133
|
is_enabled: boolean;
|
|
62
134
|
source_platform: string;
|
|
63
|
-
|
|
64
|
-
|
|
135
|
+
can_customize?: boolean;
|
|
136
|
+
metadata: NotificationTemplateMetadata;
|
|
137
|
+
available_context: NotificationTemplateContext;
|
|
138
|
+
/** e.g. `content:course`, `audience:user`, `audience:watcher`. */
|
|
139
|
+
tags?: string[];
|
|
65
140
|
created_at: string;
|
|
66
141
|
updated_at: string;
|
|
67
142
|
periodic_config?: NotificationTemplatePeriodicConfig;
|
|
68
143
|
proactive_prompt_message?: string;
|
|
144
|
+
/** Nested read-back of the flat `user_progress_*` write fields. */
|
|
145
|
+
user_progress_config?: NotificationTemplateUserProgressConfig;
|
|
146
|
+
/**
|
|
147
|
+
* Deprecated alias of `user_progress_config`, and currently the only one
|
|
148
|
+
* deployed backends populate — read it as a fallback.
|
|
149
|
+
*/
|
|
150
|
+
courses_progress_config?: NotificationTemplateUserProgressConfig | null;
|
|
151
|
+
/** `null` until customized — watchers then fall back to `email_subject`. */
|
|
152
|
+
watcher_email_subject?: string | null;
|
|
153
|
+
/** `null` until customized — watchers then fall back to `email_html_template`. */
|
|
154
|
+
watcher_email_html_template?: string | null;
|
|
155
|
+
/**
|
|
156
|
+
* Learner context plus `learner_name`. `null` for notification types that
|
|
157
|
+
* have no watcher variant — hide the watcher editor in that case.
|
|
158
|
+
*/
|
|
159
|
+
watcher_available_context?: NotificationTemplateContext | null;
|
|
69
160
|
}
|