@superdurable/connector-customerio 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/README.md CHANGED
@@ -1,3 +1,3 @@
1
1
  # Customer.io TypeScript connector
2
2
 
3
- Implements `getCustomersByEmail`, returning matching Customer.io profile IDs. Go-recorded conformance checks exact requests, branches, retries and outputs. Configure a secret App API private key using the [connection guide](../README.md). See the [runnable Dex Flow](examples/customer-lookup/README.md). Live provider authorization remains unverified.
3
+ Use `getCustomersByEmail` to find matching profile IDs, `listCampaigns` to enumerate campaigns, `getCampaign` to look up a campaign, and `getCampaignMetrics` to fetch its time series. Configure an App API private key with read access using the [connection guide](../README.md). The [runnable Dex Flows](examples/customer-lookup/README.md) share the static `customerio` connection.
@@ -1,12 +1,176 @@
1
1
  {
2
2
  "connectorId": "customerio",
3
- "releaseTag": "connectors/customerio/go/v0.1.0",
3
+ "releaseTag": "connectors/customerio/go/v0.2.0",
4
4
  "package": {
5
5
  "ecosystem": "npm",
6
6
  "name": "@superdurable/connector-customerio",
7
- "version": "0.1.0"
7
+ "version": "0.2.0"
8
8
  },
9
9
  "factories": [
10
+ {
11
+ "name": "newGetCampaignStep",
12
+ "kind": "query",
13
+ "operationId": "getCampaign",
14
+ "inputType": "GetCampaignInput",
15
+ "description": "Read one campaign automation by its positive integer ID.",
16
+ "fields": {
17
+ "stepType": "stepType",
18
+ "annotations": "annotations",
19
+ "connectionName": "connectionName",
20
+ "resultAttribute": "resultAttribute"
21
+ },
22
+ "branches": [
23
+ {
24
+ "id": "found",
25
+ "field": "found",
26
+ "optional": false
27
+ },
28
+ {
29
+ "id": "notFound",
30
+ "field": "notFound",
31
+ "optional": true
32
+ },
33
+ {
34
+ "id": "providerRejected",
35
+ "field": "providerRejected",
36
+ "optional": true
37
+ },
38
+ {
39
+ "id": "invalidResponse",
40
+ "field": "invalidResponse",
41
+ "optional": true
42
+ },
43
+ {
44
+ "id": "defect",
45
+ "field": "defect",
46
+ "optional": true
47
+ }
48
+ ],
49
+ "inputSchema": {
50
+ "additionalProperties": false,
51
+ "description": "GetCampaignInput identifies an automation by its positive ID.",
52
+ "properties": {
53
+ "campaignId": {
54
+ "description": "CampaignID is the integer shown in the automation URL.",
55
+ "type": "integer"
56
+ }
57
+ },
58
+ "required": [
59
+ "campaignId"
60
+ ],
61
+ "type": "object"
62
+ }
63
+ },
64
+ {
65
+ "name": "newListCampaignsStep",
66
+ "kind": "query",
67
+ "operationId": "listCampaigns",
68
+ "inputType": "ListCampaignsInput",
69
+ "description": "List all accessible campaign automations.",
70
+ "fields": {
71
+ "stepType": "stepType",
72
+ "annotations": "annotations",
73
+ "connectionName": "connectionName",
74
+ "resultAttribute": "resultAttribute"
75
+ },
76
+ "branches": [
77
+ {
78
+ "id": "listed",
79
+ "field": "listed",
80
+ "optional": false
81
+ },
82
+ {
83
+ "id": "providerRejected",
84
+ "field": "providerRejected",
85
+ "optional": true
86
+ },
87
+ {
88
+ "id": "invalidResponse",
89
+ "field": "invalidResponse",
90
+ "optional": true
91
+ },
92
+ {
93
+ "id": "defect",
94
+ "field": "defect",
95
+ "optional": true
96
+ }
97
+ ],
98
+ "inputSchema": {
99
+ "additionalProperties": false,
100
+ "description": "ListCampaignsInput requests the workspace's automations.",
101
+ "properties": {},
102
+ "type": "object"
103
+ }
104
+ },
105
+ {
106
+ "name": "newGetCampaignMetricsStep",
107
+ "kind": "query",
108
+ "operationId": "getCampaignMetrics",
109
+ "inputType": "GetCampaignMetricsInput",
110
+ "description": "Read version-two campaign metric series for a UTC window.",
111
+ "fields": {
112
+ "stepType": "stepType",
113
+ "annotations": "annotations",
114
+ "connectionName": "connectionName",
115
+ "resultAttribute": "resultAttribute"
116
+ },
117
+ "branches": [
118
+ {
119
+ "id": "found",
120
+ "field": "found",
121
+ "optional": false
122
+ },
123
+ {
124
+ "id": "notFound",
125
+ "field": "notFound",
126
+ "optional": true
127
+ },
128
+ {
129
+ "id": "providerRejected",
130
+ "field": "providerRejected",
131
+ "optional": true
132
+ },
133
+ {
134
+ "id": "invalidResponse",
135
+ "field": "invalidResponse",
136
+ "optional": true
137
+ },
138
+ {
139
+ "id": "defect",
140
+ "field": "defect",
141
+ "optional": true
142
+ }
143
+ ],
144
+ "inputSchema": {
145
+ "additionalProperties": false,
146
+ "description": "GetCampaignMetricsInput selects a UTC metrics window and increment.",
147
+ "properties": {
148
+ "campaignId": {
149
+ "description": "CampaignID is the positive automation ID.",
150
+ "type": "integer"
151
+ },
152
+ "endUnix": {
153
+ "description": "EndUnix is the UTC end time in Unix seconds.",
154
+ "type": "integer"
155
+ },
156
+ "resolution": {
157
+ "description": "Resolution is hours, days, weeks, or months.",
158
+ "type": "string"
159
+ },
160
+ "startUnix": {
161
+ "description": "StartUnix is the inclusive UTC start time in Unix seconds.",
162
+ "type": "integer"
163
+ }
164
+ },
165
+ "required": [
166
+ "campaignId",
167
+ "endUnix",
168
+ "resolution",
169
+ "startUnix"
170
+ ],
171
+ "type": "object"
172
+ }
173
+ },
10
174
  {
11
175
  "name": "newGetCustomersByEmailStep",
12
176
  "kind": "query",
@@ -0,0 +1,237 @@
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(["privateKey"]);
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["privateKey"] != null && !(typeof fields["privateKey"] === "string")) throw new CredentialMaterialError("credential privateKey has an invalid type");
29
+ const credentials = {};
30
+ if (!fields["privateKey"]) throw new CredentialMaterialError("credential privateKey is required");
31
+ credentials.privateKey = new SecretString(fields["privateKey"] ?? "");
32
+ return credentials;
33
+ }
34
+ var GetCampaignInputSchema = z.strictObject({
35
+ "campaignId": z.number().int()
36
+ });
37
+ var CampaignSummarySchema = z.strictObject({
38
+ "id": z.number().int(),
39
+ "name": z.string(),
40
+ "active": z.boolean(),
41
+ "state": z.string()
42
+ });
43
+ var ListCampaignsInputSchema = z.strictObject({});
44
+ var CampaignsPageSchema = z.strictObject({
45
+ "campaigns": z.array(CampaignSummarySchema).nullable()
46
+ });
47
+ var GetCampaignMetricsInputSchema = z.strictObject({
48
+ "campaignId": z.number().int(),
49
+ "startUnix": z.number().int(),
50
+ "endUnix": z.number().int(),
51
+ "resolution": z.string()
52
+ });
53
+ var CampaignMetricsSchema = z.strictObject({
54
+ "campaignId": z.number().int(),
55
+ "series": z.record(z.string(), z.array(z.number().int()).nullable()).nullable()
56
+ });
57
+ var GetCustomersByEmailInputSchema = z.strictObject({
58
+ "email": z.string()
59
+ });
60
+ var CustomerLookupPageSchema = z.strictObject({
61
+ "email": z.string(),
62
+ "customerIDs": z.array(z.string()).nullable()
63
+ });
64
+
65
+ // src/generated/definitions.ts
66
+ var ConnectorID = "customerio";
67
+ var ProviderID = "customerio";
68
+ var GetCampaignBranch = {
69
+ Found: "found",
70
+ NotFound: "notFound",
71
+ ProviderRejected: "providerRejected",
72
+ InvalidResponse: "invalidResponse",
73
+ Defect: "defect"
74
+ };
75
+ var GetCampaignBranchFound = GetCampaignBranch.Found;
76
+ var GetCampaignBranchNotFound = GetCampaignBranch.NotFound;
77
+ var GetCampaignBranchProviderRejected = GetCampaignBranch.ProviderRejected;
78
+ var GetCampaignBranchInvalidResponse = GetCampaignBranch.InvalidResponse;
79
+ var GetCampaignBranchDefect = GetCampaignBranch.Defect;
80
+ var GetCampaignDefinition = {
81
+ operation: { connectorId: ConnectorID, operationId: "getCampaign" },
82
+ branches: [
83
+ { id: "found", description: "Customer.io returned the campaign." },
84
+ { id: "notFound", description: "No accessible campaign has this ID.", optional: true },
85
+ { id: "providerRejected", description: "Customer.io rejected the campaign lookup.", optional: true },
86
+ { id: "invalidResponse", description: "Customer.io returned invalid or oversized JSON.", optional: true },
87
+ { id: "defect", description: "Input or App API credentials are invalid.", optional: true }
88
+ ],
89
+ stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
90
+ };
91
+ var GetCampaignMetadata = { kind: "query", idempotency: "none", authorization: "required" };
92
+ var ListCampaignsBranch = {
93
+ Listed: "listed",
94
+ ProviderRejected: "providerRejected",
95
+ InvalidResponse: "invalidResponse",
96
+ Defect: "defect"
97
+ };
98
+ var ListCampaignsBranchListed = ListCampaignsBranch.Listed;
99
+ var ListCampaignsBranchProviderRejected = ListCampaignsBranch.ProviderRejected;
100
+ var ListCampaignsBranchInvalidResponse = ListCampaignsBranch.InvalidResponse;
101
+ var ListCampaignsBranchDefect = ListCampaignsBranch.Defect;
102
+ var ListCampaignsDefinition = {
103
+ operation: { connectorId: ConnectorID, operationId: "listCampaigns" },
104
+ branches: [
105
+ { id: "listed", description: "Customer.io returned the campaign list." },
106
+ { id: "providerRejected", description: "Customer.io rejected the campaign list.", optional: true },
107
+ { id: "invalidResponse", description: "Customer.io returned invalid or oversized JSON.", optional: true },
108
+ { id: "defect", description: "App API credentials are invalid.", optional: true }
109
+ ],
110
+ stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
111
+ };
112
+ var ListCampaignsMetadata = { kind: "query", idempotency: "none", authorization: "required" };
113
+ var GetCampaignMetricsBranch = {
114
+ Found: "found",
115
+ NotFound: "notFound",
116
+ ProviderRejected: "providerRejected",
117
+ InvalidResponse: "invalidResponse",
118
+ Defect: "defect"
119
+ };
120
+ var GetCampaignMetricsBranchFound = GetCampaignMetricsBranch.Found;
121
+ var GetCampaignMetricsBranchNotFound = GetCampaignMetricsBranch.NotFound;
122
+ var GetCampaignMetricsBranchProviderRejected = GetCampaignMetricsBranch.ProviderRejected;
123
+ var GetCampaignMetricsBranchInvalidResponse = GetCampaignMetricsBranch.InvalidResponse;
124
+ var GetCampaignMetricsBranchDefect = GetCampaignMetricsBranch.Defect;
125
+ var GetCampaignMetricsDefinition = {
126
+ operation: { connectorId: ConnectorID, operationId: "getCampaignMetrics" },
127
+ branches: [
128
+ { id: "found", description: "Customer.io returned campaign metric series." },
129
+ { id: "notFound", description: "No accessible campaign has this ID.", optional: true },
130
+ { id: "providerRejected", description: "Customer.io rejected the metrics request.", optional: true },
131
+ { id: "invalidResponse", description: "Customer.io returned invalid or oversized JSON.", optional: true },
132
+ { id: "defect", description: "Input or App API credentials are invalid.", optional: true }
133
+ ],
134
+ stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
135
+ };
136
+ var GetCampaignMetricsMetadata = { kind: "query", idempotency: "none", authorization: "required" };
137
+ var GetCustomersByEmailBranch = {
138
+ Found: "found",
139
+ ProviderRejected: "providerRejected",
140
+ InvalidResponse: "invalidResponse",
141
+ Defect: "defect"
142
+ };
143
+ var GetCustomersByEmailBranchFound = GetCustomersByEmailBranch.Found;
144
+ var GetCustomersByEmailBranchProviderRejected = GetCustomersByEmailBranch.ProviderRejected;
145
+ var GetCustomersByEmailBranchInvalidResponse = GetCustomersByEmailBranch.InvalidResponse;
146
+ var GetCustomersByEmailBranchDefect = GetCustomersByEmailBranch.Defect;
147
+ var GetCustomersByEmailDefinition = {
148
+ operation: { connectorId: ConnectorID, operationId: "getCustomersByEmail" },
149
+ branches: [
150
+ { id: "found", description: "Customer.io returned matching customer IDs, possibly empty." },
151
+ { id: "providerRejected", description: "Customer.io conclusively rejected the lookup.", optional: true },
152
+ { id: "invalidResponse", description: "Customer.io returned malformed or oversized JSON.", optional: true },
153
+ { id: "defect", description: "Local input or credentials are invalid.", optional: true }
154
+ ],
155
+ stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
156
+ };
157
+ var GetCustomersByEmailMetadata = { kind: "query", idempotency: "none", authorization: "required" };
158
+
159
+ // src/generated/connection.ts
160
+ import { ConnectionRefSchema } from "@superdurable/connectors-sdk";
161
+ var Connection = class {
162
+ /** Stable provider and connection name. */
163
+ reference;
164
+ /** Bound provider operations. */
165
+ operations;
166
+ /** Validate a reference and bind operations. */
167
+ constructor(reference, operations) {
168
+ this.reference = ConnectionRefSchema.parse(reference);
169
+ if (this.reference.provider !== ProviderID) throw new TypeError("connection provider differs from the manifest");
170
+ if (!operations) throw new TypeError("connector operations are required");
171
+ this.operations = operations;
172
+ }
173
+ };
174
+ function newConnection(client, reference) {
175
+ if (!client) throw new TypeError("connector client is required");
176
+ return new Connection(reference, client);
177
+ }
178
+ function newConnectionWithOperations(operations, reference) {
179
+ return new Connection(reference, operations);
180
+ }
181
+ function newProjectConnection(project, connectionName, createClient) {
182
+ if (!project) throw new TypeError("loaded project is required");
183
+ const reference = ConnectionRefSchema.parse({ provider: ProviderID, name: connectionName });
184
+ const selected = project.configuration.connections.find((entry) => entry.connectorId === ConnectorID && entry.connectionName === connectionName);
185
+ if (!selected || selected.provider !== ProviderID) throw new TypeError("project connection is not configured");
186
+ return newConnection(createClient(project, connectionName), reference);
187
+ }
188
+
189
+ export {
190
+ ConfigSchema,
191
+ CredentialMaterialError,
192
+ isCredentialMaterialError,
193
+ decodeCredentials,
194
+ GetCampaignInputSchema,
195
+ CampaignSummarySchema,
196
+ ListCampaignsInputSchema,
197
+ CampaignsPageSchema,
198
+ GetCampaignMetricsInputSchema,
199
+ CampaignMetricsSchema,
200
+ GetCustomersByEmailInputSchema,
201
+ CustomerLookupPageSchema,
202
+ ConnectorID,
203
+ ProviderID,
204
+ GetCampaignBranch,
205
+ GetCampaignBranchFound,
206
+ GetCampaignBranchNotFound,
207
+ GetCampaignBranchProviderRejected,
208
+ GetCampaignBranchInvalidResponse,
209
+ GetCampaignBranchDefect,
210
+ GetCampaignDefinition,
211
+ GetCampaignMetadata,
212
+ ListCampaignsBranch,
213
+ ListCampaignsBranchListed,
214
+ ListCampaignsBranchProviderRejected,
215
+ ListCampaignsBranchInvalidResponse,
216
+ ListCampaignsBranchDefect,
217
+ ListCampaignsDefinition,
218
+ ListCampaignsMetadata,
219
+ GetCampaignMetricsBranch,
220
+ GetCampaignMetricsBranchFound,
221
+ GetCampaignMetricsBranchNotFound,
222
+ GetCampaignMetricsBranchProviderRejected,
223
+ GetCampaignMetricsBranchInvalidResponse,
224
+ GetCampaignMetricsBranchDefect,
225
+ GetCampaignMetricsDefinition,
226
+ GetCampaignMetricsMetadata,
227
+ GetCustomersByEmailBranch,
228
+ GetCustomersByEmailBranchFound,
229
+ GetCustomersByEmailBranchProviderRejected,
230
+ GetCustomersByEmailBranchInvalidResponse,
231
+ GetCustomersByEmailBranchDefect,
232
+ GetCustomersByEmailDefinition,
233
+ GetCustomersByEmailMetadata,
234
+ Connection,
235
+ newConnectionWithOperations,
236
+ newProjectConnection
237
+ };
@@ -0,0 +1,155 @@
1
+ import { CredentialProvider, SecretString, Query, ConnectionRef } from '@superdurable/connectors-sdk';
2
+ import { z } from 'zod';
3
+
4
+ /** Connector configuration; omitted fields use manifest defaults. */
5
+ interface Config {
6
+ /** Customer.io App API HTTPS root. Blank uses the displayed US-region default; override with https://api-eu.customer.io for an EU workspace. Do not include path, query, or credentials. */
7
+ baseUrl?: string;
8
+ /** Maximum duration of one App API request as a positive Go duration. Blank uses the displayed default; increase only for slow responses. Runtime value in milliseconds. */
9
+ timeoutMs?: number;
10
+ /** Maximum complete App API JSON response in bytes as a positive integer. Blank uses the displayed default; increase for large customer or campaign responses. */
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 App API private key from Customer.io > Settings > API Credentials > App API > Create API Key. Copy the complete sk_ key or existing App API key with profile and campaign read access, not its label; blank prevents calls. Dex sends it only as a Bearer credential. */
22
+ privateKey: 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
+ /** GetCampaignInput identifies an automation by its positive ID. */
35
+ interface GetCampaignInput {
36
+ /** CampaignID is the integer shown in the automation URL. */
37
+ "campaignId": number;
38
+ }
39
+ /** CampaignSummary contains the stable public identity and status of one automation. */
40
+ interface CampaignSummary {
41
+ /** ID is the Customer.io campaign ID. */
42
+ "id": number;
43
+ /** Name is the automation name. */
44
+ "name": string;
45
+ /** Active indicates that the automation is enabled. */
46
+ "active": boolean;
47
+ /** State is the provider's automation lifecycle state. */
48
+ "state": string;
49
+ }
50
+ /** ListCampaignsInput requests the workspace's automations. */
51
+ interface ListCampaignsInput {
52
+ }
53
+ /** CampaignsPage contains all automations returned by the App API. */
54
+ interface CampaignsPage {
55
+ /** Campaigns are the returned automations in provider order. */
56
+ "campaigns": Array<CampaignSummary> | null;
57
+ }
58
+ /** GetCampaignMetricsInput selects a UTC metrics window and increment. */
59
+ interface GetCampaignMetricsInput {
60
+ /** CampaignID is the positive automation ID. */
61
+ "campaignId": number;
62
+ /** StartUnix is the inclusive UTC start time in Unix seconds. */
63
+ "startUnix": number;
64
+ /** EndUnix is the UTC end time in Unix seconds. */
65
+ "endUnix": number;
66
+ /** Resolution is hours, days, weeks, or months. */
67
+ "resolution": string;
68
+ }
69
+ /** CampaignMetrics contains the provider's numeric series for one campaign. */
70
+ interface CampaignMetrics {
71
+ /** CampaignID identifies the requested automation. */
72
+ "campaignId": number;
73
+ /** Series maps provider metric names to counts in the requested increments. */
74
+ "series": {
75
+ [key: string]: Array<number> | null;
76
+ } | null;
77
+ }
78
+ /** GetCustomersByEmailInput identifies an exact non-secret customer email address. */
79
+ interface GetCustomersByEmailInput {
80
+ /** Email is the complete email address shown on the Customer.io People page. */
81
+ "email": string;
82
+ }
83
+ /** CustomerLookupPage contains Customer.io profile IDs matching an email. */
84
+ interface CustomerLookupPage {
85
+ /** Email is the address supplied to Customer.io. */
86
+ "email": string;
87
+ /** CustomerIDs are the matching cio_id values in provider order. */
88
+ "customerIDs": Array<string> | null;
89
+ }
90
+ /** Runtime validator for GetCampaignInput. */
91
+ declare const GetCampaignInputSchema: z.ZodObject<{
92
+ campaignId: z.ZodNumber;
93
+ }, z.core.$strict>;
94
+ /** Runtime validator for CampaignSummary. */
95
+ declare const CampaignSummarySchema: z.ZodObject<{
96
+ id: z.ZodNumber;
97
+ name: z.ZodString;
98
+ active: z.ZodBoolean;
99
+ state: z.ZodString;
100
+ }, z.core.$strict>;
101
+ /** Runtime validator for ListCampaignsInput. */
102
+ declare const ListCampaignsInputSchema: z.ZodObject<{}, z.core.$strict>;
103
+ /** Runtime validator for CampaignsPage. */
104
+ declare const CampaignsPageSchema: z.ZodObject<{
105
+ campaigns: z.ZodNullable<z.ZodArray<z.ZodObject<{
106
+ id: z.ZodNumber;
107
+ name: z.ZodString;
108
+ active: z.ZodBoolean;
109
+ state: z.ZodString;
110
+ }, z.core.$strict>>>;
111
+ }, z.core.$strict>;
112
+ /** Runtime validator for GetCampaignMetricsInput. */
113
+ declare const GetCampaignMetricsInputSchema: z.ZodObject<{
114
+ campaignId: z.ZodNumber;
115
+ startUnix: z.ZodNumber;
116
+ endUnix: z.ZodNumber;
117
+ resolution: z.ZodString;
118
+ }, z.core.$strict>;
119
+ /** Runtime validator for CampaignMetrics. */
120
+ declare const CampaignMetricsSchema: z.ZodObject<{
121
+ campaignId: z.ZodNumber;
122
+ series: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodArray<z.ZodNumber>>>>;
123
+ }, z.core.$strict>;
124
+ /** Runtime validator for GetCustomersByEmailInput. */
125
+ declare const GetCustomersByEmailInputSchema: z.ZodObject<{
126
+ email: z.ZodString;
127
+ }, z.core.$strict>;
128
+ /** Runtime validator for CustomerLookupPage. */
129
+ declare const CustomerLookupPageSchema: z.ZodObject<{
130
+ email: z.ZodString;
131
+ customerIDs: z.ZodNullable<z.ZodArray<z.ZodString>>;
132
+ }, z.core.$strict>;
133
+
134
+ /** Typed operations supplied by a client or mock. */
135
+ interface Operations {
136
+ /** Invoke getCampaign through this connection. */
137
+ getCampaign(): Query<GetCampaignInput, CampaignSummary>;
138
+ /** Invoke listCampaigns through this connection. */
139
+ listCampaigns(): Query<ListCampaignsInput, CampaignsPage>;
140
+ /** Invoke getCampaignMetrics through this connection. */
141
+ getCampaignMetrics(): Query<GetCampaignMetricsInput, CampaignMetrics>;
142
+ /** Invoke getCustomersByEmail through this connection. */
143
+ getCustomersByEmail(): Query<GetCustomersByEmailInput, CustomerLookupPage>;
144
+ }
145
+ /** Named connector connection kept outside Flow state. */
146
+ declare class Connection<BoundOperations = Operations> {
147
+ /** Stable provider and connection name. */
148
+ readonly reference: ConnectionRef;
149
+ /** Bound provider operations. */
150
+ readonly operations: BoundOperations;
151
+ /** Validate a reference and bind operations. */
152
+ constructor(reference: ConnectionRef, operations: BoundOperations);
153
+ }
154
+
155
+ export { type CampaignMetrics as C, type GetCampaignMetricsInput as G, type ListCampaignsInput as L, type Operations as O, Connection as a, type GetCampaignInput as b, type CampaignSummary as c, type GetCustomersByEmailInput as d, type CustomerLookupPage as e, type CampaignsPage as f, type Config as g, type Credentials as h, CampaignMetricsSchema as i, CampaignSummarySchema as j, CampaignsPageSchema as k, ConfigSchema as l, CredentialMaterialError as m, type CredentialSource as n, CustomerLookupPageSchema as o, GetCampaignInputSchema as p, GetCampaignMetricsInputSchema as q, GetCustomersByEmailInputSchema as r, ListCampaignsInputSchema as s, decodeCredentials as t, isCredentialMaterialError as u };