@23blocks/block-forms 3.1.8 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +9 -1
- package/dist/src/lib/forms.block.d.ts +17 -0
- package/dist/src/lib/forms.block.d.ts.map +1 -1
- package/dist/src/lib/services/application-forms.service.d.ts +13 -0
- package/dist/src/lib/services/application-forms.service.d.ts.map +1 -1
- package/dist/src/lib/services/appointments.service.d.ts +53 -0
- package/dist/src/lib/services/appointments.service.d.ts.map +1 -1
- package/dist/src/lib/services/crm-sync.service.d.ts +13 -2
- package/dist/src/lib/services/crm-sync.service.d.ts.map +1 -1
- package/dist/src/lib/services/form-instances.service.d.ts +28 -0
- package/dist/src/lib/services/form-instances.service.d.ts.map +1 -1
- package/dist/src/lib/services/form-schema-versions.service.d.ts +26 -0
- package/dist/src/lib/services/form-schema-versions.service.d.ts.map +1 -1
- package/dist/src/lib/services/form-schemas.service.d.ts +16 -0
- package/dist/src/lib/services/form-schemas.service.d.ts.map +1 -1
- package/dist/src/lib/services/form-sets.service.d.ts +15 -0
- package/dist/src/lib/services/form-sets.service.d.ts.map +1 -1
- package/dist/src/lib/services/forms.service.d.ts +26 -0
- package/dist/src/lib/services/forms.service.d.ts.map +1 -1
- package/dist/src/lib/services/landings.service.d.ts +31 -0
- package/dist/src/lib/services/landings.service.d.ts.map +1 -1
- package/dist/src/lib/services/mail-templates.service.d.ts +31 -0
- package/dist/src/lib/services/mail-templates.service.d.ts.map +1 -1
- package/dist/src/lib/services/referrals.service.d.ts +31 -0
- package/dist/src/lib/services/referrals.service.d.ts.map +1 -1
- package/dist/src/lib/services/subscriptions.service.d.ts +31 -0
- package/dist/src/lib/services/subscriptions.service.d.ts.map +1 -1
- package/dist/src/lib/services/surveys.service.d.ts +58 -0
- package/dist/src/lib/services/surveys.service.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1159,7 +1159,15 @@ function mapBatchResult(response) {
|
|
|
1159
1159
|
};
|
|
1160
1160
|
}
|
|
1161
1161
|
|
|
1162
|
-
|
|
1162
|
+
/**
|
|
1163
|
+
* Create the Forms block.
|
|
1164
|
+
*
|
|
1165
|
+
* @example
|
|
1166
|
+
* ```typescript
|
|
1167
|
+
* const block = createFormsBlock(transport, { appId: 'xxx' });
|
|
1168
|
+
* const forms = await block.forms.list({ page: 1 });
|
|
1169
|
+
* ```
|
|
1170
|
+
*/ function createFormsBlock(transport, config) {
|
|
1163
1171
|
return {
|
|
1164
1172
|
forms: createFormsService(transport),
|
|
1165
1173
|
schemas: createFormSchemasService(transport),
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import type { Transport, BlockConfig, BlockMetadata } from '@23blocks/contracts';
|
|
2
2
|
import { type FormsService, type FormSchemasService, type FormSchemaVersionsService, type FormInstancesService, type FormSetsService, type LandingsService, type SubscriptionsService, type AppointmentsService, type SurveysService, type ReferralsService, type MailTemplatesService, type ApplicationFormsService, type CrmSyncService } from './services/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the Forms block.
|
|
5
|
+
*/
|
|
3
6
|
export interface FormsBlockConfig extends BlockConfig {
|
|
7
|
+
/** Application ID */
|
|
4
8
|
appId: string;
|
|
9
|
+
/** Tenant ID (optional, for multi-tenant setups) */
|
|
5
10
|
tenantId?: string;
|
|
6
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Dynamic forms and submissions block interface.
|
|
14
|
+
*/
|
|
7
15
|
export interface FormsBlock {
|
|
8
16
|
/** Form definitions (CRUD) */
|
|
9
17
|
forms: FormsService;
|
|
@@ -32,6 +40,15 @@ export interface FormsBlock {
|
|
|
32
40
|
/** CRM sync operations */
|
|
33
41
|
crmSync: CrmSyncService;
|
|
34
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Create the Forms block.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* const block = createFormsBlock(transport, { appId: 'xxx' });
|
|
49
|
+
* const forms = await block.forms.list({ page: 1 });
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
35
52
|
export declare function createFormsBlock(transport: Transport, config: FormsBlockConfig): FormsBlock;
|
|
36
53
|
export declare const formsBlockMetadata: BlockMetadata;
|
|
37
54
|
//# sourceMappingURL=forms.block.d.ts.map
|
|
@@ -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,MAAM,qBAAqB,CAAC;AACjF,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,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,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,4BAA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C;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;CACzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,gBAAgB,GACvB,UAAU,CAgBZ;AAED,eAAO,MAAM,kBAAkB,EAAE,aAmBhC,CAAC"}
|
|
@@ -5,20 +5,30 @@ export interface ApplicationFormsService {
|
|
|
5
5
|
* Get public form via magic link
|
|
6
6
|
* If OTP verification is required, returns form with verificationStatus: 'pending'
|
|
7
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)
|
|
8
10
|
*/
|
|
9
11
|
get(urlId: string): Promise<ApplicationForm>;
|
|
10
12
|
/**
|
|
11
13
|
* Submit a completed form
|
|
12
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
|
|
13
18
|
*/
|
|
14
19
|
submit(urlId: string, data: ApplicationFormSubmission): Promise<ApplicationFormResponse>;
|
|
15
20
|
/**
|
|
16
21
|
* Save form as draft
|
|
17
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
|
|
18
26
|
*/
|
|
19
27
|
draft(urlId: string, data: ApplicationFormDraft): Promise<ApplicationFormResponse>;
|
|
20
28
|
/**
|
|
21
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
|
|
22
32
|
* @throws Error with code RATE_LIMITED if called too frequently (60s cooldown)
|
|
23
33
|
* @throws Error with code ALREADY_VERIFIED if form is already verified
|
|
24
34
|
* @throws Error with code OTP_NOT_REQUIRED if form doesn't require OTP
|
|
@@ -27,6 +37,9 @@ export interface ApplicationFormsService {
|
|
|
27
37
|
/**
|
|
28
38
|
* Verify OTP code and get full form access
|
|
29
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
|
|
30
43
|
* @throws Error with code INVALID_CODE if code is wrong (includes attemptsRemaining)
|
|
31
44
|
* @throws Error with code CODE_EXPIRED if code has expired (10 min lifetime)
|
|
32
45
|
* @throws Error with code ATTEMPTS_EXCEEDED if max attempts (5) reached
|
|
@@ -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;;;;;;OAMG;IACH,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAE7C;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAEzF;;;;;;OAMG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAEnF;;;;;;;OAOG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAEjD;;;;;;;;;OASG;IACH,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,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,uBAAuB,CAuCvH"}
|
|
@@ -1,14 +1,67 @@
|
|
|
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
|
+
*/
|
|
4
10
|
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
|
+
*/
|
|
5
17
|
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
|
+
*/
|
|
6
24
|
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
|
+
*/
|
|
7
32
|
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
|
+
*/
|
|
8
39
|
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
|
+
*/
|
|
9
46
|
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
|
+
*/
|
|
10
53
|
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
|
+
*/
|
|
11
59
|
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
|
+
*/
|
|
12
65
|
reportSummary(data: AppointmentReportRequest): Promise<AppointmentReportSummary>;
|
|
13
66
|
}
|
|
14
67
|
export declare function createAppointmentsService(transport: Transport, _config: {
|
|
@@ -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,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;
|
|
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,CAA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AS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,mBAAmB,CAoG/G"}
|
|
@@ -3,30 +3,41 @@ import type { CrmSyncResult, CrmSyncBatchRequest, CrmSyncBatchResult, CrmConnect
|
|
|
3
3
|
export interface CrmSyncService {
|
|
4
4
|
/**
|
|
5
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
|
|
6
8
|
*/
|
|
7
9
|
syncLanding(uniqueId: string): Promise<CrmSyncResult>;
|
|
8
10
|
/**
|
|
9
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
|
|
10
14
|
*/
|
|
11
15
|
syncSubscription(uniqueId: string): Promise<CrmSyncResult>;
|
|
12
16
|
/**
|
|
13
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
|
|
14
20
|
*/
|
|
15
21
|
syncAppointment(uniqueId: string): Promise<CrmSyncResult>;
|
|
16
22
|
/**
|
|
17
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
|
|
18
26
|
*/
|
|
19
27
|
batchSync(data: CrmSyncBatchRequest): Promise<CrmSyncBatchResult>;
|
|
20
28
|
/**
|
|
21
|
-
* Retry failed sync operations
|
|
29
|
+
* Retry all previously failed sync operations
|
|
30
|
+
* @returns Batch result with total, synced, and failed counts plus per-record results
|
|
22
31
|
*/
|
|
23
32
|
retryFailed(): Promise<CrmSyncBatchResult>;
|
|
24
33
|
/**
|
|
25
34
|
* Test CRM connection
|
|
35
|
+
* @returns Connection status including provider, connectivity, and any errors
|
|
26
36
|
*/
|
|
27
37
|
testConnection(): Promise<CrmConnectionStatus>;
|
|
28
38
|
/**
|
|
29
|
-
* Get CRM sync status
|
|
39
|
+
* Get CRM sync status overview
|
|
40
|
+
* @returns Status summary including pending/failed counts and next scheduled sync time
|
|
30
41
|
*/
|
|
31
42
|
status(): Promise<CrmSyncStatus>;
|
|
32
43
|
}
|
|
@@ -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;;;;OAIG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAEtD;;;;OAIG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAE3D;;;;OAIG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAE1D;;;;OAIG;IACH,SAAS,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAElE;;;OAGG;IACH,WAAW,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAE3C;;;OAGG;IACH,cAAc,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAE/C;;;OAGG;IACH,MAAM,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;CAClC;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,cAAc,CAoDrG"}
|
|
@@ -3,38 +3,66 @@ import type { FormInstance, CreateFormInstanceRequest, UpdateFormInstanceRequest
|
|
|
3
3
|
export interface FormInstancesService {
|
|
4
4
|
/**
|
|
5
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
|
|
6
9
|
*/
|
|
7
10
|
list(formUniqueId: string, params?: ListFormInstancesParams): Promise<PageResult<FormInstance>>;
|
|
8
11
|
/**
|
|
9
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
|
|
10
16
|
*/
|
|
11
17
|
get(formUniqueId: string, uniqueId: string): Promise<FormInstance>;
|
|
12
18
|
/**
|
|
13
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
|
|
14
23
|
*/
|
|
15
24
|
create(formUniqueId: string, data: CreateFormInstanceRequest): Promise<FormInstance>;
|
|
16
25
|
/**
|
|
17
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
|
|
18
31
|
*/
|
|
19
32
|
update(formUniqueId: string, uniqueId: string, data: UpdateFormInstanceRequest): Promise<FormInstance>;
|
|
20
33
|
/**
|
|
21
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
|
|
22
38
|
*/
|
|
23
39
|
delete(formUniqueId: string, uniqueId: string): Promise<void>;
|
|
24
40
|
/**
|
|
25
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
|
|
26
45
|
*/
|
|
27
46
|
start(formUniqueId: string, uniqueId: string): Promise<FormInstance>;
|
|
28
47
|
/**
|
|
29
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
|
|
30
52
|
*/
|
|
31
53
|
submit(formUniqueId: string, uniqueId: string): Promise<FormInstance>;
|
|
32
54
|
/**
|
|
33
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
|
|
34
59
|
*/
|
|
35
60
|
cancel(formUniqueId: string, uniqueId: string): Promise<FormInstance>;
|
|
36
61
|
/**
|
|
37
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
|
|
38
66
|
*/
|
|
39
67
|
resendMagicLink(formUniqueId: string, uniqueId: string): Promise<void>;
|
|
40
68
|
}
|
|
@@ -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;;;;;OAKG;IACH,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IAEhG;;;;;OAKG;IACH,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEnE;;;;;OAKG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAErF;;;;;;OAMG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEvG;;;;;OAKG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9D;;;;;OAKG;IACH,KAAK,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAErE;;;;;OAKG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEtE;;;;;OAKG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEtE;;;;;OAKG;IACH,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,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,oBAAoB,CAsEjH"}
|
|
@@ -3,26 +3,52 @@ import type { FormSchemaVersion, CreateFormSchemaVersionRequest, UpdateFormSchem
|
|
|
3
3
|
export interface FormSchemaVersionsService {
|
|
4
4
|
/**
|
|
5
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
|
|
6
10
|
*/
|
|
7
11
|
list(formUniqueId: string, schemaUniqueId: string, params?: ListFormSchemaVersionsParams): Promise<PageResult<FormSchemaVersion>>;
|
|
8
12
|
/**
|
|
9
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
|
|
10
18
|
*/
|
|
11
19
|
get(formUniqueId: string, schemaUniqueId: string, versionUniqueId: string): Promise<FormSchemaVersion>;
|
|
12
20
|
/**
|
|
13
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
|
|
14
26
|
*/
|
|
15
27
|
create(formUniqueId: string, schemaUniqueId: string, data: CreateFormSchemaVersionRequest): Promise<FormSchemaVersion>;
|
|
16
28
|
/**
|
|
17
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
|
|
18
35
|
*/
|
|
19
36
|
update(formUniqueId: string, schemaUniqueId: string, versionUniqueId: string, data: UpdateFormSchemaVersionRequest): Promise<FormSchemaVersion>;
|
|
20
37
|
/**
|
|
21
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
|
|
22
44
|
*/
|
|
23
45
|
publish(formUniqueId: string, schemaUniqueId: string, versionUniqueId: string): Promise<FormSchemaVersion>;
|
|
24
46
|
/**
|
|
25
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
|
|
26
52
|
*/
|
|
27
53
|
delete(formUniqueId: string, schemaUniqueId: string, versionUniqueId: string): Promise<void>;
|
|
28
54
|
}
|
|
@@ -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;;;;;;OAMG;IACH,IAAI,CACF,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EACtB,MAAM,CAAC,EAAE,4BAA4B,GACpC,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAE1C;;;;;;OAMG;IACH,GAAG,CACD,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE9B;;;;;;OAMG;IACH,MAAM,CACJ,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,8BAA8B,GACnC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE9B;;;;;;;OAOG;IACH,MAAM,CACJ,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,MAAM,EACvB,IAAI,EAAE,8BAA8B,GACnC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE9B;;;;;;;OAOG;IACH,OAAO,CACL,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE9B;;;;;;OAMG;IACH,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,KAAK,EAAE,MAAM,CAAA;CAAE,GACzB,yBAAyB,CAgG3B"}
|
|
@@ -3,22 +3,38 @@ import type { FormSchema, CreateFormSchemaRequest, UpdateFormSchemaRequest, List
|
|
|
3
3
|
export interface FormSchemasService {
|
|
4
4
|
/**
|
|
5
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
|
|
6
9
|
*/
|
|
7
10
|
list(formUniqueId: string, params?: ListFormSchemasParams): Promise<PageResult<FormSchema>>;
|
|
8
11
|
/**
|
|
9
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
|
|
10
16
|
*/
|
|
11
17
|
get(formUniqueId: string, schemaUniqueId: string): Promise<FormSchema>;
|
|
12
18
|
/**
|
|
13
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
|
|
14
23
|
*/
|
|
15
24
|
create(formUniqueId: string, data: CreateFormSchemaRequest): Promise<FormSchema>;
|
|
16
25
|
/**
|
|
17
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
|
|
18
31
|
*/
|
|
19
32
|
update(formUniqueId: string, schemaUniqueId: string, data: UpdateFormSchemaRequest): Promise<FormSchema>;
|
|
20
33
|
/**
|
|
21
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
|
|
22
38
|
*/
|
|
23
39
|
delete(formUniqueId: string, schemaUniqueId: string): Promise<void>;
|
|
24
40
|
}
|
|
@@ -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;;;;;OAKG;IACH,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;IAE5F;;;;;OAKG;IACH,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAEvE;;;;;OAKG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAEjF;;;;;;OAMG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAEzG;;;;;OAKG;IACH,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,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,kBAAkB,CAuD7G"}
|
|
@@ -4,30 +4,45 @@ import type { FormInstance } from '../types/form-instance.js';
|
|
|
4
4
|
export interface FormSetsService {
|
|
5
5
|
/**
|
|
6
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
|
|
7
9
|
*/
|
|
8
10
|
list(params?: ListFormSetsParams): Promise<PageResult<FormSet>>;
|
|
9
11
|
/**
|
|
10
12
|
* Get a specific form set
|
|
13
|
+
* @param uniqueId - The unique identifier of the form set
|
|
14
|
+
* @returns The matching FormSet record
|
|
11
15
|
*/
|
|
12
16
|
get(uniqueId: string): Promise<FormSet>;
|
|
13
17
|
/**
|
|
14
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
|
|
15
21
|
*/
|
|
16
22
|
create(data: CreateFormSetRequest): Promise<FormSet>;
|
|
17
23
|
/**
|
|
18
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
|
|
19
28
|
*/
|
|
20
29
|
update(uniqueId: string, data: UpdateFormSetRequest): Promise<FormSet>;
|
|
21
30
|
/**
|
|
22
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
|
|
23
34
|
*/
|
|
24
35
|
delete(uniqueId: string): Promise<void>;
|
|
25
36
|
/**
|
|
26
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
|
|
27
40
|
*/
|
|
28
41
|
match(data: FormSetMatchRequest): Promise<FormSetMatchResult[]>;
|
|
29
42
|
/**
|
|
30
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
|
|
31
46
|
*/
|
|
32
47
|
autoAssign(data: FormSetAutoAssignRequest): Promise<FormInstance[]>;
|
|
33
48
|
}
|
|
@@ -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":[],"mapp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sParams } from '../types/form.js';
|
|
3
3
|
export interface FormsService {
|
|
4
|
+
/**
|
|
5
|
+
* List all forms
|
|
6
|
+
* @param params - Optional filtering by status, form type, search term, and pagination
|
|
7
|
+
* @returns Paginated result containing Form items and metadata
|
|
8
|
+
*/
|
|
4
9
|
list(params?: ListFormsParams): Promise<PageResult<Form>>;
|
|
10
|
+
/**
|
|
11
|
+
* Get a specific form
|
|
12
|
+
* @param uniqueId - The unique identifier of the form
|
|
13
|
+
* @returns The matching Form record
|
|
14
|
+
*/
|
|
5
15
|
get(uniqueId: string): Promise<Form>;
|
|
16
|
+
/**
|
|
17
|
+
* Create a new form
|
|
18
|
+
* @param data - Form details including code, name, description, and form type
|
|
19
|
+
* @returns The newly created Form record
|
|
20
|
+
*/
|
|
6
21
|
create(data: CreateFormRequest): Promise<Form>;
|
|
22
|
+
/**
|
|
23
|
+
* Update an existing form
|
|
24
|
+
* @param uniqueId - The unique identifier of the form to update
|
|
25
|
+
* @param data - Fields to update such as name, description, type, or status
|
|
26
|
+
* @returns The updated Form record
|
|
27
|
+
*/
|
|
7
28
|
update(uniqueId: string, data: UpdateFormRequest): Promise<Form>;
|
|
29
|
+
/**
|
|
30
|
+
* Delete a form
|
|
31
|
+
* @param uniqueId - The unique identifier of the form to delete
|
|
32
|
+
* @returns Resolves when the form has been deleted
|
|
33
|
+
*/
|
|
8
34
|
delete(uniqueId: string): Promise<void>;
|
|
9
35
|
}
|
|
10
36
|
export declare function createFormsService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forms.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/forms.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,IAAI,EACJ,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAG1B,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"forms.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/forms.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,IAAI,EACJ,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAG1B,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IAE1D;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/C;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjE;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzC;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CAmDjG"}
|
|
@@ -1,10 +1,41 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { Landing, CreateLandingRequest, UpdateLandingRequest, ListLandingsParams } from '../types/landing.js';
|
|
3
3
|
export interface LandingsService {
|
|
4
|
+
/**
|
|
5
|
+
* List all landing page submissions for a form
|
|
6
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
7
|
+
* @param params - Optional filtering by status and pagination
|
|
8
|
+
* @returns Paginated result containing Landing items and metadata
|
|
9
|
+
*/
|
|
4
10
|
list(formUniqueId: string, params?: ListLandingsParams): Promise<PageResult<Landing>>;
|
|
11
|
+
/**
|
|
12
|
+
* Get a specific landing page submission
|
|
13
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
14
|
+
* @param uniqueId - The unique identifier of the landing submission
|
|
15
|
+
* @returns The matching Landing record
|
|
16
|
+
*/
|
|
5
17
|
get(formUniqueId: string, uniqueId: string): Promise<Landing>;
|
|
18
|
+
/**
|
|
19
|
+
* Submit a new landing page form
|
|
20
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
21
|
+
* @param data - Submission details including contact information and form data
|
|
22
|
+
* @returns The newly created Landing record
|
|
23
|
+
*/
|
|
6
24
|
submit(formUniqueId: string, data: CreateLandingRequest): Promise<Landing>;
|
|
25
|
+
/**
|
|
26
|
+
* Update a landing page submission
|
|
27
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
28
|
+
* @param uniqueId - The unique identifier of the landing submission to update
|
|
29
|
+
* @param data - Fields to update such as contact info, data, or status
|
|
30
|
+
* @returns The updated Landing record
|
|
31
|
+
*/
|
|
7
32
|
update(formUniqueId: string, uniqueId: string, data: UpdateLandingRequest): Promise<Landing>;
|
|
33
|
+
/**
|
|
34
|
+
* Delete a landing page submission
|
|
35
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
36
|
+
* @param uniqueId - The unique identifier of the landing submission to delete
|
|
37
|
+
* @returns Resolves when the submission has been deleted
|
|
38
|
+
*/
|
|
8
39
|
delete(formUniqueId: string, uniqueId: string): Promise<void>;
|
|
9
40
|
}
|
|
10
41
|
export declare function createLandingsService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"landings.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/landings.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,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qB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,eAAe,CAqDvG"}
|
|
@@ -1,11 +1,42 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { MailTemplate, CreateMailTemplateRequest, UpdateMailTemplateRequest, ListMailTemplatesParams, MailTemplateStats } from '../types/mail-template.js';
|
|
3
3
|
export interface MailTemplatesService {
|
|
4
|
+
/**
|
|
5
|
+
* List all mail templates
|
|
6
|
+
* @param params - Optional filtering by status, provider, and pagination
|
|
7
|
+
* @returns Paginated result containing MailTemplate items and metadata
|
|
8
|
+
*/
|
|
4
9
|
list(params?: ListMailTemplatesParams): Promise<PageResult<MailTemplate>>;
|
|
10
|
+
/**
|
|
11
|
+
* Get a specific mail template
|
|
12
|
+
* @param uniqueId - The unique identifier of the mail template
|
|
13
|
+
* @returns The matching MailTemplate record
|
|
14
|
+
*/
|
|
5
15
|
get(uniqueId: string): Promise<MailTemplate>;
|
|
16
|
+
/**
|
|
17
|
+
* Create a new mail template
|
|
18
|
+
* @param data - Template details including name, subject, content, and sender configuration
|
|
19
|
+
* @returns The newly created MailTemplate record
|
|
20
|
+
*/
|
|
6
21
|
create(data: CreateMailTemplateRequest): Promise<MailTemplate>;
|
|
22
|
+
/**
|
|
23
|
+
* Update an existing mail template
|
|
24
|
+
* @param uniqueId - The unique identifier of the template to update
|
|
25
|
+
* @param data - Fields to update such as subject, content, or sender configuration
|
|
26
|
+
* @returns The updated MailTemplate record
|
|
27
|
+
*/
|
|
7
28
|
update(uniqueId: string, data: UpdateMailTemplateRequest): Promise<MailTemplate>;
|
|
29
|
+
/**
|
|
30
|
+
* Delete a mail template
|
|
31
|
+
* @param uniqueId - The unique identifier of the template to delete
|
|
32
|
+
* @returns Resolves when the template has been deleted
|
|
33
|
+
*/
|
|
8
34
|
delete(uniqueId: string): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Get usage statistics for a mail template
|
|
37
|
+
* @param uniqueId - The unique identifier of the mail template
|
|
38
|
+
* @returns Statistics object with send/open/click metrics for the template
|
|
39
|
+
*/
|
|
9
40
|
getStats(uniqueId: string): Promise<MailTemplateStats>;
|
|
10
41
|
}
|
|
11
42
|
export declare function createMailTemplatesService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mail-templates.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/mail-templates.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,EACvB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,MAAM,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"mail-templates.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/mail-templates.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,EACvB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IAE1E;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAE7C;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAE/D;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEjF;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACxD;AAED,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,oBAAoB,CAiEjH"}
|
|
@@ -1,10 +1,41 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { Referral, CreateReferralRequest, UpdateReferralRequest, ListReferralsParams } from '../types/referral.js';
|
|
3
3
|
export interface ReferralsService {
|
|
4
|
+
/**
|
|
5
|
+
* List all referrals for a form
|
|
6
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
7
|
+
* @param params - Optional filtering by status, referrer, and pagination
|
|
8
|
+
* @returns Paginated result containing Referral items and metadata
|
|
9
|
+
*/
|
|
4
10
|
list(formUniqueId: string, params?: ListReferralsParams): Promise<PageResult<Referral>>;
|
|
11
|
+
/**
|
|
12
|
+
* Get a specific referral
|
|
13
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
14
|
+
* @param uniqueId - The unique identifier of the referral
|
|
15
|
+
* @returns The matching Referral record
|
|
16
|
+
*/
|
|
5
17
|
get(formUniqueId: string, uniqueId: string): Promise<Referral>;
|
|
18
|
+
/**
|
|
19
|
+
* Create a new referral
|
|
20
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
21
|
+
* @param data - Referral details including referrer and referee contact information
|
|
22
|
+
* @returns The newly created Referral record
|
|
23
|
+
*/
|
|
6
24
|
create(formUniqueId: string, data: CreateReferralRequest): Promise<Referral>;
|
|
25
|
+
/**
|
|
26
|
+
* Update an existing referral
|
|
27
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
28
|
+
* @param uniqueId - The unique identifier of the referral to update
|
|
29
|
+
* @param data - Fields to update such as referee info, data, or status
|
|
30
|
+
* @returns The updated Referral record
|
|
31
|
+
*/
|
|
7
32
|
update(formUniqueId: string, uniqueId: string, data: UpdateReferralRequest): Promise<Referral>;
|
|
33
|
+
/**
|
|
34
|
+
* Delete a referral
|
|
35
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
36
|
+
* @param uniqueId - The unique identifier of the referral to delete
|
|
37
|
+
* @returns Resolves when the referral has been deleted
|
|
38
|
+
*/
|
|
8
39
|
delete(formUniqueId: string, uniqueId: string): Promise<void>;
|
|
9
40
|
}
|
|
10
41
|
export declare function createReferralsService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"referrals.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/referrals.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,QAAQ,EACR,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"referrals.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/referrals.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,QAAQ,EACR,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;IAExF;;;;;OAKG;IACH,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAE/D;;;;;OAKG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAE7E;;;;;;OAMG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAE/F;;;;;OAKG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/D;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,gBAAgB,CAqDzG"}
|
|
@@ -1,10 +1,41 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { Subscription, CreateSubscriptionRequest, UpdateSubscriptionRequest, ListSubscriptionsParams } from '../types/subscription.js';
|
|
3
3
|
export interface SubscriptionsService {
|
|
4
|
+
/**
|
|
5
|
+
* List all subscriptions for a form
|
|
6
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
7
|
+
* @param params - Optional filtering by status and pagination
|
|
8
|
+
* @returns Paginated result containing Subscription items and metadata
|
|
9
|
+
*/
|
|
4
10
|
list(formUniqueId: string, params?: ListSubscriptionsParams): Promise<PageResult<Subscription>>;
|
|
11
|
+
/**
|
|
12
|
+
* Get a specific subscription
|
|
13
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
14
|
+
* @param uniqueId - The unique identifier of the subscription
|
|
15
|
+
* @returns The matching Subscription record
|
|
16
|
+
*/
|
|
5
17
|
get(formUniqueId: string, uniqueId: string): Promise<Subscription>;
|
|
18
|
+
/**
|
|
19
|
+
* Submit a new subscription
|
|
20
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
21
|
+
* @param data - Subscription details including email, name, phone, and form data
|
|
22
|
+
* @returns The newly created Subscription record
|
|
23
|
+
*/
|
|
6
24
|
submit(formUniqueId: string, data: CreateSubscriptionRequest): Promise<Subscription>;
|
|
25
|
+
/**
|
|
26
|
+
* Update an existing subscription
|
|
27
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
28
|
+
* @param uniqueId - The unique identifier of the subscription to update
|
|
29
|
+
* @param data - Fields to update such as contact info, data, or status
|
|
30
|
+
* @returns The updated Subscription record
|
|
31
|
+
*/
|
|
7
32
|
update(formUniqueId: string, uniqueId: string, data: UpdateSubscriptionRequest): Promise<Subscription>;
|
|
33
|
+
/**
|
|
34
|
+
* Delete a subscription
|
|
35
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
36
|
+
* @param uniqueId - The unique identifier of the subscription to delete
|
|
37
|
+
* @returns Resolves when the subscription has been deleted
|
|
38
|
+
*/
|
|
8
39
|
delete(formUniqueId: string, uniqueId: string): Promise<void>;
|
|
9
40
|
}
|
|
10
41
|
export declare function createSubscriptionsService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/subscriptions.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,0BAA0B,CAAC;AAGlC,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"subscriptions.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/subscriptions.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,0BAA0B,CAAC;AAGlC,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IAEhG;;;;;OAKG;IACH,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEnE;;;;;OAKG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAErF;;;;;;OAMG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEvG;;;;;OAKG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/D;AAED,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,oBAAoB,CAmDjH"}
|
|
@@ -1,14 +1,72 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { Survey, SurveyStatus, CreateSurveyRequest, UpdateSurveyRequest, UpdateSurveyStatusRequest, ListSurveysParams } from '../types/survey.js';
|
|
3
3
|
export interface SurveysService {
|
|
4
|
+
/**
|
|
5
|
+
* List all survey instances for a form
|
|
6
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
7
|
+
* @param params - Optional filtering by status, user, and pagination
|
|
8
|
+
* @returns Paginated result containing Survey items and metadata
|
|
9
|
+
*/
|
|
4
10
|
list(formUniqueId: string, params?: ListSurveysParams): Promise<PageResult<Survey>>;
|
|
11
|
+
/**
|
|
12
|
+
* List survey instances filtered by a specific status
|
|
13
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
14
|
+
* @param status - The survey status to filter by
|
|
15
|
+
* @param params - Optional additional filtering by user and pagination
|
|
16
|
+
* @returns Paginated result containing Survey items matching the status
|
|
17
|
+
*/
|
|
5
18
|
listByStatus(formUniqueId: string, status: SurveyStatus, params?: ListSurveysParams): Promise<PageResult<Survey>>;
|
|
19
|
+
/**
|
|
20
|
+
* Get a specific survey instance
|
|
21
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
22
|
+
* @param uniqueId - The unique identifier of the survey instance
|
|
23
|
+
* @returns The matching Survey record
|
|
24
|
+
*/
|
|
6
25
|
get(formUniqueId: string, uniqueId: string): Promise<Survey>;
|
|
26
|
+
/**
|
|
27
|
+
* Create a new survey instance
|
|
28
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
29
|
+
* @param data - Survey details including user/contact info and initial data
|
|
30
|
+
* @returns The newly created Survey record
|
|
31
|
+
*/
|
|
7
32
|
create(formUniqueId: string, data: CreateSurveyRequest): Promise<Survey>;
|
|
33
|
+
/**
|
|
34
|
+
* Update a survey instance
|
|
35
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
36
|
+
* @param uniqueId - The unique identifier of the survey to update
|
|
37
|
+
* @param data - Fields to update such as contact info, data, or status
|
|
38
|
+
* @returns The updated Survey record
|
|
39
|
+
*/
|
|
8
40
|
update(formUniqueId: string, uniqueId: string, data: UpdateSurveyRequest): Promise<Survey>;
|
|
41
|
+
/**
|
|
42
|
+
* Delete a survey instance
|
|
43
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
44
|
+
* @param uniqueId - The unique identifier of the survey to delete
|
|
45
|
+
* @returns Resolves when the survey has been deleted
|
|
46
|
+
*/
|
|
9
47
|
delete(formUniqueId: string, uniqueId: string): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Update only the status of a survey instance
|
|
50
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
51
|
+
* @param uniqueId - The unique identifier of the survey
|
|
52
|
+
* @param data - The new status value
|
|
53
|
+
* @returns The updated Survey record with the new status
|
|
54
|
+
*/
|
|
10
55
|
updateStatus(formUniqueId: string, uniqueId: string, data: UpdateSurveyStatusRequest): Promise<Survey>;
|
|
56
|
+
/**
|
|
57
|
+
* Resend magic link for a survey instance
|
|
58
|
+
* @param formUniqueId - The unique identifier of the parent form
|
|
59
|
+
* @param uniqueId - The unique identifier of the survey
|
|
60
|
+
* @returns Resolves when the magic link email has been sent
|
|
61
|
+
*/
|
|
11
62
|
resendMagicLink(formUniqueId: string, uniqueId: string): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* List all surveys assigned to a specific user
|
|
65
|
+
* @param userUniqueId - The unique identifier of the user
|
|
66
|
+
* @param params - Optional filtering by status and pagination
|
|
67
|
+
* @returns Paginated result of Survey records for the given user
|
|
68
|
+
* @note Uses POST to query across all forms for a user
|
|
69
|
+
*/
|
|
12
70
|
listByUser(userUniqueId: string, params?: ListSurveysParams): Promise<PageResult<Survey>>;
|
|
13
71
|
}
|
|
14
72
|
export declare function createSurveysService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surveys.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/surveys.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,S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