@greatwait/contracts 0.1.0-alpha.4 → 0.1.0-alpha.5

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 (84) hide show
  1. package/README.md +1 -1
  2. package/dist/billing.d.ts +231 -1
  3. package/dist/billing.js +150 -1
  4. package/dist/callback-safety.js +13 -3
  5. package/dist/configuration-bounds.d.ts +13 -0
  6. package/dist/configuration-bounds.js +13 -0
  7. package/dist/effective-limits.d.ts +40 -0
  8. package/dist/effective-limits.js +42 -0
  9. package/dist/endpoints.d.ts +5 -5
  10. package/dist/endpoints.js +5 -5
  11. package/dist/first-value-journey.d.ts +1 -1
  12. package/dist/first-value-journey.js +11 -7
  13. package/dist/forecast.d.ts +111 -21
  14. package/dist/forecast.js +87 -24
  15. package/dist/index.d.ts +5 -4
  16. package/dist/index.js +5 -4
  17. package/dist/mcp.js +1 -1
  18. package/dist/operational-config.d.ts +101 -0
  19. package/dist/operational-config.js +341 -0
  20. package/dist/operations.d.ts +597 -16
  21. package/dist/operations.js +384 -23
  22. package/dist/partition.d.ts +17 -9
  23. package/dist/partition.js +3 -3
  24. package/dist/problems.d.ts +25 -2
  25. package/dist/problems.js +49 -1
  26. package/dist/protocol.d.ts +5 -5
  27. package/dist/protocol.js +2 -1
  28. package/dist/scheduling-records.d.ts +6 -0
  29. package/dist/scheduling.d.ts +37 -1
  30. package/dist/scheduling.js +60 -4
  31. package/dist/usage.js +6 -21
  32. package/generated/v1/examples/attempts.list.response.json +2 -0
  33. package/generated/v1/examples/attempts.read.response.json +2 -0
  34. package/generated/v1/examples/billing.fundingconfirm.response.json +120 -0
  35. package/generated/v1/examples/billing.invoicehistory.response.json +6 -0
  36. package/generated/v1/examples/billing.invoices.response.json +15 -0
  37. package/generated/v1/examples/billing.paymenthistory.response.json +6 -0
  38. package/generated/v1/examples/billing.paymentmethod.response.json +16 -0
  39. package/generated/v1/examples/billing.paymentmethodconfirm.request.json +3 -0
  40. package/generated/v1/examples/billing.paymentmethodconfirm.response.json +16 -0
  41. package/generated/v1/examples/billing.paymentmethodremove.request.json +3 -0
  42. package/generated/v1/examples/billing.paymentmethodremove.response.json +4 -0
  43. package/generated/v1/examples/billing.paymentmethodsetup.request.json +1 -0
  44. package/generated/v1/examples/billing.paymentmethodsetup.response.json +3 -0
  45. package/generated/v1/examples/limits.read.response.json +16 -0
  46. package/generated/v1/examples/occurrences.redeliver.response.json +2 -0
  47. package/generated/v1/first-value-journey.json +24 -8
  48. package/generated/v1/manifest.json +342 -10
  49. package/generated/v1/openapi.json +12395 -6543
  50. package/generated/v1/policy-matrix.json +65 -2
  51. package/generated/v1/schemas/attempts.list.response.json +15 -0
  52. package/generated/v1/schemas/attempts.read.response.json +15 -0
  53. package/generated/v1/schemas/billing.fundingconfirm.response.json +552 -0
  54. package/generated/v1/schemas/billing.invoicehistory.query.json +16 -0
  55. package/generated/v1/schemas/billing.invoicehistory.response.json +88 -0
  56. package/generated/v1/schemas/billing.invoices.response.json +51 -0
  57. package/generated/v1/schemas/billing.ledger.response.json +5 -0
  58. package/generated/v1/schemas/billing.notificationsettingsupdate.request.json +24 -17
  59. package/generated/v1/schemas/billing.paymenthistory.query.json +16 -0
  60. package/generated/v1/schemas/billing.paymenthistory.response.json +182 -0
  61. package/generated/v1/schemas/billing.paymentmethod.response.json +137 -0
  62. package/generated/v1/schemas/billing.paymentmethodconfirm.request.json +14 -0
  63. package/generated/v1/schemas/billing.paymentmethodconfirm.response.json +137 -0
  64. package/generated/v1/schemas/billing.paymentmethodremove.request.json +12 -0
  65. package/generated/v1/schemas/billing.paymentmethodremove.response.json +137 -0
  66. package/generated/v1/schemas/billing.paymentmethodsetup.request.json +12 -0
  67. package/generated/v1/schemas/billing.paymentmethodsetup.response.json +11 -0
  68. package/generated/v1/schemas/billing.purchase.request.json +4 -0
  69. package/generated/v1/schemas/forecast.read.request-headers.json +10 -0
  70. package/generated/v1/schemas/forecast.read.response.json +148 -0
  71. package/generated/v1/schemas/limits.read.response.json +79 -0
  72. package/generated/v1/schemas/occurrences.redeliver.response.json +15 -0
  73. package/generated/v1/snippets/billing.fundingconfirm.json +6 -0
  74. package/generated/v1/snippets/billing.invoicehistory.json +6 -0
  75. package/generated/v1/snippets/billing.invoices.json +6 -0
  76. package/generated/v1/snippets/billing.notificationsettingsupdate.json +1 -1
  77. package/generated/v1/snippets/billing.paymenthistory.json +6 -0
  78. package/generated/v1/snippets/billing.paymentmethod.json +6 -0
  79. package/generated/v1/snippets/billing.paymentmethodconfirm.json +6 -0
  80. package/generated/v1/snippets/billing.paymentmethodremove.json +6 -0
  81. package/generated/v1/snippets/billing.paymentmethodsetup.json +6 -0
  82. package/generated/v1/snippets/forecast.windows.json +1 -1
  83. package/generated/v1/snippets/limits.read.json +6 -0
  84. package/package.json +7 -2
