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

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 (135) hide show
  1. package/README.md +1 -1
  2. package/dist/attempt-diagnostics.d.ts +8 -0
  3. package/dist/attempt-diagnostics.js +68 -0
  4. package/dist/authority.d.ts +4 -1
  5. package/dist/authority.js +1 -0
  6. package/dist/billing.d.ts +11 -10
  7. package/dist/billing.js +7 -4
  8. package/dist/data-export.d.ts +2 -0
  9. package/dist/delivery.d.ts +43 -40
  10. package/dist/delivery.js +14 -37
  11. package/dist/effective-limits.d.ts +4 -4
  12. package/dist/endpoints.d.ts +173 -5
  13. package/dist/endpoints.js +72 -1
  14. package/dist/first-value-journey.js +4 -4
  15. package/dist/http-request.d.ts +193 -0
  16. package/dist/http-request.js +305 -0
  17. package/dist/identity.d.ts +7 -7
  18. package/dist/index.d.ts +6 -3
  19. package/dist/index.js +5 -2
  20. package/dist/mcp.d.ts +2 -1
  21. package/dist/members.d.ts +141 -0
  22. package/dist/members.js +223 -0
  23. package/dist/oauth.d.ts +7 -0
  24. package/dist/operation-definitions.d.ts +20 -4
  25. package/dist/operation-definitions.js +9 -1
  26. package/dist/operations.d.ts +999 -135
  27. package/dist/operations.js +83 -10
  28. package/dist/organization-lifecycle.d.ts +10 -0
  29. package/dist/policy.js +5 -2
  30. package/dist/scheduling-records.d.ts +332 -8
  31. package/dist/scheduling-records.js +5 -0
  32. package/dist/scheduling.d.ts +485 -18
  33. package/dist/scheduling.js +77 -5
  34. package/dist/secrets.d.ts +7 -0
  35. package/dist/signatures.d.ts +1 -1
  36. package/dist/tenancy.d.ts +1 -1
  37. package/dist/tenancy.js +1 -1
  38. package/dist/test-sink.d.ts +27 -41
  39. package/dist/test-sink.js +12 -31
  40. package/dist/zod-values.d.ts +2 -2
  41. package/dist/zod-values.js +1 -1
  42. package/generated/v1/callback-receiver.json +4 -4
  43. package/generated/v1/examples/endpoints.ensure.request.json +3 -0
  44. package/generated/v1/examples/endpoints.ensure.response.json +20 -0
  45. package/generated/v1/examples/invitations.create.request.json +5 -0
  46. package/generated/v1/examples/invitations.create.response.json +7 -0
  47. package/generated/v1/examples/invitations.list.response.json +11 -0
  48. package/generated/v1/examples/invitations.resend.request.json +1 -0
  49. package/generated/v1/examples/invitations.resend.response.json +4 -0
  50. package/generated/v1/examples/invitations.revoke.request.json +3 -0
  51. package/generated/v1/examples/invitations.revoke.response.json +4 -0
  52. package/generated/v1/examples/members.list.response.json +13 -0
  53. package/generated/v1/examples/members.remove.request.json +3 -0
  54. package/generated/v1/examples/members.remove.response.json +4 -0
  55. package/generated/v1/examples/members.role.request.json +3 -0
  56. package/generated/v1/examples/members.role.response.json +4 -0
  57. package/generated/v1/examples/projectmembers.add.request.json +1 -0
  58. package/generated/v1/examples/projectmembers.add.response.json +4 -0
  59. package/generated/v1/examples/projectmembers.remove.request.json +3 -0
  60. package/generated/v1/examples/projectmembers.remove.response.json +4 -0
  61. package/generated/v1/first-value-journey.json +4 -4
  62. package/generated/v1/manifest.json +284 -0
  63. package/generated/v1/openapi.json +9387 -1021
  64. package/generated/v1/policy-matrix.json +72 -0
  65. package/generated/v1/schemas/attempts.list.response.json +105 -0
  66. package/generated/v1/schemas/attempts.read.response.json +105 -0
  67. package/generated/v1/schemas/billing.notices.response.json +16 -6
  68. package/generated/v1/schemas/context.read.response.json +1 -0
  69. package/generated/v1/schemas/credentials.connection.response.json +1 -0
  70. package/generated/v1/schemas/credentials.create.request.json +1 -0
  71. package/generated/v1/schemas/credentials.create.response.json +1 -0
  72. package/generated/v1/schemas/credentials.list.response.json +1 -0
  73. package/generated/v1/schemas/credentials.revoke.response.json +1 -0
  74. package/generated/v1/schemas/credentials.rotate.response.json +2 -0
  75. package/generated/v1/schemas/endpoints.acknowledgeSigningKeyRotation.response.json +59 -0
  76. package/generated/v1/schemas/endpoints.create.request.json +74 -0
  77. package/generated/v1/schemas/endpoints.create.response.json +59 -0
  78. package/generated/v1/schemas/endpoints.disable.response.json +59 -0
  79. package/generated/v1/schemas/endpoints.enable.response.json +59 -0
  80. package/generated/v1/schemas/endpoints.ensure.request.json +91 -0
  81. package/generated/v1/schemas/endpoints.ensure.response.json +169 -0
  82. package/generated/v1/schemas/endpoints.list.response.json +59 -0
  83. package/generated/v1/schemas/endpoints.read.response.json +59 -0
  84. package/generated/v1/schemas/endpoints.rotateSigningKey.response.json +59 -0
  85. package/generated/v1/schemas/endpoints.update.request.json +74 -0
  86. package/generated/v1/schemas/endpoints.update.response.json +59 -0
  87. package/generated/v1/schemas/grants.list.response.json +1 -0
  88. package/generated/v1/schemas/grants.revoke.response.json +1 -0
  89. package/generated/v1/schemas/invitations.create.request-headers.json +13 -0
  90. package/generated/v1/schemas/invitations.create.request.json +24 -0
  91. package/generated/v1/schemas/invitations.create.response.json +31 -0
  92. package/generated/v1/schemas/invitations.list.response.json +40 -0
  93. package/generated/v1/schemas/invitations.resend.request-headers.json +13 -0
  94. package/generated/v1/schemas/invitations.resend.request.json +6 -0
  95. package/generated/v1/schemas/invitations.resend.response.json +27 -0
  96. package/generated/v1/schemas/invitations.revoke.request-headers.json +13 -0
  97. package/generated/v1/schemas/invitations.revoke.request.json +12 -0
  98. package/generated/v1/schemas/invitations.revoke.response.json +27 -0
  99. package/generated/v1/schemas/members.list.response.json +53 -0
  100. package/generated/v1/schemas/members.remove.request-headers.json +13 -0
  101. package/generated/v1/schemas/members.remove.request.json +12 -0
  102. package/generated/v1/schemas/members.remove.response.json +27 -0
  103. package/generated/v1/schemas/members.role.request-headers.json +13 -0
  104. package/generated/v1/schemas/members.role.request.json +12 -0
  105. package/generated/v1/schemas/members.role.response.json +27 -0
  106. package/generated/v1/schemas/occurrences.redeliver.response.json +105 -0
  107. package/generated/v1/schemas/projectmembers.add.request-headers.json +13 -0
  108. package/generated/v1/schemas/projectmembers.add.request.json +6 -0
  109. package/generated/v1/schemas/projectmembers.add.response.json +27 -0
  110. package/generated/v1/schemas/projectmembers.remove.request-headers.json +13 -0
  111. package/generated/v1/schemas/projectmembers.remove.request.json +12 -0
  112. package/generated/v1/schemas/projectmembers.remove.response.json +27 -0
  113. package/generated/v1/schemas/schedules.archive.response.json +188 -1
  114. package/generated/v1/schemas/schedules.cancel.response.json +188 -1
  115. package/generated/v1/schemas/schedules.create.request.json +164 -1
  116. package/generated/v1/schemas/schedules.create.response.json +206 -1
  117. package/generated/v1/schemas/schedules.list.response.json +188 -1
  118. package/generated/v1/schemas/schedules.pause.response.json +188 -1
  119. package/generated/v1/schemas/schedules.read.response.json +188 -1
  120. package/generated/v1/schemas/schedules.replace.request.json +164 -1
  121. package/generated/v1/schemas/schedules.replace.response.json +206 -1
  122. package/generated/v1/schemas/schedules.resume.response.json +188 -1
  123. package/generated/v1/snippets/endpoints.create.json +1 -1
  124. package/generated/v1/snippets/endpoints.ensure.json +6 -0
  125. package/generated/v1/snippets/invitations.create.json +6 -0
  126. package/generated/v1/snippets/invitations.list.json +6 -0
  127. package/generated/v1/snippets/invitations.resend.json +6 -0
  128. package/generated/v1/snippets/invitations.revoke.json +6 -0
  129. package/generated/v1/snippets/journey/create-destination.json +1 -1
  130. package/generated/v1/snippets/members.list.json +6 -0
  131. package/generated/v1/snippets/members.remove.json +6 -0
  132. package/generated/v1/snippets/members.role.json +6 -0
  133. package/generated/v1/snippets/projectmembers.add.json +6 -0
  134. package/generated/v1/snippets/projectmembers.remove.json +6 -0
  135. package/package.json +1 -1
