@superdurable/connector-braze 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +6 -2
- package/dex-connector.json +430 -0
- package/dist/chunk-E4CIKIAP.js +400 -0
- package/dist/connection-DIkDjeJK.d.ts +282 -0
- package/dist/index.d.ts +475 -0
- package/dist/index.js +873 -0
- package/dist/mock.d.ts +174 -0
- package/dist/mock.js +417 -0
- package/package.json +59 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Super Durable
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Braze TypeScript connector
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Install with `npm install @superdurable/connector-braze@0.2.0`. The package implements all eight [Braze operations](../README.md), including profile reads and writes, marketing identity lists, and targeted campaign and Canvas sends. Configure the regional REST endpoint and an API key with the permissions for the operations you use. [Braze connection setup](../README.md)
|
|
4
|
+
|
|
5
|
+
The [example Worker](examples/profile-inspection/README.md) uses the static connection name `braze`. Profile updates submit only supplied absolute attributes. Each send targets one existing user and uses the configured send cap. An unconfirmed outcome at the cap selects `uncertain`.
|
|
6
|
+
|
|
7
|
+
Custom connections passed to `newConnectionWithOperations` must provide all eight operations. Run `npm run check` for Go-recorded provider conformance. The example integration tests run against real Dex with recorded responses. Live Braze authorization and provider behavior remain unverified.
|
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
{
|
|
2
|
+
"connectorId": "braze",
|
|
3
|
+
"releaseTag": "connectors/braze/go/v0.2.0",
|
|
4
|
+
"package": {
|
|
5
|
+
"ecosystem": "npm",
|
|
6
|
+
"name": "@superdurable/connector-braze",
|
|
7
|
+
"version": "0.2.0"
|
|
8
|
+
},
|
|
9
|
+
"factories": [
|
|
10
|
+
{
|
|
11
|
+
"name": "newTriggerCampaignSendStep",
|
|
12
|
+
"kind": "mutation",
|
|
13
|
+
"operationId": "triggerCampaignSend",
|
|
14
|
+
"inputType": "TriggerCampaignSendInput",
|
|
15
|
+
"description": "Trigger an API-enabled campaign for one existing external user ID.",
|
|
16
|
+
"fields": {
|
|
17
|
+
"stepType": "stepType",
|
|
18
|
+
"annotations": "annotations",
|
|
19
|
+
"connectionName": "connectionName",
|
|
20
|
+
"resultAttribute": "resultAttribute"
|
|
21
|
+
},
|
|
22
|
+
"branches": [
|
|
23
|
+
{
|
|
24
|
+
"id": "sent",
|
|
25
|
+
"field": "sent",
|
|
26
|
+
"optional": false
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "providerRejected",
|
|
30
|
+
"field": "providerRejected",
|
|
31
|
+
"optional": true
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "defect",
|
|
35
|
+
"field": "defect",
|
|
36
|
+
"optional": true
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "uncertain",
|
|
40
|
+
"field": "uncertain",
|
|
41
|
+
"optional": true
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"inputSchema": {
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"description": "TriggerCampaignSendInput targets one existing user in an API-triggered campaign.",
|
|
47
|
+
"properties": {
|
|
48
|
+
"campaignId": {
|
|
49
|
+
"description": "CampaignID comes from a campaign configured for API-triggered delivery.",
|
|
50
|
+
"type": "string"
|
|
51
|
+
},
|
|
52
|
+
"externalId": {
|
|
53
|
+
"description": "ExternalID is the existing user's external ID.",
|
|
54
|
+
"type": "string"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"required": [
|
|
58
|
+
"campaignId",
|
|
59
|
+
"externalId"
|
|
60
|
+
],
|
|
61
|
+
"type": "object"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "newTriggerCanvasSendStep",
|
|
66
|
+
"kind": "mutation",
|
|
67
|
+
"operationId": "triggerCanvasSend",
|
|
68
|
+
"inputType": "TriggerCanvasSendInput",
|
|
69
|
+
"description": "Trigger an API-enabled Canvas for one existing external user ID.",
|
|
70
|
+
"fields": {
|
|
71
|
+
"stepType": "stepType",
|
|
72
|
+
"annotations": "annotations",
|
|
73
|
+
"connectionName": "connectionName",
|
|
74
|
+
"resultAttribute": "resultAttribute"
|
|
75
|
+
},
|
|
76
|
+
"branches": [
|
|
77
|
+
{
|
|
78
|
+
"id": "sent",
|
|
79
|
+
"field": "sent",
|
|
80
|
+
"optional": false
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "providerRejected",
|
|
84
|
+
"field": "providerRejected",
|
|
85
|
+
"optional": true
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "defect",
|
|
89
|
+
"field": "defect",
|
|
90
|
+
"optional": true
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": "uncertain",
|
|
94
|
+
"field": "uncertain",
|
|
95
|
+
"optional": true
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"inputSchema": {
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"description": "TriggerCanvasSendInput targets one existing user in an API-triggered Canvas.",
|
|
101
|
+
"properties": {
|
|
102
|
+
"canvasId": {
|
|
103
|
+
"description": "CanvasID comes from a Canvas configured for API-triggered delivery.",
|
|
104
|
+
"type": "string"
|
|
105
|
+
},
|
|
106
|
+
"externalId": {
|
|
107
|
+
"description": "ExternalID is the existing user's external ID.",
|
|
108
|
+
"type": "string"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"required": [
|
|
112
|
+
"canvasId",
|
|
113
|
+
"externalId"
|
|
114
|
+
],
|
|
115
|
+
"type": "object"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "newUpdateUserProfileStep",
|
|
120
|
+
"kind": "mutation",
|
|
121
|
+
"operationId": "updateUserProfile",
|
|
122
|
+
"inputType": "UpdateUserProfileInput",
|
|
123
|
+
"description": "Set selected absolute profile attributes for an external user ID.",
|
|
124
|
+
"fields": {
|
|
125
|
+
"stepType": "stepType",
|
|
126
|
+
"annotations": "annotations",
|
|
127
|
+
"connectionName": "connectionName",
|
|
128
|
+
"resultAttribute": "resultAttribute"
|
|
129
|
+
},
|
|
130
|
+
"branches": [
|
|
131
|
+
{
|
|
132
|
+
"id": "accepted",
|
|
133
|
+
"field": "accepted",
|
|
134
|
+
"optional": false
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"id": "providerRejected",
|
|
138
|
+
"field": "providerRejected",
|
|
139
|
+
"optional": true
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"id": "invalidResponse",
|
|
143
|
+
"field": "invalidResponse",
|
|
144
|
+
"optional": true
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"id": "defect",
|
|
148
|
+
"field": "defect",
|
|
149
|
+
"optional": true
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
"inputSchema": {
|
|
153
|
+
"additionalProperties": false,
|
|
154
|
+
"description": "UpdateUserProfileInput sets only supplied absolute attributes on one external user.",
|
|
155
|
+
"properties": {
|
|
156
|
+
"email": {
|
|
157
|
+
"description": "Email replaces the contact email when supplied.",
|
|
158
|
+
"type": "string"
|
|
159
|
+
},
|
|
160
|
+
"externalId": {
|
|
161
|
+
"description": "ExternalID identifies the profile and may create it when absent.",
|
|
162
|
+
"type": "string"
|
|
163
|
+
},
|
|
164
|
+
"firstName": {
|
|
165
|
+
"description": "FirstName replaces the given name when supplied.",
|
|
166
|
+
"type": "string"
|
|
167
|
+
},
|
|
168
|
+
"lastName": {
|
|
169
|
+
"description": "LastName replaces the family name when supplied.",
|
|
170
|
+
"type": "string"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"required": [
|
|
174
|
+
"externalId"
|
|
175
|
+
],
|
|
176
|
+
"type": "object"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"name": "newDeleteUserProfileStep",
|
|
181
|
+
"kind": "mutation",
|
|
182
|
+
"operationId": "deleteUserProfile",
|
|
183
|
+
"inputType": "DeleteUserProfileInput",
|
|
184
|
+
"description": "Queue deletion of one profile by external user ID.",
|
|
185
|
+
"fields": {
|
|
186
|
+
"stepType": "stepType",
|
|
187
|
+
"annotations": "annotations",
|
|
188
|
+
"connectionName": "connectionName",
|
|
189
|
+
"resultAttribute": "resultAttribute"
|
|
190
|
+
},
|
|
191
|
+
"branches": [
|
|
192
|
+
{
|
|
193
|
+
"id": "deleted",
|
|
194
|
+
"field": "deleted",
|
|
195
|
+
"optional": false
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"id": "providerRejected",
|
|
199
|
+
"field": "providerRejected",
|
|
200
|
+
"optional": true
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"id": "invalidResponse",
|
|
204
|
+
"field": "invalidResponse",
|
|
205
|
+
"optional": true
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"id": "defect",
|
|
209
|
+
"field": "defect",
|
|
210
|
+
"optional": true
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"inputSchema": {
|
|
214
|
+
"additionalProperties": false,
|
|
215
|
+
"description": "DeleteUserProfileInput selects one user profile for permanent deletion.",
|
|
216
|
+
"properties": {
|
|
217
|
+
"externalId": {
|
|
218
|
+
"description": "ExternalID is the application's user ID.",
|
|
219
|
+
"type": "string"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"required": [
|
|
223
|
+
"externalId"
|
|
224
|
+
],
|
|
225
|
+
"type": "object"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "newListCampaignsStep",
|
|
230
|
+
"kind": "query",
|
|
231
|
+
"operationId": "listCampaigns",
|
|
232
|
+
"inputType": "ListCampaignsInput",
|
|
233
|
+
"description": "List one page of campaign IDs and names.",
|
|
234
|
+
"fields": {
|
|
235
|
+
"stepType": "stepType",
|
|
236
|
+
"annotations": "annotations",
|
|
237
|
+
"connectionName": "connectionName",
|
|
238
|
+
"resultAttribute": "resultAttribute"
|
|
239
|
+
},
|
|
240
|
+
"branches": [
|
|
241
|
+
{
|
|
242
|
+
"id": "listed",
|
|
243
|
+
"field": "listed",
|
|
244
|
+
"optional": false
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"id": "providerRejected",
|
|
248
|
+
"field": "providerRejected",
|
|
249
|
+
"optional": true
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"id": "invalidResponse",
|
|
253
|
+
"field": "invalidResponse",
|
|
254
|
+
"optional": true
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"id": "defect",
|
|
258
|
+
"field": "defect",
|
|
259
|
+
"optional": true
|
|
260
|
+
}
|
|
261
|
+
],
|
|
262
|
+
"inputSchema": {
|
|
263
|
+
"additionalProperties": false,
|
|
264
|
+
"description": "ListCampaignsInput selects one page of up to 100 campaigns, beginning at zero.",
|
|
265
|
+
"properties": {
|
|
266
|
+
"page": {
|
|
267
|
+
"description": "Page is a non-negative zero-based page number.",
|
|
268
|
+
"type": "integer"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"required": [
|
|
272
|
+
"page"
|
|
273
|
+
],
|
|
274
|
+
"type": "object"
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"name": "newListCanvasesStep",
|
|
279
|
+
"kind": "query",
|
|
280
|
+
"operationId": "listCanvases",
|
|
281
|
+
"inputType": "ListCanvasesInput",
|
|
282
|
+
"description": "List one page of Canvas IDs and names.",
|
|
283
|
+
"fields": {
|
|
284
|
+
"stepType": "stepType",
|
|
285
|
+
"annotations": "annotations",
|
|
286
|
+
"connectionName": "connectionName",
|
|
287
|
+
"resultAttribute": "resultAttribute"
|
|
288
|
+
},
|
|
289
|
+
"branches": [
|
|
290
|
+
{
|
|
291
|
+
"id": "listed",
|
|
292
|
+
"field": "listed",
|
|
293
|
+
"optional": false
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"id": "providerRejected",
|
|
297
|
+
"field": "providerRejected",
|
|
298
|
+
"optional": true
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"id": "invalidResponse",
|
|
302
|
+
"field": "invalidResponse",
|
|
303
|
+
"optional": true
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"id": "defect",
|
|
307
|
+
"field": "defect",
|
|
308
|
+
"optional": true
|
|
309
|
+
}
|
|
310
|
+
],
|
|
311
|
+
"inputSchema": {
|
|
312
|
+
"additionalProperties": false,
|
|
313
|
+
"description": "ListCanvasesInput selects one page of up to 100 Canvases, beginning at zero.",
|
|
314
|
+
"properties": {
|
|
315
|
+
"page": {
|
|
316
|
+
"description": "Page is a non-negative zero-based page number.",
|
|
317
|
+
"type": "integer"
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"required": [
|
|
321
|
+
"page"
|
|
322
|
+
],
|
|
323
|
+
"type": "object"
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"name": "newListSegmentsStep",
|
|
328
|
+
"kind": "query",
|
|
329
|
+
"operationId": "listSegments",
|
|
330
|
+
"inputType": "ListSegmentsInput",
|
|
331
|
+
"description": "List one page of segment IDs, names, and analytics tracking settings.",
|
|
332
|
+
"fields": {
|
|
333
|
+
"stepType": "stepType",
|
|
334
|
+
"annotations": "annotations",
|
|
335
|
+
"connectionName": "connectionName",
|
|
336
|
+
"resultAttribute": "resultAttribute"
|
|
337
|
+
},
|
|
338
|
+
"branches": [
|
|
339
|
+
{
|
|
340
|
+
"id": "listed",
|
|
341
|
+
"field": "listed",
|
|
342
|
+
"optional": false
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"id": "providerRejected",
|
|
346
|
+
"field": "providerRejected",
|
|
347
|
+
"optional": true
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"id": "invalidResponse",
|
|
351
|
+
"field": "invalidResponse",
|
|
352
|
+
"optional": true
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"id": "defect",
|
|
356
|
+
"field": "defect",
|
|
357
|
+
"optional": true
|
|
358
|
+
}
|
|
359
|
+
],
|
|
360
|
+
"inputSchema": {
|
|
361
|
+
"additionalProperties": false,
|
|
362
|
+
"description": "ListSegmentsInput selects one page of up to 100 segments, beginning at zero.",
|
|
363
|
+
"properties": {
|
|
364
|
+
"page": {
|
|
365
|
+
"description": "Page is a non-negative zero-based page number.",
|
|
366
|
+
"type": "integer"
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"required": [
|
|
370
|
+
"page"
|
|
371
|
+
],
|
|
372
|
+
"type": "object"
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"name": "newGetUserProfileStep",
|
|
377
|
+
"kind": "query",
|
|
378
|
+
"operationId": "getUserProfile",
|
|
379
|
+
"inputType": "GetUserProfileInput",
|
|
380
|
+
"description": "Read one user's external ID, Braze ID, name, and email if present.",
|
|
381
|
+
"fields": {
|
|
382
|
+
"stepType": "stepType",
|
|
383
|
+
"annotations": "annotations",
|
|
384
|
+
"connectionName": "connectionName",
|
|
385
|
+
"resultAttribute": "resultAttribute"
|
|
386
|
+
},
|
|
387
|
+
"branches": [
|
|
388
|
+
{
|
|
389
|
+
"id": "found",
|
|
390
|
+
"field": "found",
|
|
391
|
+
"optional": false
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"id": "notFound",
|
|
395
|
+
"field": "notFound",
|
|
396
|
+
"optional": true
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"id": "providerRejected",
|
|
400
|
+
"field": "providerRejected",
|
|
401
|
+
"optional": true
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"id": "invalidResponse",
|
|
405
|
+
"field": "invalidResponse",
|
|
406
|
+
"optional": true
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"id": "defect",
|
|
410
|
+
"field": "defect",
|
|
411
|
+
"optional": true
|
|
412
|
+
}
|
|
413
|
+
],
|
|
414
|
+
"inputSchema": {
|
|
415
|
+
"additionalProperties": false,
|
|
416
|
+
"description": "GetUserProfileInput selects a Braze user by the application's external ID.",
|
|
417
|
+
"properties": {
|
|
418
|
+
"externalId": {
|
|
419
|
+
"description": "ExternalID is a non-secret stable application user ID.",
|
|
420
|
+
"type": "string"
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"required": [
|
|
424
|
+
"externalId"
|
|
425
|
+
],
|
|
426
|
+
"type": "object"
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
]
|
|
430
|
+
}
|