@trycourier/courier 7.9.0 → 7.10.1

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 (75) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/client.d.mts +4 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +4 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/internal/utils/env.js +2 -2
  9. package/internal/utils/env.js.map +1 -1
  10. package/internal/utils/env.mjs +2 -2
  11. package/internal/utils/env.mjs.map +1 -1
  12. package/package.json +1 -1
  13. package/resources/index.d.mts +2 -2
  14. package/resources/index.d.mts.map +1 -1
  15. package/resources/index.d.ts +2 -2
  16. package/resources/index.d.ts.map +1 -1
  17. package/resources/index.js.map +1 -1
  18. package/resources/index.mjs.map +1 -1
  19. package/resources/notifications/index.d.mts +1 -2
  20. package/resources/notifications/index.d.mts.map +1 -1
  21. package/resources/notifications/index.d.ts +1 -2
  22. package/resources/notifications/index.d.ts.map +1 -1
  23. package/resources/notifications/index.js +1 -3
  24. package/resources/notifications/index.js.map +1 -1
  25. package/resources/notifications/index.mjs +0 -1
  26. package/resources/notifications/index.mjs.map +1 -1
  27. package/resources/notifications/notifications.d.mts +305 -30
  28. package/resources/notifications/notifications.d.mts.map +1 -1
  29. package/resources/notifications/notifications.d.ts +305 -30
  30. package/resources/notifications/notifications.d.ts.map +1 -1
  31. package/resources/notifications/notifications.js +73 -10
  32. package/resources/notifications/notifications.js.map +1 -1
  33. package/resources/notifications/notifications.mjs +73 -10
  34. package/resources/notifications/notifications.mjs.map +1 -1
  35. package/resources/providers/providers.d.mts +7 -4
  36. package/resources/providers/providers.d.mts.map +1 -1
  37. package/resources/providers/providers.d.ts +7 -4
  38. package/resources/providers/providers.d.ts.map +1 -1
  39. package/resources/providers/providers.js +6 -4
  40. package/resources/providers/providers.js.map +1 -1
  41. package/resources/providers/providers.mjs +6 -4
  42. package/resources/providers/providers.mjs.map +1 -1
  43. package/resources/routing-strategies.d.mts +34 -14
  44. package/resources/routing-strategies.d.mts.map +1 -1
  45. package/resources/routing-strategies.d.ts +34 -14
  46. package/resources/routing-strategies.d.ts.map +1 -1
  47. package/resources/routing-strategies.js +15 -2
  48. package/resources/routing-strategies.js.map +1 -1
  49. package/resources/routing-strategies.mjs +15 -2
  50. package/resources/routing-strategies.mjs.map +1 -1
  51. package/src/client.ts +28 -4
  52. package/src/internal/utils/env.ts +2 -2
  53. package/src/resources/index.ts +14 -2
  54. package/src/resources/notifications/index.ts +12 -2
  55. package/src/resources/notifications/notifications.ts +390 -36
  56. package/src/resources/providers/providers.ts +8 -5
  57. package/src/resources/routing-strategies.ts +46 -15
  58. package/src/version.ts +1 -1
  59. package/version.d.mts +1 -1
  60. package/version.d.mts.map +1 -1
  61. package/version.d.ts +1 -1
  62. package/version.d.ts.map +1 -1
  63. package/version.js +1 -1
  64. package/version.js.map +1 -1
  65. package/version.mjs +1 -1
  66. package/version.mjs.map +1 -1
  67. package/resources/notifications/draft.d.mts +0 -15
  68. package/resources/notifications/draft.d.mts.map +0 -1
  69. package/resources/notifications/draft.d.ts +0 -15
  70. package/resources/notifications/draft.d.ts.map +0 -1
  71. package/resources/notifications/draft.js +0 -20
  72. package/resources/notifications/draft.js.map +0 -1
  73. package/resources/notifications/draft.mjs +0 -16
  74. package/resources/notifications/draft.mjs.map +0 -1
  75. package/src/resources/notifications/draft.ts +0 -20
package/src/client.ts CHANGED
@@ -88,13 +88,14 @@ import {
88
88
  } from './resources/messages';
89
89
  import { Requests } from './resources/requests';