@@ -0,0 +1,137 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "card": {
6
+ "anyOf": [
7
+ {
8
+ "type": "object",
9
+ "properties": {
10
+ "brand": {
11
+ "type": "string",
12
+ "minLength": 1,
13
+ "maxLength": 32
14
+ },
15
+ "last4": {
16
+ "type": "string",
17
+ "pattern": "^\\d{4}$"
18
+ },
19
+ "expMonth": {
20
+ "type": "integer",
21
+ "minimum": 1,
22
+ "maximum": 12
23
+ },
24
+ "expYear": {
25
+ "type": "integer",
26
+ "minimum": 2000,
27
+ "maximum": 2200
28
+ }
29
+ },
30
+ "required": ["brand", "last4", "expMonth", "expYear"]
31
+ },
32
+ {
33
+ "type": "null"
34
+ }
35
+ ]
36
+ },
37
+ "method": {
38
+ "anyOf": [
39
+ {
40
+ "oneOf": [
41
+ {
42
+ "type": "object",
43
+ "properties": {
44
+ "brand": {
45
+ "type": "string",
46
+ "minLength": 1,
47
+ "maxLength": 32
48
+ },
49
+ "last4": {
50
+ "type": "string",
51
+ "pattern": "^\\d{4}$"
52
+ },
53
+ "expMonth": {
54
+ "type": "integer",
55
+ "minimum": 1,
56
+ "maximum": 12
57
+ },
58
+ "expYear": {
59
+ "type": "integer",
60
+ "minimum": 2000,
61
+ "maximum": 2200
62
+ },
63
+ "type": {
64
+ "type": "string",
65
+ "const": "card"
66
+ },
67
+ "label": {
68
+ "type": "string",
69
+ "minLength": 1,
70
+ "maxLength": 200
71
+ }
72
+ },
73
+ "required": [
74
+ "brand",
75
+ "last4",
76
+ "expMonth",
77
+ "expYear",
78
+ "type",
79
+ "label"
80
+ ]
81
+ },
82
+ {
83
+ "type": "object",
84
+ "properties": {
85
+ "type": {
86
+ "type": "string",
87
+ "const": "link"
88
+ },
89
+ "label": {
90
+ "type": "string",
91
+ "minLength": 1,
92
+ "maxLength": 200
93
+ },
94
+ "email": {
95
+ "anyOf": [
96
+ {
97
+ "type": "string",
98
+ "minLength": 3,
99
+ "maxLength": 320
100
+ },
101
+ {
102
+ "type": "null"
103
+ }
104
+ ]
105
+ }
106
+ },
107
+ "required": ["type", "label", "email"]
108
+ },
109
+ {
110
+ "type": "object",
111
+ "properties": {
112
+ "type": {
113
+ "type": "string",
114
+ "const": "other"
115
+ },
116
+ "label": {
117
+ "type": "string",
118
+ "minLength": 1,
119
+ "maxLength": 200
120
+ },
121
+ "providerType": {
122
+ "type": "string",
123
+ "pattern": "^[a-z][a-z0-9_]{0,63}$"
124
+ }
125
+ },
126
+ "required": ["type", "label", "providerType"]
127
+ }
128
+ ]
129
+ },
130
+ {
131
+ "type": "null"
132
+ }
133
+ ]
134
+ }
135
+ },
136
+ "required": ["card", "method"]
137
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "returnUrl": {
6
+ "type": "string",
7
+ "maxLength": 2048,
8
+ "format": "uri"
9
+ }
10
+ },
11
+ "additionalProperties": false
12
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "url": {
6
+ "type": "string",
7
+ "format": "uri"
8
+ }
9
+ },
10
+ "required": ["url"]
11
+ }
@@ -2,6 +2,10 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "type": "object",
4
4
  "properties": {
5
+ "automaticTopUp": {
6
+ "type": "boolean",
7
+ "description": "true: the customer also asks to top up automatically when credit runs low. The hosted payment then saves the payment method for later off-session charges (it offers every method the account enables except Klarna, which cannot be charged that way), and once the provider confirms this payment paid, automatic top-up is enabled with the default rule (add USD 10.00 when available credit falls below USD 2.00, at most USD 50.00 of automatic charges a month) using that payment method. A rule that is already ready is left unchanged; an enabled rule waiting for a payment method keeps its own amounts and gains this one. Omitted or false: the purchase does exactly what it always did. An unpaid, expired or cancelled payment enables nothing."
8
+ },
5
9
  "confirmed": {
6
10
  "type": "boolean",
7
11
  "const": true
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "X-Greatwait-Accept-Partial-Forecast": {
6
+ "type": "string",
7
+ "const": "true"
8
+ }
9
+ }
10
+ }
@@ -2,6 +2,154 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "type": "object",
4
4
  "properties": {
5
+ "coverage": {
6
+ "type": "object",
7
+ "properties": {
8
+ "complete": {
9
+ "type": "boolean"
10
+ },
11
+ "countMeaning": {
12
+ "type": "string",
13
+ "enum": ["complete-total", "lower-bound"]
14
+ },
15
+ "projectedWindow": {
16
+ "type": "object",
17
+ "properties": {
18
+ "from": {
19
+ "type": "string",
20
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
21
+ },
22
+ "to": {
23
+ "type": "string",
24
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
25
+ }
26
+ },
27
+ "required": ["from", "to"]
28
+ },
29
+ "completeThrough": {
30
+ "type": "string",
31
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
32
+ },
33
+ "heads": {
34
+ "type": "object",
35
+ "properties": {
36
+ "groupsRead": {
37
+ "type": "integer",
38
+ "minimum": 0,
39
+ "maximum": 9007199254740991
40
+ },
41
+ "occurrencesCounted": {
42
+ "type": "integer",
43
+ "minimum": 0,
44
+ "maximum": 9007199254740991
45
+ },
46
+ "complete": {
47
+ "type": "boolean"
48
+ },
49
+ "selection": {
50
+ "type": "string",
51
+ "const": "earliest bucket, latency class, partition key groups"
52
+ },
53
+ "lastGroup": {
54
+ "type": "object",
55
+ "properties": {
56
+ "start": {
57
+ "type": "string",
58
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
59
+ },
60
+ "latencyClass": {
61
+ "type": "string",
62
+ "enum": ["realtime", "bulk"]
63
+ },
64
+ "partitionKey": {
65
+ "type": "string"
66
+ }
67
+ },
68
+ "required": ["start", "latencyClass", "partitionKey"]
69
+ }
70
+ },
71
+ "required": [
72
+ "groupsRead",
73
+ "occurrencesCounted",
74
+ "complete",
75
+ "selection"
76
+ ]
77
+ },
78
+ "recurring": {
79
+ "type": "object",
80
+ "properties": {
81
+ "schedulesRead": {
82
+ "type": "integer",
83
+ "minimum": 0,
84
+ "maximum": 9007199254740991
85
+ },
86
+ "populationComplete": {
87
+ "type": "boolean"
88
+ },
89
+ "selection": {
90
+ "type": "string",
91
+ "const": "oldest eligible active recurring schedules by createdAt and scheduleId"
92
+ },
93
+ "firstScheduleId": {
94
+ "type": "string"
95
+ },
96
+ "lastScheduleId": {
97
+ "type": "string"
98
+ }
99
+ },
100
+ "required": ["schedulesRead", "populationComplete", "selection"]
101
+ },
102
+ "work": {
103
+ "type": "object",
104
+ "properties": {
105
+ "usedUnits": {
106
+ "type": "integer",
107
+ "minimum": 0,
108
+ "maximum": 9007199254740991
109
+ },
110
+ "limitUnits": {
111
+ "type": "integer",
112
+ "minimum": 0,
113
+ "maximum": 9007199254740991
114
+ }
115
+ },
116
+ "required": ["usedUnits", "limitUnits"]
117
+ },
118
+ "boundsReached": {
119
+ "type": "array",
120
+ "items": {
121
+ "type": "object",
122
+ "properties": {
123
+ "kind": {
124
+ "type": "string",
125
+ "enum": [
126
+ "head-cells",
127
+ "recurring-series",
128
+ "projection-work",
129
+ "projection-cells"
130
+ ]
131
+ },
132
+ "limit": {
133
+ "type": "integer",
134
+ "minimum": 0,
135
+ "maximum": 9007199254740991
136
+ }
137
+ },
138
+ "required": ["kind", "limit"]
139
+ }
140
+ }
141
+ },
142
+ "required": [
143
+ "complete",
144
+ "countMeaning",
145
+ "projectedWindow",
146
+ "completeThrough",
147
+ "heads",
148
+ "recurring",
149
+ "work",
150
+ "boundsReached"
151
+ ]
152
+ },
5
153
  "buckets": {
6
154
  "type": "array",
7
155
  "items": {
@@ -0,0 +1,79 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "limits": {
6
+ "type": "object",
7
+ "properties": {
8
+ "inlinePayloadBytes": {
9
+ "type": "integer",
10
+ "minimum": 0,
11
+ "maximum": 65536
12
+ },
13
+ "partitionKeyCeiling": {
14
+ "type": "integer",
15
+ "minimum": 1,
16
+ "maximum": 10000
17
+ },
18
+ "forecastHorizonSeconds": {
19
+ "type": "integer",
20
+ "minimum": 60,
21
+ "maximum": 90000
22
+ },
23
+ "usageWindowDays": {
24
+ "type": "integer",
25
+ "minimum": 1,
26
+ "maximum": 366
27
+ }
28
+ },
29
+ "required": [
30
+ "inlinePayloadBytes",
31
+ "forecastHorizonSeconds",
32
+ "usageWindowDays"
33
+ ]
34
+ },
35
+ "provenance": {
36
+ "type": "object",
37
+ "properties": {
38
+ "inlinePayloadBytes": {
39
+ "type": "string",
40
+ "enum": ["default", "global", "deployment", "organization"]
41
+ },
42
+ "partitionKeyCeiling": {
43
+ "type": "string",
44
+ "enum": ["default", "global", "deployment", "organization"]
45
+ },
46
+ "forecastHorizonSeconds": {
47
+ "type": "string",
48
+ "enum": ["default", "global", "deployment", "organization"]
49
+ },
50
+ "usageWindowDays": {
51
+ "type": "string",
52
+ "enum": ["default", "global", "deployment", "organization"]
53
+ }
54
+ },
55
+ "required": [
56
+ "inlinePayloadBytes",
57
+ "forecastHorizonSeconds",
58
+ "usageWindowDays"
59
+ ]
60
+ },
61
+ "revision": {
62
+ "type": "object",
63
+ "properties": {
64
+ "global": {
65
+ "type": "integer",
66
+ "minimum": 0,
67
+ "maximum": 9007199254740991
68
+ },
69
+ "organization": {
70
+ "type": "integer",
71
+ "minimum": 0,
72
+ "maximum": 9007199254740991
73
+ }
74
+ },
75
+ "required": ["global", "organization"]
76
+ }
77
+ },
78
+ "required": ["limits", "provenance", "revision"]
79
+ }
@@ -35,6 +35,11 @@
35
35
  "rate_limited"
36
36
  ]