@@ -87,12 +87,168 @@
87
87
  "schedule": {
88
88
  "type": "object",
89
89
  "properties": {
90
+ "autoPauseAfterFailures": {
91
+ "anyOf": [
92
+ {
93
+ "type": "integer",
94
+ "minimum": 1,
95
+ "maximum": 100
96
+ },
97
+ {
98
+ "type": "string",
99
+ "const": "never"
100
+ }
101
+ ],
102
+ "description": "Consecutive failed runs before automatic pause: 1–100 or \"never\". Defaults to 5 on create; omission on replace preserves the setting. One-shot schedules are unaffected."
103
+ },
104
+ "consecutiveFailedRuns": {
105
+ "type": "integer",
106
+ "minimum": 0,
107
+ "maximum": 9007199254740991
108
+ },
109
+ "autoPauseReason": {
110
+ "anyOf": [
111
+ {
112
+ "type": "object",
113
+ "properties": {
114
+ "failedRuns": {
115
+ "type": "integer",
116
+ "exclusiveMinimum": 0,
117
+ "maximum": 9007199254740991
118
+ },
119
+ "status": {
120
+ "type": "integer",
121
+ "minimum": 100,
122
+ "maximum": 599
123
+ },
124
+ "diagnostic": {
125
+ "type": "string",
126
+ "maxLength": 500
127
+ },
128
+ "pausedAt": {
129
+ "type": "string",
130
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
131
+ }
132
+ },
133
+ "required": ["failedRuns", "diagnostic", "pausedAt"]
134
+ },
135
+ {
136
+ "type": "null"
137
+ }
138
+ ]
139
+ },
140
+ "http": {
141
+ "type": "object",
142
+ "properties": {
143
+ "method": {
144
+ "type": "string",
145
+ "enum": ["POST", "PUT", "GET"]
146
+ },
147
+ "body": {
148
+ "oneOf": [
149
+ {
150
+ "type": "object",
151
+ "properties": {
152
+ "mode": {
153
+ "type": "string",
154
+ "const": "envelope"
155
+ }
156
+ },
157
+ "required": ["mode"]
158
+ },
159
+ {
160
+ "type": "object",
161
+ "properties": {
162
+ "mode": {
163
+ "type": "string",
164
+ "const": "none"
165
+ }
166
+ },
167
+ "required": ["mode"]
168
+ },
169
+ {
170
+ "type": "object",
171
+ "properties": {
172
+ "mode": {
173
+ "type": "string",
174
+ "const": "json"
175
+ },
176
+ "value": {
177
+ "$ref": "#/$defs/__schema0"
178
+ }
179
+ },
180
+ "required": ["mode"]
181
+ }
182
+ ]
183
+ },
184
+ "headers": {
185
+ "type": "array",
186
+ "items": {
187
+ "anyOf": [
188
+ {
189
+ "type": "object",
190
+ "properties": {
191
+ "name": {
192
+ "type": "string",
193
+ "minLength": 1
194
+ },
195
+ "secret": {
196
+ "type": "boolean",
197
+ "const": false
198
+ },
199
+ "value": {
200
+ "type": "string"
201
+ }
202
+ },
203
+ "required": ["name", "secret", "value"]
204
+ },
205
+ {
206
+ "type": "object",
207
+ "properties": {
208
+ "name": {
209
+ "type": "string",
210
+ "minLength": 1
211
+ },
212
+ "secret": {
213
+ "type": "boolean",
214
+ "const": true
215
+ },
216
+ "configured": {
217
+ "type": "boolean",
218
+ "const": true
219
+ },
220
+ "value": {
221
+ "not": {}
222
+ }
223
+ },
224
+ "required": ["name", "secret", "configured"]
225
+ },
226
+ {
227
+ "type": "object",
228
+ "properties": {
229
+ "name": {
230
+ "type": "string",
231
+ "minLength": 1
232
+ },
233
+ "suppressed": {
234
+ "type": "boolean",
235
+ "const": true
236
+ }
237
+ },
238
+ "required": ["name", "suppressed"]
239
+ }
240
+ ]
241
+ }
242
+ }
243
+ },
244
+ "required": ["method", "body", "headers"]
245
+ },
90
246
  "archivedAt": {
91
247
  "type": "string",
92
248
  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
93
249
  },
94
250
  "data": {
95
- "$ref": "#/$defs/__schema0"
251
+ "$ref": "#/$defs/__schema1"
96
252
  },
97
253
  "createdAt": {
98
254
  "type": "string",
@@ -272,6 +428,37 @@
272
428
  }
273
429
  }
274
430
  ]
