@superdurable/connector-productboard 0.1.0 → 0.2.0
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/dex-connector.json +2 -5
- package/dist/{chunk-GDHSBL3L.js → chunk-TTILIYMD.js} +1 -1
- package/dist/{connection-CxSuhl7t.d.ts → connection-BX4A6Fjw.d.ts} +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -3
- package/dist/mock.d.ts +1 -1
- package/dist/mock.js +2 -4
- package/package.json +1 -1
package/dex-connector.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"connectorId": "productboard",
|
|
3
|
-
"releaseTag": "connectors/productboard/go/v0.
|
|
3
|
+
"releaseTag": "connectors/productboard/go/v0.2.0",
|
|
4
4
|
"package": {
|
|
5
5
|
"ecosystem": "npm",
|
|
6
6
|
"name": "@superdurable/connector-productboard",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.2.0"
|
|
8
8
|
},
|
|
9
9
|
"factories": [
|
|
10
10
|
{
|
|
@@ -50,9 +50,6 @@
|
|
|
50
50
|
"type": "string"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
"required": [
|
|
54
|
-
"pageCursor"
|
|
55
|
-
],
|
|
56
53
|
"type": "object"
|
|
57
54
|
}
|
|
58
55
|
}
|
|
@@ -28,7 +28,7 @@ type CredentialSource = CredentialProvider<Credentials>;
|
|
|
28
28
|
/** ListFeaturesInput selects a page by its opaque, non-secret cursor. */
|
|
29
29
|
interface ListFeaturesInput {
|
|
30
30
|
/** PageCursor is blank for the first page or a previous NextCursor value. */
|
|
31
|
-
"pageCursor"
|
|
31
|
+
"pageCursor"?: string | undefined;
|
|
32
32
|
}
|
|
33
33
|
/** FeatureMetadata contains only the feature ID and name. */
|
|
34
34
|
interface FeatureMetadata {
|
|
@@ -46,7 +46,7 @@ interface FeaturesPage {
|
|
|
46
46
|
}
|
|
47
47
|
/** Runtime validator for ListFeaturesInput. */
|
|
48
48
|
declare const ListFeaturesInputSchema: z.ZodObject<{
|
|
49
|
-
pageCursor: z.ZodString
|
|
49
|
+
pageCursor: z.ZodOptional<z.ZodString>;
|
|
50
50
|
}, z.core.$strict>;
|
|
51
51
|
/** Runtime validator for FeatureMetadata. */
|
|
52
52
|
declare const FeatureMetadataSchema: z.ZodObject<{
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as ListFeaturesInput, F as FeaturesPage, C as Connection, O as Operations, a as Config, b as Credentials } from './connection-
|
|
2
|
-
export { c as ConfigSchema, d as CredentialSource, e as FeatureMetadata, f as FeatureMetadataSchema, g as FeaturesPageSchema, h as ListFeaturesInputSchema, i as decodeCredentials, n as newConnection, j as newConnectionWithOperations } from './connection-
|
|
1
|
+
import { L as ListFeaturesInput, F as FeaturesPage, C as Connection, O as Operations, a as Config, b as Credentials } from './connection-BX4A6Fjw.js';
|
|
2
|
+
export { c as ConfigSchema, d as CredentialSource, e as FeatureMetadata, f as FeatureMetadataSchema, g as FeaturesPageSchema, h as ListFeaturesInputSchema, i as decodeCredentials, n as newConnection, j as newConnectionWithOperations } from './connection-BX4A6Fjw.js';
|
|
3
3
|
import { QueryDefinition, QueryStepConfig, Query, QueryResult, QueryStep, CredentialProvider, Call, QueryAttempt } from '@superdurable/connectors-sdk';
|
|
4
4
|
import { StepTarget } from '@superdurable/dex';
|
|
5
5
|
import { LoadedProject } from '@superdurable/connectors-sdk/projectconfig';
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
newConnection,
|
|
18
18
|
newConnectionWithOperations,
|
|
19
19
|
newProjectConnection
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-TTILIYMD.js";
|
|
21
21
|
|
|
22
22
|
// src/generated/steps.ts
|
|
23
23
|
import { goToBranch, newQueryStep } from "@superdurable/connectors-sdk";
|
|
@@ -114,9 +114,10 @@ var ListFeaturesOperation = class {
|
|
|
114
114
|
}
|
|
115
115
|
/** Classify provider outcomes consistently with the Go implementation. */
|
|
116
116
|
async invoke(call, input) {
|
|
117
|
-
|
|
117
|
+
const pageCursor = input?.pageCursor ?? "";
|
|
118
|
+
if (!input || !isValidCursor(pageCursor))
|
|
118
119
|
return terminal("defect", "VALIDATION", "page cursor contains invalid characters or exceeds 2048 bytes");
|
|
119
|
-
const exchange = await this.client.get(call,
|
|
120
|
+
const exchange = await this.client.get(call, pageCursor);
|
|
120
121
|
if (exchange.error === "credential") return terminal("defect", "AUTHENTICATION", "Productboard credentials are unavailable or invalid");
|
|
121
122
|
if (exchange.error === "request") return retry("TRANSPORT", "Productboard request failed");
|
|
122
123
|
if (exchange.status === 429) return retry("RATE_LIMIT", "Productboard rate limited the request", exchange.retryAfterMs);
|
package/dist/mock.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MockQuery, Case } from '@superdurable/connectors-sdk/connectormock';
|
|
2
2
|
import { Failure } from '@superdurable/connectors-sdk';
|
|
3
|
-
import { O as Operations, C as Connection, L as ListFeaturesInput, F as FeaturesPage, e as FeatureMetadata } from './connection-
|
|
3
|
+
import { O as Operations, C as Connection, L as ListFeaturesInput, F as FeaturesPage, e as FeatureMetadata } from './connection-BX4A6Fjw.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
/** Go zero value for ListFeaturesInput in scripted cases. */
|
package/dist/mock.js
CHANGED
|
@@ -5,13 +5,11 @@ import {
|
|
|
5
5
|
ListFeaturesInputSchema,
|
|
6
6
|
ProviderID,
|
|
7
7
|
newConnectionWithOperations
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TTILIYMD.js";
|
|
9
9
|
|
|
10
10
|
// src/generated/mock.ts
|
|
11
11
|
import { branchCase, retryCase, newQuery } from "@superdurable/connectors-sdk/connectormock";
|
|
12
|
-
var emptyListFeaturesInput = ListFeaturesInputSchema.parse({
|
|
13
|
-
"pageCursor": ""
|
|
14
|
-
});
|
|
12
|
+
var emptyListFeaturesInput = ListFeaturesInputSchema.parse({});
|
|
15
13
|
var emptyFeatureMetadata = FeatureMetadataSchema.parse({
|
|
16
14
|
"id": "",
|
|
17
15
|
"name": ""
|