37
37
  },
38
+ "dispatchRecoveries": {
39
+ "type": "integer",
40
+ "minimum": 0,
41
+ "maximum": 9007199254740991
42
+ },
38
43
  "durationMs": {
39
44
  "type": "integer",
40
45
  "minimum": 0,
@@ -67,10 +72,20 @@
67
72
  "type": "string",
68
73
  "pattern": "^att_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
69
74
  },
75
+ "localReceiptRecoveries": {
76
+ "type": "integer",
77
+ "minimum": 0,
78
+ "maximum": 9007199254740991
79
+ },
70
80
  "occurrence": {
71
81
  "type": "string",
72
82
  "pattern": "^occ_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
73
83
  },
84
+ "rescues": {
85
+ "type": "integer",
86
+ "exclusiveMinimum": 0,
87
+ "maximum": 9007199254740991
88
+ },
74
89
  "remediation": {
75
90
  "type": "string",
76
91
  "enum": [
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X POST \"$GREATWAIT_API_URL/v1/billing/funding/$GREATWAIT_PAYMENTOPERATION/confirm\" \\\n --variable %GREATWAIT_API_KEY \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_API_KEY}}\"",
3
+ "environments": ["live"],
4
+ "javascript": "import { createGreatwaitClient } from \"@greatwait/api-client\";\n\nconst greatwait = createGreatwaitClient({\n baseUrl: process.env.GREATWAIT_API_URL,\n credential: process.env.GREATWAIT_API_KEY,\n fetch,\n});\n\nconst paymentOperation = process.env.GREATWAIT_PAYMENTOPERATION;\n\nconst result = await greatwait.request(\"billing_fundingconfirm\", paymentOperation);",
5
+ "mcp": "// Any MCP client, against $GREATWAIT_API_URL/mcp.\n{\n \"arguments\": {\n \"paymentOperation\": \"$PAYMENTOPERATION\"\n },\n \"name\": \"billing_fundingconfirm\"\n}"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X GET \"$GREATWAIT_API_URL/v1/billing/invoice-history\" \\\n --variable %GREATWAIT_API_KEY \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_API_KEY}}\"",
3
+ "environments": ["test", "live"],
4
+ "javascript": "import { createGreatwaitClient } from \"@greatwait/api-client\";\n\nconst greatwait = createGreatwaitClient({\n baseUrl: process.env.GREATWAIT_API_URL,\n credential: process.env.GREATWAIT_API_KEY,\n fetch,\n});\n\nconst result = await greatwait.request(\"billing_invoicehistory\");",
5
+ "mcp": "// Any MCP client, against $GREATWAIT_API_URL/mcp.\n{\n \"arguments\": {},\n \"name\": \"billing_invoicehistory\"\n}"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X GET \"$GREATWAIT_API_URL/v1/billing/invoices\" \\\n --variable %GREATWAIT_API_KEY \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_API_KEY}}\"",
3
+ "environments": ["test", "live"],
4
+ "javascript": "import { createGreatwaitClient } from \"@greatwait/api-client\";\n\nconst greatwait = createGreatwaitClient({\n baseUrl: process.env.GREATWAIT_API_URL,\n credential: process.env.GREATWAIT_API_KEY,\n fetch,\n});\n\nconst result = await greatwait.request(\"billing_invoices\");",
5
+ "mcp": "// Any MCP client, against $GREATWAIT_API_URL/mcp.\n{\n \"arguments\": {},\n \"name\": \"billing_invoices\"\n}"
6
+ }
@@ -2,5 +2,5 @@
2
2
  "curl": "curl -sS -X PATCH \"$GREATWAIT_API_URL/v1/billing/notification-settings\" \\\n --variable %GREATWAIT_API_KEY \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_API_KEY}}\" \\\n -H 'Content-Type: application/json' \\\n -H 'Idempotency-Key: $GREATWAIT_IDEMPOTENCY_KEY' \\\n --data-binary '{\"expectedRevision\":1,\"lowCreditThreshold\":{\"currency\":\"USD\",\"microdollars\":\"2000000\",\"scale\":6},\"noncriticalEmail\":false}'",
3
3
  "environments": ["live"],
4
4
  "javascript": "import { createGreatwaitClient } from \"@greatwait/api-client\";\n\nconst greatwait = createGreatwaitClient({\n baseUrl: process.env.GREATWAIT_API_URL,\n credential: process.env.GREATWAIT_API_KEY,\n fetch,\n});\n\nconst body = {\n \"expectedRevision\": 1,\n \"lowCreditThreshold\": {\n \"currency\": \"USD\",\n \"microdollars\": \"2000000\",\n \"scale\": 6\n },\n \"noncriticalEmail\": false\n};\n\nconst result = await greatwait.request(\"billing_notificationsettingsupdate\", body, { \"Idempotency-Key\": process.env.GREATWAIT_IDEMPOTENCY_KEY });",
5
- "mcp": "// Any MCP client, against $GREATWAIT_API_URL/mcp.\n{\n \"arguments\": {\n \"Idempotency-Key\": \"$IDEMPOTENCY_KEY\",\n \"expectedRevision\": 1,\n \"lowCreditThreshold\": {\n \"currency\": \"USD\",\n \"microdollars\": \"2000000\",\n \"scale\": 6\n },\n \"noncriticalEmail\": false\n },\n \"name\": \"billing_notificationsettingsupdate\"\n}"
5
+ "mcp": "// Any MCP client, against $GREATWAIT_API_URL/mcp.\n{\n \"arguments\": {\n \"Idempotency-Key\": \"$IDEMPOTENCY_KEY\",\n \"expectedRevision\": 1,\n \"noncriticalEmail\": false,\n \"lowCreditThreshold\": {\n \"currency\": \"USD\",\n \"microdollars\": \"2000000\",\n \"scale\": 6\n }\n },\n \"name\": \"billing_notificationsettingsupdate\"\n}"
6
6
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X GET \"$GREATWAIT_API_URL/v1/billing/payment-history\" \\\n --variable %GREATWAIT_API_KEY \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_API_KEY}}\"",
3
+ "environments": ["test", "live"],
4
+ "javascript": "import { createGreatwaitClient } from \"@greatwait/api-client\";\n\nconst greatwait = createGreatwaitClient({\n baseUrl: process.env.GREATWAIT_API_URL,\n credential: process.env.GREATWAIT_API_KEY,\n fetch,\n});\n\nconst result = await greatwait.request(\"billing_paymenthistory\");",
5
+ "mcp": "// Any MCP client, against $GREATWAIT_API_URL/mcp.\n{\n \"arguments\": {},\n \"name\": \"billing_paymenthistory\"\n}"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X GET \"$GREATWAIT_API_URL/v1/billing/payment-method\" \\\n --variable %GREATWAIT_API_KEY \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_API_KEY}}\"",
3
+ "environments": ["test", "live"],
4
+ "javascript": "import { createGreatwaitClient } from \"@greatwait/api-client\";\n\nconst greatwait = createGreatwaitClient({\n baseUrl: process.env.GREATWAIT_API_URL,\n credential: process.env.GREATWAIT_API_KEY,\n fetch,\n});\n\nconst result = await greatwait.request(\"billing_paymentmethod\");",
5
+ "mcp": "// Any MCP client, against $GREATWAIT_API_URL/mcp.\n{\n \"arguments\": {},\n \"name\": \"billing_paymentmethod\"\n}"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X POST \"$GREATWAIT_API_URL/v1/billing/payment-method/confirm\" \\\n --variable %GREATWAIT_API_KEY \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_API_KEY}}\" \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\"checkoutSession\":\"cs_example_card_setup\"}'",
3
+ "environments": ["live"],
4
+ "javascript": "import { createGreatwaitClient } from \"@greatwait/api-client\";\n\nconst greatwait = createGreatwaitClient({\n baseUrl: process.env.GREATWAIT_API_URL,\n credential: process.env.GREATWAIT_API_KEY,\n fetch,\n});\n\nconst body = {\n \"checkoutSession\": \"cs_example_card_setup\"\n};\n\nconst result = await greatwait.request(\"billing_paymentmethodconfirm\", body);",
5
+ "mcp": "// Any MCP client, against $GREATWAIT_API_URL/mcp.\n{\n \"arguments\": {\n \"checkoutSession\": \"cs_example_card_setup\"\n },\n \"name\": \"billing_paymentmethodconfirm\"\n}"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X POST \"$GREATWAIT_API_URL/v1/billing/payment-method/remove\" \\\n --variable %GREATWAIT_API_KEY \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_API_KEY}}\" \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\"confirmed\":true}'",
3
+ "environments": ["live"],
4
+ "javascript": "import { createGreatwaitClient } from \"@greatwait/api-client\";\n\nconst greatwait = createGreatwaitClient({\n baseUrl: process.env.GREATWAIT_API_URL,\n credential: process.env.GREATWAIT_API_KEY,\n fetch,\n});\n\nconst body = {\n \"confirmed\": true\n};\n\nconst result = await greatwait.request(\"billing_paymentmethodremove\", body);",
5
+ "mcp": "// Any MCP client, against $GREATWAIT_API_URL/mcp.\n{\n \"arguments\": {\n \"confirmed\": true\n },\n \"name\": \"billing_paymentmethodremove\"\n}"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X POST \"$GREATWAIT_API_URL/v1/billing/payment-method/setup\" \\\n --variable %GREATWAIT_API_KEY \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_API_KEY}}\" \\\n -H 'Content-Type: application/json' \\\n --data-binary '{}'",
3
+ "environments": ["live"],
4
+ "javascript": "import { createGreatwaitClient } from \"@greatwait/api-client\";\n\nconst greatwait = createGreatwaitClient({\n baseUrl: process.env.GREATWAIT_API_URL,\n credential: process.env.GREATWAIT_API_KEY,\n fetch,\n});\n\nconst body = {};\n\nconst result = await greatwait.request(\"billing_paymentmethodsetup\", body);",
5
+ "mcp": "// Any MCP client, against $GREATWAIT_API_URL/mcp.\n{\n \"arguments\": {},\n \"name\": \"billing_paymentmethodsetup\"\n}"
6
+ }
@@ -2,5 +2,5 @@
2
2
  "curl": "curl -sS -X GET \"$GREATWAIT_API_URL/v1/forecast/windows\" \\\n --variable %GREATWAIT_API_KEY \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_API_KEY}}\"",
