@firedrill-tools/stripe 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 (59) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +433 -0
  3. package/firedrill/agent.target.json +17 -0
  4. package/firedrill/api-unavailable.scenario.json +11 -0
  5. package/firedrill/baseline.scenario.json +5 -0
  6. package/firedrill/conformance.suite.json +17 -0
  7. package/firedrill/rate-limited.scenario.json +11 -0
  8. package/firedrill/refund-committed-lost.scenario.json +11 -0
  9. package/firedrill/stripe-api-unavailable.drill.json +463 -0
  10. package/firedrill/stripe-denied.drill.json +74 -0
  11. package/firedrill/stripe-large-pages.drill.json +153 -0
  12. package/firedrill/stripe-live-mode.drill.json +136 -0
  13. package/firedrill/stripe-mcp-aliases.drill.json +406 -0
  14. package/firedrill/stripe-no-permissions.drill.json +1143 -0
  15. package/firedrill/stripe-rate-limited.drill.json +616 -0
  16. package/firedrill/stripe-refund-committed-lost.drill.json +139 -0
  17. package/firedrill/stripe-rest-flow.drill.json +1401 -0
  18. package/firedrill/stripe-restricted-key.drill.json +171 -0
  19. package/firedrill/tools/stripe/app/assets/ATTRIBUTION.md +36 -0
  20. package/firedrill/tools/stripe/app/assets/fonts/OFL.txt +93 -0
  21. package/firedrill/tools/stripe/app/assets/stripe-s.svg +1 -0
  22. package/firedrill/tools/stripe/app/assets/stripe.svg +1 -0
  23. package/firedrill/tools/stripe/app/site/app.js +456 -0
  24. package/firedrill/tools/stripe/app/site/assets/fonts/inter-latin.woff2 +0 -0
  25. package/firedrill/tools/stripe/app/site/assets/stripe-s.svg +1 -0
  26. package/firedrill/tools/stripe/app/site/assets/stripe.svg +1 -0
  27. package/firedrill/tools/stripe/app/site/icons.js +90 -0
  28. package/firedrill/tools/stripe/app/site/index.html +137 -0
  29. package/firedrill/tools/stripe/app/site/pages-billing.js +902 -0
  30. package/firedrill/tools/stripe/app/site/pages-catalog.js +314 -0
  31. package/firedrill/tools/stripe/app/site/pages-customers.js +416 -0
  32. package/firedrill/tools/stripe/app/site/pages-home.js +373 -0
  33. package/firedrill/tools/stripe/app/site/pages-payments.js +502 -0
  34. package/firedrill/tools/stripe/app/site/store.js +99 -0
  35. package/firedrill/tools/stripe/app/site/styles.css +2512 -0
  36. package/firedrill/tools/stripe/app/site/ui.js +767 -0
  37. package/firedrill/tools/stripe/app/site/widgets.js +707 -0
  38. package/firedrill/tools/stripe/behavior.mjs +148 -0
  39. package/firedrill/tools/stripe/lib/cards.mjs +53 -0
  40. package/firedrill/tools/stripe/lib/form.mjs +204 -0
  41. package/firedrill/tools/stripe/lib/ids.mjs +85 -0
  42. package/firedrill/tools/stripe/lib/money.mjs +35 -0
  43. package/firedrill/tools/stripe/lib/objects.mjs +229 -0
  44. package/firedrill/tools/stripe/lib/periods.mjs +41 -0
  45. package/firedrill/tools/stripe/lib/size.mjs +55 -0
  46. package/firedrill/tools/stripe/lib/state.mjs +230 -0
  47. package/firedrill/tools/stripe/lib/validate.mjs +184 -0
  48. package/firedrill/tools/stripe/lib/wire.mjs +98 -0
  49. package/firedrill/tools/stripe/ops/billing.mjs +914 -0
  50. package/firedrill/tools/stripe/ops/catalog.mjs +203 -0
  51. package/firedrill/tools/stripe/ops/customers.mjs +241 -0
  52. package/firedrill/tools/stripe/ops/dashboard.mjs +29 -0
  53. package/firedrill/tools/stripe/ops/payments.mjs +608 -0
  54. package/firedrill/tools/stripe/stripe.tool.json +28833 -0
  55. package/firedrill/world.json +8527 -0
  56. package/firedrill.json +5 -0
  57. package/package.json +64 -0
  58. package/starter.json +7999 -0
  59. package/test/conformance.mjs +1133 -0
