@greatwait/contracts 0.1.0-alpha.6 → 0.1.0-alpha.8
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.
- package/README.md +1 -1
- package/dist/attempt-diagnostics.d.ts +8 -0
- package/dist/attempt-diagnostics.js +68 -0
- package/dist/billing.d.ts +12 -10
- package/dist/billing.js +14 -4
- package/dist/delivery.d.ts +17 -40
- package/dist/delivery.js +12 -37
- package/dist/effective-limits.d.ts +4 -4
- package/dist/endpoints.d.ts +6 -6
- package/dist/first-value-journey.js +4 -4
- package/dist/identity.d.ts +3 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/members.d.ts +4 -4
- package/dist/operations.d.ts +338 -103
- package/dist/operations.js +3 -1
- package/dist/policy.d.ts +5 -4
- package/dist/policy.js +5 -4
- package/dist/project-notifications.d.ts +238 -0
- package/dist/project-notifications.js +236 -0
- package/dist/scheduling-records.d.ts +112 -8
- package/dist/scheduling.d.ts +253 -22
- package/dist/scheduling.js +51 -9
- package/dist/signatures.d.ts +1 -1
- package/dist/test-sink.d.ts +27 -41
- package/dist/test-sink.js +12 -31
- package/dist/workspace.d.ts +4 -4
- package/generated/v1/callback-receiver.json +4 -4
- package/generated/v1/examples/projectnotifications.read.response.json +12 -0
- package/generated/v1/examples/projectnotifications.rotateSigningKey.request.json +3 -0
- package/generated/v1/examples/projectnotifications.rotateSigningKey.response.json +25 -0
- package/generated/v1/examples/projectnotifications.update.request.json +10 -0
- package/generated/v1/examples/projectnotifications.update.response.json +12 -0
- package/generated/v1/examples/statusdeliveries.list.response.json +3 -0
- package/generated/v1/first-value-journey.json +4 -4
- package/generated/v1/manifest.json +110 -1
- package/generated/v1/openapi.json +3655 -333
- package/generated/v1/policy-matrix.json +28 -0
- package/generated/v1/schemas/attempts.list.response.json +105 -0
- package/generated/v1/schemas/attempts.read.response.json +105 -0
- package/generated/v1/schemas/billing.notices.response.json +17 -6
- package/generated/v1/schemas/billing.purchase.request.json +4 -0
- package/generated/v1/schemas/occurrences.redeliver.response.json +105 -0
- package/generated/v1/schemas/projectnotifications.read.response.json +101 -0
- package/generated/v1/schemas/projectnotifications.rotateSigningKey.request.json +13 -0
- package/generated/v1/schemas/projectnotifications.rotateSigningKey.response.json +119 -0
- package/generated/v1/schemas/projectnotifications.update.request-headers.json +13 -0
- package/generated/v1/schemas/projectnotifications.update.request.json +90 -0
- package/generated/v1/schemas/projectnotifications.update.response.json +101 -0
- package/generated/v1/schemas/schedules.archive.response.json +50 -0
- package/generated/v1/schemas/schedules.cancel.response.json +50 -0
- package/generated/v1/schemas/schedules.create.request.json +14 -0
- package/generated/v1/schemas/schedules.create.response.json +50 -0
- package/generated/v1/schemas/schedules.list.response.json +50 -0
- package/generated/v1/schemas/schedules.pause.response.json +50 -0
- package/generated/v1/schemas/schedules.read.response.json +50 -0
- package/generated/v1/schemas/schedules.replace.request.json +14 -0
- package/generated/v1/schemas/schedules.replace.response.json +50 -0
- package/generated/v1/schemas/schedules.resume.response.json +50 -0
- package/generated/v1/schemas/statusdeliveries.list.query.json +16 -0
- package/generated/v1/schemas/statusdeliveries.list.response.json +82 -0
- package/generated/v1/snippets/projectnotifications.read.json +6 -0
- package/generated/v1/snippets/projectnotifications.rotateSigningKey.json +6 -0
- package/generated/v1/snippets/projectnotifications.update.json +6 -0
- package/generated/v1/snippets/statusdeliveries.list.json +6 -0
- package/package.json +1 -1
|
@@ -87,6 +87,56 @@
|
|
|
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
|
+
},
|
|
90
140
|
"http": {
|
|
91
141
|
"type": "object",
|
|
92
142
|
"properties": {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"cursor": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"minLength": 1
|
|
8
|
+
},
|
|
9
|
+
"limit": {
|
|
10
|
+
"default": 25,
|
|
11
|
+
"type": "integer",
|
|
12
|
+
"minimum": 1,
|
|
13
|
+
"maximum": 100
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"data": {
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"id": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1,
|
|
13
|
+
"maxLength": 255
|
|
14
|
+
},
|
|
15
|
+
"event": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": ["failed"]
|
|
18
|
+
},
|
|
19
|
+
"schedule": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^sch_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
|
|
22
|
+
},
|
|
23
|
+
"occurrence": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^occ_[0-9abcdefghjkmnpqrstvwxyz]{26}$"
|
|
26
|
+
},
|
|
27
|
+
"occurredAt": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
|
|
30
|
+
},
|
|
31
|
+
"url": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"format": "uri"
|
|
34
|
+
},
|
|
35
|
+
"state": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"enum": [
|
|
38
|
+
"pending",
|
|
39
|
+
"delivering",
|
|
40
|
+
"delivered",
|
|
41
|
+
"failed",
|
|
42
|
+
"suppressed"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"attempts": {
|
|
46
|
+
"type": "integer",
|
|
47
|
+
"minimum": 0,
|
|
48
|
+
"maximum": 9007199254740991
|
|
49
|
+
},
|
|
50
|
+
"nextAttemptAt": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
|
|
53
|
+
},
|
|
54
|
+
"lastStatus": {
|
|
55
|
+
"type": "integer",
|
|
56
|
+
"minimum": 100,
|
|
57
|
+
"maximum": 599
|
|
58
|
+
},
|
|
59
|
+
"lastError": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"maxLength": 128
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"required": [
|
|
65
|
+
"id",
|
|
66
|
+
"event",
|
|
67
|
+
"schedule",
|
|
68
|
+
"occurrence",
|
|
69
|
+
"occurredAt",
|
|
70
|
+
"url",
|
|
71
|
+
"state",
|
|
72
|
+
"attempts"
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"nextCursor": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"minLength": 1
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"required": ["data"]
|
|
82
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"curl": "curl -sS -X GET \"$GREATWAIT_API_URL/v1/projects/$GREATWAIT_PROJECTID/notification-settings\" \\\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 projectId = process.env.GREATWAIT_PROJECTID;\n\nconst result = await greatwait.request(\"projectnotifications_read\", projectId);",
|
|
5
|
+
"mcp": "// Any MCP client, against $GREATWAIT_API_URL/mcp.\n{\n \"arguments\": {\n \"projectId\": \"$PROJECTID\"\n },\n \"name\": \"projectnotifications_read\"\n}"
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"curl": "curl -sS -X POST \"$GREATWAIT_API_URL/v1/projects/$GREATWAIT_PROJECTID/notification-settings/status-signing-key\" \\\n --variable %GREATWAIT_API_KEY \\\n --expand-header \"Authorization: Bearer {{GREATWAIT_API_KEY}}\" \\\n -H 'Content-Type: application/json' \\\n --data-binary '{\"expectedRevision\":1}'",
|
|
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 projectId = process.env.GREATWAIT_PROJECTID;\n\nconst body = {\n \"expectedRevision\": 1\n};\n\nconst result = await greatwait.request(\"projectnotifications_rotateSigningKey\", projectId, body);",
|
|
5
|
+
"mcp": "// projectnotifications.rotateSigningKey is not on the MCP surface.\n// Minting or rotating returns a one-time signing secret. MCP has no negotiated secure-result channel that keeps it out of ordinary tool history. Configure preferences with projectnotifications_update, then use the dashboard or an authenticated REST/SDK/CLI client for the secret."
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"curl": "curl -sS -X PATCH \"$GREATWAIT_API_URL/v1/projects/$GREATWAIT_PROJECTID/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,\"email\":{\"enabled\":true,\"recipients\":{\"kind\":\"admins\"},\"scheduleKinds\":\"both\"}}'",
|
|
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 projectId = process.env.GREATWAIT_PROJECTID;\n\nconst body = {\n \"expectedRevision\": 1,\n \"email\": {\n \"enabled\": true,\n \"recipients\": {\n \"kind\": \"admins\"\n },\n \"scheduleKinds\": \"both\"\n }\n};\n\nconst result = await greatwait.request(\"projectnotifications_update\", projectId, 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 \"projectId\": \"$PROJECTID\",\n \"email\": {\n \"enabled\": true,\n \"recipients\": {\n \"kind\": \"admins\"\n },\n \"scheduleKinds\": \"both\"\n }\n },\n \"name\": \"projectnotifications_update\"\n}"
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"curl": "curl -sS -X GET \"$GREATWAIT_API_URL/v1/projects/$GREATWAIT_PROJECTID/status-deliveries\" \\\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 projectId = process.env.GREATWAIT_PROJECTID;\n\nconst result = await greatwait.request(\"statusdeliveries_list\", projectId);",
|
|
5
|
+
"mcp": "// Any MCP client, against $GREATWAIT_API_URL/mcp.\n{\n \"arguments\": {\n \"projectId\": \"$PROJECTID\"\n },\n \"name\": \"statusdeliveries_list\"\n}"
|
|
6
|
+
}
|
package/package.json
CHANGED