3
3
  "environments": ["test", "live"],
4
4
  "javascript": "import { createGreatwaitClient } from \"@greatwait/api-client\";\n\nconst greatwait = createGreatwaitClient({\n baseUrl: process.env.GREATWAIT_API_URL,\n credential: process.env.GREATWAIT_API_KEY,\n fetch,\n});\n\nconst result = await greatwait.request(\"forecast_windows\");",
5
- "mcp": "// forecast.windows is not on the MCP surface.\n// A transitional shape for the autoscaler migration, scheduled for withdrawal once W6-02 has cut over. forecast.read is the same data in the shape this product publishes, and it is the tool an agent should reach for."
5
+ "mcp": "// forecast.windows is not on the MCP surface.\n// A transitional shape for the autoscaler migration, withdrawn after its cutover. forecast.read is the same data in the shape this product publishes, and it is the tool an agent should reach for."
6
6
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X GET \"$GREATWAIT_API_URL/v1/limits\" \\\n --variable %GREATWAIT_API_KEY \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_API_KEY}}\"",
3
+ "environments": ["test", "live"],
4
+ "javascript": "import { createGreatwaitClient } from \"@greatwait/api-client\";\n\nconst greatwait = createGreatwaitClient({\n baseUrl: process.env.GREATWAIT_API_URL,\n credential: process.env.GREATWAIT_API_KEY,\n fetch,\n});\n\nconst result = await greatwait.request(\"limits_read\");",
5
+ "mcp": "// Any MCP client, against $GREATWAIT_API_URL/mcp.\n{\n \"arguments\": {},\n \"name\": \"limits_read\"\n}"
6
+ }
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "dependencies": {
6
6
  "zod": "4.4.3"
7
7
  },
8
- "description": "Public contracts for the Greatwait scheduling API: schemas, problem codes, the operation registry, and the generated OpenAPI documents.",
8
+ "description": "Public contracts for the GreatWait scheduling API: schemas, problem codes, the operation registry, and the generated OpenAPI documents.",
9
9
  "engines": {
10
10
  "node": ">=22.13.0"
11
11
  },
@@ -100,6 +100,11 @@
100
100
  "import": "./dist/time.js",
101
101
  "default": "./dist/time.js"
102
102
  },
103
+ "./operational-config": {
104
+ "types": "./dist/operational-config.d.ts",
105
+ "import": "./dist/operational-config.js",
106
+ "default": "./dist/operational-config.js"
107
+ },
103
108
  "./workspace": {
104
109
  "types": "./dist/workspace.d.ts",
105
110
  "import": "./dist/workspace.js",
@@ -149,5 +154,5 @@
149
154
  },
150
155
  "sideEffects": false,
151
156
  "type": "module",
152
- "version": "0.1.0-alpha.4"
157
+ "version": "0.1.0-alpha.5"
153
158
  }