@@ -0,0 +1,139 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "stripe-refund-committed-lost",
4
+ "title": "Refunds commit but the caller sees 503; a retry with a new Idempotency-Key refunds twice and the last one hits charge_already_refunded",
5
+ "targetId": "conformance-agent",
6
+ "scenarioId": "refund-committed-lost",
7
+ "actorId": "owner",
8
+ "task": {
9
+ "instruction": "Run the refund-committed-lost conformance flow against the synthetic Stripe Tool and fail loudly on any unexpected status, header or body."
10
+ },
11
+ "assertions": [
12
+ {
13
+ "id": "refunds-create-error",
14
+ "kind": "operation.count",
15
+ "operation": {
16
+ "packageId": "stripe",
17
+ "operationId": "refunds.create"
18
+ },
19
+ "outcomes": [
20
+ "tool_error"
21
+ ],
22
+ "comparison": {
23
+ "operator": "equals",
24
+ "value": 5
25
+ }
26
+ },
27
+ {
28
+ "id": "refunds-create-ok",
29
+ "kind": "operation.count",
30
+ "operation": {
31
+ "packageId": "stripe",
32
+ "operationId": "refunds.create"
33
+ },
34
+ "outcomes": [
35
+ "ok"
36
+ ],
37
+ "comparison": {
38
+ "operator": "equals",
39
+ "value": 0
40
+ }
41
+ },
42
+ {
43
+ "id": "customers-create-ok",
44
+ "kind": "operation.count",
45
+ "operation": {
46
+ "packageId": "stripe",
47
+ "operationId": "customers.create"
48
+ },
49
+ "outcomes": [
50
+ "ok"
51
+ ],
52
+ "comparison": {
53
+ "operator": "equals",
54
+ "value": 1
55
+ }
56
+ },
57
+ {
58
+ "id": "refunds-list-ok",
59
+ "kind": "operation.count",
60
+ "operation": {
61
+ "packageId": "stripe",
62
+ "operationId": "refunds.list"
63
+ },
64
+ "outcomes": [
65
+ "ok"
66
+ ],
67
+ "comparison": {
68
+ "operator": "greater_than_or_equal",
69
+ "value": 1
70
+ }
71
+ },
72
+ {
73
+ "id": "charges-retrieve-ok",
74
+ "kind": "operation.count",
75
+ "operation": {
76
+ "packageId": "stripe",
77
+ "operationId": "charges.retrieve"
78
+ },
79
+ "outcomes": [
80
+ "ok"
81
+ ],
82
+ "comparison": {
83
+ "operator": "greater_than_or_equal",
84
+ "value": 1
85
+ }
86
+ },
87
+ {
88
+ "id": "charge-refunded-events",
89
+ "kind": "event.count",
90
+ "event": {
91
+ "packageId": "stripe",
92
+ "eventId": "charge.refunded"
93
+ },
94
+ "phase": "emitted",
95
+ "comparison": {
96
+ "operator": "equals",
97
+ "value": 3
98
+ }
99
+ },
100
+ {
101
+ "id": "refunds-count",
102
+ "kind": "state.count",
103
+ "packageId": "stripe",
104
+ "namespace": "refunds",
105
+ "comparison": {
106
+ "operator": "equals",
107
+ "value": 7
108
+ }
109
+ },
110
+ {
111
+ "id": "charge-fully-refunded",
112
+ "kind": "state.value",
113
+ "packageId": "stripe",
114
+ "namespace": "charges",
115
+ "rowId": "ch_00005Q1YjqV41Z",
116
+ "path": [
117
+ "refunded"
118
+ ],
119
+ "comparison": {
120
+ "operator": "equals",
121
+ "value": true
122
+ }
123
+ },
124
+ {
125
+ "id": "charge-amount-refunded",
126
+ "kind": "state.value",
127
+ "packageId": "stripe",
128
+ "namespace": "charges",
129
+ "rowId": "ch_00005Q1YjqV41Z",
130
+ "path": [
131
+ "amount_refunded"
132
+ ],
133
+ "comparison": {
134
+ "operator": "equals",
135
+ "value": 189000
136
+ }
137
+ }
138
+ ]
139
+ }