@taprootio/integration-sdk 0.0.0-stage → 0.1.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 (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +141 -2
  3. package/fixtures/manifest.valid.json +28 -0
  4. package/fixtures/webhooks/v1/common.schema.json +45 -0
  5. package/fixtures/webhooks/v1/examples/installation.created.json +1 -0
  6. package/fixtures/webhooks/v1/examples/installation.resumed.json +1 -0
  7. package/fixtures/webhooks/v1/examples/installation.suspended.json +1 -0
  8. package/fixtures/webhooks/v1/examples/installation.uninstalled.json +1 -0
  9. package/fixtures/webhooks/v1/examples/installation.updated.json +1 -0
  10. package/fixtures/webhooks/v1/examples/page.deleted.json +1 -0
  11. package/fixtures/webhooks/v1/examples/page.published.json +1 -0
  12. package/fixtures/webhooks/v1/examples/ping.json +1 -0
  13. package/fixtures/webhooks/v1/examples/placement.created.json +1 -0
  14. package/fixtures/webhooks/v1/examples/placement.deleted.json +1 -0
  15. package/fixtures/webhooks/v1/examples/placement.updated.json +1 -0
  16. package/fixtures/webhooks/v1/examples/publish.completed.json +1 -0
  17. package/fixtures/webhooks/v1/examples/publish.failed.json +1 -0
  18. package/fixtures/webhooks/v1/examples/sync.requested.json +1 -0
  19. package/fixtures/webhooks/v1/installation.created.schema.json +22 -0
  20. package/fixtures/webhooks/v1/installation.resumed.schema.json +8 -0
  21. package/fixtures/webhooks/v1/installation.suspended.schema.json +8 -0
  22. package/fixtures/webhooks/v1/installation.uninstalled.schema.json +8 -0
  23. package/fixtures/webhooks/v1/installation.updated.schema.json +8 -0
  24. package/fixtures/webhooks/v1/page.deleted.schema.json +23 -0
  25. package/fixtures/webhooks/v1/page.published.schema.json +23 -0
  26. package/fixtures/webhooks/v1/ping.schema.json +18 -0
  27. package/fixtures/webhooks/v1/placement.created.schema.json +23 -0
  28. package/fixtures/webhooks/v1/placement.deleted.schema.json +23 -0
  29. package/fixtures/webhooks/v1/placement.updated.schema.json +23 -0
  30. package/fixtures/webhooks/v1/publish.completed.schema.json +21 -0
  31. package/fixtures/webhooks/v1/publish.failed.schema.json +22 -0
  32. package/fixtures/webhooks/v1/schema-index.json +19 -0
  33. package/fixtures/webhooks/v1/signature-vector.json +9 -0
  34. package/fixtures/webhooks/v1/sync.requested.schema.json +22 -0
  35. package/index.d.ts +258 -0
  36. package/package.json +42 -4
  37. package/schema/taproot-integration-manifest.v1.schema.json +82 -0
  38. package/src/bytes.js +51 -0
  39. package/src/client.js +409 -0
  40. package/src/constants.js +17 -0
  41. package/src/errors.js +18 -0
  42. package/src/handoff.js +223 -0
  43. package/src/index.js +16 -0
  44. package/src/json.js +56 -0
  45. package/src/manifest.js +284 -0
  46. package/src/openapi-contract.d.ts +73 -0
  47. package/src/openapi-contract.js +1035 -0
  48. package/src/webhooks.js +269 -0
@@ -0,0 +1,1035 @@
1
+ // Generated by scripts/generate-integration-sdk.mjs from reviewed OpenAPI and webhook schema sources. Do not edit.
2
+ export const INTEGRATION_OPENAPI_OPERATIONS = Object.freeze({
3
+ "claimInstallation": {
4
+ "operationId": "ClaimIntegrationInstallation",
5
+ "method": "post",
6
+ "path": "v1/integration-installations/{installationId}/claim",
7
+ "credential": "publisher",
8
+ "retry": "never",
9
+ "requestSchema": "ClaimIntegrationInstallationRequest",
10
+ "responseSchema": "ClaimIntegrationInstallationResponse"
11
+ },
12
+ "validateInstallation": {
13
+ "operationId": "ValidateIntegrationInstallation",
14
+ "method": "get",
15
+ "path": "v1/integration-installations/{installationId}/validate",
16
+ "credential": "installation",
17
+ "retry": "safe",
18
+ "responseSchema": "ValidateIntegrationInstallationResponse"
19
+ },
20
+ "createSync": {
21
+ "operationId": "BeginIntegrationSync",
22
+ "method": "post",
23
+ "path": "v1/integration-installations/{installationId}/syncs",
24
+ "credential": "installation",
25
+ "retry": "idempotency",
26
+ "requestSchema": "BeginIntegrationSyncRequest",
27
+ "responseSchema": "IntegrationSyncResult"
28
+ },
29
+ "putManagedPage": {
30
+ "operationId": "UpsertIntegrationPage",
31
+ "method": "post",
32
+ "path": "v1/integration-installations/{installationId}/pages:upsert",
33
+ "credential": "installation",
34
+ "retry": "idempotency",
35
+ "requestSchema": "UpsertIntegrationPageRequest",
36
+ "responseSchema": "IntegrationSyncResult"
37
+ },
38
+ "deleteManagedPage": {
39
+ "operationId": "DeleteIntegrationPage",
40
+ "method": "post",
41
+ "path": "v1/integration-installations/{installationId}/pages:delete",
42
+ "credential": "installation",
43
+ "retry": "idempotency",
44
+ "requestSchema": "DeleteIntegrationContentRequest",
45
+ "responseSchema": "IntegrationSyncResult"
46
+ },
47
+ "putDataDocument": {
48
+ "operationId": "PutIntegrationDataDocument",
49
+ "method": "post",
50
+ "path": "v1/integration-installations/{installationId}/data:put",
51
+ "credential": "installation",
52
+ "retry": "idempotency",
53
+ "requestSchema": "PutIntegrationDataDocumentRequest",
54
+ "responseSchema": "IntegrationSyncResult"
55
+ },
56
+ "deleteDataDocument": {
57
+ "operationId": "DeleteIntegrationDataDocument",
58
+ "method": "post",
59
+ "path": "v1/integration-installations/{installationId}/data:delete",
60
+ "credential": "installation",
61
+ "retry": "idempotency",
62
+ "requestSchema": "DeleteIntegrationContentRequest",
63
+ "responseSchema": "IntegrationSyncResult"
64
+ },
65
+ "completeSync": {
66
+ "operationId": "CompleteIntegrationSync",
67
+ "method": "post",
68
+ "path": "v1/integration-installations/{installationId}/syncs/{syncId}/complete",
69
+ "credential": "installation",
70
+ "retry": "idempotency",
71
+ "requestSchema": "FinishIntegrationSyncRequest",
72
+ "responseSchema": "IntegrationSyncResult"
73
+ },
74
+ "abortSync": {
75
+ "operationId": "AbortIntegrationSync",
76
+ "method": "post",
77
+ "path": "v1/integration-installations/{installationId}/syncs/{syncId}/abort",
78
+ "credential": "installation",
79
+ "retry": "idempotency",
80
+ "requestSchema": "FinishIntegrationSyncRequest",
81
+ "responseSchema": "IntegrationSyncResult"
82
+ },
83
+ "requestMediaUpload": {
84
+ "operationId": "RequestIntegrationMediaUpload",
85
+ "method": "post",
86
+ "path": "v1/integration-installations/{installationId}/media:request-upload",
87
+ "credential": "installation",
88
+ "retry": "never",
89
+ "requestSchema": "RequestIntegrationMediaUploadRequest",
90
+ "responseSchema": "RequestIntegrationMediaUploadResponse"
91
+ },
92
+ "confirmMediaUpload": {
93
+ "operationId": "ConfirmIntegrationMediaUpload",
94
+ "method": "post",
95
+ "path": "v1/integration-installations/{installationId}/media:confirm-upload",
96
+ "credential": "installation",
97
+ "retry": "never",
98
+ "requestSchema": "ConfirmIntegrationMediaUploadRequest",
99
+ "responseSchema": "ConfirmIntegrationMediaUploadResponse"
100
+ },
101
+ "listPlacements": {
102
+ "operationId": "ListIntegrationPlacements",
103
+ "method": "get",
104
+ "path": "v1/integration-installations/{installationId}/placements",
105
+ "credential": "installation",
106
+ "retry": "safe",
107
+ "responseSchema": "ListIntegrationPlacementsResponse"
108
+ },
109
+ "putFragment": {
110
+ "operationId": "PutIntegrationFragment",
111
+ "method": "post",
112
+ "path": "v1/integration-installations/{installationId}/placements/{placementId}/fragment:put",
113
+ "credential": "installation",
114
+ "retry": "idempotency",
115
+ "requestSchema": "PutIntegrationFragmentRequest",
116
+ "responseSchema": "IntegrationPlacementFragmentResult"
117
+ },
118
+ "deleteFragment": {
119
+ "operationId": "DeleteIntegrationFragment",
120
+ "method": "post",
121
+ "path": "v1/integration-installations/{installationId}/placements/{placementId}/fragment:delete",
122
+ "credential": "installation",
123
+ "retry": "idempotency",
124
+ "requestSchema": "DeleteIntegrationFragmentRequest",
125
+ "responseSchema": "IntegrationPlacementFragmentResult"
126
+ },
127
+ "requestBundleUpload": {
128
+ "operationId": "RequestIntegrationBundleUpload",
129
+ "method": "post",
130
+ "path": "v1/integration-publisher/integrations/{integrationId}/bundles:request-upload",
131
+ "credential": "publisher",
132
+ "retry": "never",
133
+ "requestSchema": "RequestIntegrationBundleUploadRequest",
134
+ "responseSchema": "RequestIntegrationBundleUploadResponse"
135
+ },
136
+ "confirmBundleUpload": {
137
+ "operationId": "ConfirmIntegrationBundleUpload",
138
+ "method": "post",
139
+ "path": "v1/integration-publisher/integrations/{integrationId}/bundles/{uploadId}:confirm",
140
+ "credential": "publisher",
141
+ "retry": "never",
142
+ "requestSchema": "ConfirmIntegrationBundleUploadRequest",
143
+ "responseSchema": "IntegrationBundle"
144
+ },
145
+ "confirmHandoff": {
146
+ "operationId": "ConfirmIntegrationSettingsHandoff",
147
+ "method": "post",
148
+ "path": "v1/integration-installations/{installationId}/settings-handoff:confirm",
149
+ "credential": "installation",
150
+ "retry": "never",
151
+ "requestSchema": "ConfirmIntegrationSettingsHandoffRequest",
152
+ "responseSchema": "ConfirmIntegrationSettingsHandoffResponse"
153
+ }
154
+ });
155
+ export const INTEGRATION_OPENAPI_SCHEMAS = Object.freeze({
156
+ "BeginIntegrationSyncRequest": {
157
+ "type": "object",
158
+ "properties": {
159
+ "installationId": {
160
+ "type": "string"
161
+ },
162
+ "mode": {
163
+ "type": "string"
164
+ },
165
+ "idempotencyKey": {
166
+ "type": "string"
167
+ },
168
+ "requestedSyncId": {
169
+ "type": "string",
170
+ "description": "Exact signed sync.requested syncId; empty preserves unsolicited syncs."
171
+ }
172
+ },
173
+ "additionalProperties": false
174
+ },
175
+ "ClaimIntegrationInstallationRequest": {
176
+ "type": "object",
177
+ "properties": {
178
+ "installationId": {
179
+ "type": "string"
180
+ },
181
+ "claimCode": {
182
+ "type": "string"
183
+ }
184
+ },
185
+ "additionalProperties": false
186
+ },
187
+ "ClaimIntegrationInstallationResponse": {
188
+ "type": "object",
189
+ "properties": {
190
+ "installation": {
191
+ "$ref": "#/components/schemas/IntegrationInstallation"
192
+ },
193
+ "credential": {
194
+ "$ref": "#/components/schemas/IntegrationCredential"
195
+ }
196
+ },
197
+ "additionalProperties": false
198
+ },
199
+ "ConfirmIntegrationBundleUploadRequest": {
200
+ "type": "object",
201
+ "properties": {
202
+ "integrationId": {
203
+ "type": "string"
204
+ },
205
+ "uploadId": {
206
+ "type": "string"
207
+ }
208
+ },
209
+ "additionalProperties": false
210
+ },
211
+ "ConfirmIntegrationMediaUploadRequest": {
212
+ "type": "object",
213
+ "properties": {
214
+ "installationId": {
215
+ "type": "string"
216
+ },
217
+ "uploadId": {
218
+ "type": "string"
219
+ }
220
+ },
221
+ "additionalProperties": false
222
+ },
223
+ "ConfirmIntegrationMediaUploadResponse": {
224
+ "type": "object",
225
+ "properties": {
226
+ "image": {
227
+ "$ref": "#/components/schemas/TaprootImage"
228
+ }
229
+ },
230
+ "additionalProperties": false
231
+ },
232
+ "ConfirmIntegrationSettingsHandoffRequest": {
233
+ "type": "object",
234
+ "properties": {
235
+ "installationId": {
236
+ "type": "string"
237
+ },
238
+ "token": {
239
+ "type": "string"
240
+ }
241
+ },
242
+ "additionalProperties": false
243
+ },
244
+ "ConfirmIntegrationSettingsHandoffResponse": {
245
+ "type": "object",
246
+ "properties": {
247
+ "userId": {
248
+ "type": "string"
249
+ },
250
+ "siteId": {
251
+ "type": "string"
252
+ },
253
+ "installationId": {
254
+ "type": "string"
255
+ },
256
+ "integrationId": {
257
+ "type": "string"
258
+ },
259
+ "credentialId": {
260
+ "type": "string"
261
+ },
262
+ "role": {
263
+ "type": "string"
264
+ },
265
+ "engagementId": {
266
+ "type": "string"
267
+ },
268
+ "expiresAt": {
269
+ "type": "string",
270
+ "description": "Absolute integration-side session expiry; no refresh credential is issued."
271
+ }
272
+ },
273
+ "additionalProperties": false
274
+ },
275
+ "DeleteIntegrationContentRequest": {
276
+ "type": "object",
277
+ "properties": {
278
+ "installationId": {
279
+ "type": "string"
280
+ },
281
+ "syncId": {
282
+ "type": "string"
283
+ },
284
+ "idempotencyKey": {
285
+ "type": "string"
286
+ },
287
+ "key": {
288
+ "type": "string",
289
+ "description": "Page external_id for page deletion; canonical document key for data deletion."
290
+ }
291
+ },
292
+ "additionalProperties": false
293
+ },
294
+ "DeleteIntegrationFragmentRequest": {
295
+ "type": "object",
296
+ "properties": {
297
+ "installationId": {
298
+ "type": "string"
299
+ },
300
+ "placementId": {
301
+ "type": "string"
302
+ },
303
+ "configurationRevision": {
304
+ "type": "integer",
305
+ "format": "int64"
306
+ },
307
+ "expectedFragmentRevision": {
308
+ "type": "integer",
309
+ "format": "int64"
310
+ },
311
+ "syncId": {
312
+ "type": "string"
313
+ },
314
+ "idempotencyKey": {
315
+ "type": "string"
316
+ }
317
+ },
318
+ "additionalProperties": false
319
+ },
320
+ "FinishIntegrationSyncRequest": {
321
+ "type": "object",
322
+ "properties": {
323
+ "installationId": {
324
+ "type": "string"
325
+ },
326
+ "syncId": {
327
+ "type": "string"
328
+ },
329
+ "idempotencyKey": {
330
+ "type": "string"
331
+ },
332
+ "summary": {
333
+ "type": "string"
334
+ }
335
+ },
336
+ "additionalProperties": false
337
+ },
338
+ "ImageOwnershipScope": {
339
+ "enum": [
340
+ "IMAGE_OWNERSHIP_SCOPE_UNKNOWN",
341
+ "IMAGE_OWNERSHIP_SCOPE_PROFILE",
342
+ "IMAGE_OWNERSHIP_SCOPE_SITE",
343
+ "IMAGE_OWNERSHIP_SCOPE_ACCOUNT"
344
+ ],
345
+ "type": "string",
346
+ "description": "Explicit ownership boundary for an image or pending upload."
347
+ },
348
+ "ImageProcessingState": {
349
+ "enum": [
350
+ "IMAGE_PROCESSING_STATE_UNKNOWN",
351
+ "IMAGE_PROCESSING_STATE_PENDING",
352
+ "IMAGE_PROCESSING_STATE_COMPLETE",
353
+ "IMAGE_PROCESSING_STATE_IN_PROGRESS",
354
+ "IMAGE_PROCESSING_STATE_RETRYING",
355
+ "IMAGE_PROCESSING_STATE_FAILED"
356
+ ],
357
+ "type": "string",
358
+ "description": "Processing state for responsive image variants."
359
+ },
360
+ "ImageType": {
361
+ "enum": [
362
+ "IMAGE_TYPE_UNKNOWN",
363
+ "IMAGE_TYPE_JPEG",
364
+ "IMAGE_TYPE_PNG",
365
+ "IMAGE_TYPE_WEBP",
366
+ "IMAGE_TYPE_GIF"
367
+ ],
368
+ "type": "string",
369
+ "description": "Image type"
370
+ },
371
+ "ImageUrl": {
372
+ "type": "object",
373
+ "properties": {
374
+ "minWidth": {
375
+ "type": "integer",
376
+ "description": "The minimum width of the image.",
377
+ "format": "int32"
378
+ },
379
+ "url": {
380
+ "type": "string",
381
+ "description": "The URL of the image."
382
+ }
383
+ },
384
+ "additionalProperties": false,
385
+ "description": "Image URL for image template data."
386
+ },
387
+ "IntegrationBundle": {
388
+ "type": "object",
389
+ "properties": {
390
+ "id": {
391
+ "type": "string"
392
+ },
393
+ "integrationId": {
394
+ "type": "string"
395
+ },
396
+ "contentHash": {
397
+ "type": "string"
398
+ },
399
+ "byteLength": {
400
+ "type": "integer",
401
+ "format": "int64"
402
+ },
403
+ "runtimeMajor": {
404
+ "type": "integer",
405
+ "format": "int32"
406
+ },
407
+ "url": {
408
+ "type": "string"
409
+ },
410
+ "createdAt": {
411
+ "type": "string"
412
+ }
413
+ },
414
+ "additionalProperties": false
415
+ },
416
+ "IntegrationCredential": {
417
+ "type": "object",
418
+ "properties": {
419
+ "id": {
420
+ "type": "string"
421
+ },
422
+ "displayPrefix": {
423
+ "type": "string"
424
+ },
425
+ "status": {
426
+ "type": "string"
427
+ },
428
+ "secret": {
429
+ "type": "string",
430
+ "description": "Present exactly once on issuance. Metadata-only replay leaves this empty."
431
+ },
432
+ "isReplay": {
433
+ "type": "boolean"
434
+ },
435
+ "createdAt": {
436
+ "type": "string"
437
+ },
438
+ "expiresAt": {
439
+ "type": "string"
440
+ }
441
+ },
442
+ "additionalProperties": false
443
+ },
444
+ "IntegrationInstallation": {
445
+ "type": "object",
446
+ "properties": {
447
+ "id": {
448
+ "type": "string"
449
+ },
450
+ "siteId": {
451
+ "type": "string"
452
+ },
453
+ "accountId": {
454
+ "type": "string"
455
+ },
456
+ "integrationId": {
457
+ "type": "string"
458
+ },
459
+ "status": {
460
+ "type": "string"
461
+ },
462
+ "grantedCapabilities": {
463
+ "type": "array",
464
+ "items": {
465
+ "type": "string"
466
+ }
467
+ },
468
+ "publishPolicy": {
469
+ "type": "string"
470
+ },
471
+ "contractVersion": {
472
+ "type": "string"
473
+ },
474
+ "sourceKind": {
475
+ "type": "string"
476
+ },
477
+ "sourceEngagementId": {
478
+ "type": "string"
479
+ },
480
+ "sourceManagingAccountId": {
481
+ "type": "string"
482
+ },
483
+ "sourceTerminated": {
484
+ "type": "boolean"
485
+ },
486
+ "credentialId": {
487
+ "type": "string"
488
+ },
489
+ "revision": {
490
+ "type": "integer",
491
+ "format": "int32"
492
+ },
493
+ "pathPrefix": {
494
+ "type": "string"
495
+ },
496
+ "contentRevision": {
497
+ "type": "integer",
498
+ "format": "int64"
499
+ },
500
+ "syncCadence": {
501
+ "type": "string"
502
+ },
503
+ "syncMinuteOfDay": {
504
+ "type": "integer",
505
+ "format": "int32"
506
+ },
507
+ "lastSyncedAt": {
508
+ "type": "string"
509
+ },
510
+ "lastPublishedAt": {
511
+ "type": "string"
512
+ },
513
+ "healthStatus": {
514
+ "type": "string"
515
+ },
516
+ "healthReason": {
517
+ "type": "string"
518
+ },
519
+ "healthUpdatedAt": {
520
+ "type": "string"
521
+ },
522
+ "lastPublishedCandidateRevision": {
523
+ "type": "integer",
524
+ "format": "int64"
525
+ },
526
+ "lastPublishedDeploymentId": {
527
+ "type": "string"
528
+ },
529
+ "pricingOptionId": {
530
+ "type": "string"
531
+ },
532
+ "pricingOptionVersion": {
533
+ "type": "string"
534
+ },
535
+ "billingStatus": {
536
+ "type": "string"
537
+ },
538
+ "entitlementStatus": {
539
+ "type": "string"
540
+ },
541
+ "entitlementPeriodEnd": {
542
+ "type": "string"
543
+ },
544
+ "billingMutationId": {
545
+ "type": "string"
546
+ },
547
+ "billingItemKey": {
548
+ "type": "string"
549
+ },
550
+ "priceAmountCents": {
551
+ "type": "integer",
552
+ "format": "int64"
553
+ },
554
+ "priceCurrency": {
555
+ "type": "string"
556
+ },
557
+ "priceCatalogueVersion": {
558
+ "type": "string"
559
+ },
560
+ "priceCadence": {
561
+ "type": "string"
562
+ },
563
+ "bundle": {
564
+ "$ref": "#/components/schemas/IntegrationBundle"
565
+ },
566
+ "browserCodeConsented": {
567
+ "type": "boolean"
568
+ }
569
+ },
570
+ "additionalProperties": false
571
+ },
572
+ "IntegrationInstallationPlacement": {
573
+ "type": "object",
574
+ "properties": {
575
+ "placementId": {
576
+ "type": "string"
577
+ },
578
+ "componentId": {
579
+ "type": "string"
580
+ },
581
+ "configurationRevision": {
582
+ "type": "integer",
583
+ "format": "int64"
584
+ },
585
+ "configJson": {
586
+ "type": "string"
587
+ },
588
+ "fragmentRevision": {
589
+ "type": "integer",
590
+ "format": "int64"
591
+ },
592
+ "fragmentStatus": {
593
+ "type": "string"
594
+ }
595
+ },
596
+ "additionalProperties": false
597
+ },
598
+ "IntegrationManagedPageContent": {
599
+ "type": "object",
600
+ "properties": {
601
+ "externalId": {
602
+ "type": "string"
603
+ },
604
+ "path": {
605
+ "type": "string"
606
+ },
607
+ "title": {
608
+ "type": "string"
609
+ },
610
+ "description": {
611
+ "type": "string"
612
+ },
613
+ "indexable": {
614
+ "type": "boolean"
615
+ },
616
+ "fragments": {
617
+ "type": "array",
618
+ "items": {
619
+ "type": "string"
620
+ }
621
+ },
622
+ "structuredData": {
623
+ "type": "array",
624
+ "items": {
625
+ "type": "string"
626
+ }
627
+ },
628
+ "primaryStructuredDataId": {
629
+ "type": "string"
630
+ },
631
+ "folder": {
632
+ "type": "string"
633
+ },
634
+ "tagIds": {
635
+ "type": "array",
636
+ "items": {
637
+ "type": "string"
638
+ }
639
+ },
640
+ "includeInNavigation": {
641
+ "type": "boolean"
642
+ },
643
+ "publicationDate": {
644
+ "type": "string"
645
+ },
646
+ "archiveDate": {
647
+ "type": "string"
648
+ },
649
+ "includeInLatestPosts": {
650
+ "type": "boolean"
651
+ },
652
+ "contentUpdatedAt": {
653
+ "type": "string",
654
+ "description": "Advisory only; never a freshness/hash input."
655
+ }
656
+ },
657
+ "additionalProperties": false
658
+ },
659
+ "IntegrationPlacementFragmentResult": {
660
+ "type": "object",
661
+ "properties": {
662
+ "placementId": {
663
+ "type": "string"
664
+ },
665
+ "configurationRevision": {
666
+ "type": "integer",
667
+ "format": "int64"
668
+ },
669
+ "fragmentRevision": {
670
+ "type": "integer",
671
+ "format": "int64"
672
+ },
673
+ "status": {
674
+ "type": "string"
675
+ },
676
+ "changed": {
677
+ "type": "boolean"
678
+ }
679
+ },
680
+ "additionalProperties": false
681
+ },
682
+ "IntegrationSyncResult": {
683
+ "type": "object",
684
+ "properties": {
685
+ "syncId": {
686
+ "type": "string"
687
+ },
688
+ "status": {
689
+ "type": "string"
690
+ },
691
+ "baseRevision": {
692
+ "type": "integer",
693
+ "format": "int64"
694
+ },
695
+ "candidateRevision": {
696
+ "type": "integer",
697
+ "format": "int64"
698
+ },
699
+ "changed": {
700
+ "type": "boolean"
701
+ }
702
+ },
703
+ "additionalProperties": false,
704
+ "description": "A sync writes isolated versions. Only completion creates an immutable pending revision."
705
+ },
706
+ "ListIntegrationPlacementsResponse": {
707
+ "type": "object",
708
+ "properties": {
709
+ "placements": {
710
+ "type": "array",
711
+ "items": {
712
+ "$ref": "#/components/schemas/IntegrationInstallationPlacement"
713
+ }
714
+ }
715
+ },
716
+ "additionalProperties": false
717
+ },
718
+ "PutIntegrationDataDocumentRequest": {
719
+ "type": "object",
720
+ "properties": {
721
+ "installationId": {
722
+ "type": "string"
723
+ },
724
+ "syncId": {
725
+ "type": "string"
726
+ },
727
+ "idempotencyKey": {
728
+ "type": "string"
729
+ },
730
+ "key": {
731
+ "type": "string"
732
+ },
733
+ "json": {
734
+ "type": "string"
735
+ }
736
+ },
737
+ "additionalProperties": false
738
+ },
739
+ "PutIntegrationFragmentRequest": {
740
+ "type": "object",
741
+ "properties": {
742
+ "installationId": {
743
+ "type": "string"
744
+ },
745
+ "placementId": {
746
+ "type": "string"
747
+ },
748
+ "configurationRevision": {
749
+ "type": "integer",
750
+ "format": "int64"
751
+ },
752
+ "expectedFragmentRevision": {
753
+ "type": "integer",
754
+ "format": "int64"
755
+ },
756
+ "html": {
757
+ "type": "string"
758
+ },
759
+ "structuredData": {
760
+ "type": "array",
761
+ "items": {
762
+ "type": "string"
763
+ }
764
+ },
765
+ "syncId": {
766
+ "type": "string"
767
+ },
768
+ "idempotencyKey": {
769
+ "type": "string"
770
+ }
771
+ },
772
+ "additionalProperties": false
773
+ },
774
+ "RequestIntegrationBundleUploadRequest": {
775
+ "type": "object",
776
+ "properties": {
777
+ "integrationId": {
778
+ "type": "string"
779
+ },
780
+ "contentHash": {
781
+ "type": "string"
782
+ },
783
+ "byteLength": {
784
+ "type": "integer",
785
+ "format": "int64"
786
+ },
787
+ "runtimeMajor": {
788
+ "type": "integer",
789
+ "format": "int32"
790
+ }
791
+ },
792
+ "additionalProperties": false
793
+ },
794
+ "RequestIntegrationBundleUploadResponse": {
795
+ "type": "object",
796
+ "properties": {
797
+ "uploadId": {
798
+ "type": "string"
799
+ },
800
+ "presignedUrl": {
801
+ "type": "string"
802
+ },
803
+ "requiredHeaders": {
804
+ "type": "object",
805
+ "additionalProperties": {
806
+ "type": "string"
807
+ }
808
+ },
809
+ "expiresAt": {
810
+ "type": "string"
811
+ },
812
+ "existingBundle": {
813
+ "$ref": "#/components/schemas/IntegrationBundle"
814
+ },
815
+ "isDuplicate": {
816
+ "type": "boolean"
817
+ }
818
+ },
819
+ "additionalProperties": false
820
+ },
821
+ "RequestIntegrationMediaUploadRequest": {
822
+ "type": "object",
823
+ "properties": {
824
+ "installationId": {
825
+ "type": "string"
826
+ },
827
+ "fileName": {
828
+ "type": "string"
829
+ },
830
+ "contentType": {
831
+ "type": "string"
832
+ },
833
+ "fileSize": {
834
+ "type": "number",
835
+ "format": "double"
836
+ },
837
+ "contentHash": {
838
+ "type": "string"
839
+ },
840
+ "width": {
841
+ "type": "integer",
842
+ "format": "int32"
843
+ },
844
+ "height": {
845
+ "type": "integer",
846
+ "format": "int32"
847
+ }
848
+ },
849
+ "additionalProperties": false
850
+ },
851
+ "RequestIntegrationMediaUploadResponse": {
852
+ "type": "object",
853
+ "properties": {
854
+ "presignedUrl": {
855
+ "type": "string"
856
+ },
857
+ "uploadId": {
858
+ "type": "string"
859
+ },
860
+ "isDuplicate": {
861
+ "type": "boolean"
862
+ },
863
+ "image": {
864
+ "$ref": "#/components/schemas/TaprootImage"
865
+ },
866
+ "requiredHeaders": {
867
+ "type": "object",
868
+ "additionalProperties": {
869
+ "type": "string"
870
+ }
871
+ }
872
+ },
873
+ "additionalProperties": false
874
+ },
875
+ "TaprootImage": {
876
+ "type": "object",
877
+ "properties": {
878
+ "imageId": {
879
+ "type": "string",
880
+ "description": "The ID of the image."
881
+ },
882
+ "url": {
883
+ "type": "string",
884
+ "description": "Signed platform preview URL; resolves once ingest finishes (see processing_state)."
885
+ },
886
+ "height": {
887
+ "type": "number",
888
+ "description": "The height of the image.",
889
+ "format": "double"
890
+ },
891
+ "width": {
892
+ "type": "number",
893
+ "description": "The width of the image.",
894
+ "format": "double"
895
+ },
896
+ "fileSize": {
897
+ "type": "number",
898
+ "description": "The size of the image in bytes.",
899
+ "format": "double"
900
+ },
901
+ "uploadedName": {
902
+ "type": "string",
903
+ "description": "The name of the image that was uploaded."
904
+ },
905
+ "imageType": {
906
+ "$ref": "#/components/schemas/ImageType"
907
+ },
908
+ "responsiveUrls": {
909
+ "type": "array",
910
+ "items": {
911
+ "$ref": "#/components/schemas/ImageUrl"
912
+ },
913
+ "description": "Signed platform WebP transform URLs."
914
+ },
915
+ "thumbHash": {
916
+ "type": "string",
917
+ "description": "Base64-encoded ThumbHash placeholder for inline previews."
918
+ },
919
+ "processingState": {
920
+ "$ref": "#/components/schemas/ImageProcessingState"
921
+ },
922
+ "ownershipScope": {
923
+ "$ref": "#/components/schemas/ImageOwnershipScope"
924
+ },
925
+ "siteId": {
926
+ "type": "string",
927
+ "description": "Owning site for SITE scope; empty for PROFILE and ACCOUNT."
928
+ }
929
+ },
930
+ "additionalProperties": false,
931
+ "description": "An image reference"
932
+ },
933
+ "UpsertIntegrationPageRequest": {
934
+ "type": "object",
935
+ "properties": {
936
+ "installationId": {
937
+ "type": "string"
938
+ },
939
+ "syncId": {
940
+ "type": "string",
941
+ "description": "Empty creates and completes an isolated single-item incremental sync."
942
+ },
943
+ "idempotencyKey": {
944
+ "type": "string"
945
+ },
946
+ "page": {
947
+ "$ref": "#/components/schemas/IntegrationManagedPageContent"
948
+ }
949
+ },
950
+ "additionalProperties": false
951
+ },
952
+ "ValidateIntegrationInstallationResponse": {
953
+ "type": "object",
954
+ "properties": {
955
+ "valid": {
956
+ "type": "boolean"
957
+ },
958
+ "installation": {
959
+ "$ref": "#/components/schemas/IntegrationInstallation"
960
+ },
961
+ "entitlementStatus": {
962
+ "type": "string"
963
+ },
964
+ "entitlementEnabled": {
965
+ "type": "boolean"
966
+ },
967
+ "writesEnabled": {
968
+ "type": "boolean"
969
+ },
970
+ "code": {
971
+ "type": "string",
972
+ "description": "Lifecycle details are available only after successful credential authentication."
973
+ }
974
+ },
975
+ "additionalProperties": false
976
+ }
977
+ });
978
+ export const INTEGRATION_WEBHOOK_EVENTS = Object.freeze({
979
+ "installation.created": {
980
+ "schema": "installation.created.schema.json",
981
+ "example": "examples/installation.created.json"
982
+ },
983
+ "installation.resumed": {
984
+ "schema": "installation.resumed.schema.json",
985
+ "example": "examples/installation.resumed.json"
986
+ },
987
+ "installation.suspended": {
988
+ "schema": "installation.suspended.schema.json",
989
+ "example": "examples/installation.suspended.json"
990
+ },
991
+ "installation.uninstalled": {
992
+ "schema": "installation.uninstalled.schema.json",
993
+ "example": "examples/installation.uninstalled.json"
994
+ },
995
+ "installation.updated": {
996
+ "schema": "installation.updated.schema.json",
997
+ "example": "examples/installation.updated.json"
998
+ },
999
+ "page.deleted": {
1000
+ "schema": "page.deleted.schema.json",
1001
+ "example": "examples/page.deleted.json"
1002
+ },
1003
+ "page.published": {
1004
+ "schema": "page.published.schema.json",
1005
+ "example": "examples/page.published.json"
1006
+ },
1007
+ "ping": {
1008
+ "schema": "ping.schema.json",
1009
+ "example": "examples/ping.json"
1010
+ },
1011
+ "placement.created": {
1012
+ "schema": "placement.created.schema.json",
1013
+ "example": "examples/placement.created.json"
1014
+ },
1015
+ "placement.deleted": {
1016
+ "schema": "placement.deleted.schema.json",
1017
+ "example": "examples/placement.deleted.json"
1018
+ },
1019
+ "placement.updated": {
1020
+ "schema": "placement.updated.schema.json",
1021
+ "example": "examples/placement.updated.json"
1022
+ },
1023
+ "publish.completed": {
1024
+ "schema": "publish.completed.schema.json",
1025
+ "example": "examples/publish.completed.json"
1026
+ },
1027
+ "publish.failed": {
1028
+ "schema": "publish.failed.schema.json",
1029
+ "example": "examples/publish.failed.json"
1030
+ },
1031
+ "sync.requested": {
1032
+ "schema": "sync.requested.schema.json",
1033
+ "example": "examples/sync.requested.json"
1034
+ }
1035
+ });