@superdurable/connector-insightly 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 +3 -4
- package/dist/{chunk-PTFX7RNO.js → chunk-A3K3SIKE.js} +1 -1
- package/dist/{connection-lTitKWJP.d.ts → connection-a5yVGqYp.d.ts} +3 -3
- 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 -3
- package/package.json +1 -1
package/dex-connector.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"connectorId": "insightly",
|
|
3
|
-
"releaseTag": "connectors/insightly/go/v0.
|
|
3
|
+
"releaseTag": "connectors/insightly/go/v0.2.0",
|
|
4
4
|
"package": {
|
|
5
5
|
"ecosystem": "npm",
|
|
6
6
|
"name": "@superdurable/connector-insightly",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.2.0"
|
|
8
8
|
},
|
|
9
9
|
"factories": [
|
|
10
10
|
{
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"description": "ListContactsInput selects a bounded Insightly contact page.",
|
|
47
47
|
"properties": {
|
|
48
48
|
"skip": {
|
|
49
|
-
"description": "Skip is the nonnegative number of contacts to omit before this page.",
|
|
49
|
+
"description": "Skip is the nonnegative number of contacts to omit before this page; zero starts at the first contact.",
|
|
50
50
|
"type": "integer"
|
|
51
51
|
},
|
|
52
52
|
"top": {
|
|
@@ -55,7 +55,6 @@
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"required": [
|
|
58
|
-
"skip",
|
|
59
58
|
"top"
|
|
60
59
|
],
|
|
61
60
|
"type": "object"
|
|
@@ -19,7 +19,7 @@ function decodeCredentials(value) {
|
|
|
19
19
|
}
|
|
20
20
|
var ListContactsInputSchema = z.strictObject({
|
|
21
21
|
"top": z.number().int(),
|
|
22
|
-
"skip": z.number().int()
|
|
22
|
+
"skip": z.number().int().optional()
|
|
23
23
|
});
|
|
24
24
|
var ContactMetadataSchema = z.strictObject({
|
|
25
25
|
"id": z.number().int(),
|
|
@@ -29,8 +29,8 @@ type CredentialSource = CredentialProvider<Credentials>;
|
|
|
29
29
|
interface ListContactsInput {
|
|
30
30
|
/** Top is the maximum page size, from 1 to 500 records. */
|
|
31
31
|
"top": number;
|
|
32
|
-
/** Skip is the nonnegative number of contacts to omit before this page. */
|
|
33
|
-
"skip"
|
|
32
|
+
/** Skip is the nonnegative number of contacts to omit before this page; zero starts at the first contact. */
|
|
33
|
+
"skip"?: number | undefined;
|
|
34
34
|
}
|
|
35
35
|
/** ContactMetadata contains public contact identity without custom fields or links. */
|
|
36
36
|
interface ContactMetadata {
|
|
@@ -56,7 +56,7 @@ interface GetContactInput {
|
|
|
56
56
|
/** Runtime validator for ListContactsInput. */
|
|
57
57
|
declare const ListContactsInputSchema: z.ZodObject<{
|
|
58
58
|
top: z.ZodNumber;
|
|
59
|
-
skip: z.ZodNumber
|
|
59
|
+
skip: z.ZodOptional<z.ZodNumber>;
|
|
60
60
|
}, z.core.$strict>;
|
|
61
61
|
/** Runtime validator for ContactMetadata. */
|
|
62
62
|
declare const ContactMetadataSchema: z.ZodObject<{
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as GetContactInput, C as ContactMetadata, a as Connection, L as ListContactsInput, b as ContactsPage, O as Operations, c as Config, d as Credentials } from './connection-
|
|
2
|
-
export { e as ConfigSchema, f as ContactMetadataSchema, g as ContactsPageSchema, h as CredentialSource, i as GetContactInputSchema, j as ListContactsInputSchema, k as decodeCredentials, n as newConnection, l as newConnectionWithOperations } from './connection-
|
|
1
|
+
import { G as GetContactInput, C as ContactMetadata, a as Connection, L as ListContactsInput, b as ContactsPage, O as Operations, c as Config, d as Credentials } from './connection-a5yVGqYp.js';
|
|
2
|
+
export { e as ConfigSchema, f as ContactMetadataSchema, g as ContactsPageSchema, h as CredentialSource, i as GetContactInputSchema, j as ListContactsInputSchema, k as decodeCredentials, n as newConnection, l as newConnectionWithOperations } from './connection-a5yVGqYp.js';
|
|
3
3
|
import { QueryDefinition, QueryStepConfig, Query, QueryResult, QueryStep, CredentialProvider, Call, QueryAttempt, Failure } 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
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
newConnection,
|
|
27
27
|
newConnectionWithOperations,
|
|
28
28
|
newProjectConnection
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-A3K3SIKE.js";
|
|
30
30
|
|
|
31
31
|
// src/generated/steps.ts
|
|
32
32
|
import { goToBranch, newQueryStep } from "@superdurable/connectors-sdk";
|
|
@@ -137,8 +137,9 @@ var ListContactsOperation = class {
|
|
|
137
137
|
}
|
|
138
138
|
/** Read a bounded contact page. */
|
|
139
139
|
async invoke(call, input) {
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
const skip = input?.skip ?? 0;
|
|
141
|
+
if (!input || !Number.isSafeInteger(input.top) || input.top < 1 || input.top > 500 || !Number.isSafeInteger(skip) || skip < 0) return terminal("listContacts", "defect", "VALIDATION", "contact page size or offset is invalid", emptyPage());
|
|
142
|
+
const result = await this.client.exchange(call, "listContacts", `/Contacts?skip=${skip}&top=${input.top}`, false);
|
|
142
143
|
if (result.retry) return newQueryRetry(result.failure, result.retryAfterMs);
|
|
143
144
|
if (result.failure) return newQueryBranch(result.branch, emptyPage(), {}, result.failure);
|
|
144
145
|
const document = parseJSON(result.body);
|
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, a as Connection, L as ListContactsInput, b as ContactsPage, G as GetContactInput, C as ContactMetadata } from './connection-
|
|
3
|
+
import { O as Operations, a as Connection, L as ListContactsInput, b as ContactsPage, G as GetContactInput, C as ContactMetadata } from './connection-a5yVGqYp.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
/** Go zero value for ListContactsInput in scripted cases. */
|
package/dist/mock.js
CHANGED
|
@@ -7,13 +7,12 @@ import {
|
|
|
7
7
|
ListContactsInputSchema,
|
|
8
8
|
ProviderID,
|
|
9
9
|
newConnectionWithOperations
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-A3K3SIKE.js";
|
|
11
11
|
|
|
12
12
|
// src/generated/mock.ts
|
|
13
13
|
import { branchCase, retryCase, newQuery } from "@superdurable/connectors-sdk/connectormock";
|
|
14
14
|
var emptyListContactsInput = ListContactsInputSchema.parse({
|
|
15
|
-
"top": 0
|
|
16
|
-
"skip": 0
|
|
15
|
+
"top": 0
|
|
17
16
|
});
|
|
18
17
|
var emptyContactMetadata = ContactMetadataSchema.parse({
|
|
19
18
|
"id": 0,
|