@superdurable/connector-hootsuite 0.0.0-stage → 0.1.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/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,7 @@
1
- # Temporary Holding Version
1
+ # Hootsuite for Dex TypeScript
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ This package implements `listSocialProfiles`, `listScheduledPosts`, and `schedulePost` with generated typed Steps, a renewable OAuth connection, and bounded provider requests. See the [connector guide](../README.md) for Hootsuite app setup.
4
+
5
+ `schedulePost` can create a real scheduled message. If the outcome is `uncertain`, inspect Hootsuite Planner before asking for another post. Go-recorded provider scenarios are replayed in `test/conformance.test.ts`; live Hootsuite authorization remains unverified.
6
+
7
+ The runnable [social profiles Flow](examples/social-profiles/README.md) uses the static `hootsuite` Dex Web connection. Run `npm ci` and `npm run check` from this package. The Flow's real Dex integration test uses a local Hootsuite fixture and does not need provider credentials.
@@ -0,0 +1,173 @@
1
+ {
2
+ "connectorId": "hootsuite",
3
+ "releaseTag": "connectors/hootsuite/go/v0.1.0",
4
+ "package": {
5
+ "ecosystem": "npm",
6
+ "name": "@superdurable/connector-hootsuite",
7
+ "version": "0.1.0"
8
+ },
9
+ "factories": [
10
+ {
11
+ "name": "newListSocialProfilesStep",
12
+ "kind": "query",
13
+ "operationId": "listSocialProfiles",
14
+ "inputType": "ListSocialProfilesInput",
15
+ "description": "Return the connected user's visible social profile IDs, network types, and usernames.",
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": "ListSocialProfilesInput requests profiles visible to the connected user.",
47
+ "properties": {},
48
+ "type": "object"
49
+ }
50
+ },
51
+ {
52
+ "name": "newListScheduledPostsStep",
53
+ "kind": "query",
54
+ "operationId": "listScheduledPosts",
55
+ "inputType": "ListScheduledPostsInput",
56
+ "description": "Read one page of scheduled outbound messages within a UTC interval of at most four weeks.",
57
+ "fields": {
58
+ "stepType": "stepType",
59
+ "annotations": "annotations",
60
+ "connectionName": "connectionName",
61
+ "resultAttribute": "resultAttribute"
62
+ },
63
+ "branches": [
64
+ {
65
+ "id": "listed",
66
+ "field": "listed",
67
+ "optional": false
68
+ },
69
+ {
70
+ "id": "providerRejected",
71
+ "field": "providerRejected",
72
+ "optional": true
73
+ },
74
+ {
75
+ "id": "invalidResponse",
76
+ "field": "invalidResponse",
77
+ "optional": true
78
+ },
79
+ {
80
+ "id": "defect",
81
+ "field": "defect",
82
+ "optional": true
83
+ }
84
+ ],
85
+ "inputSchema": {
86
+ "additionalProperties": false,
87
+ "description": "ListScheduledPostsInput selects one page of scheduled messages in a UTC interval.",
88
+ "properties": {
89
+ "cursor": {
90
+ "description": "Cursor is the opaque cursor from a prior page; empty selects the first page.",
91
+ "type": "string"
92
+ },
93
+ "endTime": {
94
+ "description": "EndTime is the exclusive UTC instant, no later than four weeks after StartTime.",
95
+ "type": "string"
96
+ },
97
+ "socialProfileId": {
98
+ "description": "SocialProfileID optionally filters to one ID returned by listSocialProfiles.",
99
+ "type": "string"
100
+ },
101
+ "startTime": {
102
+ "description": "StartTime is the inclusive UTC instant, formatted as RFC 3339 with a Z suffix.",
103
+ "type": "string"
104
+ }
105
+ },
106
+ "required": [
107
+ "endTime",
108
+ "startTime"
109
+ ],
110
+ "type": "object"
111
+ }
112
+ },
113
+ {
114
+ "name": "newSchedulePostStep",
115
+ "kind": "mutation",
116
+ "operationId": "schedulePost",
117
+ "inputType": "SchedulePostInput",
118
+ "description": "Schedule a text message on one social profile; inspect Hootsuite Planner if the outcome is uncertain.",
119
+ "fields": {
120
+ "stepType": "stepType",
121
+ "annotations": "annotations",
122
+ "connectionName": "connectionName",
123
+ "resultAttribute": "resultAttribute"
124
+ },
125
+ "branches": [
126
+ {
127
+ "id": "scheduled",
128
+ "field": "scheduled",
129
+ "optional": false
130
+ },
131
+ {
132
+ "id": "providerRejected",
133
+ "field": "providerRejected",
134
+ "optional": true
135
+ },
136
+ {
137
+ "id": "uncertain",
138
+ "field": "uncertain",
139
+ "optional": true
140
+ },
141
+ {
142
+ "id": "defect",
143
+ "field": "defect",
144
+ "optional": true
145
+ }
146
+ ],
147
+ "inputSchema": {
148
+ "additionalProperties": false,
149
+ "description": "SchedulePostInput schedules one text message on one social profile.",
150
+ "properties": {
151
+ "scheduledSendTime": {
152
+ "description": "ScheduledSendTime is an ISO-8601 UTC instant ending in Z.",
153
+ "type": "string"
154
+ },
155
+ "socialProfileId": {
156
+ "description": "SocialProfileID is a stable ID returned by listSocialProfiles.",
157
+ "type": "string"
158
+ },
159
+ "text": {
160
+ "description": "Text is the message body; Hootsuite applies network-specific length restrictions.",
161
+ "type": "string"
162
+ }
163
+ },
164
+ "required": [
165
+ "scheduledSendTime",
166
+ "socialProfileId",
167
+ "text"
168
+ ],
169
+ "type": "object"
170
+ }
171
+ }
172
+ ]
173
+ }
@@ -0,0 +1,216 @@
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
+ function decodeCredentials(value) {
10
+ if (!value || typeof value !== "object" || Array.isArray(value)) throw new TypeError("credential fields are invalid");
11
+ const fields = value;
12
+ const allowed = /* @__PURE__ */ new Set(["access_token", "oauth_client_id", "oauth_client_secret", "refresh_token"]);
13
+ if (Object.keys(fields).some((key) => !allowed.has(key))) throw new TypeError("stored credential does not match the connector credential fields");
14
+ if (fields["access_token"] != null && !(typeof fields["access_token"] === "string")) throw new TypeError("credential access_token has an invalid type");
15
+ if (fields["oauth_client_id"] != null && !(typeof fields["oauth_client_id"] === "string")) throw new TypeError("credential oauth_client_id has an invalid type");
16
+ if (fields["oauth_client_secret"] != null && !(typeof fields["oauth_client_secret"] === "string")) throw new TypeError("credential oauth_client_secret has an invalid type");
17
+ if (fields["refresh_token"] != null && !(typeof fields["refresh_token"] === "string")) throw new TypeError("credential refresh_token has an invalid type");
18
+ const credentials = {};
19
+ if (!fields["oauth_client_id"]) throw new TypeError("credential oauth_client_id is required");
20
+ credentials.oauthClientId = fields["oauth_client_id"] ?? "";
21
+ if (!fields["oauth_client_secret"]) throw new TypeError("credential oauth_client_secret is required");
22
+ credentials.oauthClientSecret = new SecretString(fields["oauth_client_secret"] ?? "");
23
+ if (!fields["access_token"]) throw new TypeError("credential access_token is required");
24
+ credentials.accessToken = new SecretString(fields["access_token"] ?? "");
25
+ if (!fields["refresh_token"]) throw new TypeError("credential refresh_token is required");
26
+ credentials.refreshToken = new SecretString(fields["refresh_token"] ?? "");
27
+ return credentials;
28
+ }
29
+ function decodeSharedCredentials(value) {
30
+ if (!value || typeof value !== "object" || Array.isArray(value)) throw new TypeError("credential fields are invalid");
31
+ const fields = value;
32
+ const allowed = /* @__PURE__ */ new Set(["access_token", "oauth_client_id", "oauth_client_secret", "refresh_token"]);
33
+ if (Object.keys(fields).some((key) => !allowed.has(key))) throw new TypeError("stored credential does not match the connector credential fields");
34
+ if (fields["access_token"] != null && !(typeof fields["access_token"] === "string")) throw new TypeError("credential access_token has an invalid type");
35
+ if (fields["oauth_client_id"] != null && !(typeof fields["oauth_client_id"] === "string")) throw new TypeError("credential oauth_client_id has an invalid type");
36
+ if (fields["oauth_client_secret"] != null && !(typeof fields["oauth_client_secret"] === "string")) throw new TypeError("credential oauth_client_secret has an invalid type");
37
+ if (fields["refresh_token"] != null && !(typeof fields["refresh_token"] === "string")) throw new TypeError("credential refresh_token has an invalid type");
38
+ const credentials = {};
39
+ if (!fields["oauth_client_id"]) throw new TypeError("credential oauth_client_id is required");
40
+ credentials.oauthClientId = fields["oauth_client_id"] ?? "";
41
+ credentials.oauthClientSecret = new SecretString(fields["oauth_client_secret"] ?? "");
42
+ if (!fields["access_token"]) throw new TypeError("credential access_token is required");
43
+ credentials.accessToken = new SecretString(fields["access_token"] ?? "");
44
+ credentials.refreshToken = new SecretString(fields["refresh_token"] ?? "");
45
+ return credentials;
46
+ }
47
+ var ListSocialProfilesInputSchema = z.strictObject({});
48
+ var SocialProfileSchema = z.strictObject({
49
+ "id": z.string(),
50
+ "type": z.string(),
51
+ "username": z.string()
52
+ });
53
+ var SocialProfilesPageSchema = z.strictObject({
54
+ "profiles": z.array(SocialProfileSchema).nullable()
55
+ });
56
+ var ListScheduledPostsInputSchema = z.strictObject({
57
+ "startTime": z.string(),
58
+ "endTime": z.string(),
59
+ "socialProfileId": z.string().optional(),
60
+ "cursor": z.string().optional()
61
+ });
62
+ var ScheduledPostSchema = z.strictObject({
63
+ "id": z.string(),
64
+ "state": z.string(),
65
+ "socialProfileId": z.string(),
66
+ "scheduledSendTime": z.string()
67
+ });
68
+ var ScheduledPostsPageSchema = z.strictObject({
69
+ "posts": z.array(ScheduledPostSchema).nullable(),
70
+ "nextCursor": z.string()
71
+ });
72
+ var SchedulePostInputSchema = z.strictObject({
73
+ "text": z.string(),
74
+ "socialProfileId": z.string(),
75
+ "scheduledSendTime": z.string()
76
+ });
77
+ var ScheduledPostReceiptSchema = z.strictObject({
78
+ "id": z.string(),
79
+ "state": z.string(),
80
+ "socialProfileId": z.string()
81
+ });
82
+
83
+ // src/generated/definitions.ts
84
+ var ConnectorID = "hootsuite";
85
+ var ProviderID = "hootsuite";
86
+ var ListSocialProfilesBranch = {
87
+ Listed: "listed",
88
+ ProviderRejected: "providerRejected",
89
+ InvalidResponse: "invalidResponse",
90
+ Defect: "defect"
91
+ };
92
+ var ListSocialProfilesBranchListed = ListSocialProfilesBranch.Listed;
93
+ var ListSocialProfilesBranchProviderRejected = ListSocialProfilesBranch.ProviderRejected;
94
+ var ListSocialProfilesBranchInvalidResponse = ListSocialProfilesBranch.InvalidResponse;
95
+ var ListSocialProfilesBranchDefect = ListSocialProfilesBranch.Defect;
96
+ var ListSocialProfilesDefinition = {
97
+ operation: { connectorId: ConnectorID, operationId: "listSocialProfiles" },
98
+ branches: [
99
+ { id: "listed", description: "Hootsuite returned the visible profiles." },
100
+ { id: "providerRejected", description: "Hootsuite definitively rejected the lookup.", optional: true },
101
+ { id: "invalidResponse", description: "Hootsuite returned malformed or oversized JSON.", optional: true },
102
+ { id: "defect", description: "Local connection credentials are invalid.", optional: true }
103
+ ],
104
+ stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
105
+ };
106
+ var ListSocialProfilesMetadata = { kind: "query", idempotency: "none", authorization: "required" };
107
+ var ListScheduledPostsBranch = {
108
+ Listed: "listed",
109
+ ProviderRejected: "providerRejected",
110
+ InvalidResponse: "invalidResponse",
111
+ Defect: "defect"
112
+ };
113
+ var ListScheduledPostsBranchListed = ListScheduledPostsBranch.Listed;
114
+ var ListScheduledPostsBranchProviderRejected = ListScheduledPostsBranch.ProviderRejected;
115
+ var ListScheduledPostsBranchInvalidResponse = ListScheduledPostsBranch.InvalidResponse;
116
+ var ListScheduledPostsBranchDefect = ListScheduledPostsBranch.Defect;
117
+ var ListScheduledPostsDefinition = {
118
+ operation: { connectorId: ConnectorID, operationId: "listScheduledPosts" },
119
+ branches: [
120
+ { id: "listed", description: "Hootsuite returned one scheduled message page." },
121
+ { id: "providerRejected", description: "Hootsuite definitively rejected the lookup.", optional: true },
122
+ { id: "invalidResponse", description: "Hootsuite returned malformed or oversized JSON.", optional: true },
123
+ { id: "defect", description: "Local input or connection credentials are invalid.", optional: true }
124
+ ],
125
+ stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
126
+ };
127
+ var ListScheduledPostsMetadata = { kind: "query", idempotency: "none", authorization: "required" };
128
+ var SchedulePostBranch = {
129
+ Scheduled: "scheduled",
130
+ ProviderRejected: "providerRejected",
131
+ Uncertain: "uncertain",
132
+ Defect: "defect"
133
+ };
134
+ var SchedulePostBranchScheduled = SchedulePostBranch.Scheduled;
135
+ var SchedulePostBranchProviderRejected = SchedulePostBranch.ProviderRejected;
136
+ var SchedulePostBranchUncertain = SchedulePostBranch.Uncertain;
137
+ var SchedulePostBranchDefect = SchedulePostBranch.Defect;
138
+ var SchedulePostDefinition = {
139
+ operation: { connectorId: ConnectorID, operationId: "schedulePost" },
140
+ branches: [
141
+ { id: "scheduled", description: "Hootsuite accepted the scheduled message and returned its ID." },
142
+ { id: "providerRejected", description: "Hootsuite definitively rejected the schedule request.", optional: true },
143
+ { id: "uncertain", description: "The request may have reached Hootsuite but no message ID was confirmed; inspect Planner before resending.", optional: true },
144
+ { id: "defect", description: "Local post input, credentials, or dispatch checkpoint is invalid.", optional: true }
145
+ ],
146
+ stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "sync" }
147
+ };
148
+ var SchedulePostMetadata = { kind: "mutation", idempotency: "required", authorization: "required" };
149
+
150
+ // src/generated/connection.ts
151
+ import { ConnectionRefSchema } from "@superdurable/connectors-sdk";
152
+ import { newRefreshingCredentialProvider } from "@superdurable/connectors-sdk/projectconfig";
153
+ var Connection = class {
154
+ /** Stable provider and connection name. */
155
+ reference;
156
+ /** Bound provider operations. */
157
+ operations;
158
+ /** Validate a reference and bind operations. */
159
+ constructor(reference, operations) {
160
+ this.reference = ConnectionRefSchema.parse(reference);
161
+ if (this.reference.provider !== ProviderID) throw new TypeError("connection provider differs from the manifest");
162
+ if (!operations) throw new TypeError("connector operations are required");
163
+ this.operations = operations;
164
+ }
165
+ };
166
+ function newConnection(client, reference) {
167
+ if (!client) throw new TypeError("connector client is required");
168
+ return new Connection(reference, client);
169
+ }
170
+ function newConnectionWithOperations(operations, reference) {
171
+ return new Connection(reference, operations);
172
+ }
173
+ function newProjectCredentialProvider(project, connectionName, decode, encode, decodeShared) {
174
+ return newRefreshingCredentialProvider(project.connections, { connectorId: ConnectorID, connectionName }, decode, encode, decodeShared);
175
+ }
176
+
177
+ export {
178
+ ConfigSchema,
179
+ decodeCredentials,
180
+ decodeSharedCredentials,
181
+ ListSocialProfilesInputSchema,
182
+ SocialProfileSchema,
183
+ SocialProfilesPageSchema,
184
+ ListScheduledPostsInputSchema,
185
+ ScheduledPostSchema,
186
+ ScheduledPostsPageSchema,
187
+ SchedulePostInputSchema,
188
+ ScheduledPostReceiptSchema,
189
+ ConnectorID,
190
+ ProviderID,
191
+ ListSocialProfilesBranch,
192
+ ListSocialProfilesBranchListed,
193
+ ListSocialProfilesBranchProviderRejected,
194
+ ListSocialProfilesBranchInvalidResponse,
195
+ ListSocialProfilesBranchDefect,
196
+ ListSocialProfilesDefinition,
197
+ ListSocialProfilesMetadata,
198
+ ListScheduledPostsBranch,
199
+ ListScheduledPostsBranchListed,
200
+ ListScheduledPostsBranchProviderRejected,
201
+ ListScheduledPostsBranchInvalidResponse,
202
+ ListScheduledPostsBranchDefect,
203
+ ListScheduledPostsDefinition,
204
+ ListScheduledPostsMetadata,
205
+ SchedulePostBranch,
206
+ SchedulePostBranchScheduled,
207
+ SchedulePostBranchProviderRejected,
208
+ SchedulePostBranchUncertain,
209
+ SchedulePostBranchDefect,
210
+ SchedulePostDefinition,
211
+ SchedulePostMetadata,
212
+ Connection,
213
+ newConnection,
214
+ newConnectionWithOperations,
215
+ newProjectCredentialProvider
216
+ };
@@ -0,0 +1,176 @@
1
+ import { RefreshingCredentialProvider, 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
+ /** Hootsuite API root as an absolute HTTPS URL. Blank uses the displayed production endpoint; override only for a trusted test gateway. */
7
+ baseUrl?: string;
8
+ /** Positive duration for one Hootsuite request in Go units such as 15s or 1m. Blank uses the displayed default; increase for a slow approved gateway. Runtime value in milliseconds. */
9
+ timeoutMs?: number;
10
+ /** Positive maximum complete Hootsuite response in bytes. Blank uses the displayed default; increase only for a known large profile list. */
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 Bearer token returned by Hootsuite consent and refreshed by Dex. Never enter it manually; blank requires authorization. */
22
+ accessToken: SecretString;
23
+ /** Non-secret Client ID from https://developer.hootsuite.com/ > My Apps > select your app > REST API credentials. Blank prevents authorization or refresh. */
24
+ oauthClientId: string;
25
+ /** Secret Client Secret from https://developer.hootsuite.com/ > My Apps > select your app > REST API credentials. Store only in Dex; blank prevents authorization or refresh. */
26
+ oauthClientSecret: SecretString;
27
+ /** Secret refresh token returned with offline consent. Dex rotates it on refresh; blank requires reauthorization. */
28
+ refreshToken: SecretString;
29
+ }
30
+ /** Decode private credential fields for the connector. */
31
+ declare function decodeCredentials(value: unknown): Credentials;
32
+ /** Decode shared credential fields for the connector. */
33
+ declare function decodeSharedCredentials(value: unknown): Credentials;
34
+ /** Host-owned source of private connector credentials. */
35
+ type CredentialSource = RefreshingCredentialProvider<Credentials>;
36
+ /** ListSocialProfilesInput requests profiles visible to the connected user. */
37
+ interface ListSocialProfilesInput {
38
+ }
39
+ /** SocialProfile contains one visible publishing channel. */
40
+ interface SocialProfile {
41
+ /** ID is Hootsuite's stable social profile ID. */
42
+ "id": string;
43
+ /** Type is the connected social network, such as FACEBOOK. */
44
+ "type": string;
45
+ /** Username is the account label shown by Hootsuite. */
46
+ "username": string;
47
+ }
48
+ /** SocialProfilesPage contains the bounded list returned by Hootsuite. */
49
+ interface SocialProfilesPage {
50
+ /** Profiles are the connected user's visible social profiles. */
51
+ "profiles": Array<SocialProfile> | null;
52
+ }
53
+ /** ListScheduledPostsInput selects one page of scheduled messages in a UTC interval. */
54
+ interface ListScheduledPostsInput {
55
+ /** StartTime is the inclusive UTC instant, formatted as RFC 3339 with a Z suffix. */
56
+ "startTime": string;
57
+ /** EndTime is the exclusive UTC instant, no later than four weeks after StartTime. */
58
+ "endTime": string;
59
+ /** SocialProfileID optionally filters to one ID returned by listSocialProfiles. */
60
+ "socialProfileId"?: string | undefined;
61
+ /** Cursor is the opaque cursor from a prior page; empty selects the first page. */
62
+ "cursor"?: string | undefined;
63
+ }
64
+ /** ScheduledPost identifies a scheduled outbound message without returning its text. */
65
+ interface ScheduledPost {
66
+ /** ID is Hootsuite's stable message ID. */
67
+ "id": string;
68
+ /** State is the provider's outbound message state. */
69
+ "state": string;
70
+ /** SocialProfileID is the destination social profile. */
71
+ "socialProfileId": string;
72
+ /** ScheduledSendTime is the UTC send instant. */
73
+ "scheduledSendTime": string;
74
+ }
75
+ /** ScheduledPostsPage contains at most 100 scheduled messages and a continuation cursor. */
76
+ interface ScheduledPostsPage {
77
+ /** Posts contains the scheduled messages in provider order. */
78
+ "posts": Array<ScheduledPost> | null;
79
+ /** NextCursor is empty when there is no next page. */
80
+ "nextCursor": string;
81
+ }
82
+ /** SchedulePostInput schedules one text message on one social profile. */
83
+ interface SchedulePostInput {
84
+ /** Text is the message body; Hootsuite applies network-specific length restrictions. */
85
+ "text": string;
86
+ /** SocialProfileID is a stable ID returned by listSocialProfiles. */
87
+ "socialProfileId": string;
88
+ /** ScheduledSendTime is an ISO-8601 UTC instant ending in Z. */
89
+ "scheduledSendTime": string;
90
+ }
91
+ /** ScheduledPostReceipt identifies a message accepted by Hootsuite. */
92
+ interface ScheduledPostReceipt {
93
+ /** ID is Hootsuite's stable message ID. */
94
+ "id": string;
95
+ /** State is the state Hootsuite assigned to the message. */
96
+ "state": string;
97
+ /** SocialProfileID is the requested destination profile. */
98
+ "socialProfileId": string;
99
+ }
100
+ /** Runtime validator for ListSocialProfilesInput. */
101
+ declare const ListSocialProfilesInputSchema: z.ZodObject<{}, z.core.$strict>;
102
+ /** Runtime validator for SocialProfile. */
103
+ declare const SocialProfileSchema: z.ZodObject<{
104
+ id: z.ZodString;
105
+ type: z.ZodString;
106
+ username: z.ZodString;
107
+ }, z.core.$strict>;
108
+ /** Runtime validator for SocialProfilesPage. */
109
+ declare const SocialProfilesPageSchema: z.ZodObject<{
110
+ profiles: z.ZodNullable<z.ZodArray<z.ZodObject<{
111
+ id: z.ZodString;
112
+ type: z.ZodString;
113
+ username: z.ZodString;
114
+ }, z.core.$strict>>>;
115
+ }, z.core.$strict>;
116
+ /** Runtime validator for ListScheduledPostsInput. */
117
+ declare const ListScheduledPostsInputSchema: z.ZodObject<{
118
+ startTime: z.ZodString;
119
+ endTime: z.ZodString;
120
+ socialProfileId: z.ZodOptional<z.ZodString>;
121
+ cursor: z.ZodOptional<z.ZodString>;
122
+ }, z.core.$strict>;
123
+ /** Runtime validator for ScheduledPost. */
124
+ declare const ScheduledPostSchema: z.ZodObject<{
125
+ id: z.ZodString;
126
+ state: z.ZodString;
127
+ socialProfileId: z.ZodString;
128
+ scheduledSendTime: z.ZodString;
129
+ }, z.core.$strict>;
130
+ /** Runtime validator for ScheduledPostsPage. */
131
+ declare const ScheduledPostsPageSchema: z.ZodObject<{
132
+ posts: z.ZodNullable<z.ZodArray<z.ZodObject<{
133
+ id: z.ZodString;
134
+ state: z.ZodString;
135
+ socialProfileId: z.ZodString;
136
+ scheduledSendTime: z.ZodString;
137
+ }, z.core.$strict>>>;
138
+ nextCursor: z.ZodString;
139
+ }, z.core.$strict>;
140
+ /** Runtime validator for SchedulePostInput. */
141
+ declare const SchedulePostInputSchema: z.ZodObject<{
142
+ text: z.ZodString;
143
+ socialProfileId: z.ZodString;
144
+ scheduledSendTime: z.ZodString;
145
+ }, z.core.$strict>;
146
+ /** Runtime validator for ScheduledPostReceipt. */
147
+ declare const ScheduledPostReceiptSchema: z.ZodObject<{
148
+ id: z.ZodString;
149
+ state: z.ZodString;
150
+ socialProfileId: z.ZodString;
151
+ }, z.core.$strict>;
152
+
153
+ /** Typed operations supplied by a client or mock. */
154
+ interface Operations {
155
+ /** Invoke listSocialProfiles through this connection. */
156
+ listSocialProfiles(): Query<ListSocialProfilesInput, SocialProfilesPage>;
157
+ /** Invoke listScheduledPosts through this connection. */
158
+ listScheduledPosts(): Query<ListScheduledPostsInput, ScheduledPostsPage>;
159
+ /** Invoke schedulePost through this connection. */
160
+ schedulePost(): Mutation<SchedulePostInput, ScheduledPostReceipt>;
161
+ }
162
+ /** Named connector connection kept outside Flow state. */
163
+ declare class Connection<BoundOperations = Operations> {
164
+ /** Stable provider and connection name. */
165
+ readonly reference: ConnectionRef;
166
+ /** Bound provider operations. */
167
+ readonly operations: BoundOperations;
168
+ /** Validate a reference and bind operations. */
169
+ constructor(reference: ConnectionRef, operations: BoundOperations);
170
+ }
171
+ /** Bind a client to a named connection. */
172
+ declare function newConnection(client: Operations, reference: ConnectionRef): Connection;
173
+ /** Bind scripted operations to a named connection. */
174
+ declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
175
+
176
+ export { Connection as C, type ListScheduledPostsInput as L, type Operations as O, type ScheduledPostsPage as S, type ListSocialProfilesInput as a, type SocialProfilesPage as b, type SchedulePostInput as c, type ScheduledPostReceipt as d, type Config as e, type Credentials as f, ConfigSchema as g, type CredentialSource as h, ListScheduledPostsInputSchema as i, ListSocialProfilesInputSchema as j, SchedulePostInputSchema as k, type ScheduledPost as l, ScheduledPostReceiptSchema as m, ScheduledPostSchema as n, ScheduledPostsPageSchema as o, type SocialProfile as p, SocialProfileSchema as q, SocialProfilesPageSchema as r, decodeCredentials as s, decodeSharedCredentials as t, newConnection as u, newConnectionWithOperations as v };