@novu/api 3.12.0 → 3.13.0
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/examples/package-lock.json +1 -1
- package/funcs/subscribersPreferencesList.d.ts +1 -1
- package/funcs/subscribersPreferencesList.d.ts.map +1 -1
- package/funcs/subscribersPreferencesList.js +5 -9
- package/funcs/subscribersPreferencesList.js.map +1 -1
- package/funcs/subscribersTopicsList.js +1 -0
- package/funcs/subscribersTopicsList.js.map +1 -1
- package/funcs/topicsSubscriptionsList.js +1 -0
- package/funcs/topicsSubscriptionsList.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/sdks.js +2 -2
- package/lib/sdks.js.map +1 -1
- package/models/components/activitynotificationjobresponsedto.d.ts +4 -4
- package/models/components/activitynotificationjobresponsedto.d.ts.map +1 -1
- package/models/components/activitynotificationjobresponsedto.js +6 -7
- package/models/components/activitynotificationjobresponsedto.js.map +1 -1
- package/models/components/bulkupdatesubscriberpreferencesdto.d.ts +34 -0
- package/models/components/bulkupdatesubscriberpreferencesdto.d.ts.map +1 -1
- package/models/components/bulkupdatesubscriberpreferencesdto.js +17 -1
- package/models/components/bulkupdatesubscriberpreferencesdto.js.map +1 -1
- package/models/components/createchannelconnectionrequestdto.d.ts +10 -10
- package/models/components/createchannelconnectionrequestdto.d.ts.map +1 -1
- package/models/components/createchannelconnectionrequestdto.js +16 -12
- package/models/components/createchannelconnectionrequestdto.js.map +1 -1
- package/models/components/createslackchannelendpointdto.d.ts +8 -8
- package/models/components/createslackchannelendpointdto.d.ts.map +1 -1
- package/models/components/createslackchannelendpointdto.js +13 -7
- package/models/components/createslackchannelendpointdto.js.map +1 -1
- package/models/components/createtopicsubscriptionsrequestdto.d.ts +34 -0
- package/models/components/createtopicsubscriptionsrequestdto.d.ts.map +1 -1
- package/models/components/createtopicsubscriptionsrequestdto.js +23 -1
- package/models/components/createtopicsubscriptionsrequestdto.js.map +1 -1
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/messageactionresult.d.ts +3 -8
- package/models/components/messageactionresult.d.ts.map +1 -1
- package/models/components/messageactionresult.js +2 -8
- package/models/components/messageactionresult.js.map +1 -1
- package/models/components/messageresponsedto.d.ts +6 -16
- package/models/components/messageresponsedto.d.ts.map +1 -1
- package/models/components/messageresponsedto.js +3 -15
- package/models/components/messageresponsedto.js.map +1 -1
- package/models/components/patchsubscriberpreferencesdto.d.ts +34 -0
- package/models/components/patchsubscriberpreferencesdto.d.ts.map +1 -1
- package/models/components/patchsubscriberpreferencesdto.js +19 -1
- package/models/components/patchsubscriberpreferencesdto.js.map +1 -1
- package/models/components/subscriberworkflowpreferencedto.d.ts +4 -0
- package/models/components/subscriberworkflowpreferencedto.d.ts.map +1 -1
- package/models/components/subscriberworkflowpreferencedto.js +1 -0
- package/models/components/subscriberworkflowpreferencedto.js.map +1 -1
- package/models/components/subscriptiondetailsresponsedto.d.ts +30 -0
- package/models/components/subscriptiondetailsresponsedto.d.ts.map +1 -0
- package/models/components/{createtopicsubscriptionsresponsedto.js → subscriptiondetailsresponsedto.js} +12 -12
- package/models/components/subscriptiondetailsresponsedto.js.map +1 -0
- package/models/components/subscriptiondto.d.ts +4 -0
- package/models/components/subscriptiondto.d.ts.map +1 -1
- package/models/components/subscriptiondto.js +1 -0
- package/models/components/subscriptiondto.js.map +1 -1
- package/models/components/subscriptionresponsedto.d.ts +4 -0
- package/models/components/subscriptionresponsedto.d.ts.map +1 -1
- package/models/components/subscriptionresponsedto.js +1 -0
- package/models/components/subscriptionresponsedto.js.map +1 -1
- package/models/components/topicsubscriptionresponsedto.d.ts +4 -0
- package/models/components/topicsubscriptionresponsedto.d.ts.map +1 -1
- package/models/components/topicsubscriptionresponsedto.js +1 -0
- package/models/components/topicsubscriptionresponsedto.js.map +1 -1
- package/models/operations/inboundwebhookscontrollerhandlewebhook.d.ts +6 -2
- package/models/operations/inboundwebhookscontrollerhandlewebhook.d.ts.map +1 -1
- package/models/operations/inboundwebhookscontrollerhandlewebhook.js +1 -1
- package/models/operations/inboundwebhookscontrollerhandlewebhook.js.map +1 -1
- package/models/operations/subscriberscontrollergetsubscriberpreferences.d.ts +5 -0
- package/models/operations/subscriberscontrollergetsubscriberpreferences.d.ts.map +1 -1
- package/models/operations/subscriberscontrollergetsubscriberpreferences.js +1 -0
- package/models/operations/subscriberscontrollergetsubscriberpreferences.js.map +1 -1
- package/models/operations/subscriberscontrollerlistsubscribertopics.d.ts +5 -0
- package/models/operations/subscriberscontrollerlistsubscribertopics.d.ts.map +1 -1
- package/models/operations/subscriberscontrollerlistsubscribertopics.js +1 -0
- package/models/operations/subscriberscontrollerlistsubscribertopics.js.map +1 -1
- package/models/operations/topicscontrollergettopicsubscription.d.ts +1 -1
- package/models/operations/topicscontrollergettopicsubscription.d.ts.map +1 -1
- package/models/operations/topicscontrollergettopicsubscription.js +1 -1
- package/models/operations/topicscontrollergettopicsubscription.js.map +1 -1
- package/models/operations/topicscontrollerlisttopicsubscriptions.d.ts +5 -0
- package/models/operations/topicscontrollerlisttopicsubscriptions.d.ts.map +1 -1
- package/models/operations/topicscontrollerlisttopicsubscriptions.js +1 -0
- package/models/operations/topicscontrollerlisttopicsubscriptions.js.map +1 -1
- package/package.json +1 -1
- package/sdk/preferences.d.ts +1 -1
- package/sdk/preferences.d.ts.map +1 -1
- package/sdk/preferences.js +2 -2
- package/sdk/preferences.js.map +1 -1
- package/sources/json-development.json +238 -6
- package/src/funcs/subscribersPreferencesList.ts +5 -17
- package/src/funcs/subscribersTopicsList.ts +1 -0
- package/src/funcs/topicsSubscriptionsList.ts +1 -0
- package/src/lib/config.ts +4 -4
- package/src/lib/sdks.ts +2 -2
- package/src/models/components/activitynotificationjobresponsedto.ts +9 -19
- package/src/models/components/bulkupdatesubscriberpreferencesdto.ts +62 -0
- package/src/models/components/createchannelconnectionrequestdto.ts +51 -18
- package/src/models/components/createslackchannelendpointdto.ts +31 -13
- package/src/models/components/createtopicsubscriptionsrequestdto.ts +82 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/messageactionresult.ts +2 -21
- package/src/models/components/messageresponsedto.ts +4 -48
- package/src/models/components/patchsubscriberpreferencesdto.ts +48 -0
- package/src/models/components/subscriberworkflowpreferencedto.ts +5 -0
- package/src/models/components/subscriptiondetailsresponsedto.ts +58 -0
- package/src/models/components/subscriptiondto.ts +5 -0
- package/src/models/components/subscriptionresponsedto.ts +5 -0
- package/src/models/components/topicsubscriptionresponsedto.ts +5 -0
- package/src/models/operations/inboundwebhookscontrollerhandlewebhook.ts +3 -3
- package/src/models/operations/subscriberscontrollergetsubscriberpreferences.ts +6 -0
- package/src/models/operations/subscriberscontrollerlistsubscribertopics.ts +6 -0
- package/src/models/operations/topicscontrollergettopicsubscription.ts +2 -2
- package/src/models/operations/topicscontrollerlisttopicsubscriptions.ts +6 -0
- package/src/sdk/preferences.ts +2 -6
- package/models/components/createtopicsubscriptionsresponsedto.d.ts +0 -24
- package/models/components/createtopicsubscriptionsresponsedto.d.ts.map +0 -1
- package/models/components/createtopicsubscriptionsresponsedto.js.map +0 -1
- package/models/components/steptypeenum.d.ts +0 -26
- package/models/components/steptypeenum.d.ts.map +0 -1
- package/models/components/steptypeenum.js +0 -60
- package/models/components/steptypeenum.js.map +0 -1
- package/models/components/uploadtranslationsrequestdto.d.ts +0 -34
- package/models/components/uploadtranslationsrequestdto.d.ts.map +0 -1
- package/models/components/uploadtranslationsrequestdto.js +0 -60
- package/models/components/uploadtranslationsrequestdto.js.map +0 -1
- package/src/models/components/createtopicsubscriptionsresponsedto.ts +0 -54
- package/src/models/components/steptypeenum.ts +0 -33
- package/src/models/components/uploadtranslationsrequestdto.ts +0 -62
- package/temp/example.ts +0 -5
|
@@ -3023,7 +3023,9 @@
|
|
|
3023
3023
|
"content": {
|
|
3024
3024
|
"application/json": {
|
|
3025
3025
|
"schema": {
|
|
3026
|
-
"
|
|
3026
|
+
"type": "object",
|
|
3027
|
+
"additionalProperties": true,
|
|
3028
|
+
"description": "Generic webhook payload from delivery providers"
|
|
3027
3029
|
}
|
|
3028
3030
|
}
|
|
3029
3031
|
}
|
|
@@ -9506,6 +9508,21 @@
|
|
|
9506
9508
|
"type": "string"
|
|
9507
9509
|
}
|
|
9508
9510
|
},
|
|
9511
|
+
{
|
|
9512
|
+
"name": "contextKeys",
|
|
9513
|
+
"required": false,
|
|
9514
|
+
"in": "query",
|
|
9515
|
+
"description": "Context keys for filtering preferences (e.g., [\"tenant:acme\"])",
|
|
9516
|
+
"example": [
|
|
9517
|
+
"tenant:acme"
|
|
9518
|
+
],
|
|
9519
|
+
"schema": {
|
|
9520
|
+
"type": "array",
|
|
9521
|
+
"items": {
|
|
9522
|
+
"type": "string"
|
|
9523
|
+
}
|
|
9524
|
+
}
|
|
9525
|
+
},
|
|
9509
9526
|
{
|
|
9510
9527
|
"name": "idempotency-key",
|
|
9511
9528
|
"in": "header",
|
|
@@ -11052,6 +11069,22 @@
|
|
|
11052
11069
|
"type": "string"
|
|
11053
11070
|
}
|
|
11054
11071
|
},
|
|
11072
|
+
{
|
|
11073
|
+
"name": "contextKeys",
|
|
11074
|
+
"required": false,
|
|
11075
|
+
"in": "query",
|
|
11076
|
+
"description": "Filter by exact context keys, order insensitive (format: \"type:id\")",
|
|
11077
|
+
"example": [
|
|
11078
|
+
"tenant:org-123",
|
|
11079
|
+
"region:us-east-1"
|
|
11080
|
+
],
|
|
11081
|
+
"schema": {
|
|
11082
|
+
"type": "array",
|
|
11083
|
+
"items": {
|
|
11084
|
+
"type": "string"
|
|
11085
|
+
}
|
|
11086
|
+
}
|
|
11087
|
+
},
|
|
11055
11088
|
{
|
|
11056
11089
|
"name": "idempotency-key",
|
|
11057
11090
|
"in": "header",
|
|
@@ -14146,6 +14179,22 @@
|
|
|
14146
14179
|
"type": "string"
|
|
14147
14180
|
}
|
|
14148
14181
|
},
|
|
14182
|
+
{
|
|
14183
|
+
"name": "contextKeys",
|
|
14184
|
+
"required": false,
|
|
14185
|
+
"in": "query",
|
|
14186
|
+
"description": "Filter by exact context keys, order insensitive (format: \"type:id\")",
|
|
14187
|
+
"example": [
|
|
14188
|
+
"tenant:org-123",
|
|
14189
|
+
"region:us-east-1"
|
|
14190
|
+
],
|
|
14191
|
+
"schema": {
|
|
14192
|
+
"type": "array",
|
|
14193
|
+
"items": {
|
|
14194
|
+
"type": "string"
|
|
14195
|
+
}
|
|
14196
|
+
}
|
|
14197
|
+
},
|
|
14149
14198
|
{
|
|
14150
14199
|
"name": "idempotency-key",
|
|
14151
14200
|
"in": "header",
|
|
@@ -15668,7 +15717,7 @@
|
|
|
15668
15717
|
"content": {
|
|
15669
15718
|
"application/json": {
|
|
15670
15719
|
"schema": {
|
|
15671
|
-
"$ref": "#/components/schemas/
|
|
15720
|
+
"$ref": "#/components/schemas/SubscriptionDetailsResponseDto"
|
|
15672
15721
|
}
|
|
15673
15722
|
}
|
|
15674
15723
|
}
|
|
@@ -42088,7 +42137,7 @@
|
|
|
42088
42137
|
"info": {
|
|
42089
42138
|
"title": "Novu API",
|
|
42090
42139
|
"description": "Novu REST API. Please see https://docs.novu.co/api-reference for more details.",
|
|
42091
|
-
"version": "3.
|
|
42140
|
+
"version": "3.12.0",
|
|
42092
42141
|
"contact": {
|
|
42093
42142
|
"name": "Novu Support",
|
|
42094
42143
|
"url": "https://discord.gg/novu",
|
|
@@ -46061,7 +46110,8 @@
|
|
|
46061
46110
|
"properties": {
|
|
46062
46111
|
"payload": {
|
|
46063
46112
|
"type": "object",
|
|
46064
|
-
"description": "Payload of the action result"
|
|
46113
|
+
"description": "Payload of the action result",
|
|
46114
|
+
"additionalProperties": true
|
|
46065
46115
|
},
|
|
46066
46116
|
"type": {
|
|
46067
46117
|
"$ref": "#/components/schemas/ButtonTypeEnum"
|
|
@@ -47148,11 +47198,13 @@
|
|
|
47148
47198
|
},
|
|
47149
47199
|
"payload": {
|
|
47150
47200
|
"type": "object",
|
|
47151
|
-
"description": "The payload that was used to send the notification trigger"
|
|
47201
|
+
"description": "The payload that was used to send the notification trigger",
|
|
47202
|
+
"additionalProperties": true
|
|
47152
47203
|
},
|
|
47153
47204
|
"overrides": {
|
|
47154
47205
|
"type": "object",
|
|
47155
|
-
"description": "Provider specific overrides used when triggering the notification"
|
|
47206
|
+
"description": "Provider specific overrides used when triggering the notification",
|
|
47207
|
+
"additionalProperties": true
|
|
47156
47208
|
},
|
|
47157
47209
|
"contextKeys": {
|
|
47158
47210
|
"description": "Context (single or multi) in which the message was sent",
|
|
@@ -47735,6 +47787,10 @@
|
|
|
47735
47787
|
"$ref": "#/components/schemas/SubscriberPreferencesWorkflowInfoDto"
|
|
47736
47788
|
}
|
|
47737
47789
|
]
|
|
47790
|
+
},
|
|
47791
|
+
"updatedAt": {
|
|
47792
|
+
"type": "string",
|
|
47793
|
+
"description": "Timestamp when the subscriber last updated their preference. Only present if subscriber explicitly set preferences."
|
|
47738
47794
|
}
|
|
47739
47795
|
},
|
|
47740
47796
|
"required": [
|
|
@@ -47926,6 +47982,40 @@
|
|
|
47926
47982
|
"items": {
|
|
47927
47983
|
"$ref": "#/components/schemas/BulkUpdateSubscriberPreferenceItemDto"
|
|
47928
47984
|
}
|
|
47985
|
+
},
|
|
47986
|
+
"context": {
|
|
47987
|
+
"type": "object",
|
|
47988
|
+
"additionalProperties": {
|
|
47989
|
+
"oneOf": [
|
|
47990
|
+
{
|
|
47991
|
+
"type": "string",
|
|
47992
|
+
"description": "Simple context id",
|
|
47993
|
+
"example": "org-acme"
|
|
47994
|
+
},
|
|
47995
|
+
{
|
|
47996
|
+
"type": "object",
|
|
47997
|
+
"description": "Rich context object with id and optional data",
|
|
47998
|
+
"properties": {
|
|
47999
|
+
"id": {
|
|
48000
|
+
"type": "string",
|
|
48001
|
+
"example": "org-acme"
|
|
48002
|
+
},
|
|
48003
|
+
"data": {
|
|
48004
|
+
"type": "object",
|
|
48005
|
+
"description": "Optional additional context data",
|
|
48006
|
+
"additionalProperties": true,
|
|
48007
|
+
"example": {
|
|
48008
|
+
"name": "Acme Corp",
|
|
48009
|
+
"region": "us-east-1"
|
|
48010
|
+
}
|
|
48011
|
+
}
|
|
48012
|
+
},
|
|
48013
|
+
"required": [
|
|
48014
|
+
"id"
|
|
48015
|
+
]
|
|
48016
|
+
}
|
|
48017
|
+
]
|
|
48018
|
+
}
|
|
47929
48019
|
}
|
|
47930
48020
|
},
|
|
47931
48021
|
"required": [
|
|
@@ -47954,6 +48044,40 @@
|
|
|
47954
48044
|
"$ref": "#/components/schemas/ScheduleDto"
|
|
47955
48045
|
}
|
|
47956
48046
|
]
|
|
48047
|
+
},
|
|
48048
|
+
"context": {
|
|
48049
|
+
"type": "object",
|
|
48050
|
+
"additionalProperties": {
|
|
48051
|
+
"oneOf": [
|
|
48052
|
+
{
|
|
48053
|
+
"type": "string",
|
|
48054
|
+
"description": "Simple context id",
|
|
48055
|
+
"example": "org-acme"
|
|
48056
|
+
},
|
|
48057
|
+
{
|
|
48058
|
+
"type": "object",
|
|
48059
|
+
"description": "Rich context object with id and optional data",
|
|
48060
|
+
"properties": {
|
|
48061
|
+
"id": {
|
|
48062
|
+
"type": "string",
|
|
48063
|
+
"example": "org-acme"
|
|
48064
|
+
},
|
|
48065
|
+
"data": {
|
|
48066
|
+
"type": "object",
|
|
48067
|
+
"description": "Optional additional context data",
|
|
48068
|
+
"additionalProperties": true,
|
|
48069
|
+
"example": {
|
|
48070
|
+
"name": "Acme Corp",
|
|
48071
|
+
"region": "us-east-1"
|
|
48072
|
+
}
|
|
48073
|
+
}
|
|
48074
|
+
},
|
|
48075
|
+
"required": [
|
|
48076
|
+
"id"
|
|
48077
|
+
]
|
|
48078
|
+
}
|
|
48079
|
+
]
|
|
48080
|
+
}
|
|
47957
48081
|
}
|
|
47958
48082
|
}
|
|
47959
48083
|
},
|
|
@@ -48033,6 +48157,17 @@
|
|
|
48033
48157
|
"$ref": "#/components/schemas/SubscriberDto"
|
|
48034
48158
|
}
|
|
48035
48159
|
]
|
|
48160
|
+
},
|
|
48161
|
+
"contextKeys": {
|
|
48162
|
+
"description": "Context keys that scope this subscription (e.g., tenant:org-a, project:proj-123)",
|
|
48163
|
+
"example": [
|
|
48164
|
+
"tenant:org-a",
|
|
48165
|
+
"project:proj-123"
|
|
48166
|
+
],
|
|
48167
|
+
"type": "array",
|
|
48168
|
+
"items": {
|
|
48169
|
+
"type": "string"
|
|
48170
|
+
}
|
|
48036
48171
|
}
|
|
48037
48172
|
},
|
|
48038
48173
|
"required": [
|
|
@@ -48989,6 +49124,17 @@
|
|
|
48989
49124
|
"$ref": "#/components/schemas/SubscriptionPreferenceDto"
|
|
48990
49125
|
}
|
|
48991
49126
|
},
|
|
49127
|
+
"contextKeys": {
|
|
49128
|
+
"description": "Context keys that scope this subscription (e.g., tenant:org-a, project:proj-123)",
|
|
49129
|
+
"example": [
|
|
49130
|
+
"tenant:org-a",
|
|
49131
|
+
"project:proj-123"
|
|
49132
|
+
],
|
|
49133
|
+
"type": "array",
|
|
49134
|
+
"items": {
|
|
49135
|
+
"type": "string"
|
|
49136
|
+
}
|
|
49137
|
+
},
|
|
48992
49138
|
"createdAt": {
|
|
48993
49139
|
"type": "string",
|
|
48994
49140
|
"description": "The creation date of the subscription",
|
|
@@ -49257,6 +49403,40 @@
|
|
|
49257
49403
|
"description": "The name of the topic",
|
|
49258
49404
|
"example": "My Topic"
|
|
49259
49405
|
},
|
|
49406
|
+
"context": {
|
|
49407
|
+
"type": "object",
|
|
49408
|
+
"additionalProperties": {
|
|
49409
|
+
"oneOf": [
|
|
49410
|
+
{
|
|
49411
|
+
"type": "string",
|
|
49412
|
+
"description": "Simple context id",
|
|
49413
|
+
"example": "org-acme"
|
|
49414
|
+
},
|
|
49415
|
+
{
|
|
49416
|
+
"type": "object",
|
|
49417
|
+
"description": "Rich context object with id and optional data",
|
|
49418
|
+
"properties": {
|
|
49419
|
+
"id": {
|
|
49420
|
+
"type": "string",
|
|
49421
|
+
"example": "org-acme"
|
|
49422
|
+
},
|
|
49423
|
+
"data": {
|
|
49424
|
+
"type": "object",
|
|
49425
|
+
"description": "Optional additional context data",
|
|
49426
|
+
"additionalProperties": true,
|
|
49427
|
+
"example": {
|
|
49428
|
+
"name": "Acme Corp",
|
|
49429
|
+
"region": "us-east-1"
|
|
49430
|
+
}
|
|
49431
|
+
}
|
|
49432
|
+
},
|
|
49433
|
+
"required": [
|
|
49434
|
+
"id"
|
|
49435
|
+
]
|
|
49436
|
+
}
|
|
49437
|
+
]
|
|
49438
|
+
}
|
|
49439
|
+
},
|
|
49260
49440
|
"preferences": {
|
|
49261
49441
|
"type": "array",
|
|
49262
49442
|
"description": "The preferences of the topic. Can be a simple workflow ID string, workflow preference object, or group filter object",
|
|
@@ -49319,6 +49499,17 @@
|
|
|
49319
49499
|
}
|
|
49320
49500
|
]
|
|
49321
49501
|
},
|
|
49502
|
+
"contextKeys": {
|
|
49503
|
+
"description": "Context keys that scope this subscription (e.g., tenant:org-a, project:proj-123)",
|
|
49504
|
+
"example": [
|
|
49505
|
+
"tenant:org-a",
|
|
49506
|
+
"project:proj-123"
|
|
49507
|
+
],
|
|
49508
|
+
"type": "array",
|
|
49509
|
+
"items": {
|
|
49510
|
+
"type": "string"
|
|
49511
|
+
}
|
|
49512
|
+
},
|
|
49322
49513
|
"createdAt": {
|
|
49323
49514
|
"type": "string",
|
|
49324
49515
|
"description": "The creation date of the subscription",
|
|
@@ -49452,6 +49643,47 @@
|
|
|
49452
49643
|
}
|
|
49453
49644
|
}
|
|
49454
49645
|
},
|
|
49646
|
+
"SubscriptionDetailsResponseDto": {
|
|
49647
|
+
"type": "object",
|
|
49648
|
+
"properties": {
|
|
49649
|
+
"id": {
|
|
49650
|
+
"type": "string",
|
|
49651
|
+
"description": "The unique identifier of the subscription",
|
|
49652
|
+
"example": "64f5e95d3d7946d80d0cb679"
|
|
49653
|
+
},
|
|
49654
|
+
"identifier": {
|
|
49655
|
+
"type": "string",
|
|
49656
|
+
"description": "The identifier of the subscription",
|
|
49657
|
+
"example": "subscription-identifier"
|
|
49658
|
+
},
|
|
49659
|
+
"name": {
|
|
49660
|
+
"type": "string",
|
|
49661
|
+
"description": "The name of the subscription",
|
|
49662
|
+
"example": "My Subscription"
|
|
49663
|
+
},
|
|
49664
|
+
"preferences": {
|
|
49665
|
+
"description": "The preferences/rules for the subscription",
|
|
49666
|
+
"type": "array",
|
|
49667
|
+
"items": {
|
|
49668
|
+
"$ref": "#/components/schemas/SubscriptionPreferenceDto"
|
|
49669
|
+
}
|
|
49670
|
+
},
|
|
49671
|
+
"contextKeys": {
|
|
49672
|
+
"description": "Context keys that scope this subscription (e.g., tenant:org-a, project:proj-123)",
|
|
49673
|
+
"example": [
|
|
49674
|
+
"tenant:org-a",
|
|
49675
|
+
"project:proj-123"
|
|
49676
|
+
],
|
|
49677
|
+
"type": "array",
|
|
49678
|
+
"items": {
|
|
49679
|
+
"type": "string"
|
|
49680
|
+
}
|
|
49681
|
+
}
|
|
49682
|
+
},
|
|
49683
|
+
"required": [
|
|
49684
|
+
"id"
|
|
49685
|
+
]
|
|
49686
|
+
},
|
|
49455
49687
|
"UpdateTopicSubscriptionRequestDto": {
|
|
49456
49688
|
"type": "object",
|
|
49457
49689
|
"properties": {
|
|
@@ -34,9 +34,7 @@ import { Result } from "../types/fp.js";
|
|
|
34
34
|
*/
|
|
35
35
|
export function subscribersPreferencesList(
|
|
36
36
|
client: NovuCore,
|
|
37
|
-
|
|
38
|
-
criticality?: operations.Criticality | undefined,
|
|
39
|
-
idempotencyKey?: string | undefined,
|
|
37
|
+
request: operations.SubscribersControllerGetSubscriberPreferencesRequest,
|
|
40
38
|
options?: RequestOptions,
|
|
41
39
|
): APIPromise<
|
|
42
40
|
Result<
|
|
@@ -55,18 +53,14 @@ export function subscribersPreferencesList(
|
|
|
55
53
|
> {
|
|
56
54
|
return new APIPromise($do(
|
|
57
55
|
client,
|
|
58
|
-
|
|
59
|
-
criticality,
|
|
60
|
-
idempotencyKey,
|
|
56
|
+
request,
|
|
61
57
|
options,
|
|
62
58
|
));
|
|
63
59
|
}
|
|
64
60
|
|
|
65
61
|
async function $do(
|
|
66
62
|
client: NovuCore,
|
|
67
|
-
|
|
68
|
-
criticality?: operations.Criticality | undefined,
|
|
69
|
-
idempotencyKey?: string | undefined,
|
|
63
|
+
request: operations.SubscribersControllerGetSubscriberPreferencesRequest,
|
|
70
64
|
options?: RequestOptions,
|
|
71
65
|
): Promise<
|
|
72
66
|
[
|
|
@@ -86,15 +80,8 @@ async function $do(
|
|
|
86
80
|
APICall,
|
|
87
81
|
]
|
|
88
82
|
> {
|
|
89
|
-
const input: operations.SubscribersControllerGetSubscriberPreferencesRequest =
|
|
90
|
-
{
|
|
91
|
-
subscriberId: subscriberId,
|
|
92
|
-
criticality: criticality,
|
|
93
|
-
idempotencyKey: idempotencyKey,
|
|
94
|
-
};
|
|
95
|
-
|
|
96
83
|
const parsed = safeParse(
|
|
97
|
-
|
|
84
|
+
request,
|
|
98
85
|
(value) =>
|
|
99
86
|
operations
|
|
100
87
|
.SubscribersControllerGetSubscriberPreferencesRequest$outboundSchema
|
|
@@ -119,6 +106,7 @@ async function $do(
|
|
|
119
106
|
);
|
|
120
107
|
|
|
121
108
|
const query = encodeFormQuery({
|
|
109
|
+
"contextKeys": payload.contextKeys,
|
|
122
110
|
"criticality": payload.criticality,
|
|
123
111
|
});
|
|
124
112
|
|
|
@@ -105,6 +105,7 @@ async function $do(
|
|
|
105
105
|
const query = encodeFormQuery({
|
|
106
106
|
"after": payload.after,
|
|
107
107
|
"before": payload.before,
|
|
108
|
+
"contextKeys": payload.contextKeys,
|
|
108
109
|
"includeCursor": payload.includeCursor,
|
|
109
110
|
"limit": payload.limit,
|
|
110
111
|
"orderBy": payload.orderBy,
|
package/src/lib/config.ts
CHANGED
|
@@ -58,8 +58,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
58
58
|
|
|
59
59
|
export const SDK_METADATA = {
|
|
60
60
|
language: "typescript",
|
|
61
|
-
openapiDocVersion: "3.
|
|
62
|
-
sdkVersion: "3.
|
|
63
|
-
genVersion: "2.
|
|
64
|
-
userAgent: "speakeasy-sdk/typescript 3.
|
|
61
|
+
openapiDocVersion: "3.12.0",
|
|
62
|
+
sdkVersion: "3.13.0",
|
|
63
|
+
genVersion: "2.801.2",
|
|
64
|
+
userAgent: "speakeasy-sdk/typescript 3.13.0 2.801.2 3.12.0 @novu/api",
|
|
65
65
|
} as const;
|
package/src/lib/sdks.ts
CHANGED
|
@@ -304,9 +304,9 @@ export class ClientSDK {
|
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
const jsonLikeContentTypeRE =
|
|
307
|
+
const jsonLikeContentTypeRE = /^(application|text)\/([^+]+\+)*json.*/;
|
|
308
308
|
const jsonlLikeContentTypeRE =
|
|
309
|
-
|
|
309
|
+
/^(application|text)\/([^+]+\+)*(jsonl|x-ndjson)\b.*/;
|
|
310
310
|
async function logRequest(logger: Logger | undefined, req: Request) {
|
|
311
311
|
if (!logger) {
|
|
312
312
|
return;
|
|
@@ -50,7 +50,7 @@ export type ActivityNotificationJobResponseDtoType = ClosedEnum<
|
|
|
50
50
|
/**
|
|
51
51
|
* Optional payload for the job
|
|
52
52
|
*/
|
|
53
|
-
export type
|
|
53
|
+
export type Payload = {};
|
|
54
54
|
|
|
55
55
|
export type ActivityNotificationJobResponseDto = {
|
|
56
56
|
/**
|
|
@@ -80,7 +80,7 @@ export type ActivityNotificationJobResponseDto = {
|
|
|
80
80
|
/**
|
|
81
81
|
* Optional payload for the job
|
|
82
82
|
*/
|
|
83
|
-
payload?:
|
|
83
|
+
payload?: Payload | undefined;
|
|
84
84
|
/**
|
|
85
85
|
* Provider ID of the job
|
|
86
86
|
*/
|
|
@@ -106,25 +106,16 @@ export const ActivityNotificationJobResponseDtoType$inboundSchema:
|
|
|
106
106
|
);
|
|
107
107
|
|
|
108
108
|
/** @internal */
|
|
109
|
-
export const
|
|
110
|
-
|
|
111
|
-
z.ZodTypeDef,
|
|
112
|
-
unknown
|
|
113
|
-
> = z.object({});
|
|
109
|
+
export const Payload$inboundSchema: z.ZodType<Payload, z.ZodTypeDef, unknown> =
|
|
110
|
+
z.object({});
|
|
114
111
|
|
|
115
|
-
export function
|
|
112
|
+
export function payloadFromJSON(
|
|
116
113
|
jsonString: string,
|
|
117
|
-
): SafeParseResult<
|
|
118
|
-
ActivityNotificationJobResponseDtoPayload,
|
|
119
|
-
SDKValidationError
|
|
120
|
-
> {
|
|
114
|
+
): SafeParseResult<Payload, SDKValidationError> {
|
|
121
115
|
return safeParse(
|
|
122
116
|
jsonString,
|
|
123
|
-
(x) =>
|
|
124
|
-
|
|
125
|
-
JSON.parse(x),
|
|
126
|
-
),
|
|
127
|
-
`Failed to parse 'ActivityNotificationJobResponseDtoPayload' from JSON`,
|
|
117
|
+
(x) => Payload$inboundSchema.parse(JSON.parse(x)),
|
|
118
|
+
`Failed to parse 'Payload' from JSON`,
|
|
128
119
|
);
|
|
129
120
|
}
|
|
130
121
|
|
|
@@ -142,8 +133,7 @@ export const ActivityNotificationJobResponseDto$inboundSchema: z.ZodType<
|
|
|
142
133
|
),
|
|
143
134
|
step: ActivityNotificationStepResponseDto$inboundSchema,
|
|
144
135
|
overrides: z.record(z.any()).optional(),
|
|
145
|
-
payload: z.lazy(() =>
|
|
146
|
-
.optional(),
|
|
136
|
+
payload: z.lazy(() => Payload$inboundSchema).optional(),
|
|
147
137
|
providerId: ProvidersIdEnum$inboundSchema,
|
|
148
138
|
status: z.string(),
|
|
149
139
|
updatedAt: z.string().optional(),
|
|
@@ -9,16 +9,75 @@ import {
|
|
|
9
9
|
BulkUpdateSubscriberPreferenceItemDto$outboundSchema,
|
|
10
10
|
} from "./bulkupdatesubscriberpreferenceitemdto.js";
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Rich context object with id and optional data
|
|
14
|
+
*/
|
|
15
|
+
export type Context2 = {
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional additional context data
|
|
19
|
+
*/
|
|
20
|
+
data?: { [k: string]: any } | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type BulkUpdateSubscriberPreferencesDtoContext = Context2 | string;
|
|
24
|
+
|
|
12
25
|
export type BulkUpdateSubscriberPreferencesDto = {
|
|
13
26
|
/**
|
|
14
27
|
* Array of workflow preferences to update (maximum 100 items)
|
|
15
28
|
*/
|
|
16
29
|
preferences: Array<BulkUpdateSubscriberPreferenceItemDto>;
|
|
30
|
+
context?: { [k: string]: Context2 | string } | undefined;
|
|
17
31
|
};
|
|
18
32
|
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type Context2$Outbound = {
|
|
35
|
+
id: string;
|
|
36
|
+
data?: { [k: string]: any } | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const Context2$outboundSchema: z.ZodType<
|
|
41
|
+
Context2$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
Context2
|
|
44
|
+
> = z.object({
|
|
45
|
+
id: z.string(),
|
|
46
|
+
data: z.record(z.any()).optional(),
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export function context2ToJSON(context2: Context2): string {
|
|
50
|
+
return JSON.stringify(Context2$outboundSchema.parse(context2));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export type BulkUpdateSubscriberPreferencesDtoContext$Outbound =
|
|
55
|
+
| Context2$Outbound
|
|
56
|
+
| string;
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const BulkUpdateSubscriberPreferencesDtoContext$outboundSchema:
|
|
60
|
+
z.ZodType<
|
|
61
|
+
BulkUpdateSubscriberPreferencesDtoContext$Outbound,
|
|
62
|
+
z.ZodTypeDef,
|
|
63
|
+
BulkUpdateSubscriberPreferencesDtoContext
|
|
64
|
+
> = z.union([z.lazy(() => Context2$outboundSchema), z.string()]);
|
|
65
|
+
|
|
66
|
+
export function bulkUpdateSubscriberPreferencesDtoContextToJSON(
|
|
67
|
+
bulkUpdateSubscriberPreferencesDtoContext:
|
|
68
|
+
BulkUpdateSubscriberPreferencesDtoContext,
|
|
69
|
+
): string {
|
|
70
|
+
return JSON.stringify(
|
|
71
|
+
BulkUpdateSubscriberPreferencesDtoContext$outboundSchema.parse(
|
|
72
|
+
bulkUpdateSubscriberPreferencesDtoContext,
|
|
73
|
+
),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
19
77
|
/** @internal */
|
|
20
78
|
export type BulkUpdateSubscriberPreferencesDto$Outbound = {
|
|
21
79
|
preferences: Array<BulkUpdateSubscriberPreferenceItemDto$Outbound>;
|
|
80
|
+
context?: { [k: string]: Context2$Outbound | string } | undefined;
|
|
22
81
|
};
|
|
23
82
|
|
|
24
83
|
/** @internal */
|
|
@@ -28,6 +87,9 @@ export const BulkUpdateSubscriberPreferencesDto$outboundSchema: z.ZodType<
|
|
|
28
87
|
BulkUpdateSubscriberPreferencesDto
|
|
29
88
|
> = z.object({
|
|
30
89
|
preferences: z.array(BulkUpdateSubscriberPreferenceItemDto$outboundSchema),
|
|
90
|
+
context: z.record(
|
|
91
|
+
z.union([z.lazy(() => Context2$outboundSchema), z.string()]),
|
|
92
|
+
).optional(),
|
|
31
93
|
});
|
|
32
94
|
|
|
33
95
|
export function bulkUpdateSubscriberPreferencesDtoToJSON(
|