strapi-plugin-hubspot 0.7.0 → 0.9.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/CHANGELOG.md +38 -0
- package/README.md +28 -0
- package/dist/_chunks/{Forms-CKA6ukB6.mjs → Forms-BsKys-Hc.mjs} +404 -42
- package/dist/_chunks/{Forms-HMZbTk_B.js → Forms-JuzNfsbL.js} +401 -39
- package/dist/_chunks/{HubspotFormInput-CKYRcNNU.mjs → HubspotFormInput-CIvHS5rp.mjs} +1 -1
- package/dist/_chunks/{HubspotFormInput-BequMb12.js → HubspotFormInput-ph9pe6xY.js} +1 -1
- package/dist/_chunks/{HubspotObjectInput-V3uhGK8k.mjs → HubspotObjectInput-BX1qYD2c.mjs} +3 -3
- package/dist/_chunks/{HubspotObjectInput-D-FGwsyS.js → HubspotObjectInput-dAd-lMdD.js} +3 -3
- package/dist/_chunks/{HubspotPropertyInput-Dn1QvOcu.js → HubspotPropertyInput-BM3ZaY8f.js} +3 -3
- package/dist/_chunks/{HubspotPropertyInput-DrBsx9jQ.mjs → HubspotPropertyInput-C2Z6472q.mjs} +3 -3
- package/dist/_chunks/{Settings-Cgp7M1Cv.js → Settings-Cdcjy9DA.js} +2 -2
- package/dist/_chunks/{Settings-BjkNbyna.mjs → Settings-DnwGetcc.mjs} +2 -2
- package/dist/_chunks/{en-Cun5LoUP.mjs → en-CcQWnXra.mjs} +50 -3
- package/dist/_chunks/{en-D5Ch9YFo.js → en-Cqfair98.js} +50 -3
- package/dist/_chunks/{fr-ClOWflse.mjs → fr-CBRZ9q8U.mjs} +50 -3
- package/dist/_chunks/{fr-CqlhHltZ.js → fr-D117-3Ta.js} +50 -3
- package/dist/_chunks/{index-D2Q34BuH.js → index-BbRtXnAL.js} +6 -6
- package/dist/_chunks/{index-FKsiOEPB.mjs → index-LTaVoyWJ.mjs} +6 -6
- package/dist/_chunks/{objectLabels-DBKevJle.mjs → objectLabels-DE2xGq7f.mjs} +1 -1
- package/dist/_chunks/{objectLabels-LAQ0M6-a.js → objectLabels-DU0Cagt_.js} +1 -1
- package/dist/_chunks/{useHubspotSchema-BC0Od-Wl.mjs → useHubspotSchema-BSKow0X3.mjs} +1 -1
- package/dist/_chunks/{useHubspotSchema-C08qBAyy.js → useHubspotSchema-DzBMAxv7.js} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/builder/types.d.ts +26 -0
- package/dist/admin/src/pages/Forms.d.ts +5 -1
- package/dist/admin/src/pages/Submissions.d.ts +8 -0
- package/dist/server/index.js +396 -21
- package/dist/server/index.mjs +396 -21
- package/dist/server/src/__tests__/importHubspot.test.d.ts +1 -0
- package/dist/server/src/__tests__/submissions.test.d.ts +1 -0
- package/dist/server/src/content-types.d.ts +3 -0
- package/dist/server/src/forms.d.ts +2 -0
- package/dist/server/src/formsAdmin.d.ts +19 -0
- package/dist/server/src/importHubspot.d.ts +85 -0
- package/dist/server/src/importLegacy.d.ts +1 -0
- package/dist/server/src/index.d.ts +32 -1
- package/dist/server/src/submissions.d.ts +28 -0
- package/dist/shared/types.d.ts +2 -0
- package/package.json +2 -2
|
@@ -20,6 +20,7 @@ export interface ConvertedForm {
|
|
|
20
20
|
nextLabel?: string | null;
|
|
21
21
|
submitLabel?: string | null;
|
|
22
22
|
successMessage?: string | null;
|
|
23
|
+
class?: string | null;
|
|
23
24
|
definition: FormDefinition;
|
|
24
25
|
}
|
|
25
26
|
export declare function convertLegacyForm(entry: Record<string, unknown>, map?: ImportMap): ConvertedForm;
|
|
@@ -22,7 +22,7 @@ declare const _default: {
|
|
|
22
22
|
kind: string;
|
|
23
23
|
collectionName: string;
|
|
24
24
|
info: {
|
|
25
|
-
singularName: string;
|
|
25
|
+
singularName: string;
|
|
26
26
|
pluralName: string;
|
|
27
27
|
displayName: string;
|
|
28
28
|
description: string;
|
|
@@ -96,6 +96,9 @@ declare const _default: {
|
|
|
96
96
|
};
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
|
+
class: {
|
|
100
|
+
type: string;
|
|
101
|
+
};
|
|
99
102
|
definition: {
|
|
100
103
|
type: string;
|
|
101
104
|
required: boolean;
|
|
@@ -253,8 +256,36 @@ declare const _default: {
|
|
|
253
256
|
options(ctx: import("./formsAdmin").Ctx): Promise<void>;
|
|
254
257
|
listSources(ctx: import("./formsAdmin").Ctx): Promise<void>;
|
|
255
258
|
runImport(ctx: import("./formsAdmin").Ctx): Promise<void>;
|
|
259
|
+
listHubspotSources(ctx: import("./formsAdmin").Ctx): Promise<void>;
|
|
260
|
+
runHubspotImport(ctx: import("./formsAdmin").Ctx): Promise<void>;
|
|
261
|
+
duplicate(ctx: import("./formsAdmin").Ctx): Promise<void>;
|
|
256
262
|
remove(ctx: import("./formsAdmin").Ctx): Promise<void>;
|
|
257
263
|
};
|
|
264
|
+
submissions: ({ strapi }: {
|
|
265
|
+
strapi: Core.Strapi;
|
|
266
|
+
}) => {
|
|
267
|
+
/** Paged submissions, newest first, optionally narrowed to one form. */
|
|
268
|
+
list(ctx: {
|
|
269
|
+
query: {
|
|
270
|
+
form?: string;
|
|
271
|
+
page?: string;
|
|
272
|
+
pageSize?: string;
|
|
273
|
+
};
|
|
274
|
+
body: unknown;
|
|
275
|
+
}): Promise<void>;
|
|
276
|
+
/**
|
|
277
|
+
* Whole history of one form as CSV, definition columns first. Returned as
|
|
278
|
+
* JSON (`{ csv, filename }`): the admin fetch client speaks JSON, and the
|
|
279
|
+
* page turns it into a download — no auth-header gymnastics.
|
|
280
|
+
*/
|
|
281
|
+
export(ctx: {
|
|
282
|
+
query: {
|
|
283
|
+
form?: string;
|
|
284
|
+
};
|
|
285
|
+
body: unknown;
|
|
286
|
+
throw: (s: number, m: string) => never;
|
|
287
|
+
}): Promise<void>;
|
|
288
|
+
};
|
|
258
289
|
forms: ({ strapi }: {
|
|
259
290
|
strapi: Core.Strapi;
|
|
260
291
|
}) => {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading side of the submissions store — the admin's Submissions tab and its
|
|
3
|
+
* CSV export. Pure shaping here; the controller does the fetching.
|
|
4
|
+
*
|
|
5
|
+
* The CSV columns follow the *form definition* order (the way the editor
|
|
6
|
+
* reads the form), then any extra keys found in older submissions — a field
|
|
7
|
+
* renamed or removed since doesn't lose its historical answers.
|
|
8
|
+
*/
|
|
9
|
+
import type { FormDefinition } from "./conditions";
|
|
10
|
+
export interface SubmissionRow {
|
|
11
|
+
documentId: string;
|
|
12
|
+
form: string;
|
|
13
|
+
formTitle?: string | null;
|
|
14
|
+
email?: string | null;
|
|
15
|
+
values: Record<string, string | number | boolean>;
|
|
16
|
+
meta?: Record<string, string> | null;
|
|
17
|
+
locale?: string | null;
|
|
18
|
+
hubspotSynced?: boolean;
|
|
19
|
+
createdAt?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Field names in definition order — the natural reading order of the form. */
|
|
22
|
+
export declare function fieldOrder(definition: FormDefinition | null | undefined): string[];
|
|
23
|
+
/**
|
|
24
|
+
* Submissions → CSV. `knownFields` (usually `fieldOrder(definition)`) leads;
|
|
25
|
+
* keys present in the rows but not in the definition are appended, sorted, so
|
|
26
|
+
* nothing recorded is ever silently dropped from an export.
|
|
27
|
+
*/
|
|
28
|
+
export declare function submissionsCsv(rows: SubmissionRow[], knownFields: string[]): string;
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -72,6 +72,8 @@ export interface PublicForm {
|
|
|
72
72
|
nextLabel?: string | null;
|
|
73
73
|
submitLabel?: string | null;
|
|
74
74
|
successMessage?: string | null;
|
|
75
|
+
/** Extra utility classes on the form wrapper, for the host frontend. */
|
|
76
|
+
class?: string | null;
|
|
75
77
|
locale?: string | null;
|
|
76
78
|
steps: PublicFormStep[];
|
|
77
79
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "strapi-plugin-hubspot",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "The form builder for HubSpot in Strapi — multi-step forms with conditional fields mapped to real CRM properties, a public submit pipeline with retries, and save-time mapping validation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"strapi",
|
|
@@ -100,4 +100,4 @@
|
|
|
100
100
|
"engines": {
|
|
101
101
|
"node": ">=18.0.0"
|
|
102
102
|
}
|
|
103
|
-
}
|
|
103
|
+
}
|