@irogane/kaji 0.2.0-beta.11 → 0.3.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.
Files changed (137) hide show
  1. package/README.md +112 -551
  2. package/dist/index.d.mts +253 -0
  3. package/dist/index.mjs +440 -0
  4. package/package.json +28 -166
  5. package/contracts/README.md +0 -14
  6. package/contracts/beta-core-v1.json +0 -52
  7. package/contracts/cli/init-cases-v1.json +0 -27
  8. package/contracts/errors/error-codes.json +0 -48
  9. package/contracts/errors/integration-recovery-v1.json +0 -127
  10. package/contracts/errors/provider-normalization.json +0 -111
  11. package/contracts/events/conformance-invalid.json +0 -20
  12. package/contracts/events/conformance.json +0 -511
  13. package/contracts/events/new-kaji-event-v1.schema.json +0 -1021
  14. package/contracts/events/stored-kaji-event-v1.schema.json +0 -1025
  15. package/contracts/feature-tiers-v1.json +0 -488
  16. package/contracts/integrations/abi-index-v1.json +0 -8
  17. package/contracts/integrations/conformance-invalid.json +0 -443
  18. package/contracts/integrations/conformance-valid.json +0 -121
  19. package/contracts/integrations/copy-provenance-v1.schema.json +0 -61
  20. package/contracts/integrations/echo-tool-abi-v1.json +0 -37
  21. package/contracts/integrations/github-api-conformance-v1.json +0 -644
  22. package/contracts/integrations/github-tool-abi-typescript-v1.json +0 -369
  23. package/contracts/integrations/github-tool-abi-v1.json +0 -146
  24. package/contracts/integrations/gmail-api-conformance-v1.json +0 -750
  25. package/contracts/integrations/gmail-tool-abi-v1.json +0 -62
  26. package/contracts/integrations/index.schema.json +0 -37
  27. package/contracts/integrations/manifest.schema.json +0 -119
  28. package/contracts/parity/expected-normalized.json +0 -4906
  29. package/contracts/parity/scenarios.json +0 -100
  30. package/contracts/parity/scenarios.schema.json +0 -214
  31. package/contracts/providers/cost-conformance.json +0 -112
  32. package/contracts/release/github-proof-v1.schema.json +0 -138
  33. package/contracts/release/gmail-proof-v1.schema.json +0 -138
  34. package/contracts/release/kaji-ts-consumer-handoff-v1.schema.json +0 -1289
  35. package/contracts/release/publisher-identity-receipt-v1.schema.json +0 -319
  36. package/contracts/release/typescript-onboarding-evidence-v1.schema.json +0 -740
  37. package/contracts/tools/conformance-invalid.json +0 -271
  38. package/contracts/tools/conformance-valid.json +0 -78
  39. package/contracts/tools/tool-schema-v1.schema.json +0 -18
  40. package/dist/anthropic.cjs +0 -1231
  41. package/dist/anthropic.cjs.map +0 -1
  42. package/dist/anthropic.d.cts +0 -26
  43. package/dist/anthropic.d.ts +0 -26
  44. package/dist/anthropic.js +0 -270
  45. package/dist/anthropic.js.map +0 -1
  46. package/dist/auth.cjs +0 -1507
  47. package/dist/auth.cjs.map +0 -1
  48. package/dist/auth.d.cts +0 -129
  49. package/dist/auth.d.ts +0 -129
  50. package/dist/auth.js +0 -1039
  51. package/dist/auth.js.map +0 -1
  52. package/dist/base-B9FRMcP8.d.cts +0 -140
  53. package/dist/base-nHQd1VtS.d.ts +0 -140
  54. package/dist/chunk-AAM33KAO.js +0 -4367
  55. package/dist/chunk-AAM33KAO.js.map +0 -1
  56. package/dist/chunk-KAJ6BM64.js +0 -153
  57. package/dist/chunk-KAJ6BM64.js.map +0 -1
  58. package/dist/chunk-KCAXIOZS.js +0 -308
  59. package/dist/chunk-KCAXIOZS.js.map +0 -1
  60. package/dist/chunk-LSJ4AVO2.js +0 -243
  61. package/dist/chunk-LSJ4AVO2.js.map +0 -1
  62. package/dist/chunk-TM7ZGOJX.js +0 -716
  63. package/dist/chunk-TM7ZGOJX.js.map +0 -1
  64. package/dist/cli/bin.d.ts +0 -2
  65. package/dist/cli/bin.js +0 -13
  66. package/dist/cli/bin.js.map +0 -1
  67. package/dist/cli/chunk-2RCWPRVY.js +0 -6277
  68. package/dist/cli/chunk-2RCWPRVY.js.map +0 -1
  69. package/dist/cli/chunk-SEBX54TR.js +0 -681
  70. package/dist/cli/chunk-SEBX54TR.js.map +0 -1
  71. package/dist/cli/index.d.ts +0 -232
  72. package/dist/cli/index.js +0 -11
  73. package/dist/cli/index.js.map +0 -1
  74. package/dist/cli/init-worker.d.ts +0 -2
  75. package/dist/cli/init-worker.js +0 -18
  76. package/dist/cli/init-worker.js.map +0 -1
  77. package/dist/cli/integration-copy-worker.js +0 -48
  78. package/dist/cli/integration-copy-worker.js.map +0 -1
  79. package/dist/cli/package-entry-cjs.cjs +0 -21
  80. package/dist/cli/package-entry-cjs.cjs.map +0 -1
  81. package/dist/cli/package-entry-cjs.d.cts +0 -2
  82. package/dist/cli/package-entry.d.ts +0 -2
  83. package/dist/cli/package-entry.js +0 -13
  84. package/dist/cli/package-entry.js.map +0 -1
  85. package/dist/context-BaFHrQHv.d.cts +0 -21
  86. package/dist/context-BaFHrQHv.d.ts +0 -21
  87. package/dist/context-C-YPY-GS.d.cts +0 -1538
  88. package/dist/context-C-YPY-GS.d.ts +0 -1538
  89. package/dist/index.cjs +0 -12346
  90. package/dist/index.cjs.map +0 -1
  91. package/dist/index.d.cts +0 -1560
  92. package/dist/index.d.ts +0 -1560
  93. package/dist/index.js +0 -7852
  94. package/dist/index.js.map +0 -1
  95. package/dist/integrations/github.cjs +0 -2092
  96. package/dist/integrations/github.cjs.map +0 -1
  97. package/dist/integrations/github.d.cts +0 -21
  98. package/dist/integrations/github.d.ts +0 -21
  99. package/dist/integrations/github.js +0 -2088
  100. package/dist/integrations/github.js.map +0 -1
  101. package/dist/integrations.cjs +0 -3370
  102. package/dist/integrations.cjs.map +0 -1
  103. package/dist/integrations.d.cts +0 -202
  104. package/dist/integrations.d.ts +0 -202
  105. package/dist/integrations.js +0 -2650
  106. package/dist/integrations.js.map +0 -1
  107. package/dist/observability-Cj--OkME.d.cts +0 -96
  108. package/dist/observability-Cj--OkME.d.ts +0 -96
  109. package/dist/openai.cjs +0 -1235
  110. package/dist/openai.cjs.map +0 -1
  111. package/dist/openai.d.cts +0 -32
  112. package/dist/openai.d.ts +0 -32
  113. package/dist/openai.js +0 -272
  114. package/dist/openai.js.map +0 -1
  115. package/dist/testing.cjs +0 -554
  116. package/dist/testing.cjs.map +0 -1
  117. package/dist/testing.d.cts +0 -43
  118. package/dist/testing.d.ts +0 -43
  119. package/dist/testing.js +0 -118
  120. package/dist/testing.js.map +0 -1
  121. package/registry/echo/index.ts +0 -53
  122. package/registry/echo/manifest.json +0 -53
  123. package/registry/github/LICENSE +0 -105
  124. package/registry/github/client.ts +0 -1727
  125. package/registry/github/index.ts +0 -263
  126. package/registry/github/manifest.json +0 -227
  127. package/registry/github/owner-fixtures.json +0 -10
  128. package/registry/github/tests/github.test.ts +0 -32
  129. package/registry/gmail/LICENSE +0 -105
  130. package/registry/gmail/client.ts +0 -548
  131. package/registry/gmail/index.ts +0 -165
  132. package/registry/gmail/manifest.json +0 -102
  133. package/registry/gmail/owner-fixtures.json +0 -10
  134. package/registry/gmail/tests/gmail.test.ts +0 -32
  135. package/registry/index.json +0 -21
  136. package/registry/index.schema.json +0 -37
  137. package/registry/schema.json +0 -119
