@23blocks/block-forms 3.3.0 → 5.0.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 +352 -0
- package/README.md +107 -138
- package/dist/index.esm.js +509 -172
- package/dist/src/lib/forms.block.d.ts +1 -5
- package/dist/src/lib/forms.block.d.ts.map +1 -1
- package/dist/src/lib/mappers/application-form.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/appointment.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/form-instance.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/form-schema.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/form-set.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/form.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/landing.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/mail-template.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/referral.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/subscription.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/survey.mapper.d.ts.map +1 -1
- package/dist/src/lib/mappers/utils.d.ts +2 -2
- package/dist/src/lib/mappers/utils.d.ts.map +1 -1
- package/dist/src/lib/services/application-forms.service.d.ts +1 -40
- package/dist/src/lib/services/application-forms.service.d.ts.map +1 -1
- package/dist/src/lib/services/appointments.service.d.ts +1 -54
- package/dist/src/lib/services/appointments.service.d.ts.map +1 -1
- package/dist/src/lib/services/crm-sync.service.d.ts +3 -35
- package/dist/src/lib/services/crm-sync.service.d.ts.map +1 -1
- package/dist/src/lib/services/form-instances.service.d.ts +1 -56
- package/dist/src/lib/services/form-instances.service.d.ts.map +1 -1
- package/dist/src/lib/services/form-schema-versions.service.d.ts +1 -45
- package/dist/src/lib/services/form-schema-versions.service.d.ts.map +1 -1
- package/dist/src/lib/services/form-schemas.service.d.ts +1 -32
- package/dist/src/lib/services/form-schemas.service.d.ts.map +1 -1
- package/dist/src/lib/services/form-sets.service.d.ts +1 -37
- package/dist/src/lib/services/form-sets.service.d.ts.map +1 -1
- package/dist/src/lib/services/forms.service.d.ts +1 -27
- package/dist/src/lib/services/forms.service.d.ts.map +1 -1
- package/dist/src/lib/services/landings.service.d.ts +1 -32
- package/dist/src/lib/services/landings.service.d.ts.map +1 -1
- package/dist/src/lib/services/mail-templates.service.d.ts +1 -32
- package/dist/src/lib/services/mail-templates.service.d.ts.map +1 -1
- package/dist/src/lib/services/referrals.service.d.ts +1 -32
- package/dist/src/lib/services/referrals.service.d.ts.map +1 -1
- package/dist/src/lib/services/subscriptions.service.d.ts +1 -32
- package/dist/src/lib/services/subscriptions.service.d.ts.map +1 -1
- package/dist/src/lib/services/surveys.service.d.ts +1 -59
- package/dist/src/lib/services/surveys.service.d.ts.map +1 -1
- package/dist/src/lib/types/application-form.d.ts +0 -21
- package/dist/src/lib/types/application-form.d.ts.map +1 -1
- package/dist/src/lib/types/appointment.d.ts +68 -18
- package/dist/src/lib/types/appointment.d.ts.map +1 -1
- package/dist/src/lib/types/crm-sync.d.ts +5 -4
- package/dist/src/lib/types/crm-sync.d.ts.map +1 -1
- package/dist/src/lib/types/form-instance.d.ts +22 -20
- package/dist/src/lib/types/form-instance.d.ts.map +1 -1
- package/dist/src/lib/types/form-schema-version.d.ts +6 -6
- package/dist/src/lib/types/form-schema-version.d.ts.map +1 -1
- package/dist/src/lib/types/form-schema.d.ts +6 -11
- package/dist/src/lib/types/form-schema.d.ts.map +1 -1
- package/dist/src/lib/types/form-set.d.ts +45 -19
- package/dist/src/lib/types/form-set.d.ts.map +1 -1
- package/dist/src/lib/types/form.d.ts +60 -2
- package/dist/src/lib/types/form.d.ts.map +1 -1
- package/dist/src/lib/types/landing.d.ts +45 -11
- package/dist/src/lib/types/landing.d.ts.map +1 -1
- package/dist/src/lib/types/mail-template.d.ts +45 -21
- package/dist/src/lib/types/mail-template.d.ts.map +1 -1
- package/dist/src/lib/types/referral.d.ts +61 -21
- package/dist/src/lib/types/referral.d.ts.map +1 -1
- package/dist/src/lib/types/subscription.d.ts +39 -8
- package/dist/src/lib/types/subscription.d.ts.map +1 -1
- package/dist/src/lib/types/survey.d.ts +42 -6
- package/dist/src/lib/types/survey.d.ts.map +1 -1
- package/package.json +3 -1
|
@@ -4,10 +4,6 @@ import { type FormsService, type FormSchemasService, type FormSchemaVersionsServ
|
|
|
4
4
|
* Configuration for the Forms block.
|
|
5
5
|
*/
|
|
6
6
|
export interface FormsBlockConfig extends BlockConfig {
|
|
7
|
-
/** Application ID */
|
|
8
|
-
appId: string;
|
|
9
|
-
/** Tenant ID (optional, for multi-tenant setups) */
|
|
10
|
-
tenantId?: string;
|
|
11
7
|
}
|
|
12
8
|
/**
|
|
13
9
|
* Dynamic forms and submissions block interface.
|
|
@@ -47,7 +43,7 @@ export interface FormsBlock {
|
|
|
47
43
|
*
|
|
48
44
|
* @example
|
|
49
45
|
* ```typescript
|
|
50
|
-
* const block = createFormsBlock(transport, {
|
|
46
|
+
* const block = createFormsBlock(transport, { apiKey: 'xxx' });
|
|
51
47
|
* const forms = await block.forms.list({ page: 1 });
|
|
52
48
|
* ```
|
|
53
49
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forms.block.d.ts","sourceRoot":"","sources":["../../../src/lib/forms.block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACtG,OAAO,EAcL,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW;
|
|
1
|
+
{"version":3,"file":"forms.block.d.ts","sourceRoot":"","sources":["../../../src/lib/forms.block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACtG,OAAO,EAcL,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW;CACpD;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,8BAA8B;IAC9B,KAAK,EAAE,YAAY,CAAC;IAEpB,sCAAsC;IACtC,OAAO,EAAE,kBAAkB,CAAC;IAE5B,gDAAgD;IAChD,cAAc,EAAE,yBAAyB,CAAC;IAE1C,4CAA4C;IAC5C,SAAS,EAAE,oBAAoB,CAAC;IAEhC,4CAA4C;IAC5C,IAAI,EAAE,eAAe,CAAC;IAEtB,6BAA6B;IAC7B,QAAQ,EAAE,eAAe,CAAC;IAE1B,kCAAkC;IAClC,aAAa,EAAE,oBAAoB,CAAC;IAEpC,iCAAiC;IACjC,YAAY,EAAE,mBAAmB,CAAC;IAElC,4BAA4B;IAC5B,OAAO,EAAE,cAAc,CAAC;IAExB,8BAA8B;IAC9B,SAAS,EAAE,gBAAgB,CAAC;IAE5B,qBAAqB;IACrB,aAAa,EAAE,oBAAoB,CAAC;IAEpC,4CAA4C;IAC5C,gBAAgB,EAAE,uBAAuB,CAAC;IAE1C,0BAA0B;IAC1B,OAAO,EAAE,cAAc,CAAC;IACxB,uCAAuC;IACvC,MAAM,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACxC;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,gBAAgB,GACvB,UAAU,CAiBZ;AAED,eAAO,MAAM,kBAAkB,EAAE,aAmBhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-form.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/application-form.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAsB,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAclI,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"application-form.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/application-form.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAsB,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAclI,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,eAAe,CAwBjE,CAAC;AAEF;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,eAAe,CAOrF;AAED,eAAO,MAAM,6BAA6B,EAAE,cAAc,CAAC,uBAAuB,CAajF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/appointment.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG3D,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"appointment.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/appointment.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG3D,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAC,WAAW,CAwCzD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-instance.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/form-instance.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAG9D,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"form-instance.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/form-instance.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAG9D,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,YAAY,CAoB3D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-schema.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/form-schema.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAG1D,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"form-schema.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/form-schema.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAG1D,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,UAAU,CAiBvD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-set.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/form-set.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"form-set.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/form-set.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAe,MAAM,sBAAsB,CAAC;AAGjE,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,OAAO,CAmCjD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/form.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAG7C,eAAO,MAAM,UAAU,EAAE,cAAc,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"form.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/form.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAG7C,eAAO,MAAM,UAAU,EAAE,cAAc,CAAC,IAAI,CA+C3C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"landing.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/landing.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAGnD,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"landing.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/landing.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAGnD,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,OAAO,CAgCjD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mail-template.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/mail-template.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAG9D,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"mail-template.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/mail-template.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAG9D,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,YAAY,CA2B3D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"referral.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/referral.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGrD,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"referral.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/referral.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGrD,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,QAAQ,CAiCnD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/subscription.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAG7D,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"subscription.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/subscription.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAG7D,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,YAAY,CA8B3D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"survey.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/survey.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAGjD,eAAO,MAAM,YAAY,EAAE,cAAc,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"survey.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/survey.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAGjD,eAAO,MAAM,YAAY,EAAE,cAAc,CAAC,MAAM,CAgC/C,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Parse a string value, returning undefined for empty/undefined
|
|
3
3
|
*/
|
|
4
|
-
export declare function parseString(value: unknown): string
|
|
4
|
+
export declare function parseString(value: unknown): string;
|
|
5
5
|
/**
|
|
6
6
|
* Parse a date value
|
|
7
7
|
*/
|
|
8
|
-
export declare function parseDate(value: unknown): Date
|
|
8
|
+
export declare function parseDate(value: unknown): Date;
|
|
9
9
|
/**
|
|
10
10
|
* Parse a boolean value
|
|
11
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAMlD;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAe9C;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQpD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,GAAG,SAAS,CAQrE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAMlD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAMtE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAMtG"}
|
|
@@ -1,52 +1,13 @@
|
|
|
1
1
|
import type { Transport } from '@23blocks/contracts';
|
|
2
2
|
import type { ApplicationForm, ApplicationFormSubmission, ApplicationFormDraft, ApplicationFormResponse, SendOtpResponse, VerifyOtpRequest } from '../types/application-form.js';
|
|
3
3
|
export interface ApplicationFormsService {
|
|
4
|
-
/**
|
|
5
|
-
* Get public form via magic link
|
|
6
|
-
* If OTP verification is required, returns form with verificationStatus: 'pending'
|
|
7
|
-
* and limited fields (no schema/uiSchema until verified)
|
|
8
|
-
* @param urlId - The magic link URL identifier for the form
|
|
9
|
-
* @returns The ApplicationForm record (may have limited fields if OTP is pending)
|
|
10
|
-
*/
|
|
11
4
|
get(urlId: string): Promise<ApplicationForm>;
|
|
12
|
-
/**
|
|
13
|
-
* Submit a completed form
|
|
14
|
-
* Requires OTP verification if form has OTP enabled
|
|
15
|
-
* @param urlId - The magic link URL identifier for the form
|
|
16
|
-
* @param data - The form submission data and optional payload
|
|
17
|
-
* @returns The ApplicationFormResponse confirming the submission
|
|
18
|
-
*/
|
|
19
5
|
submit(urlId: string, data: ApplicationFormSubmission): Promise<ApplicationFormResponse>;
|
|
20
|
-
/**
|
|
21
|
-
* Save form as draft
|
|
22
|
-
* Requires OTP verification if form has OTP enabled
|
|
23
|
-
* @param urlId - The magic link URL identifier for the form
|
|
24
|
-
* @param data - The partial form data and optional payload to save
|
|
25
|
-
* @returns The ApplicationFormResponse confirming the draft was saved
|
|
26
|
-
*/
|
|
27
6
|
draft(urlId: string, data: ApplicationFormDraft): Promise<ApplicationFormResponse>;
|
|
28
|
-
/**
|
|
29
|
-
* Send OTP verification code to user's email
|
|
30
|
-
* @param urlId - The magic link URL identifier for the form
|
|
31
|
-
* @returns Response indicating OTP was sent, including expiration details
|
|
32
|
-
* @throws Error with code RATE_LIMITED if called too frequently (60s cooldown)
|
|
33
|
-
* @throws Error with code ALREADY_VERIFIED if form is already verified
|
|
34
|
-
* @throws Error with code OTP_NOT_REQUIRED if form doesn't require OTP
|
|
35
|
-
*/
|
|
36
7
|
sendOtp(urlId: string): Promise<SendOtpResponse>;
|
|
37
|
-
/**
|
|
38
|
-
* Verify OTP code and get full form access
|
|
39
|
-
* On success, returns full form with schema and fields
|
|
40
|
-
* @param urlId - The magic link URL identifier for the form
|
|
41
|
-
* @param data - The verification code to validate
|
|
42
|
-
* @returns The full ApplicationForm record with schema and fields unlocked
|
|
43
|
-
* @throws Error with code INVALID_CODE if code is wrong (includes attemptsRemaining)
|
|
44
|
-
* @throws Error with code CODE_EXPIRED if code has expired (10 min lifetime)
|
|
45
|
-
* @throws Error with code ATTEMPTS_EXCEEDED if max attempts (5) reached
|
|
46
|
-
*/
|
|
47
8
|
verifyOtp(urlId: string, data: VerifyOtpRequest): Promise<ApplicationForm>;
|
|
48
9
|
}
|
|
49
10
|
export declare function createApplicationFormsService(transport: Transport, _config: {
|
|
50
|
-
|
|
11
|
+
apiKey: string;
|
|
51
12
|
}): ApplicationFormsService;
|
|
52
13
|
//# sourceMappingURL=application-forms.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-forms.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/application-forms.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EACV,eAAe,EACf,yBAAyB,EACzB,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAGtC,MAAM,WAAW,uBAAuB;IACtC
|
|
1
|
+
{"version":3,"file":"application-forms.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/application-forms.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EACV,eAAe,EACf,yBAAyB,EACzB,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAGtC,MAAM,WAAW,uBAAuB;IACtC,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAC7C,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACzF,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACnF,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IACjD,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAC5E;AAED,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,uBAAuB,CAiCxH"}
|
|
@@ -1,70 +1,17 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { Appointment, CreateAppointmentRequest, UpdateAppointmentRequest, ListAppointmentsParams, AppointmentReportRequest, AppointmentReportSummary } from '../types/appointment.js';
|
|
3
3
|
export interface AppointmentsService {
|
|
4
|
-
/**
|
|
5
|
-
* List all appointments for a form
|
|
6
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
7
|
-
* @param params - Optional filtering by status, date range, and pagination
|
|
8
|
-
* @returns Paginated result containing Appointment items and metadata
|
|
9
|
-
*/
|
|
10
4
|
list(formUniqueId: string, params?: ListAppointmentsParams): Promise<PageResult<Appointment>>;
|
|
11
|
-
/**
|
|
12
|
-
* Get a specific appointment
|
|
13
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
14
|
-
* @param uniqueId - The unique identifier of the appointment
|
|
15
|
-
* @returns The matching Appointment record
|
|
16
|
-
*/
|
|
17
5
|
get(formUniqueId: string, uniqueId: string): Promise<Appointment>;
|
|
18
|
-
/**
|
|
19
|
-
* Create a new appointment
|
|
20
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
21
|
-
* @param data - Appointment details including contact info, schedule, and location
|
|
22
|
-
* @returns The newly created Appointment record
|
|
23
|
-
*/
|
|
24
6
|
create(formUniqueId: string, data: CreateAppointmentRequest): Promise<Appointment>;
|
|
25
|
-
/**
|
|
26
|
-
* Update an existing appointment
|
|
27
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
28
|
-
* @param uniqueId - The unique identifier of the appointment to update
|
|
29
|
-
* @param data - Fields to update such as schedule, contact info, or status
|
|
30
|
-
* @returns The updated Appointment record
|
|
31
|
-
*/
|
|
32
7
|
update(formUniqueId: string, uniqueId: string, data: UpdateAppointmentRequest): Promise<Appointment>;
|
|
33
|
-
/**
|
|
34
|
-
* Delete an appointment
|
|
35
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
36
|
-
* @param uniqueId - The unique identifier of the appointment to delete
|
|
37
|
-
* @returns Resolves when the appointment has been deleted
|
|
38
|
-
*/
|
|
39
8
|
delete(formUniqueId: string, uniqueId: string): Promise<void>;
|
|
40
|
-
/**
|
|
41
|
-
* Confirm an appointment
|
|
42
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
43
|
-
* @param uniqueId - The unique identifier of the appointment to confirm
|
|
44
|
-
* @returns The updated Appointment record with confirmed status
|
|
45
|
-
*/
|
|
46
9
|
confirm(formUniqueId: string, uniqueId: string): Promise<Appointment>;
|
|
47
|
-
/**
|
|
48
|
-
* Cancel an appointment
|
|
49
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
50
|
-
* @param uniqueId - The unique identifier of the appointment to cancel
|
|
51
|
-
* @returns The updated Appointment record with cancelled status
|
|
52
|
-
*/
|
|
53
10
|
cancel(formUniqueId: string, uniqueId: string): Promise<Appointment>;
|
|
54
|
-
/**
|
|
55
|
-
* Generate an appointment report list
|
|
56
|
-
* @param data - Report criteria including form, date range, status, and grouping
|
|
57
|
-
* @returns Array of Appointment records matching the report criteria
|
|
58
|
-
*/
|
|
59
11
|
reportList(data: AppointmentReportRequest): Promise<Appointment[]>;
|
|
60
|
-
/**
|
|
61
|
-
* Generate an appointment report summary
|
|
62
|
-
* @param data - Report criteria including form, date range, status, and grouping
|
|
63
|
-
* @returns Aggregated summary statistics for matching appointments
|
|
64
|
-
*/
|
|
65
12
|
reportSummary(data: AppointmentReportRequest): Promise<AppointmentReportSummary>;
|
|
66
13
|
}
|
|
67
14
|
export declare function createAppointmentsService(transport: Transport, _config: {
|
|
68
|
-
|
|
15
|
+
apiKey: string;
|
|
69
16
|
}): AppointmentsService;
|
|
70
17
|
//# sourceMappingURL=appointments.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointments.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/appointments.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,WAAW,mBAAmB;IAClC
|
|
1
|
+
{"version":3,"file":"appointments.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/appointments.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;IAC9F,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAClE,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACnF,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACrG,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,OAAO,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACtE,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACrE,UAAU,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACnE,aAAa,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;CAClF;AAED,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,mBAAmB,CA0IhH"}
|
|
@@ -1,47 +1,15 @@
|
|
|
1
1
|
import type { Transport } from '@23blocks/contracts';
|
|
2
2
|
import type { CrmSyncResult, CrmSyncBatchRequest, CrmSyncBatchResult, CrmConnectionStatus, CrmSyncStatus } from '../types/crm-sync.js';
|
|
3
3
|
export interface CrmSyncService {
|
|
4
|
-
/**
|
|
5
|
-
* Sync a landing record to CRM
|
|
6
|
-
* @param uniqueId - The unique identifier of the landing record to sync
|
|
7
|
-
* @returns Sync outcome including success flag, timestamp, and optional CRM record ID
|
|
8
|
-
*/
|
|
9
4
|
syncLanding(uniqueId: string): Promise<CrmSyncResult>;
|
|
10
|
-
/**
|
|
11
|
-
* Sync a subscription record to CRM
|
|
12
|
-
* @param uniqueId - The unique identifier of the subscription record to sync
|
|
13
|
-
* @returns Sync outcome including success flag, timestamp, and optional CRM record ID
|
|
14
|
-
*/
|
|
15
5
|
syncSubscription(uniqueId: string): Promise<CrmSyncResult>;
|
|
16
|
-
|
|
17
|
-
* Sync an appointment record to CRM
|
|
18
|
-
* @param uniqueId - The unique identifier of the appointment record to sync
|
|
19
|
-
* @returns Sync outcome including success flag, timestamp, and optional CRM record ID
|
|
20
|
-
*/
|
|
21
|
-
syncAppointment(uniqueId: string): Promise<CrmSyncResult>;
|
|
22
|
-
/**
|
|
23
|
-
* Batch sync multiple records to CRM
|
|
24
|
-
* @param data - Batch request specifying record type and array of unique IDs
|
|
25
|
-
* @returns Batch result with total, synced, and failed counts plus per-record results
|
|
26
|
-
*/
|
|
6
|
+
syncAppointment(uniqueId: string, asType?: string): Promise<CrmSyncResult>;
|
|
27
7
|
batchSync(data: CrmSyncBatchRequest): Promise<CrmSyncBatchResult>;
|
|
28
|
-
|
|
29
|
-
* Retry all previously failed sync operations
|
|
30
|
-
* @returns Batch result with total, synced, and failed counts plus per-record results
|
|
31
|
-
*/
|
|
32
|
-
retryFailed(): Promise<CrmSyncBatchResult>;
|
|
33
|
-
/**
|
|
34
|
-
* Test CRM connection
|
|
35
|
-
* @returns Connection status including provider, connectivity, and any errors
|
|
36
|
-
*/
|
|
8
|
+
retryFailed(limit?: number): Promise<CrmSyncBatchResult>;
|
|
37
9
|
testConnection(): Promise<CrmConnectionStatus>;
|
|
38
|
-
/**
|
|
39
|
-
* Get CRM sync status overview
|
|
40
|
-
* @returns Status summary including pending/failed counts and next scheduled sync time
|
|
41
|
-
*/
|
|
42
10
|
status(): Promise<CrmSyncStatus>;
|
|
43
11
|
}
|
|
44
12
|
export declare function createCrmSyncService(transport: Transport, _config: {
|
|
45
|
-
|
|
13
|
+
apiKey: string;
|
|
46
14
|
}): CrmSyncService;
|
|
47
15
|
//# sourceMappingURL=crm-sync.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crm-sync.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/crm-sync.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACd,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,cAAc;IAC7B
|
|
1
|
+
{"version":3,"file":"crm-sync.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/crm-sync.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACd,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACtD,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAC3D,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAC3E,SAAS,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAClE,WAAW,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACzD,cAAc,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC/C,MAAM,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;CAClC;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,cAAc,CA6DtG"}
|
|
@@ -1,72 +1,17 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { FormInstance, CreateFormInstanceRequest, UpdateFormInstanceRequest, ListFormInstancesParams } from '../types/form-instance.js';
|
|
3
3
|
export interface FormInstancesService {
|
|
4
|
-
/**
|
|
5
|
-
* List all instances for a form
|
|
6
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
7
|
-
* @param params - Optional filtering by schema, user, status, and pagination
|
|
8
|
-
* @returns Paginated result containing FormInstance items and metadata
|
|
9
|
-
*/
|
|
10
4
|
list(formUniqueId: string, params?: ListFormInstancesParams): Promise<PageResult<FormInstance>>;
|
|
11
|
-
/**
|
|
12
|
-
* Get a specific form instance
|
|
13
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
14
|
-
* @param uniqueId - The unique identifier of the form instance
|
|
15
|
-
* @returns The matching FormInstance record
|
|
16
|
-
*/
|
|
17
5
|
get(formUniqueId: string, uniqueId: string): Promise<FormInstance>;
|
|
18
|
-
/**
|
|
19
|
-
* Create a new form instance
|
|
20
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
21
|
-
* @param data - Instance details including schema reference, user, and initial data
|
|
22
|
-
* @returns The newly created FormInstance record
|
|
23
|
-
*/
|
|
24
6
|
create(formUniqueId: string, data: CreateFormInstanceRequest): Promise<FormInstance>;
|
|
25
|
-
/**
|
|
26
|
-
* Update a form instance
|
|
27
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
28
|
-
* @param uniqueId - The unique identifier of the form instance to update
|
|
29
|
-
* @param data - Fields to update such as form data, status, or payload
|
|
30
|
-
* @returns The updated FormInstance record
|
|
31
|
-
*/
|
|
32
7
|
update(formUniqueId: string, uniqueId: string, data: UpdateFormInstanceRequest): Promise<FormInstance>;
|
|
33
|
-
/**
|
|
34
|
-
* Delete a form instance
|
|
35
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
36
|
-
* @param uniqueId - The unique identifier of the form instance to delete
|
|
37
|
-
* @returns Resolves when the instance has been deleted
|
|
38
|
-
*/
|
|
39
8
|
delete(formUniqueId: string, uniqueId: string): Promise<void>;
|
|
40
|
-
/**
|
|
41
|
-
* Start a form instance (begin filling)
|
|
42
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
43
|
-
* @param uniqueId - The unique identifier of the form instance to start
|
|
44
|
-
* @returns The updated FormInstance record with started status
|
|
45
|
-
*/
|
|
46
9
|
start(formUniqueId: string, uniqueId: string): Promise<FormInstance>;
|
|
47
|
-
/**
|
|
48
|
-
* Submit a form instance
|
|
49
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
50
|
-
* @param uniqueId - The unique identifier of the form instance to submit
|
|
51
|
-
* @returns The updated FormInstance record with submitted status
|
|
52
|
-
*/
|
|
53
10
|
submit(formUniqueId: string, uniqueId: string): Promise<FormInstance>;
|
|
54
|
-
/**
|
|
55
|
-
* Cancel a form instance
|
|
56
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
57
|
-
* @param uniqueId - The unique identifier of the form instance to cancel
|
|
58
|
-
* @returns The updated FormInstance record with cancelled status
|
|
59
|
-
*/
|
|
60
11
|
cancel(formUniqueId: string, uniqueId: string): Promise<FormInstance>;
|
|
61
|
-
/**
|
|
62
|
-
* Resend magic link for a form instance
|
|
63
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
64
|
-
* @param uniqueId - The unique identifier of the form instance
|
|
65
|
-
* @returns Resolves when the magic link email has been sent
|
|
66
|
-
*/
|
|
67
12
|
resendMagicLink(formUniqueId: string, uniqueId: string): Promise<void>;
|
|
68
13
|
}
|
|
69
14
|
export declare function createFormInstancesService(transport: Transport, _config: {
|
|
70
|
-
|
|
15
|
+
apiKey: string;
|
|
71
16
|
}): FormInstancesService;
|
|
72
17
|
//# sourceMappingURL=form-instances.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-instances.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/form-instances.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,WAAW,oBAAoB;IACnC
|
|
1
|
+
{"version":3,"file":"form-instances.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/form-instances.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IAChG,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACnE,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACrF,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACvG,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,KAAK,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACrE,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACtE,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACtE,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxE;AAED,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,oBAAoB,CA2ElH"}
|
|
@@ -1,58 +1,14 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { FormSchemaVersion, CreateFormSchemaVersionRequest, UpdateFormSchemaVersionRequest, ListFormSchemaVersionsParams } from '../types/form-schema-version.js';
|
|
3
3
|
export interface FormSchemaVersionsService {
|
|
4
|
-
/**
|
|
5
|
-
* List all versions for a form schema
|
|
6
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
7
|
-
* @param schemaUniqueId - The unique identifier of the form schema
|
|
8
|
-
* @param params - Optional filtering by status and pagination
|
|
9
|
-
* @returns Paginated result containing FormSchemaVersion items and metadata
|
|
10
|
-
*/
|
|
11
4
|
list(formUniqueId: string, schemaUniqueId: string, params?: ListFormSchemaVersionsParams): Promise<PageResult<FormSchemaVersion>>;
|
|
12
|
-
/**
|
|
13
|
-
* Get a specific version
|
|
14
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
15
|
-
* @param schemaUniqueId - The unique identifier of the form schema
|
|
16
|
-
* @param versionUniqueId - The unique identifier of the version
|
|
17
|
-
* @returns The matching FormSchemaVersion record
|
|
18
|
-
*/
|
|
19
5
|
get(formUniqueId: string, schemaUniqueId: string, versionUniqueId: string): Promise<FormSchemaVersion>;
|
|
20
|
-
/**
|
|
21
|
-
* Create a new version for a schema
|
|
22
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
23
|
-
* @param schemaUniqueId - The unique identifier of the form schema
|
|
24
|
-
* @param data - Version details including schema definition and UI schema
|
|
25
|
-
* @returns The newly created FormSchemaVersion record
|
|
26
|
-
*/
|
|
27
6
|
create(formUniqueId: string, schemaUniqueId: string, data: CreateFormSchemaVersionRequest): Promise<FormSchemaVersion>;
|
|
28
|
-
/**
|
|
29
|
-
* Update a version
|
|
30
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
31
|
-
* @param schemaUniqueId - The unique identifier of the form schema
|
|
32
|
-
* @param versionUniqueId - The unique identifier of the version to update
|
|
33
|
-
* @param data - Fields to update such as schema, UI schema, or status
|
|
34
|
-
* @returns The updated FormSchemaVersion record
|
|
35
|
-
*/
|
|
36
7
|
update(formUniqueId: string, schemaUniqueId: string, versionUniqueId: string, data: UpdateFormSchemaVersionRequest): Promise<FormSchemaVersion>;
|
|
37
|
-
/**
|
|
38
|
-
* Publish a version (makes it the active version)
|
|
39
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
40
|
-
* @param schemaUniqueId - The unique identifier of the form schema
|
|
41
|
-
* @param versionUniqueId - The unique identifier of the version to publish
|
|
42
|
-
* @returns The updated FormSchemaVersion record with published status
|
|
43
|
-
* @note Publishing a version makes it the active version for the schema
|
|
44
|
-
*/
|
|
45
8
|
publish(formUniqueId: string, schemaUniqueId: string, versionUniqueId: string): Promise<FormSchemaVersion>;
|
|
46
|
-
/**
|
|
47
|
-
* Delete a version
|
|
48
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
49
|
-
* @param schemaUniqueId - The unique identifier of the form schema
|
|
50
|
-
* @param versionUniqueId - The unique identifier of the version to delete
|
|
51
|
-
* @returns Resolves when the version has been deleted
|
|
52
|
-
*/
|
|
53
9
|
delete(formUniqueId: string, schemaUniqueId: string, versionUniqueId: string): Promise<void>;
|
|
54
10
|
}
|
|
55
11
|
export declare function createFormSchemaVersionsService(transport: Transport, _config: {
|
|
56
|
-
|
|
12
|
+
apiKey: string;
|
|
57
13
|
}): FormSchemaVersionsService;
|
|
58
14
|
//# sourceMappingURL=form-schema-versions.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-schema-versions.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/form-schema-versions.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,iBAAiB,EACjB,8BAA8B,EAC9B,8BAA8B,EAC9B,4BAA4B,EAC7B,MAAM,iCAAiC,CAAC;AAGzC,MAAM,WAAW,yBAAyB;IACxC
|
|
1
|
+
{"version":3,"file":"form-schema-versions.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/form-schema-versions.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,iBAAiB,EACjB,8BAA8B,EAC9B,8BAA8B,EAC9B,4BAA4B,EAC7B,MAAM,iCAAiC,CAAC;AAGzC,MAAM,WAAW,yBAAyB;IACxC,IAAI,CACF,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EACtB,MAAM,CAAC,EAAE,4BAA4B,GACpC,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC1C,GAAG,CACD,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC9B,MAAM,CACJ,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,8BAA8B,GACnC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC9B,MAAM,CACJ,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,MAAM,EACvB,IAAI,EAAE,8BAA8B,GACnC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC9B,OAAO,CACL,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC9B,MAAM,CACJ,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB;AAED,wBAAgB,+BAA+B,CAC7C,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAC1B,yBAAyB,CAgG3B"}
|
|
@@ -1,44 +1,13 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { FormSchema, CreateFormSchemaRequest, UpdateFormSchemaRequest, ListFormSchemasParams } from '../types/form-schema.js';
|
|
3
3
|
export interface FormSchemasService {
|
|
4
|
-
/**
|
|
5
|
-
* List all schemas for a form
|
|
6
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
7
|
-
* @param params - Optional filtering by status, version, and pagination
|
|
8
|
-
* @returns Paginated result containing FormSchema items and metadata
|
|
9
|
-
*/
|
|
10
4
|
list(formUniqueId: string, params?: ListFormSchemasParams): Promise<PageResult<FormSchema>>;
|
|
11
|
-
/**
|
|
12
|
-
* Get a specific schema
|
|
13
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
14
|
-
* @param schemaUniqueId - The unique identifier of the schema
|
|
15
|
-
* @returns The matching FormSchema record
|
|
16
|
-
*/
|
|
17
5
|
get(formUniqueId: string, schemaUniqueId: string): Promise<FormSchema>;
|
|
18
|
-
/**
|
|
19
|
-
* Create a new schema for a form
|
|
20
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
21
|
-
* @param data - Schema details including code, name, version, schema definition, and UI schema
|
|
22
|
-
* @returns The newly created FormSchema record
|
|
23
|
-
*/
|
|
24
6
|
create(formUniqueId: string, data: CreateFormSchemaRequest): Promise<FormSchema>;
|
|
25
|
-
/**
|
|
26
|
-
* Update a schema
|
|
27
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
28
|
-
* @param schemaUniqueId - The unique identifier of the schema to update
|
|
29
|
-
* @param data - Fields to update such as name, schema definition, or UI schema
|
|
30
|
-
* @returns The updated FormSchema record
|
|
31
|
-
*/
|
|
32
7
|
update(formUniqueId: string, schemaUniqueId: string, data: UpdateFormSchemaRequest): Promise<FormSchema>;
|
|
33
|
-
/**
|
|
34
|
-
* Delete a schema
|
|
35
|
-
* @param formUniqueId - The unique identifier of the parent form
|
|
36
|
-
* @param schemaUniqueId - The unique identifier of the schema to delete
|
|
37
|
-
* @returns Resolves when the schema has been deleted
|
|
38
|
-
*/
|
|
39
8
|
delete(formUniqueId: string, schemaUniqueId: string): Promise<void>;
|
|
40
9
|
}
|
|
41
10
|
export declare function createFormSchemasService(transport: Transport, _config: {
|
|
42
|
-
|
|
11
|
+
apiKey: string;
|
|
43
12
|
}): FormSchemasService;
|
|
44
13
|
//# sourceMappingURL=form-schemas.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-schemas.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/form-schemas.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,UAAU,EACV,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,WAAW,kBAAkB;IACjC
|
|
1
|
+
{"version":3,"file":"form-schemas.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/form-schemas.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,UAAU,EACV,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;IAC5F,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACvE,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACjF,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACzG,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrE;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,kBAAkB,CAoD9G"}
|
|
@@ -2,51 +2,15 @@ import type { Transport, PageResult } from '@23blocks/contracts';
|
|
|
2
2
|
import type { FormSet, CreateFormSetRequest, UpdateFormSetRequest, ListFormSetsParams, FormSetMatchRequest, FormSetMatchResult, FormSetAutoAssignRequest } from '../types/form-set.js';
|
|
3
3
|
import type { FormInstance } from '../types/form-instance.js';
|
|
4
4
|
export interface FormSetsService {
|
|
5
|
-
/**
|
|
6
|
-
* List all form sets
|
|
7
|
-
* @param params - Optional filtering by status, search term, and pagination
|
|
8
|
-
* @returns Paginated result containing FormSet items and metadata
|
|
9
|
-
*/
|
|
10
5
|
list(params?: ListFormSetsParams): Promise<PageResult<FormSet>>;
|
|
11
|
-
/**
|
|
12
|
-
* Get a specific form set
|
|
13
|
-
* @param uniqueId - The unique identifier of the form set
|
|
14
|
-
* @returns The matching FormSet record
|
|
15
|
-
*/
|
|
16
6
|
get(uniqueId: string): Promise<FormSet>;
|
|
17
|
-
/**
|
|
18
|
-
* Create a new form set
|
|
19
|
-
* @param data - Form set details including code, name, and form references
|
|
20
|
-
* @returns The newly created FormSet record
|
|
21
|
-
*/
|
|
22
7
|
create(data: CreateFormSetRequest): Promise<FormSet>;
|
|
23
|
-
/**
|
|
24
|
-
* Update a form set
|
|
25
|
-
* @param uniqueId - The unique identifier of the form set to update
|
|
26
|
-
* @param data - Fields to update such as name, forms list, or status
|
|
27
|
-
* @returns The updated FormSet record
|
|
28
|
-
*/
|
|
29
8
|
update(uniqueId: string, data: UpdateFormSetRequest): Promise<FormSet>;
|
|
30
|
-
/**
|
|
31
|
-
* Delete a form set
|
|
32
|
-
* @param uniqueId - The unique identifier of the form set to delete
|
|
33
|
-
* @returns Resolves when the form set has been deleted
|
|
34
|
-
*/
|
|
35
9
|
delete(uniqueId: string): Promise<void>;
|
|
36
|
-
/**
|
|
37
|
-
* Match criteria against form sets to find the best match
|
|
38
|
-
* @param data - Match request including criteria and optional user identifier
|
|
39
|
-
* @returns Array of FormSetMatchResult with matched form sets, scores, and matched criteria
|
|
40
|
-
*/
|
|
41
10
|
match(data: FormSetMatchRequest): Promise<FormSetMatchResult[]>;
|
|
42
|
-
/**
|
|
43
|
-
* Auto-assign forms from a form set to a user
|
|
44
|
-
* @param data - Assignment request including user, criteria, and optional form set
|
|
45
|
-
* @returns Array of FormInstance records created by the auto-assignment
|
|
46
|
-
*/
|
|
47
11
|
autoAssign(data: FormSetAutoAssignRequest): Promise<FormInstance[]>;
|
|
48
12
|
}
|
|
49
13
|
export declare function createFormSetsService(transport: Transport, _config: {
|
|
50
|
-
|
|
14
|
+
apiKey: string;
|
|
51
15
|
}): FormSetsService;
|
|
52
16
|
//# sourceMappingURL=form-sets.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-sets.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/form-sets.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,OAAO,EACP,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC9B
|
|
1
|
+
{"version":3,"file":"form-sets.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/form-sets.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,OAAO,EACP,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IAChE,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACrD,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACvE,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,KAAK,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAChE,UAAU,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CACrE;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,eAAe,CA+GxG"}
|