@superdurable/connector-sentry 0.0.0-stage → 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.
- package/LICENSE +21 -0
- package/README.md +8 -2
- package/dex-connector.json +188 -0
- package/dist/chunk-DLF3YZQL.js +199 -0
- package/dist/connection-e93NjxbJ.d.ts +129 -0
- package/dist/index.d.ts +218 -0
- package/dist/index.js +394 -0
- package/dist/mock.d.ts +73 -0
- package/dist/mock.js +169 -0
- package/package.json +62 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Super Durable
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Sentry TypeScript connector
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Install `@superdurable/connector-sentry` to use Sentry issue operations in Dex TypeScript Flows. The package implements `listIssues`, `getIssue`, and `updateIssueStatus`; the manifest's Go connector version remains independent of this package's `v0.1.1` release.
|
|
4
|
+
|
|
5
|
+
`SentryClient` accepts generated `Config` and a live `CredentialProvider<Credentials>`. It resolves the secret at invocation time and sends it only in the Authorization header. `newProjectConnection` reads a named connection and its `api_key` from the Dex project. Project `timeout` accepts a positive Go duration string such as `45s` or a nanosecond count and controls each provider request timeout. `newListIssuesStep`, `newGetIssueStep`, and `newUpdateIssueStatusStep` are the generated operation factories. `./mock` exports scripted operations.
|
|
6
|
+
|
|
7
|
+
The runnable [issue-review example](examples/issue-review/README.md) lists one organization issue page through a Dex Worker. The issue search query is provider syntax; the example sends no credentials in Flow input. The status mutation uses an absolute PUT and a stable Call ID key. Local invalid input or unavailable credentials select `defect`; 408, 429, 5xx, and transport failures retry. Definite provider rejection, missing detail resources, and malformed successful Query responses select their manifest branches. `updateIssueStatus` is declared `repeatOnUnknown: safe`: only HTTP 400, 401, 403, 404, 411, 413, 414, 415, or 422 rejects it, and every other unknown answer, including 409 and a malformed response, retries.
|
|
8
|
+
|
|
9
|
+
`npm run check` runs the package suite, typecheck, and lint. `npm run test:integration` requires a local `dexcli dev` address in `DEX_FLOW_SERVICE_ADDRESS` and exercises the example against a local HTTP fixture through a real Dex Worker. Go-recorded scenarios in `conformance/connectors/sentry/scenarios.json` are replayed by the TypeScript suite. Real Sentry authorization, API responses, and Dex Web Connections fields remain unverified.
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
{
|
|
2
|
+
"connectorId": "sentry",
|
|
3
|
+
"releaseTag": "connectors/sentry/go/v0.2.1",
|
|
4
|
+
"package": {
|
|
5
|
+
"ecosystem": "npm",
|
|
6
|
+
"name": "@superdurable/connector-sentry",
|
|
7
|
+
"version": "0.1.1"
|
|
8
|
+
},
|
|
9
|
+
"factories": [
|
|
10
|
+
{
|
|
11
|
+
"name": "newListIssuesStep",
|
|
12
|
+
"kind": "query",
|
|
13
|
+
"operationId": "listIssues",
|
|
14
|
+
"inputType": "ListIssuesInput",
|
|
15
|
+
"description": "ListIssues through the Sentry public JSON API.",
|
|
16
|
+
"fields": {
|
|
17
|
+
"stepType": "stepType",
|
|
18
|
+
"annotations": "annotations",
|
|
19
|
+
"connectionName": "connectionName",
|
|
20
|
+
"resultAttribute": "resultAttribute"
|
|
21
|
+
},
|
|
22
|
+
"branches": [
|
|
23
|
+
{
|
|
24
|
+
"id": "listed",
|
|
25
|
+
"field": "listed",
|
|
26
|
+
"optional": false
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "providerRejected",
|
|
30
|
+
"field": "providerRejected",
|
|
31
|
+
"optional": true
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "invalidResponse",
|
|
35
|
+
"field": "invalidResponse",
|
|
36
|
+
"optional": true
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "defect",
|
|
40
|
+
"field": "defect",
|
|
41
|
+
"optional": true
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"inputSchema": {
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"description": "ListIssuesInput selects one organization's current issues.",
|
|
47
|
+
"properties": {
|
|
48
|
+
"organization": {
|
|
49
|
+
"description": "Organization is the Sentry organization slug.",
|
|
50
|
+
"type": "string"
|
|
51
|
+
},
|
|
52
|
+
"query": {
|
|
53
|
+
"description": "Query is the provider search expression.",
|
|
54
|
+
"type": "string"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"required": [
|
|
58
|
+
"organization",
|
|
59
|
+
"query"
|
|
60
|
+
],
|
|
61
|
+
"type": "object"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "newGetIssueStep",
|
|
66
|
+
"kind": "query",
|
|
67
|
+
"operationId": "getIssue",
|
|
68
|
+
"inputType": "GetIssueInput",
|
|
69
|
+
"description": "GetIssue through the Sentry public JSON API.",
|
|
70
|
+
"fields": {
|
|
71
|
+
"stepType": "stepType",
|
|
72
|
+
"annotations": "annotations",
|
|
73
|
+
"connectionName": "connectionName",
|
|
74
|
+
"resultAttribute": "resultAttribute"
|
|
75
|
+
},
|
|
76
|
+
"branches": [
|
|
77
|
+
{
|
|
78
|
+
"id": "found",
|
|
79
|
+
"field": "found",
|
|
80
|
+
"optional": false
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "notFound",
|
|
84
|
+
"field": "notFound",
|
|
85
|
+
"optional": true
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "providerRejected",
|
|
89
|
+
"field": "providerRejected",
|
|
90
|
+
"optional": true
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": "invalidResponse",
|
|
94
|
+
"field": "invalidResponse",
|
|
95
|
+
"optional": true
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": "defect",
|
|
99
|
+
"field": "defect",
|
|
100
|
+
"optional": true
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"inputSchema": {
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"description": "GetIssueInput identifies one issue within an organization.",
|
|
106
|
+
"properties": {
|
|
107
|
+
"id": {
|
|
108
|
+
"description": "ID is the provider's stable resource identifier.",
|
|
109
|
+
"type": "string"
|
|
110
|
+
},
|
|
111
|
+
"organization": {
|
|
112
|
+
"description": "Organization is the Sentry organization slug.",
|
|
113
|
+
"type": "string"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"required": [
|
|
117
|
+
"id",
|
|
118
|
+
"organization"
|
|
119
|
+
],
|
|
120
|
+
"type": "object"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "newUpdateIssueStatusStep",
|
|
125
|
+
"kind": "mutation",
|
|
126
|
+
"operationId": "updateIssueStatus",
|
|
127
|
+
"inputType": "UpdateIssueStatusInput",
|
|
128
|
+
"description": "UpdateIssueStatus through the Sentry public JSON API.",
|
|
129
|
+
"fields": {
|
|
130
|
+
"stepType": "stepType",
|
|
131
|
+
"annotations": "annotations",
|
|
132
|
+
"connectionName": "connectionName",
|
|
133
|
+
"resultAttribute": "resultAttribute"
|
|
134
|
+
},
|
|
135
|
+
"branches": [
|
|
136
|
+
{
|
|
137
|
+
"id": "updated",
|
|
138
|
+
"field": "updated",
|
|
139
|
+
"optional": false
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"id": "notFound",
|
|
143
|
+
"field": "notFound",
|
|
144
|
+
"optional": true
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"id": "providerRejected",
|
|
148
|
+
"field": "providerRejected",
|
|
149
|
+
"optional": true
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"id": "invalidResponse",
|
|
153
|
+
"field": "invalidResponse",
|
|
154
|
+
"optional": true
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"id": "defect",
|
|
158
|
+
"field": "defect",
|
|
159
|
+
"optional": true
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"inputSchema": {
|
|
163
|
+
"additionalProperties": false,
|
|
164
|
+
"description": "UpdateIssueStatusInput sets one issue's absolute status.",
|
|
165
|
+
"properties": {
|
|
166
|
+
"id": {
|
|
167
|
+
"description": "ID is the provider's stable resource identifier.",
|
|
168
|
+
"type": "string"
|
|
169
|
+
},
|
|
170
|
+
"organization": {
|
|
171
|
+
"description": "Organization is the Sentry organization slug.",
|
|
172
|
+
"type": "string"
|
|
173
|
+
},
|
|
174
|
+
"status": {
|
|
175
|
+
"description": "Status is the provider's current status.",
|
|
176
|
+
"type": "string"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"required": [
|
|
180
|
+
"id",
|
|
181
|
+
"organization",
|
|
182
|
+
"status"
|
|
183
|
+
],
|
|
184
|
+
"type": "object"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
// src/generated/models.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { SecretString } from "@superdurable/connectors-sdk";
|
|
4
|
+
var ConfigSchema = z.object({
|
|
5
|
+
"baseUrl": z.string().optional(),
|
|
6
|
+
"timeoutMs": z.number().int().optional(),
|
|
7
|
+
"maxResponseBytes": z.number().int().optional()
|
|
8
|
+
});
|
|
9
|
+
var CredentialMaterialError = class extends TypeError {
|
|
10
|
+
constructor(message) {
|
|
11
|
+
super(message);
|
|
12
|
+
this.name = "CredentialMaterialError";
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
var sdkCredentialDecodingFailureMessages = /* @__PURE__ */ new Set([
|
|
16
|
+
"project credential decoding failed",
|
|
17
|
+
"shared project credential decoding failed",
|
|
18
|
+
"project credential decoding failed: this connector version does not support shared credentials"
|
|
19
|
+
]);
|
|
20
|
+
function isCredentialMaterialError(error) {
|
|
21
|
+
return error instanceof CredentialMaterialError || error instanceof TypeError && sdkCredentialDecodingFailureMessages.has(error.message);
|
|
22
|
+
}
|
|
23
|
+
function decodeCredentials(value) {
|
|
24
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new CredentialMaterialError("credential fields are invalid");
|
|
25
|
+
const fields = value;
|
|
26
|
+
const allowed = /* @__PURE__ */ new Set(["api_key"]);
|
|
27
|
+
if (Object.keys(fields).some((key) => !allowed.has(key))) throw new CredentialMaterialError("stored credential does not match the connector credential fields");
|
|
28
|
+
if (fields["api_key"] != null && !(typeof fields["api_key"] === "string")) throw new CredentialMaterialError("credential api_key has an invalid type");
|
|
29
|
+
const credentials = {};
|
|
30
|
+
if (!fields["api_key"]) throw new CredentialMaterialError("credential api_key is required");
|
|
31
|
+
credentials.apiKey = new SecretString(fields["api_key"] ?? "");
|
|
32
|
+
return credentials;
|
|
33
|
+
}
|
|
34
|
+
var ListIssuesInputSchema = z.strictObject({
|
|
35
|
+
"organization": z.string(),
|
|
36
|
+
"query": z.string()
|
|
37
|
+
});
|
|
38
|
+
var IssueSchema = z.strictObject({
|
|
39
|
+
"id": z.string(),
|
|
40
|
+
"shortId": z.string(),
|
|
41
|
+
"title": z.string(),
|
|
42
|
+
"status": z.string()
|
|
43
|
+
});
|
|
44
|
+
var IssuePageSchema = z.strictObject({
|
|
45
|
+
"issues": z.array(IssueSchema).nullable()
|
|
46
|
+
});
|
|
47
|
+
var GetIssueInputSchema = z.strictObject({
|
|
48
|
+
"organization": z.string(),
|
|
49
|
+
"id": z.string()
|
|
50
|
+
});
|
|
51
|
+
var UpdateIssueStatusInputSchema = z.strictObject({
|
|
52
|
+
"organization": z.string(),
|
|
53
|
+
"id": z.string(),
|
|
54
|
+
"status": z.string()
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// src/generated/definitions.ts
|
|
58
|
+
var ConnectorID = "sentry";
|
|
59
|
+
var ProviderID = "sentry";
|
|
60
|
+
var ListIssuesBranch = {
|
|
61
|
+
Listed: "listed",
|
|
62
|
+
ProviderRejected: "providerRejected",
|
|
63
|
+
InvalidResponse: "invalidResponse",
|
|
64
|
+
Defect: "defect"
|
|
65
|
+
};
|
|
66
|
+
var ListIssuesBranchListed = ListIssuesBranch.Listed;
|
|
67
|
+
var ListIssuesBranchProviderRejected = ListIssuesBranch.ProviderRejected;
|
|
68
|
+
var ListIssuesBranchInvalidResponse = ListIssuesBranch.InvalidResponse;
|
|
69
|
+
var ListIssuesBranchDefect = ListIssuesBranch.Defect;
|
|
70
|
+
var ListIssuesDefinition = {
|
|
71
|
+
operation: { connectorId: ConnectorID, operationId: "listIssues" },
|
|
72
|
+
branches: [
|
|
73
|
+
{ id: "listed", description: "Sentry returned the requested result." },
|
|
74
|
+
{ id: "providerRejected", description: "The provider definitively rejected the request.", optional: true },
|
|
75
|
+
{ id: "invalidResponse", description: "The provider returned malformed or oversized JSON.", optional: true },
|
|
76
|
+
{ id: "defect", description: "Local input or connection credentials are invalid.", optional: true }
|
|
77
|
+
],
|
|
78
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
|
|
79
|
+
};
|
|
80
|
+
var ListIssuesMetadata = { kind: "query", idempotency: "none", authorization: "required" };
|
|
81
|
+
var GetIssueBranch = {
|
|
82
|
+
Found: "found",
|
|
83
|
+
NotFound: "notFound",
|
|
84
|
+
ProviderRejected: "providerRejected",
|
|
85
|
+
InvalidResponse: "invalidResponse",
|
|
86
|
+
Defect: "defect"
|
|
87
|
+
};
|
|
88
|
+
var GetIssueBranchFound = GetIssueBranch.Found;
|
|
89
|
+
var GetIssueBranchNotFound = GetIssueBranch.NotFound;
|
|
90
|
+
var GetIssueBranchProviderRejected = GetIssueBranch.ProviderRejected;
|
|
91
|
+
var GetIssueBranchInvalidResponse = GetIssueBranch.InvalidResponse;
|
|
92
|
+
var GetIssueBranchDefect = GetIssueBranch.Defect;
|
|
93
|
+
var GetIssueDefinition = {
|
|
94
|
+
operation: { connectorId: ConnectorID, operationId: "getIssue" },
|
|
95
|
+
branches: [
|
|
96
|
+
{ id: "found", description: "Sentry returned the requested result." },
|
|
97
|
+
{ id: "notFound", description: "The requested resource does not exist.", optional: true },
|
|
98
|
+
{ id: "providerRejected", description: "The provider definitively rejected the request.", optional: true },
|
|
99
|
+
{ id: "invalidResponse", description: "The provider returned malformed or oversized JSON.", optional: true },
|
|
100
|
+
{ id: "defect", description: "Local input or connection credentials are invalid.", optional: true }
|
|
101
|
+
],
|
|
102
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
|
|
103
|
+
};
|
|
104
|
+
var GetIssueMetadata = { kind: "query", idempotency: "none", authorization: "required" };
|
|
105
|
+
var UpdateIssueStatusBranch = {
|
|
106
|
+
Updated: "updated",
|
|
107
|
+
NotFound: "notFound",
|
|
108
|
+
ProviderRejected: "providerRejected",
|
|
109
|
+
InvalidResponse: "invalidResponse",
|
|
110
|
+
Defect: "defect"
|
|
111
|
+
};
|
|
112
|
+
var UpdateIssueStatusBranchUpdated = UpdateIssueStatusBranch.Updated;
|
|
113
|
+
var UpdateIssueStatusBranchNotFound = UpdateIssueStatusBranch.NotFound;
|
|
114
|
+
var UpdateIssueStatusBranchProviderRejected = UpdateIssueStatusBranch.ProviderRejected;
|
|
115
|
+
var UpdateIssueStatusBranchInvalidResponse = UpdateIssueStatusBranch.InvalidResponse;
|
|
116
|
+
var UpdateIssueStatusBranchDefect = UpdateIssueStatusBranch.Defect;
|
|
117
|
+
var UpdateIssueStatusDefinition = {
|
|
118
|
+
operation: { connectorId: ConnectorID, operationId: "updateIssueStatus" },
|
|
119
|
+
branches: [
|
|
120
|
+
{ id: "updated", description: "Sentry returned the requested result." },
|
|
121
|
+
{ id: "notFound", description: "The requested resource does not exist.", optional: true },
|
|
122
|
+
{ id: "providerRejected", description: "The provider definitively rejected the request.", optional: true },
|
|
123
|
+
{ id: "invalidResponse", description: "Kept for compatibility and no longer selected: a malformed or oversized answer now retries, because repeating the absolute status update is safe.", optional: true },
|
|
124
|
+
{ id: "defect", description: "Local input or connection credentials are invalid.", optional: true }
|
|
125
|
+
],
|
|
126
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
|
|
127
|
+
};
|
|
128
|
+
var UpdateIssueStatusMetadata = { kind: "mutation", idempotency: "required", authorization: "required" };
|
|
129
|
+
|
|
130
|
+
// src/generated/connection.ts
|
|
131
|
+
import { ConnectionRefSchema } from "@superdurable/connectors-sdk";
|
|
132
|
+
var Connection = class {
|
|
133
|
+
/** Stable provider and connection name. */
|
|
134
|
+
reference;
|
|
135
|
+
/** Bound provider operations. */
|
|
136
|
+
operations;
|
|
137
|
+
/** Validate a reference and bind operations. */
|
|
138
|
+
constructor(reference, operations) {
|
|
139
|
+
this.reference = ConnectionRefSchema.parse(reference);
|
|
140
|
+
if (this.reference.provider !== ProviderID) throw new TypeError("connection provider differs from the manifest");
|
|
141
|
+
if (!operations) throw new TypeError("connector operations are required");
|
|
142
|
+
this.operations = operations;
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
function newConnection(client, reference) {
|
|
146
|
+
if (!client) throw new TypeError("connector client is required");
|
|
147
|
+
return new Connection(reference, client);
|
|
148
|
+
}
|
|
149
|
+
function newConnectionWithOperations(operations, reference) {
|
|
150
|
+
return new Connection(reference, operations);
|
|
151
|
+
}
|
|
152
|
+
function newProjectConnection(project, connectionName, createClient) {
|
|
153
|
+
if (!project) throw new TypeError("loaded project is required");
|
|
154
|
+
const reference = ConnectionRefSchema.parse({ provider: ProviderID, name: connectionName });
|
|
155
|
+
const selected = project.configuration.connections.find((entry) => entry.connectorId === ConnectorID && entry.connectionName === connectionName);
|
|
156
|
+
if (!selected || selected.provider !== ProviderID) throw new TypeError("project connection is not configured");
|
|
157
|
+
return newConnection(createClient(project, connectionName), reference);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export {
|
|
161
|
+
ConfigSchema,
|
|
162
|
+
CredentialMaterialError,
|
|
163
|
+
isCredentialMaterialError,
|
|
164
|
+
decodeCredentials,
|
|
165
|
+
ListIssuesInputSchema,
|
|
166
|
+
IssueSchema,
|
|
167
|
+
IssuePageSchema,
|
|
168
|
+
GetIssueInputSchema,
|
|
169
|
+
UpdateIssueStatusInputSchema,
|
|
170
|
+
ConnectorID,
|
|
171
|
+
ProviderID,
|
|
172
|
+
ListIssuesBranch,
|
|
173
|
+
ListIssuesBranchListed,
|
|
174
|
+
ListIssuesBranchProviderRejected,
|
|
175
|
+
ListIssuesBranchInvalidResponse,
|
|
176
|
+
ListIssuesBranchDefect,
|
|
177
|
+
ListIssuesDefinition,
|
|
178
|
+
ListIssuesMetadata,
|
|
179
|
+
GetIssueBranch,
|
|
180
|
+
GetIssueBranchFound,
|
|
181
|
+
GetIssueBranchNotFound,
|
|
182
|
+
GetIssueBranchProviderRejected,
|
|
183
|
+
GetIssueBranchInvalidResponse,
|
|
184
|
+
GetIssueBranchDefect,
|
|
185
|
+
GetIssueDefinition,
|
|
186
|
+
GetIssueMetadata,
|
|
187
|
+
UpdateIssueStatusBranch,
|
|
188
|
+
UpdateIssueStatusBranchUpdated,
|
|
189
|
+
UpdateIssueStatusBranchNotFound,
|
|
190
|
+
UpdateIssueStatusBranchProviderRejected,
|
|
191
|
+
UpdateIssueStatusBranchInvalidResponse,
|
|
192
|
+
UpdateIssueStatusBranchDefect,
|
|
193
|
+
UpdateIssueStatusDefinition,
|
|
194
|
+
UpdateIssueStatusMetadata,
|
|
195
|
+
Connection,
|
|
196
|
+
newConnection,
|
|
197
|
+
newConnectionWithOperations,
|
|
198
|
+
newProjectConnection
|
|
199
|
+
};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { CredentialProvider, SecretString, Query, Mutation, ConnectionRef } from '@superdurable/connectors-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
/** Connector configuration; omitted fields use manifest defaults. */
|
|
5
|
+
interface Config {
|
|
6
|
+
/** Sentry API base URL. Leave blank for the displayed public endpoint; override only for a compatible gateway or local test server. */
|
|
7
|
+
baseUrl?: string;
|
|
8
|
+
/** Maximum time for one HTTP request, as a positive Go duration such as 15s or 1m. Leave blank for the displayed default; override for slower gateways. Runtime value in milliseconds. */
|
|
9
|
+
timeoutMs?: number;
|
|
10
|
+
/** Maximum accepted response size in bytes. Leave blank for the displayed default; increase only for larger legitimate pages. */
|
|
11
|
+
maxResponseBytes?: number;
|
|
12
|
+
}
|
|
13
|
+
/** Runtime schema for manifest configuration. */
|
|
14
|
+
declare const ConfigSchema: z.ZodObject<{
|
|
15
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
16
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
maxResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
/** Private connector credentials resolved by the host. */
|
|
20
|
+
interface Credentials {
|
|
21
|
+
/** Secret Sentry token. Start at https://sentry.io/settings/account/api/auth-tokens/, follow User Settings > Auth Tokens > Create New Token. Create an auth token with event:read for reads and event:write for status updates. Copy the opaque secret; blank prevents requests. It is sent only in the Authorization header. */
|
|
22
|
+
apiKey: SecretString;
|
|
23
|
+
}
|
|
24
|
+
/** Stored credential material that fails the connector credential checks, so no retry can succeed. */
|
|
25
|
+
declare class CredentialMaterialError extends TypeError {
|
|
26
|
+
constructor(message: string);
|
|
27
|
+
}
|
|
28
|
+
/** Report malformed stored credential material, also behind the SDK provider's decoding TypeError. */
|
|
29
|
+
declare function isCredentialMaterialError(error: unknown): boolean;
|
|
30
|
+
/** Decode private credential fields for the connector. */
|
|
31
|
+
declare function decodeCredentials(value: unknown): Credentials;
|
|
32
|
+
/** Host-owned source of private connector credentials. */
|
|
33
|
+
type CredentialSource = CredentialProvider<Credentials>;
|
|
34
|
+
/** ListIssuesInput selects one organization's current issues. */
|
|
35
|
+
interface ListIssuesInput {
|
|
36
|
+
/** Organization is the Sentry organization slug. */
|
|
37
|
+
"organization": string;
|
|
38
|
+
/** Query is the provider search expression. */
|
|
39
|
+
"query": string;
|
|
40
|
+
}
|
|
41
|
+
/** Issue contains selected issue metadata. */
|
|
42
|
+
interface Issue {
|
|
43
|
+
/** ID is the provider's stable resource identifier. */
|
|
44
|
+
"id": string;
|
|
45
|
+
/** ShortID is the human-readable Sentry issue identifier. */
|
|
46
|
+
"shortId": string;
|
|
47
|
+
/** Title is the provider's display title. */
|
|
48
|
+
"title": string;
|
|
49
|
+
/** Status is the provider's current status. */
|
|
50
|
+
"status": string;
|
|
51
|
+
}
|
|
52
|
+
/** IssuePage is one organization issue response page. */
|
|
53
|
+
interface IssuePage {
|
|
54
|
+
/** Issues contains one Sentry issue response page. */
|
|
55
|
+
"issues": Array<Issue> | null;
|
|
56
|
+
}
|
|
57
|
+
/** GetIssueInput identifies one issue within an organization. */
|
|
58
|
+
interface GetIssueInput {
|
|
59
|
+
/** Organization is the Sentry organization slug. */
|
|
60
|
+
"organization": string;
|
|
61
|
+
/** ID is the provider's stable resource identifier. */
|
|
62
|
+
"id": string;
|
|
63
|
+
}
|
|
64
|
+
/** UpdateIssueStatusInput sets one issue's absolute status. */
|
|
65
|
+
interface UpdateIssueStatusInput {
|
|
66
|
+
/** Organization is the Sentry organization slug. */
|
|
67
|
+
"organization": string;
|
|
68
|
+
/** ID is the provider's stable resource identifier. */
|
|
69
|
+
"id": string;
|
|
70
|
+
/** Status is the provider's current status. */
|
|
71
|
+
"status": string;
|
|
72
|
+
}
|
|
73
|
+
/** Runtime validator for ListIssuesInput. */
|
|
74
|
+
declare const ListIssuesInputSchema: z.ZodObject<{
|
|
75
|
+
organization: z.ZodString;
|
|
76
|
+
query: z.ZodString;
|
|
77
|
+
}, z.core.$strict>;
|
|
78
|
+
/** Runtime validator for Issue. */
|
|
79
|
+
declare const IssueSchema: z.ZodObject<{
|
|
80
|
+
id: z.ZodString;
|
|
81
|
+
shortId: z.ZodString;
|
|
82
|
+
title: z.ZodString;
|
|
83
|
+
status: z.ZodString;
|
|
84
|
+
}, z.core.$strict>;
|
|
85
|
+
/** Runtime validator for IssuePage. */
|
|
86
|
+
declare const IssuePageSchema: z.ZodObject<{
|
|
87
|
+
issues: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
88
|
+
id: z.ZodString;
|
|
89
|
+
shortId: z.ZodString;
|
|
90
|
+
title: z.ZodString;
|
|
91
|
+
status: z.ZodString;
|
|
92
|
+
}, z.core.$strict>>>;
|
|
93
|
+
}, z.core.$strict>;
|
|
94
|
+
/** Runtime validator for GetIssueInput. */
|
|
95
|
+
declare const GetIssueInputSchema: z.ZodObject<{
|
|
96
|
+
organization: z.ZodString;
|
|
97
|
+
id: z.ZodString;
|
|
98
|
+
}, z.core.$strict>;
|
|
99
|
+
/** Runtime validator for UpdateIssueStatusInput. */
|
|
100
|
+
declare const UpdateIssueStatusInputSchema: z.ZodObject<{
|
|
101
|
+
organization: z.ZodString;
|
|
102
|
+
id: z.ZodString;
|
|
103
|
+
status: z.ZodString;
|
|
104
|
+
}, z.core.$strict>;
|
|
105
|
+
|
|
106
|
+
/** Typed operations supplied by a client or mock. */
|
|
107
|
+
interface Operations {
|
|
108
|
+
/** Invoke listIssues through this connection. */
|
|
109
|
+
listIssues(): Query<ListIssuesInput, IssuePage>;
|
|
110
|
+
/** Invoke getIssue through this connection. */
|
|
111
|
+
getIssue(): Query<GetIssueInput, Issue>;
|
|
112
|
+
/** Invoke updateIssueStatus through this connection. */
|
|
113
|
+
updateIssueStatus(): Mutation<UpdateIssueStatusInput, Issue>;
|
|
114
|
+
}
|
|
115
|
+
/** Named connector connection kept outside Flow state. */
|
|
116
|
+
declare class Connection<BoundOperations = Operations> {
|
|
117
|
+
/** Stable provider and connection name. */
|
|
118
|
+
readonly reference: ConnectionRef;
|
|
119
|
+
/** Bound provider operations. */
|
|
120
|
+
readonly operations: BoundOperations;
|
|
121
|
+
/** Validate a reference and bind operations. */
|
|
122
|
+
constructor(reference: ConnectionRef, operations: BoundOperations);
|
|
123
|
+
}
|
|
124
|
+
/** Bind a client to a named connection. */
|
|
125
|
+
declare function newConnection(client: Operations, reference: ConnectionRef): Connection;
|
|
126
|
+
/** Bind scripted operations to a named connection. */
|
|
127
|
+
declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
|
|
128
|
+
|
|
129
|
+
export { Connection as C, type GetIssueInput as G, type Issue as I, type ListIssuesInput as L, type Operations as O, type UpdateIssueStatusInput as U, type IssuePage as a, type Config as b, type Credentials as c, ConfigSchema as d, CredentialMaterialError as e, type CredentialSource as f, GetIssueInputSchema as g, IssuePageSchema as h, IssueSchema as i, ListIssuesInputSchema as j, UpdateIssueStatusInputSchema as k, decodeCredentials as l, isCredentialMaterialError as m, newConnection as n, newConnectionWithOperations as o };
|