90
90
  import {
91
+ AssociatedNotificationListResponse,
91
92
  RoutingStrategies,
92
93
  RoutingStrategyCreateParams,
93
94
  RoutingStrategyCreateRequest,
94
95
  RoutingStrategyGetResponse,
96
+ RoutingStrategyListNotificationsParams,
95
97
  RoutingStrategyListParams,
96
98
  RoutingStrategyListResponse,
97
- RoutingStrategyMutationResponse,
98
99
  RoutingStrategyReplaceParams,
99
100
  RoutingStrategyReplaceRequest,
100
101
  RoutingStrategySummary,
@@ -125,19 +126,30 @@ import {
125
126
  import {
126
127
  BaseCheck,
127
128
  Check,
129
+ ElementWithChecksums,
130
+ NotificationContentGetResponse,
131
+ NotificationContentMutationResponse,
132
+ NotificationContentPutRequest,
128
133
  NotificationCreateParams,
134
+ NotificationElementPutRequest,
129
135
  NotificationGetContent,
130
136
  NotificationListParams,
131
137
  NotificationListResponse,
132
138
  NotificationListVersionsParams,
139
+ NotificationLocalePutRequest,
133
140
  NotificationPublishParams,
141
+ NotificationPutContentParams,
142
+ NotificationPutElementParams,
143
+ NotificationPutLocaleParams,
134
144
  NotificationReplaceParams,
145
+ NotificationRetrieveContentParams,
146
+ NotificationRetrieveContentResponse,
135
147
  NotificationRetrieveParams,
136
148
  NotificationTemplateCreateRequest,
137
149
  NotificationTemplateGetResponse,
138
- NotificationTemplateMutationResponse,
139
150
  NotificationTemplatePayload,
140
151
  NotificationTemplatePublishRequest,
152
+ NotificationTemplateState,
141
153
  NotificationTemplateSummary,
142
154
  NotificationTemplateUpdateRequest,
143
155
  NotificationTemplateVersionListResponse,
@@ -1048,35 +1060,47 @@ export declare namespace Courier {
1048
1060
  Notifications as Notifications,
1049
1061
  type BaseCheck as BaseCheck,
1050
1062
  type Check as Check,
1063
+ type ElementWithChecksums as ElementWithChecksums,
1064
+ type NotificationContentGetResponse as NotificationContentGetResponse,
1065
+ type NotificationContentMutationResponse as NotificationContentMutationResponse,
1066
+ type NotificationContentPutRequest as NotificationContentPutRequest,
1067
+ type NotificationElementPutRequest as NotificationElementPutRequest,
1051
1068
  type NotificationGetContent as NotificationGetContent,
1069
+ type NotificationLocalePutRequest as NotificationLocalePutRequest,
1052
1070
  type NotificationTemplateCreateRequest as NotificationTemplateCreateRequest,
1053
1071
  type NotificationTemplateGetResponse as NotificationTemplateGetResponse,
1054
- type NotificationTemplateMutationResponse as NotificationTemplateMutationResponse,
1055
1072
  type NotificationTemplatePayload as NotificationTemplatePayload,
1056
1073
  type NotificationTemplatePublishRequest as NotificationTemplatePublishRequest,
1074
+ type NotificationTemplateState as NotificationTemplateState,
1057
1075
  type NotificationTemplateSummary as NotificationTemplateSummary,
1058
1076
  type NotificationTemplateUpdateRequest as NotificationTemplateUpdateRequest,
1059
1077
  type NotificationTemplateVersionListResponse as NotificationTemplateVersionListResponse,
1060
1078
  type VersionNode as VersionNode,
1061
1079
  type NotificationListResponse as NotificationListResponse,
1080
+ type NotificationRetrieveContentResponse as NotificationRetrieveContentResponse,
1062
1081
  type NotificationCreateParams as NotificationCreateParams,
1063
1082
  type NotificationRetrieveParams as NotificationRetrieveParams,
1064
1083
  type NotificationListParams as NotificationListParams,
1065
1084
  type NotificationListVersionsParams as NotificationListVersionsParams,
1066
1085
  type NotificationPublishParams as NotificationPublishParams,
1086
+ type NotificationPutContentParams as NotificationPutContentParams,
1087
+ type NotificationPutElementParams as NotificationPutElementParams,
1088
+ type NotificationPutLocaleParams as NotificationPutLocaleParams,
1067
1089
  type NotificationReplaceParams as NotificationReplaceParams,
1090
+ type NotificationRetrieveContentParams as NotificationRetrieveContentParams,
1068
1091
  };
1069
1092
 
1070
1093
  export {
1071
1094
  RoutingStrategies as RoutingStrategies,
1095
+ type AssociatedNotificationListResponse as AssociatedNotificationListResponse,
1072
1096
  type RoutingStrategyCreateRequest as RoutingStrategyCreateRequest,
1073
1097
  type RoutingStrategyGetResponse as RoutingStrategyGetResponse,
1074
1098
  type RoutingStrategyListResponse as RoutingStrategyListResponse,
1075
- type RoutingStrategyMutationResponse as RoutingStrategyMutationResponse,
1076
1099
  type RoutingStrategyReplaceRequest as RoutingStrategyReplaceRequest,
1077
1100
  type RoutingStrategySummary as RoutingStrategySummary,
1078
1101
  type RoutingStrategyCreateParams as RoutingStrategyCreateParams,
1079
1102
  type RoutingStrategyListParams as RoutingStrategyListParams,
1103
+ type RoutingStrategyListNotificationsParams as RoutingStrategyListNotificationsParams,
1080
1104
  type RoutingStrategyReplaceParams as RoutingStrategyReplaceParams,
1081
1105
  };
1082
1106
 
@@ -9,10 +9,10 @@
9
9
  */
10
10
  export const readEnv = (env: string): string | undefined => {
11
11
  if (typeof (globalThis as any).process !== 'undefined') {
12
- return (globalThis as any).process.env?.[env]?.trim() ?? undefined;
12
+ return (globalThis as any).process.env?.[env]?.trim() || undefined;
13
13
  }
14
14
  if (typeof (globalThis as any).Deno !== 'undefined') {
15
- return (globalThis as any).Deno.env?.get?.(env)?.trim();
15
+ return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined;
16
16
  }
17
17
  return undefined;
18
18
  };
@@ -90,23 +90,34 @@ export {
90
90
  Notifications,
91
91
  type BaseCheck,
92
92
  type Check,
93
+ type ElementWithChecksums,
94
+ type NotificationContentGetResponse,
95
+ type NotificationContentMutationResponse,
96
+ type NotificationContentPutRequest,
97
+ type NotificationElementPutRequest,
93
98
  type NotificationGetContent,
99
+ type NotificationLocalePutRequest,
94
100
  type NotificationTemplateCreateRequest,
95
101
  type NotificationTemplateGetResponse,
96
- type NotificationTemplateMutationResponse,
97
102
  type NotificationTemplatePayload,
98
103
  type NotificationTemplatePublishRequest,
104
+ type NotificationTemplateState,
99
105
  type NotificationTemplateSummary,
100
106
  type NotificationTemplateUpdateRequest,
101
107
  type NotificationTemplateVersionListResponse,
102
108
  type VersionNode,
103
109
  type NotificationListResponse,
110
+ type NotificationRetrieveContentResponse,
104
111
  type NotificationCreateParams,
105
112
  type NotificationRetrieveParams,
106
113
  type NotificationListParams,
107
114
  type NotificationListVersionsParams,
108
115
  type NotificationPublishParams,
116
+ type NotificationPutContentParams,
117
+ type NotificationPutElementParams,
118
+ type NotificationPutLocaleParams,
109
119
  type NotificationReplaceParams,
120
+ type NotificationRetrieveContentParams,
110
121
  } from './notifications/notifications';
111
122
  export {
112
123
  Profiles,
@@ -130,14 +141,15 @@ export {
130
141
  export { Requests } from './requests';
131
142
  export {
132
143
  RoutingStrategies,
144
+ type AssociatedNotificationListResponse,
133
145
  type RoutingStrategyCreateRequest,
134
146
  type RoutingStrategyGetResponse,
135
147
  type RoutingStrategyListResponse,
136
- type RoutingStrategyMutationResponse,
137
148
  type RoutingStrategyReplaceRequest,
138
149
  type RoutingStrategySummary,
139
150
  type RoutingStrategyCreateParams,
140
151
  type RoutingStrategyListParams,
152
+ type RoutingStrategyListNotificationsParams,
141
153
  type RoutingStrategyReplaceParams,
142
154
  } from './routing-strategies';
143
155
  export { Send, type SendMessageResponse, type SendMessageParams } from './send';
@@ -8,26 +8,36 @@ export {
8
8
  type CheckListParams,
9
9
  type CheckDeleteParams,
10
10
  } from './checks';
11
- export { Draft } from './draft';
12
11
  export {
13
12
  Notifications,
14
13
  type BaseCheck,
15
14
  type Check,
15
+ type ElementWithChecksums,
16
+ type NotificationContentGetResponse,
17
+ type NotificationContentMutationResponse,
18
+ type NotificationContentPutRequest,
19
+ type NotificationElementPutRequest,
16
20
  type NotificationGetContent,
21
+ type NotificationLocalePutRequest,
17
22
  type NotificationTemplateCreateRequest,
18
23
  type NotificationTemplateGetResponse,
19
- type NotificationTemplateMutationResponse,
20
24
  type NotificationTemplatePayload,
21
25
  type NotificationTemplatePublishRequest,
26
+ type NotificationTemplateState,
22
27
  type NotificationTemplateSummary,
23
28
  type NotificationTemplateUpdateRequest,
24
29
  type NotificationTemplateVersionListResponse,
25
30
  type VersionNode,
26
31
  type NotificationListResponse,
32
+ type NotificationRetrieveContentResponse,
27
33
  type NotificationCreateParams,
28
34
  type NotificationRetrieveParams,
29
35
  type NotificationListParams,
30
36
  type NotificationListVersionsParams,
31
37
  type NotificationPublishParams,
38
+ type NotificationPutContentParams,
39
+ type NotificationPutElementParams,
40
+ type NotificationPutLocaleParams,
32
41
  type NotificationReplaceParams,
42
+ type NotificationRetrieveContentParams,
33
43
  } from './notifications';