Skip to content

Commit 1d87ac0

Browse files
Merge branch 'main' into fix/pathFromRefreshToken
2 parents 35046f4 + 4536dd7 commit 1d87ac0

10 files changed

Lines changed: 403 additions & 393 deletions

File tree

apify/loaders/getActorRun.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ export default async function getActorRun(
4747

4848
if (props.includeDatasetItems && result.data.defaultDatasetId) {
4949
const datasetItemsResponse = await ctx.api
50-
["GET /v2/datasets/:datasetId/items"]({
51-
datasetId: result.data.defaultDatasetId,
52-
format: "json",
53-
});
50+
["GET /v2/datasets/:datasetId/items"]({
51+
datasetId: result.data.defaultDatasetId,
52+
format: "json",
53+
});
5454
result.data.results = await datasetItemsResponse.json(); // Place dataset items in the response.
5555
}
5656

compat/std/loaders/x/redirects.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ export interface Redirect {
1111
* @description Path is url pattern. https://developer.mozilla.org/en-US/docs/Web/API/URL_Pattern_API
1212
*/
1313
to: string;
14+
/**
15+
* @default "temporary"
16+
*/
1417
type?: "temporary" | "permanent";
1518
/**
1619
* @title Discard query parameters

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@
6262
"jsx": "react-jsx",
6363
"jsxImportSource": "preact"
6464
},
65-
"version": "0.126.9"
65+
"version": "0.126.10"
6666
}

hubspot/actions/conversations/sendThreadComment.ts

Lines changed: 111 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -2,148 +2,148 @@ import type { AppContext } from "../../mod.ts";
22
import { HubSpotClient } from "../../utils/client.ts";
33

44
export interface Attachment {
5-
/**
6-
* @title Attachment Type
7-
* @description Type of attachment
8-
*/
9-
type: "FILE" | "QUICK_REPLIES" | "SOCIAL_MEDIA_METADATA";
10-
11-
/**
12-
* @title File ID
13-
* @description ID of the file (required for FILE type)
14-
*/
15-
fileId?: string;
16-
17-
/**
18-
* @title Name
19-
* @description Name of the attachment
20-
*/
21-
name?: string;
22-
23-
/**
24-
* @title URL
25-
* @description URL of the attachment
26-
*/
27-
url?: string;
28-
29-
/**
30-
* @title File Usage Type
31-
* @description Usage type for the file
32-
*/
33-
fileUsageType?: string;
5+
/**
6+
* @title Attachment Type
7+
* @description Type of attachment
8+
*/
9+
type: "FILE" | "QUICK_REPLIES" | "SOCIAL_MEDIA_METADATA";
10+
11+
/**
12+
* @title File ID
13+
* @description ID of the file (required for FILE type)
14+
*/
15+
fileId?: string;
16+
17+
/**
18+
* @title Name
19+
* @description Name of the attachment
20+
*/
21+
name?: string;
22+
23+
/**
24+
* @title URL
25+
* @description URL of the attachment
26+
*/
27+
url?: string;
28+
29+
/**
30+
* @title File Usage Type
31+
* @description Usage type for the file
32+
*/
33+
fileUsageType?: string;
3434
}
3535

3636
export interface Props {
37-
/**
38-
* @title Thread ID
39-
* @description The ID of the conversation thread
40-
*/
41-
threadId: string;
42-
43-
/**
44-
* @title Comment Text
45-
* @description The text content of the comment
46-
*/
47-
text: string;
48-
49-
/**
50-
* @title Rich Text
51-
* @description Rich text content (HTML)
52-
*/
53-
richText?: string;
54-
55-
/**
56-
* @title Attachments
57-
* @description Array of attachments
58-
*/
59-
attachments?: Attachment[];
37+
/**
38+
* @title Thread ID
39+
* @description The ID of the conversation thread
40+
*/
41+
threadId: string;
42+
43+
/**
44+
* @title Comment Text
45+
* @description The text content of the comment
46+
*/
47+
text: string;
48+
49+
/**
50+
* @title Rich Text
51+
* @description Rich text content (HTML)
52+
*/
53+
richText?: string;
54+
55+
/**
56+
* @title Attachments
57+
* @description Array of attachments
58+
*/
59+
attachments?: Attachment[];
6060
}
6161

6262
export interface Client {
63-
clientType: "HUBSPOT";
64-
integrationAppId: number;
63+
clientType: "HUBSPOT";
64+
integrationAppId: number;
6565
}
6666

6767
export interface Sender {
68-
actorId: string;
69-
name?: string;
70-
senderField?: string;
71-
deliveryIdentifier?: {
72-
type: string;
73-
value: string;
74-
};
68+
actorId: string;
69+
name?: string;
70+
senderField?: string;
71+
deliveryIdentifier?: {
72+
type: string;
73+
value: string;
74+
};
7575
}
7676

7777
export interface MessageRecipient {
78-
actorId: string;
79-
name?: string;
80-
deliveryIdentifier?: {
81-
type: string;
82-
value: string;
83-
};
84-
recipientField?: string;
78+
actorId: string;
79+
name?: string;
80+
deliveryIdentifier?: {
81+
type: string;
82+
value: string;
83+
};
84+
recipientField?: string;
8585
}
8686

8787
export interface FailureDetails {
88-
errorMessageTokens: Record<string, unknown>;
89-
errorMessage?: string;
88+
errorMessageTokens: Record<string, unknown>;
89+
errorMessage?: string;
9090
}
9191

9292
export interface MessageStatus {
93-
statusType: "SENT" | "FAILED" | "PENDING";
94-
failureDetails?: FailureDetails;
93+
statusType: "SENT" | "FAILED" | "PENDING";
94+
failureDetails?: FailureDetails;
9595
}
9696

9797
export interface CommentResponse {
98-
type: "COMMENT";
99-
id: string;
100-
conversationsThreadId: string;
101-
createdAt: string;
102-
updatedAt?: string;
103-
createdBy: string;
104-
client: Client;
105-
senders: Sender[];
106-
recipients: MessageRecipient[];
107-
archived: boolean;
108-
text?: string;
109-
richText?: string;
110-
attachments: Attachment[];
111-
subject?: string;
112-
truncationStatus:
113-
| "NOT_TRUNCATED"
114-
| "TRUNCATED_TO_MOST_RECENT_REPLY"
115-
| "TRUNCATED";
116-
inReplyToId?: string;
117-
status?: MessageStatus;
118-
direction: "INCOMING" | "OUTGOING";
119-
channelId: string;
120-
channelAccountId: string;
98+
type: "COMMENT";
99+
id: string;
100+
conversationsThreadId: string;
101+
createdAt: string;
102+
updatedAt?: string;
103+
createdBy: string;
104+
client: Client;
105+
senders: Sender[];
106+
recipients: MessageRecipient[];
107+
archived: boolean;
108+
text?: string;
109+
richText?: string;
110+
attachments: Attachment[];
111+
subject?: string;
112+
truncationStatus:
113+
| "NOT_TRUNCATED"
114+
| "TRUNCATED_TO_MOST_RECENT_REPLY"
115+
| "TRUNCATED";
116+
inReplyToId?: string;
117+
status?: MessageStatus;
118+
direction: "INCOMING" | "OUTGOING";
119+
channelId: string;
120+
channelAccountId: string;
121121
}
122122

123123
/**
124124
* @title Send Thread Comment
125125
* @description Send a comment to a conversation thread
126126
*/
127127
export default async function sendThreadComment(
128-
props: Props,
129-
_req: Request,
130-
ctx: AppContext,
128+
props: Props,
129+
_req: Request,
130+
ctx: AppContext,
131131
): Promise<CommentResponse> {
132-
const { threadId, text, richText, attachments = [] } = props;
132+
const { threadId, text, richText, attachments = [] } = props;
133133

134-
const client = new HubSpotClient(ctx);
134+
const client = new HubSpotClient(ctx);
135135

136-
const commentData: Record<string, unknown> = {
137-
type: "COMMENT",
138-
text,
139-
...(richText && { richText }),
140-
...(attachments.length > 0 && { attachments }),
141-
};
136+
const commentData: Record<string, unknown> = {
137+
type: "COMMENT",
138+
text,
139+
...(richText && { richText }),
140+
...(attachments.length > 0 && { attachments }),
141+
};
142142

143-
const response = await client.post<CommentResponse>(
144-
`/conversations/v3/conversations/threads/${threadId}/messages`,
145-
commentData,
146-
);
143+
const response = await client.post<CommentResponse>(
144+
`/conversations/v3/conversations/threads/${threadId}/messages`,
145+
commentData,
146+
);
147147

148-
return response;
148+
return response;
149149
}

0 commit comments

Comments
 (0)