@@ -1,750 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://kaji.dev/contracts/integrations/gmail-api-conformance-v1.json",
4
- "version": "1.0.0",
5
- "token": "fixture-token",
6
- "cases": [
7
- {
8
- "name": "list messages",
9
- "operation": "list_messages",
10
- "input": {
11
- "query": "from:alice",
12
- "maxResults": 5
13
- },
14
- "responses": [
15
- {
16
- "status": 200,
17
- "headers": {
18
- "content-type": "application/json"
19
- },
20
- "json": {
21
- "messages": [
22
- {
23
- "id": "abc123",
24
- "threadId": "thread1"
25
- },
26
- {
27
- "id": "def456",
28
- "threadId": "thread2"
29
- }
30
- ],
31
- "resultSizeEstimate": 2,
32
- "nextPageToken": "CURSOR_2"
33
- }
34
- }
35
- ],
36
- "expected_requests": [
37
- {
38
- "method": "GET",
39
- "path_and_query": "/gmail/v1/users/me/messages?maxResults=5&q=from%3Aalice",
40
- "body": null
41
- }
42
- ],
43
- "expected": {
44
- "result": {
45
- "messages": [
46
- {
47
- "id": "abc123",
48
- "thread_id": "thread1"
49
- },
50
- {
51
- "id": "def456",
52
- "thread_id": "thread2"
53
- }
54
- ],
55
- "result_size_estimate": 2,
56
- "next_page_token": "CURSOR_2"
57
- }
58
- }
59
- },
60
- {
61
- "name": "list messages empty",
62
- "operation": "list_messages",
63
- "input": {},
64
- "responses": [
65
- {
66
- "status": 200,
67
- "headers": {},
68
- "json": {
69
- "resultSizeEstimate": 0
70
- }
71
- }
72
- ],
73
- "expected_requests": [
74
- {
75
- "method": "GET",
76
- "path_and_query": "/gmail/v1/users/me/messages?maxResults=10",
77
- "body": null
78
- }
79
- ],
80
- "expected": {
81
- "result": {
82
- "messages": [],
83
- "result_size_estimate": 0
84
- }
85
- }
86
- },
87
- {
88
- "name": "list messages with pagination",
89
- "operation": "list_messages",
90
- "input": {
91
- "maxResults": 1,
92
- "pageToken": "PREV_CURSOR"
93
- },
94
- "responses": [
95
- {
96
- "status": 200,
97
- "headers": {},
98
- "json": {
99
- "messages": [
100
- {
101
- "id": "m1",
102
- "threadId": "t1"
103
- }
104
- ],
105
- "nextPageToken": "NEXT_PAGE_42",
106
- "resultSizeEstimate": 50
107
- }
108
- }
109
- ],
110
- "expected_requests": [
111
- {
112
- "method": "GET",
113
- "path_and_query": "/gmail/v1/users/me/messages?maxResults=1&pageToken=PREV_CURSOR",
114
- "body": null
115
- }
116
- ],
117
- "expected": {
118
- "result": {
119
- "messages": [
120
- {
121
- "id": "m1",
122
- "thread_id": "t1"
123
- }
124
- ],
125
- "next_page_token": "NEXT_PAGE_42",
126
- "result_size_estimate": 50
127
- }
128
- }
129
- },
130
- {
131
- "name": "get message text plain",
132
- "operation": "get_message",
133
- "input": {
134
- "messageId": "abc123"
135
- },
136
- "responses": [
137
- {
138
- "status": 200,
139
- "headers": {},
140
- "json": {
141
- "id": "abc123",
142
- "threadId": "thread1",
143
- "snippet": "hello there",
144
- "payload": {
145
- "headers": [
146
- {
147
- "name": "From",
148
- "value": "alice@example.com"
149
- },
150
- {
151
- "name": "Subject",
152
- "value": "Hi"
153
- },
154
- {
155
- "name": "X-Noise",
156
- "value": "dropped"
157
- }
158
- ],
159
- "mimeType": "multipart/alternative",
160
- "parts": [
161
- {
162
- "mimeType": "text/html",
163
- "body": {
164
- "data": "PHA-aWdub3JlZDwvcD4"
165
- }
166
- },
167
- {
168
- "mimeType": "text/plain",
169
- "body": {
170
- "data": "cGxhaW4gYm9keQ"
171
- }
172
- }
173
- ]
174
- }
175
- }
176
- }
177
- ],
178
- "expected_requests": [
179
- {
180
- "method": "GET",
181
- "path_and_query": "/gmail/v1/users/me/messages/abc123?format=full",
182
- "body": null
183
- }
184
- ],
185
- "expected": {
186
- "result": {
187
- "body": "plain body",
188
- "body_truncated": false,
189
- "headers": {
190
- "from": "alice@example.com",
191
- "subject": "Hi"
192
- },
193
- "id": "abc123",
194
- "snippet": "hello there",
195
- "thread_id": "thread1"
196
- }
197
- }
198
- },
199
- {
200
- "name": "get message no text part",
201
- "operation": "get_message",
202
- "input": {
203
- "messageId": "noBody01"
204
- },
205
- "responses": [
206
- {
207
- "status": 200,
208
- "headers": {},
209
- "json": {
210
- "id": "noBody01",
211
- "threadId": "noBody01",
212
- "payload": {
213
- "mimeType": "text/html",
214
- "body": {
215
- "data": "PHA-b25seSBodG1sPC9wPg"
216
- }
217
- }
218
- }
219
- }
220
- ],
221
- "expected_requests": [
222
- {
223
- "method": "GET",
224
- "path_and_query": "/gmail/v1/users/me/messages/noBody01?format=full",
225
- "body": null
226
- }
227
- ],
228
- "expected": {
229
- "result": {
230
- "body": "",
231
- "body_truncated": false,
232
- "headers": {},
233
- "id": "noBody01",
234
- "snippet": "",
235
- "thread_id": "noBody01"
236
- }
237
- }
238
- },
239
- {
240
- "name": "send message",
241
- "operation": "send_message",
242
- "input": {
243
- "raw": "RnJvbTogbWVAZXhhbXBsZS5jb20NClRvOiB5b3VAZXhhbXBsZS5jb20NCg0KSGk"
244
- },
245
- "responses": [
246
- {
247
- "status": 200,
248
- "headers": {},
249
- "json": {
250
- "id": "sent1",
251
- "threadId": "thread9"
252
- }
253
- }
254
- ],
255
- "expected_requests": [
256
- {
257
- "method": "POST",
258
- "path_and_query": "/gmail/v1/users/me/messages/send",
259
- "body": "{\"raw\":\"RnJvbTogbWVAZXhhbXBsZS5jb20NClRvOiB5b3VAZXhhbXBsZS5jb20NCg0KSGk\"}"
260
- }
261
- ],
262
- "expected": {
263
- "result": {
264
- "id": "sent1",
265
- "thread_id": "thread9"
266
- }
267
- }
268
- },
269
- {
270
- "name": "401 requires authentication",
271
- "operation": "list_messages",
272
- "input": {},
273
- "responses": [
274
- {
275
- "status": 401,
276
- "headers": {},
277
- "json": {}
278
- }
279
- ],
280
- "expected_requests": [
281
- {
282
- "method": "GET",
283
- "path_and_query": "/gmail/v1/users/me/messages?maxResults=10",
284
- "body": null
285
- }
286
- ],
287
- "expected": {
288
- "error": {
289
- "code": "INTEGRATION_AUTH_REQUIRED",
290
- "outcome": "failed",
291
- "retryable": false
292
- }
293
- }
294
- },
295
- {
296
- "name": "permission 403 is not rate limit",
297
- "operation": "list_messages",
298
- "input": {},
299
- "responses": [
300
- {
301
- "status": 403,
302
- "headers": {},
303
- "json": {}
304
- }
305
- ],
306
- "expected_requests": [
307
- {
308
- "method": "GET",
309
- "path_and_query": "/gmail/v1/users/me/messages?maxResults=10",
310
- "body": null
311
- }
312
- ],
313
- "expected": {
314
- "error": {
315
- "code": "INTEGRATION_API_ERROR",
316
- "outcome": "failed",
317
- "retryable": false
318
- }
319
- }
320
- },
321
- {
322
- "name": "rate limited read retries once",
323
- "operation": "list_messages",
324
- "input": {},
325
- "responses": [
326
- {
327
- "status": 429,
328
- "headers": {
329
- "retry-after": "1"
330
- },
331
- "json": {}
332
- },
333
- {
334
- "status": 200,
335
- "headers": {},
336
- "json": {
337
- "messages": [
338
- {
339
- "id": "abc123",
340
- "threadId": "thread1"
341
- }
342
- ]
343
- }
344
- }
345
- ],
346
- "expected_requests": [
347
- {
348
- "method": "GET",
349
- "path_and_query": "/gmail/v1/users/me/messages?maxResults=10",
350
- "body": null
351
- },
352
- {
353
- "method": "GET",
354
- "path_and_query": "/gmail/v1/users/me/messages?maxResults=10",
355
- "body": null
356
- }
357
- ],
358
- "expected": {
359
- "result": {
360
- "messages": [
361
- {
362
- "id": "abc123",
363
- "thread_id": "thread1"
364
- }
365
- ]
366
- }
367
- },
368
- "expected_sleeps": [
369
- 1000
370
- ]
371
- },
372
- {
373
- "name": "404 is confirmed read failure",
374
- "operation": "get_message",
375
- "input": {
376
- "messageId": "missing01"
377
- },
378
- "responses": [
379
- {
380
- "status": 404,
381
- "headers": {},
382
- "json": {}
383
- }
384
- ],
385
- "expected_requests": [
386
- {
387
- "method": "GET",
388
- "path_and_query": "/gmail/v1/users/me/messages/missing01?format=full",
389
- "body": null
390
- }
391
- ],
392
- "expected": {
393
- "error": {
394
- "code": "INTEGRATION_API_ERROR",
395
- "outcome": "failed",
396
- "retryable": false
397
- }
398
- }
399
- },
400
- {
401
- "name": "429 mutation is not retried",
402
- "operation": "send_message",
403
- "input": {
404
- "raw": "RnJvbTogbWVAZXhhbXBsZS5jb20NCg0KSGk"
405
- },
406
- "responses": [
407
- {
408
- "status": 429,
409
- "headers": {
410
- "retry-after": "1"
411
- },
412
- "json": {}
413
- }
414
- ],
415
- "expected_requests": [
416
- {
417
- "method": "POST",
418
- "path_and_query": "/gmail/v1/users/me/messages/send",
419
- "body": "{\"raw\":\"RnJvbTogbWVAZXhhbXBsZS5jb20NCg0KSGk\"}"
420
- }
421
- ],
422
- "expected": {
423
- "error": {
424
- "code": "INTEGRATION_RATE_LIMITED",
425
- "outcome": "failed",
426
- "retryable": true
427
- }
428
- }
429
- },
430
- {
431
- "name": "malformed JSON read is certified read failure",
432
- "operation": "list_messages",
433
- "input": {},
434
- "responses": [
435
- {
436
- "status": 200,
437
- "headers": {},
438
- "body": "{not json"
439
- }
440
- ],
441
- "expected_requests": [
442
- {
443
- "method": "GET",
444
- "path_and_query": "/gmail/v1/users/me/messages?maxResults=10",
445
- "body": null
446
- }
447
- ],
448
- "expected": {
449
- "error": {
450
- "code": "INTEGRATION_API_ERROR",
451
- "outcome": "failed",
452
- "retryable": true
453
- }
454
- }
455
- },
456
- {
457
- "name": "malformed JSON after POST is unknown",
458
- "operation": "send_message",
459
- "input": {
460
- "raw": "RnJvbTogbWVAZXhhbXBsZS5jb20NCg0KSGk"
461
- },
462
- "responses": [
463
- {
464
- "status": 200,
465
- "headers": {},
466
- "body": "{not json"
467
- }
468
- ],
469
- "expected_requests": [
470
- {
471
- "method": "POST",
472
- "path_and_query": "/gmail/v1/users/me/messages/send",
473
- "body": "{\"raw\":\"RnJvbTogbWVAZXhhbXBsZS5jb20NCg0KSGk\"}"
474
- }
475
- ],
476
- "expected": {
477
- "exception": "unknown"
478
- }
479
- },
480
- {
481
- "name": "5xx read is transient",
482
- "operation": "list_messages",
483
- "input": {},
484
- "responses": [
485
- {
486
- "status": 503,
487
- "headers": {},
488
- "json": {}
489
- }
490
- ],
491
- "expected_requests": [
492
- {
493
- "method": "GET",
494
- "path_and_query": "/gmail/v1/users/me/messages?maxResults=10",
495
- "body": null
496
- }
497
- ],
498
- "expected": {
499
- "error": {
500
- "code": "INTEGRATION_API_ERROR",
501
- "outcome": "failed",
502
- "retryable": true
503
- }
504
- }
505
- },
506
- {
507
- "name": "5xx mutation is unknown",
508
- "operation": "send_message",
509
- "input": {
510
- "raw": "RnJvbTogbWVAZXhhbXBsZS5jb20NCg0KSGk"
511
- },
512
- "responses": [
513
- {
514
- "status": 500,
515
- "headers": {},
516
- "json": {}
517
- }
518
- ],
519
- "expected_requests": [
520
- {
521
- "method": "POST",
522
- "path_and_query": "/gmail/v1/users/me/messages/send",
523
- "body": "{\"raw\":\"RnJvbTogbWVAZXhhbXBsZS5jb20NCg0KSGk\"}"
524
- }
525
- ],
526
- "expected": {
527
- "exception": "unknown"
528
- }
529
- },
530
- {
531
- "name": "connection loss after write dispatch is unknown",
532
- "operation": "send_message",
533
- "input": {
534
- "raw": "RnJvbTogbWVAZXhhbXBsZS5jb20NCg0KSGk"
535
- },
536
- "responses": [
537
- {
538
- "transport_error": "connection"
539
- }
540
- ],
541
- "expected_requests": [
542
- {
543
- "method": "POST",
544
- "path_and_query": "/gmail/v1/users/me/messages/send",
545
- "body": "{\"raw\":\"RnJvbTogbWVAZXhhbXBsZS5jb20NCg0KSGk\"}"
546
- }
547
- ],
548
- "expected": {
549
- "exception": "unknown"
550
- }
551
- },
552
- {
553
- "name": "malformed base64 body is transient read",
554
- "operation": "get_message",
555
- "input": {
556
- "messageId": "bad64"
557
- },
558
- "responses": [
559
- {
560
- "status": 200,
561
- "headers": {},
562
- "json": {
563
- "id": "bad64",
564
- "threadId": "bad64",
565
- "payload": {
566
- "mimeType": "text/plain",
567
- "body": {
568
- "data": "@@@not-base64@@@"
569
- }
570
- }
571
- }
572
- }
573
- ],
574
- "expected_requests": [
575
- {
576
- "method": "GET",
577
- "path_and_query": "/gmail/v1/users/me/messages/bad64?format=full",
578
- "body": null
579
- }
580
- ],
581
- "expected": {
582
- "error": {
583
- "code": "INTEGRATION_API_ERROR",
584
- "outcome": "failed",
585
- "retryable": true
586
- }
587
- }
588
- },
589
- {
590
- "name": "mime depth bomb is transient read",
591
- "operation": "get_message",
592
- "input": {
593
- "messageId": "deepbomb"
594
- },
595
- "responses": [
596
- {
597
- "status": 200,
598
- "headers": {},
599
- "json": {
600
- "id": "deepbomb",
601
- "threadId": "deepbomb",
602
- "payload": {
603
- "mimeType": "multipart/mixed",
604
- "parts": [
605
- {
606
- "mimeType": "multipart/mixed",
607
- "parts": [
608
- {
609
- "mimeType": "multipart/mixed",
610
- "parts": [
611
- {
612
- "mimeType": "multipart/mixed",
613
- "parts": [
614
- {
615
- "mimeType": "multipart/mixed",
616
- "parts": [
617
- {
618
- "mimeType": "multipart/mixed",
619
- "parts": [
620
- {
621
- "mimeType": "multipart/mixed",
622
- "parts": [
623
- {
624
- "mimeType": "multipart/mixed",
625
- "parts": [
626
- {
627
- "mimeType": "multipart/mixed",
628
- "parts": [
629
- {
630
- "mimeType": "multipart/mixed",
631
- "parts": [
632
- {
633
- "mimeType": "multipart/mixed",
634
- "parts": [
635
- {
636
- "mimeType": "multipart/mixed",
637
- "parts": [
638
- {
639
- "mimeType": "text/plain",
640
- "body": {
641
- "data": "ZGVlcA"
642
- }
643
- }
644
- ]
645
- }
646
- ]
647
- }
648
- ]
649
- }
650
- ]
651
- }
652
- ]
653
- }
654
- ]
655
- }
656
- ]
657
- }
658
- ]
659
- }
660
- ]
661
- }
662
- ]
663
- }
664
- ]
665
- }
666
- ]
667
- }
668
- }
669
- }
670
- ],
671
- "expected_requests": [
672
- {
673
- "method": "GET",
674
- "path_and_query": "/gmail/v1/users/me/messages/deepbomb?format=full",
675
- "body": null
676
- }
677
- ],
678
- "expected": {
679
- "error": {
680
- "code": "INTEGRATION_API_ERROR",
681
- "outcome": "failed",
682
- "retryable": true
683
- }
684
- }
685
- },
686
- {
687
- "name": "non-object list is transient read",
688
- "operation": "list_messages",
689
- "input": {},
690
- "responses": [
691
- {
692
- "status": 200,
693
- "headers": {},
694
- "json": [
695
- 1,
696
- 2,
697
- 3
698
- ]
699
- }
700
- ],
701
- "expected_requests": [
702
- {
703
- "method": "GET",
704
- "path_and_query": "/gmail/v1/users/me/messages?maxResults=10",
705
- "body": null
706
- }
707
- ],
708
- "expected": {
709
- "error": {
710
- "code": "INTEGRATION_API_ERROR",
711
- "outcome": "failed",
712
- "retryable": true
713
- }
714
- }
715
- },
716
- {
717
- "name": "bad provider message id is transient read",
718
- "operation": "list_messages",
719
- "input": {},
720
- "responses": [
721
- {
722
- "status": 200,
723
- "headers": {},
724
- "json": {
725
- "messages": [
726
- {
727
- "id": "not/valid",
728
- "threadId": "t"
729
- }
730
- ]
731
- }
732
- }
733
- ],
734
- "expected_requests": [
735
- {
736
- "method": "GET",
737
- "path_and_query": "/gmail/v1/users/me/messages?maxResults=10",
738
- "body": null
739
- }
740
- ],
741
- "expected": {
742
- "error": {
743
- "code": "INTEGRATION_API_ERROR",
744
- "outcome": "failed",
745
- "retryable": true
746
- }
747
- }
748
- }
749
- ]
750
- }