431
+ },
432
+ "__schema1": {
433
+ "anyOf": [
434
+ {
435
+ "type": "string"
436
+ },
437
+ {
438
+ "type": "number"
439
+ },
440
+ {
441
+ "type": "boolean"
442
+ },
443
+ {
444
+ "type": "null"
445
+ },
446
+ {
447
+ "type": "array",
448
+ "items": {
449
+ "$ref": "#/$defs/__schema1"
450
+ }
451
+ },
452
+ {
453
+ "type": "object",
454
+ "propertyNames": {
455
+ "type": "string"
456
+ },
457
+ "additionalProperties": {
458
+ "$ref": "#/$defs/__schema1"
459
+ }
460
+ }
461
+ ]
275
462
  }
276
463
  }
277
464
  }
@@ -2,5 +2,5 @@
2
2
  "curl": "curl -sS -X POST \"$GREATWAIT_API_URL/v1/endpoints\" \\\n --variable %GREATWAIT_API_KEY \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_API_KEY}}\" \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\"url\":\"https://hooks.example.com/greatwait\"}'",
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 body = {\n \"url\": \"https://hooks.example.com/greatwait\"\n};\n\nconst result = await greatwait.request(\"endpoints_create\", body);",
5
- "mcp": "// endpoints.create is not on the MCP surface.\n// Creation returns a one-time endpoint signing secret, and MCP has no negotiated secure-result channel that can keep it out of ordinary tool history."
5
+ "mcp": "// endpoints.create is not on the MCP surface.\n// Creation returns a one-time endpoint signing secret, and MCP has no negotiated secure-result channel that can keep it out of ordinary tool history. Agents use endpoints_ensure, or schedules_create with a `url`, which create an endpoint without returning its secret."
6
6
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X POST \"$GREATWAIT_API_URL/v1/endpoints/ensure\" \\\n --variable %GREATWAIT_API_KEY \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_API_KEY}}\" \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\"url\":\"https://hooks.example.com/greatwait\"}'",
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 body = {\n \"url\": \"https://hooks.example.com/greatwait\"\n};\n\nconst result = await greatwait.request(\"endpoints_ensure\", body);",
5
+ "mcp": "// Any MCP client, against $GREATWAIT_API_URL/mcp.\n{\n \"arguments\": {\n \"url\": \"https://hooks.example.com/greatwait\"\n },\n \"name\": \"endpoints_ensure\"\n}"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X POST \"$GREATWAIT_API_URL/v1/organization/invitations\" \\\n --variable %GREATWAIT_SESSION_TOKEN \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_SESSION_TOKEN}}\" \\\n -H 'Content-Type: application/json' \\\n -H 'Idempotency-Key: $GREATWAIT_IDEMPOTENCY_KEY' \\\n --data-binary '{\"email\":\"teammate@example.com\",\"role\":\"member\",\"projects\":[\"proj_01h8xyz9k2m4n6p8r0t2v4w6y8\"]}'",
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_SESSION_TOKEN,\n fetch,\n});\n\nconst body = {\n \"email\": \"teammate@example.com\",\n \"role\": \"member\",\n \"projects\": [\n \"proj_01h8xyz9k2m4n6p8r0t2v4w6y8\"\n ]\n};\n\nconst result = await greatwait.request(\"invitations_create\", 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 \"email\": \"teammate@example.com\",\n \"projects\": [\n \"proj_01h8xyz9k2m4n6p8r0t2v4w6y8\"\n ],\n \"role\": \"member\"\n },\n \"name\": \"invitations_create\"\n}"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X GET \"$GREATWAIT_API_URL/v1/organization/invitations\" \\\n --variable %GREATWAIT_SESSION_TOKEN \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_SESSION_TOKEN}}\"",
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_SESSION_TOKEN,\n fetch,\n});\n\nconst result = await greatwait.request(\"invitations_list\");",
5
+ "mcp": "// Any MCP client, against $GREATWAIT_API_URL/mcp.\n{\n \"arguments\": {},\n \"name\": \"invitations_list\"\n}"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X POST \"$GREATWAIT_API_URL/v1/organization/invitations/$GREATWAIT_INVITATIONID/resend\" \\\n --variable %GREATWAIT_SESSION_TOKEN \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_SESSION_TOKEN}}\" \\\n -H 'Content-Type: application/json' \\\n -H 'Idempotency-Key: $GREATWAIT_IDEMPOTENCY_KEY' \\\n --data-binary '{}'",
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_SESSION_TOKEN,\n fetch,\n});\n\nconst invitationId = process.env.GREATWAIT_INVITATIONID;\n\nconst body = {};\n\nconst result = await greatwait.request(\"invitations_resend\", invitationId, 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 \"invitationId\": \"$INVITATIONID\"\n },\n \"name\": \"invitations_resend\"\n}"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X POST \"$GREATWAIT_API_URL/v1/organization/invitations/$GREATWAIT_INVITATIONID/revoke\" \\\n --variable %GREATWAIT_SESSION_TOKEN \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_SESSION_TOKEN}}\" \\\n -H 'Content-Type: application/json' \\\n -H 'Idempotency-Key: $GREATWAIT_IDEMPOTENCY_KEY' \\\n --data-binary '{\"confirmed\":true}'",
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_SESSION_TOKEN,\n fetch,\n});\n\nconst invitationId = process.env.GREATWAIT_INVITATIONID;\n\nconst body = {\n \"confirmed\": true\n};\n\nconst result = await greatwait.request(\"invitations_revoke\", invitationId, 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 \"confirmed\": true,\n \"invitationId\": \"$INVITATIONID\"\n },\n \"name\": \"invitations_revoke\"\n}"
6
+ }
@@ -2,5 +2,5 @@
2
2
  "curl": "curl -sS -X POST \"$GREATWAIT_API_URL/v1/endpoints\" \\\n --variable %GREATWAIT_API_KEY \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_API_KEY}}\" \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\"url\":\"$GREATWAIT_RECEIVER_URL\"}'",
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 body = {\n \"url\": process.env.GREATWAIT_RECEIVER_URL\n};\n\nconst result = await greatwait.request(\"endpoints_create\", body);",
5
- "mcp": "// endpoints.create is not on the MCP surface.\n// Creation returns a one-time endpoint signing secret, and MCP has no negotiated secure-result channel that can keep it out of ordinary tool history."
5
+ "mcp": "// endpoints.create is not on the MCP surface.\n// Creation returns a one-time endpoint signing secret, and MCP has no negotiated secure-result channel that can keep it out of ordinary tool history. Agents use endpoints_ensure, or schedules_create with a `url`, which create an endpoint without returning its secret."
6
6
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X GET \"$GREATWAIT_API_URL/v1/organization/members\" \\\n --variable %GREATWAIT_SESSION_TOKEN \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_SESSION_TOKEN}}\"",
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_SESSION_TOKEN,\n fetch,\n});\n\nconst result = await greatwait.request(\"members_list\");",
5
+ "mcp": "// Any MCP client, against $GREATWAIT_API_URL/mcp.\n{\n \"arguments\": {},\n \"name\": \"members_list\"\n}"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X POST \"$GREATWAIT_API_URL/v1/organization/members/$GREATWAIT_MEMBERID/remove\" \\\n --variable %GREATWAIT_SESSION_TOKEN \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_SESSION_TOKEN}}\" \\\n -H 'Content-Type: application/json' \\\n -H 'Idempotency-Key: $GREATWAIT_IDEMPOTENCY_KEY' \\\n --data-binary '{\"confirmed\":true}'",
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_SESSION_TOKEN,\n fetch,\n});\n\nconst memberId = process.env.GREATWAIT_MEMBERID;\n\nconst body = {\n \"confirmed\": true\n};\n\nconst result = await greatwait.request(\"members_remove\", memberId, 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 \"confirmed\": true,\n \"memberId\": \"$MEMBERID\"\n },\n \"name\": \"members_remove\"\n}"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X PATCH \"$GREATWAIT_API_URL/v1/organization/members/$GREATWAIT_MEMBERID\" \\\n --variable %GREATWAIT_SESSION_TOKEN \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_SESSION_TOKEN}}\" \\\n -H 'Content-Type: application/json' \\\n -H 'Idempotency-Key: $GREATWAIT_IDEMPOTENCY_KEY' \\\n --data-binary '{\"role\":\"member\"}'",
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_SESSION_TOKEN,\n fetch,\n});\n\nconst memberId = process.env.GREATWAIT_MEMBERID;\n\nconst body = {\n \"role\": \"member\"\n};\n\nconst result = await greatwait.request(\"members_role\", memberId, 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 \"memberId\": \"$MEMBERID\",\n \"role\": \"member\"\n },\n \"name\": \"members_role\"\n}"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X PUT \"$GREATWAIT_API_URL/v1/projects/$GREATWAIT_PROJECTID/members/$GREATWAIT_MEMBERID\" \\\n --variable %GREATWAIT_SESSION_TOKEN \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_SESSION_TOKEN}}\" \\\n -H 'Greatwait-Project: $GREATWAIT_PROJECT' \\\n -H 'Greatwait-Environment: $GREATWAIT_ENVIRONMENT' \\\n -H 'Content-Type: application/json' \\\n -H 'Idempotency-Key: $GREATWAIT_IDEMPOTENCY_KEY' \\\n --data-binary '{}'",
3
+ "environments": ["test", "live"],
4
+ "javascript": "import { createGreatwaitClient } from \"@greatwait/api-client\";\n\nconst named = (input, init = {}) =>\n fetch(input, {\n ...init,\n headers: {\n ...init.headers,\n \"Greatwait-Project\": process.env.GREATWAIT_PROJECT,\n \"Greatwait-Environment\": process.env.GREATWAIT_ENVIRONMENT,\n },\n });\n\nconst greatwait = createGreatwaitClient({\n baseUrl: process.env.GREATWAIT_API_URL,\n credential: process.env.GREATWAIT_SESSION_TOKEN,\n fetch: named,\n});\n\nconst projectId = process.env.GREATWAIT_PROJECTID;\nconst memberId = process.env.GREATWAIT_MEMBERID;\n\nconst body = {};\n\nconst result = await greatwait.request(\"projectmembers_add\", projectId, memberId, 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 \"memberId\": \"$MEMBERID\",\n \"projectId\": \"$PROJECTID\"\n },\n \"name\": \"projectmembers_add\"\n}"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "curl": "curl -sS -X POST \"$GREATWAIT_API_URL/v1/projects/$GREATWAIT_PROJECTID/members/$GREATWAIT_MEMBERID/remove\" \\\n --variable %GREATWAIT_SESSION_TOKEN \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_SESSION_TOKEN}}\" \\\n -H 'Greatwait-Project: $GREATWAIT_PROJECT' \\\n -H 'Greatwait-Environment: $GREATWAIT_ENVIRONMENT' \\\n -H 'Content-Type: application/json' \\\n -H 'Idempotency-Key: $GREATWAIT_IDEMPOTENCY_KEY' \\\n --data-binary '{\"confirmed\":true}'",
3
+ "environments": ["test", "live"],
4
+ "javascript": "import { createGreatwaitClient } from \"@greatwait/api-client\";\n\nconst named = (input, init = {}) =>\n fetch(input, {\n ...init,\n headers: {\n ...init.headers,\n \"Greatwait-Project\": process.env.GREATWAIT_PROJECT,\n \"Greatwait-Environment\": process.env.GREATWAIT_ENVIRONMENT,\n },\n });\n\nconst greatwait = createGreatwaitClient({\n baseUrl: process.env.GREATWAIT_API_URL,\n credential: process.env.GREATWAIT_SESSION_TOKEN,\n fetch: named,\n});\n\nconst projectId = process.env.GREATWAIT_PROJECTID;\nconst memberId = process.env.GREATWAIT_MEMBERID;\n\nconst body = {\n \"confirmed\": true\n};\n\nconst result = await greatwait.request(\"projectmembers_remove\", projectId, memberId, 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 \"confirmed\": true,\n \"memberId\": \"$MEMBERID\",\n \"projectId\": \"$PROJECTID\"\n },\n \"name\": \"projectmembers_remove\"\n}"
6
+ }
package/package.json CHANGED
@@ -154,5 +154,5 @@
154
154
  },
155
155
  "sideEffects": false,
156
156
  "type": "module",
157
- "version": "0.1.0-alpha.5"
157
+ "version": "0.1.0-alpha.7"
158
158
  }