@superdurable/connector-activecampaign 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 -6
- package/dist/{chunk-N3WLALRE.js → chunk-5OQDSH4F.js} +1 -1
- package/dist/{connection-2WCEk-xS.d.ts → connection-B6zAs6BA.d.ts} +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- 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": "activecampaign",
|
|
3
|
-
"releaseTag": "connectors/activecampaign/go/v0.
|
|
3
|
+
"releaseTag": "connectors/activecampaign/go/v0.2.0",
|
|
4
4
|
"package": {
|
|
5
5
|
"ecosystem": "npm",
|
|
6
6
|
"name": "@superdurable/connector-activecampaign",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.2.0"
|
|
8
8
|
},
|
|
9
9
|
"factories": [
|
|
10
10
|
{
|
|
@@ -50,13 +50,10 @@
|
|
|
50
50
|
"type": "integer"
|
|
51
51
|
},
|
|
52
52
|
"offset": {
|
|
53
|
-
"description": "Offset is the zero-based number of contacts to skip.",
|
|
53
|
+
"description": "Offset is the zero-based number of contacts to skip; zero starts at the first contact.",
|
|
54
54
|
"type": "integer"
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
"required": [
|
|
58
|
-
"offset"
|
|
59
|
-
],
|
|
60
57
|
"type": "object"
|
|
61
58
|
}
|
|
62
59
|
},
|
|
@@ -18,7 +18,7 @@ function decodeCredentials(value) {
|
|
|
18
18
|
return credentials;
|
|
19
19
|
}
|
|
20
20
|
var ListContactsInputSchema = z.strictObject({
|
|
21
|
-
"offset": z.number().int(),
|
|
21
|
+
"offset": z.number().int().optional(),
|
|
22
22
|
"limit": z.number().int().optional()
|
|
23
23
|
});
|
|
24
24
|
var ContactMetadataSchema = z.strictObject({
|
|
@@ -27,8 +27,8 @@ declare function decodeCredentials(value: unknown): Credentials;
|
|
|
27
27
|
type CredentialSource = CredentialProvider<Credentials>;
|
|
28
28
|
/** ListContactsInput selects an offset-based page of at most 100 contacts. */
|
|
29
29
|
interface ListContactsInput {
|
|
30
|
-
/** Offset is the zero-based number of contacts to skip. */
|
|
31
|
-
"offset"
|
|
30
|
+
/** Offset is the zero-based number of contacts to skip; zero starts at the first contact. */
|
|
31
|
+
"offset"?: number | undefined;
|
|
32
32
|
/** Limit is the maximum contact count; zero defaults to 20. */
|
|
33
33
|
"limit"?: number | undefined;
|
|
34
34
|
}
|
|
@@ -61,7 +61,7 @@ interface GetContactInput {
|
|
|
61
61
|
}
|
|
62
62
|
/** Runtime validator for ListContactsInput. */
|
|
63
63
|
declare const ListContactsInputSchema: z.ZodObject<{
|
|
64
|
-
offset: z.ZodNumber
|
|
64
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
65
65
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
66
66
|
}, z.core.$strict>;
|
|
67
67
|
/** Runtime validator for ContactMetadata. */
|
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-B6zAs6BA.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-B6zAs6BA.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-5OQDSH4F.js";
|
|
30
30
|
|
|
31
31
|
// src/generated/steps.ts
|
|
32
32
|
import { goToBranch, newQueryStep } from "@superdurable/connectors-sdk";
|
|
@@ -138,7 +138,7 @@ var ListContactsOperation = class {
|
|
|
138
138
|
}
|
|
139
139
|
/** Validate pagination and read contact metadata. */
|
|
140
140
|
async invoke(call, input) {
|
|
141
|
-
const offset = input.offset;
|
|
141
|
+
const offset = input.offset ?? 0;
|
|
142
142
|
const limit = input.limit === void 0 || input.limit === 0 ? 20 : input.limit;
|
|
143
143
|
if (!isNonnegativeInteger(offset) || !isPositiveInteger(limit) || limit > 100) return terminal("listContacts", "defect", "VALIDATION", "offset or limit is invalid", emptyContacts());
|
|
144
144
|
const result = await this.client.exchange(call, "listContacts", `/contacts?limit=${limit}&offset=${offset}`, false);
|
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-B6zAs6BA.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,11 @@ import {
|
|
|
7
7
|
ListContactsInputSchema,
|
|
8
8
|
ProviderID,
|
|
9
9
|
newConnectionWithOperations
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5OQDSH4F.js";
|
|
11
11
|
|
|
12
12
|
// src/generated/mock.ts
|
|
13
13
|
import { branchCase, retryCase, newQuery } from "@superdurable/connectors-sdk/connectormock";
|
|
14
|
-
var emptyListContactsInput = ListContactsInputSchema.parse({
|
|
15
|
-
"offset": 0
|
|
16
|
-
});
|
|
14
|
+
var emptyListContactsInput = ListContactsInputSchema.parse({});
|
|
17
15
|
var emptyContactMetadata = ContactMetadataSchema.parse({
|
|
18
16
|
"id": "",
|
|
19
17
|
"email": "",
|