@23blocks/block-crm 3.1.7 → 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/crm.block.d.ts +41 -0
- package/dist/src/lib/crm.block.d.ts.map +1 -1
- package/dist/src/lib/services/accounts.service.d.ts +44 -0
- package/dist/src/lib/services/accounts.service.d.ts.map +1 -1
- package/dist/src/lib/services/billing-reports.service.d.ts +14 -0
- package/dist/src/lib/services/billing-reports.service.d.ts.map +1 -1
- package/dist/src/lib/services/busy-blocks.service.d.ts +18 -0
- package/dist/src/lib/services/busy-blocks.service.d.ts.map +1 -1
- package/dist/src/lib/services/calendar-accounts.service.d.ts +43 -0
- package/dist/src/lib/services/calendar-accounts.service.d.ts.map +1 -1
- package/dist/src/lib/services/calendar-sync.service.d.ts +9 -0
- package/dist/src/lib/services/calendar-sync.service.d.ts.map +1 -1
- package/dist/src/lib/services/categories.service.d.ts +27 -0
- package/dist/src/lib/services/categories.service.d.ts.map +1 -1
- package/dist/src/lib/services/communications.service.d.ts +5 -0
- package/dist/src/lib/services/communications.service.d.ts.map +1 -1
- package/dist/src/lib/services/contact-events.service.d.ts +75 -0
- package/dist/src/lib/services/contact-events.service.d.ts.map +1 -1
- package/dist/src/lib/services/contacts.service.d.ts +44 -0
- package/dist/src/lib/services/contacts.service.d.ts.map +1 -1
- package/dist/src/lib/services/ics-tokens.service.d.ts +18 -0
- package/dist/src/lib/services/ics-tokens.service.d.ts.map +1 -1
- package/dist/src/lib/services/lead-follows.service.d.ts +32 -0
- package/dist/src/lib/services/lead-follows.service.d.ts.map +1 -1
- package/dist/src/lib/services/leads.service.d.ts +44 -0
- package/dist/src/lib/services/leads.service.d.ts.map +1 -1
- package/dist/src/lib/services/mail-templates.service.d.ts +45 -0
- package/dist/src/lib/services/mail-templates.service.d.ts.map +1 -1
- package/dist/src/lib/services/meeting-billings.service.d.ts +57 -0
- package/dist/src/lib/services/meeting-billings.service.d.ts.map +1 -1
- package/dist/src/lib/services/meeting-participants.service.d.ts +18 -0
- package/dist/src/lib/services/meeting-participants.service.d.ts.map +1 -1
- package/dist/src/lib/services/meetings.service.d.ts +44 -0
- package/dist/src/lib/services/meetings.service.d.ts.map +1 -1
- package/dist/src/lib/services/opportunities.service.d.ts +44 -0
- package/dist/src/lib/services/opportunities.service.d.ts.map +1 -1
- package/dist/src/lib/services/quotes.service.d.ts +44 -0
- package/dist/src/lib/services/quotes.service.d.ts.map +1 -1
- package/dist/src/lib/services/referrals.service.d.ts +27 -0
- package/dist/src/lib/services/referrals.service.d.ts.map +1 -1
- package/dist/src/lib/services/subscribers.service.d.ts +27 -0
- package/dist/src/lib/services/subscribers.service.d.ts.map +1 -1
- package/dist/src/lib/services/touches.service.d.ts +27 -0
- package/dist/src/lib/services/touches.service.d.ts.map +1 -1
- package/dist/src/lib/services/users.service.d.ts +32 -0
- package/dist/src/lib/services/users.service.d.ts.map +1 -1
- package/dist/src/lib/services/zoom-hosts.service.d.ts +41 -0
- package/dist/src/lib/services/zoom-hosts.service.d.ts.map +1 -1
- package/dist/src/lib/services/zoom-meetings.service.d.ts +33 -0
- package/dist/src/lib/services/zoom-meetings.service.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2268,7 +2268,15 @@ function createCalendarSyncService(transport, _config) {
|
|
|
2268
2268
|
};
|
|
2269
2269
|
}
|
|
2270
2270
|
|
|
2271
|
-
|
|
2271
|
+
/**
|
|
2272
|
+
* Create the CRM block.
|
|
2273
|
+
*
|
|
2274
|
+
* @example
|
|
2275
|
+
* ```typescript
|
|
2276
|
+
* const block = createCrmBlock(transport, { appId: 'xxx' });
|
|
2277
|
+
* const leads = await block.leads.list({ page: 1 });
|
|
2278
|
+
* ```
|
|
2279
|
+
*/ function createCrmBlock(transport, config) {
|
|
2272
2280
|
return {
|
|
2273
2281
|
accounts: createAccountsService(transport),
|
|
2274
2282
|
contacts: createContactsService(transport),
|
|
@@ -1,35 +1,76 @@
|
|
|
1
1
|
import type { Transport, BlockConfig, BlockMetadata } from '@23blocks/contracts';
|
|
2
2
|
import { type AccountsService, type ContactsService, type ContactEventsService, type LeadsService, type LeadFollowsService, type OpportunitiesService, type MeetingsService, type MeetingParticipantsService, type MeetingBillingsService, type QuotesService, type SubscribersService, type ReferralsService, type TouchesService, type CategoriesService, type CalendarAccountsService, type BusyBlocksService, type IcsTokensService, type ZoomMeetingsService, type ZoomHostsService, type CrmMailTemplatesService, type CommunicationsService, type CrmUsersService, type BillingReportsService, type CalendarSyncService } from './services/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the CRM block.
|
|
5
|
+
*/
|
|
3
6
|
export interface CrmBlockConfig 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
|
+
* Customer relationship management block interface.
|
|
14
|
+
*/
|
|
7
15
|
export interface CrmBlock {
|
|
16
|
+
/** Account CRUD operations */
|
|
8
17
|
accounts: AccountsService;
|
|
18
|
+
/** Contact management */
|
|
9
19
|
contacts: ContactsService;
|
|
20
|
+
/** Contact event tracking */
|
|
10
21
|
contactEvents: ContactEventsService;
|
|
22
|
+
/** Lead management */
|
|
11
23
|
leads: LeadsService;
|
|
24
|
+
/** Lead follow-up tracking */
|
|
12
25
|
leadFollows: LeadFollowsService;
|
|
26
|
+
/** Sales opportunity management */
|
|
13
27
|
opportunities: OpportunitiesService;
|
|
28
|
+
/** Meeting scheduling and management */
|
|
14
29
|
meetings: MeetingsService;
|
|
30
|
+
/** Meeting participant management */
|
|
15
31
|
meetingParticipants: MeetingParticipantsService;
|
|
32
|
+
/** Meeting billing management */
|
|
16
33
|
meetingBillings: MeetingBillingsService;
|
|
34
|
+
/** Quote/proposal management */
|
|
17
35
|
quotes: QuotesService;
|
|
36
|
+
/** Subscriber management */
|
|
18
37
|
subscribers: SubscribersService;
|
|
38
|
+
/** Referral tracking */
|
|
19
39
|
referrals: ReferralsService;
|
|
40
|
+
/** Touch-point tracking */
|
|
20
41
|
touches: TouchesService;
|
|
42
|
+
/** CRM category management */
|
|
21
43
|
categories: CategoriesService;
|
|
44
|
+
/** Calendar account integration */
|
|
22
45
|
calendarAccounts: CalendarAccountsService;
|
|
46
|
+
/** Calendar busy-block management */
|
|
23
47
|
busyBlocks: BusyBlocksService;
|
|
48
|
+
/** ICS calendar token management */
|
|
24
49
|
icsTokens: IcsTokensService;
|
|
50
|
+
/** Zoom meeting integration */
|
|
25
51
|
zoomMeetings: ZoomMeetingsService;
|
|
52
|
+
/** Zoom host management */
|
|
26
53
|
zoomHosts: ZoomHostsService;
|
|
54
|
+
/** CRM mail template management */
|
|
27
55
|
mailTemplates: CrmMailTemplatesService;
|
|
56
|
+
/** Communication log management */
|
|
28
57
|
communications: CommunicationsService;
|
|
58
|
+
/** CRM user management */
|
|
29
59
|
users: CrmUsersService;
|
|
60
|
+
/** Billing report generation */
|
|
30
61
|
billingReports: BillingReportsService;
|
|
62
|
+
/** Calendar sync operations */
|
|
31
63
|
calendarSync: CalendarSyncService;
|
|
32
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Create the CRM block.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```typescript
|
|
70
|
+
* const block = createCrmBlock(transport, { appId: 'xxx' });
|
|
71
|
+
* const leads = await block.leads.list({ page: 1 });
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
33
74
|
export declare function createCrmBlock(transport: Transport, config: CrmBlockConfig): CrmBlock;
|
|
34
75
|
export declare const crmBlockMetadata: BlockMetadata;
|
|
35
76
|
//# sourceMappingURL=crm.block.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crm.block.d.ts","sourceRoot":"","sources":["../../../src/lib/crm.block.ts"],"names":[],"mappings":"AAAA,OAA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,wBAAgB,cAAc,CAC5B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,cAAc,GACrB,QAAQ,CA2BV;AAED,eAAO,MAAM,gBAAgB,EAAE,aA8B9B,CAAC"}
|
|
@@ -1,13 +1,57 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { Account, CreateAccountRequest, UpdateAccountRequest, ListAccountsParams } from '../types/account.js';
|
|
3
3
|
export interface AccountsService {
|
|
4
|
+
/**
|
|
5
|
+
* List accounts with optional filtering, pagination, and sorting.
|
|
6
|
+
* @param params - Optional filtering, pagination, and sorting parameters.
|
|
7
|
+
* @returns Paginated result containing Account objects and metadata.
|
|
8
|
+
*/
|
|
4
9
|
list(params?: ListAccountsParams): Promise<PageResult<Account>>;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieve a single account by its unique identifier.
|
|
12
|
+
* @param uniqueId - The unique identifier of the account.
|
|
13
|
+
* @returns The matching Account object.
|
|
14
|
+
*/
|
|
5
15
|
get(uniqueId: string): Promise<Account>;
|
|
16
|
+
/**
|
|
17
|
+
* Create a new account.
|
|
18
|
+
* @param data - The account creation payload.
|
|
19
|
+
* @returns The newly created Account object.
|
|
20
|
+
*/
|
|
6
21
|
create(data: CreateAccountRequest): Promise<Account>;
|
|
22
|
+
/**
|
|
23
|
+
* Update an existing account.
|
|
24
|
+
* @param uniqueId - The unique identifier of the account to update.
|
|
25
|
+
* @param data - The fields to update on the account.
|
|
26
|
+
* @returns The updated Account object.
|
|
27
|
+
* @note Uses PUT (not PATCH) as required by the 23blocks backend.
|
|
28
|
+
*/
|
|
7
29
|
update(uniqueId: string, data: UpdateAccountRequest): Promise<Account>;
|
|
30
|
+
/**
|
|
31
|
+
* Soft-delete an account.
|
|
32
|
+
* @param uniqueId - The unique identifier of the account to delete.
|
|
33
|
+
* @returns Resolves when the account has been deleted.
|
|
34
|
+
*/
|
|
8
35
|
delete(uniqueId: string): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Recover a previously soft-deleted account.
|
|
38
|
+
* @param uniqueId - The unique identifier of the account to recover.
|
|
39
|
+
* @returns The recovered Account object.
|
|
40
|
+
*/
|
|
9
41
|
recover(uniqueId: string): Promise<Account>;
|
|
42
|
+
/**
|
|
43
|
+
* Search accounts by a query string with optional pagination.
|
|
44
|
+
* @param query - The search query string.
|
|
45
|
+
* @param params - Optional pagination parameters.
|
|
46
|
+
* @returns Paginated result containing matching Account objects.
|
|
47
|
+
* @note Performs a server-side POST-based search.
|
|
48
|
+
*/
|
|
10
49
|
search(query: string, params?: ListAccountsParams): Promise<PageResult<Account>>;
|
|
50
|
+
/**
|
|
51
|
+
* List soft-deleted accounts with optional pagination.
|
|
52
|
+
* @param params - Optional pagination parameters.
|
|
53
|
+
* @returns Paginated result containing soft-deleted Account objects.
|
|
54
|
+
*/
|
|
11
55
|
listDeleted(params?: ListAccountsParams): Promise<PageResult<Account>>;
|
|
12
56
|
}
|
|
13
57
|
export declare function createAccountsService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/accounts.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,EACnB,MAAM,qBAAqB,CAAC;AAG7B,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"accounts.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/accounts.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,EACnB,MAAM,qBAAqB,CAAC;AAG7B,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IAEhE;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAExC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAErD;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvE;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;;OAIG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE5C;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IAEjF;;;;OAIG;IACH,WAAW,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;CACxE;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,eAAe,CA6EvG"}
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import type { Transport } from '@23blocks/contracts';
|
|
2
2
|
import type { BillingReportParams, RevenueReport, AgingReport, ParticipantBillingReport } from '../types/billing-report.js';
|
|
3
3
|
export interface BillingReportsService {
|
|
4
|
+
/**
|
|
5
|
+
* Retrieve the revenue report with optional date range and status filtering.
|
|
6
|
+
* @param params - Optional date range and status filters.
|
|
7
|
+
* @returns A RevenueReport containing totals, period info, and breakdowns by month and status.
|
|
8
|
+
*/
|
|
4
9
|
getRevenueReport(params?: BillingReportParams): Promise<RevenueReport>;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieve the aging report for outstanding billings.
|
|
12
|
+
* @returns An AgingReport with amounts bucketed by days outstanding (current, 30, 60, 90, 90+) and individual items.
|
|
13
|
+
*/
|
|
5
14
|
getAgingReport(): Promise<AgingReport>;
|
|
15
|
+
/**
|
|
16
|
+
* Retrieve billing report for a specific participant.
|
|
17
|
+
* @param participantEmail - The email address of the participant.
|
|
18
|
+
* @returns A ParticipantBillingReport with billing totals and session details for the participant.
|
|
19
|
+
*/
|
|
6
20
|
getParticipantReport(participantEmail: string): Promise<ParticipantBillingReport>;
|
|
7
21
|
}
|
|
8
22
|
export declare function createBillingReportsService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-reports.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/billing-reports.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"billing-reports.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/billing-reports.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,gBAAgB,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAEvE;;;OAGG;IACH,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IAEvC;;;;OAIG;IACH,oBAAoB,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACnF;AAED,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,qBAAqB,CA8DnH"}
|
|
@@ -1,8 +1,26 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { BusyBlock, CreateBusyBlockRequest, ListBusyBlocksParams } from '../types/busy-block.js';
|
|
3
3
|
export interface BusyBlocksService {
|
|
4
|
+
/**
|
|
5
|
+
* List busy blocks for a specific user with optional filtering, pagination, and sorting.
|
|
6
|
+
* @param userUniqueId - The unique identifier of the user.
|
|
7
|
+
* @param params - Optional filtering (status, startTime, endTime, search), pagination, and sorting.
|
|
8
|
+
* @returns Paginated result containing BusyBlock objects and metadata.
|
|
9
|
+
*/
|
|
4
10
|
list(userUniqueId: string, params?: ListBusyBlocksParams): Promise<PageResult<BusyBlock>>;
|
|
11
|
+
/**
|
|
12
|
+
* Create a new busy block for a user, marking a time range as unavailable.
|
|
13
|
+
* @param userUniqueId - The unique identifier of the user.
|
|
14
|
+
* @param data - The busy block creation payload with title, time range, all-day flag, and recurrence settings.
|
|
15
|
+
* @returns The newly created BusyBlock object.
|
|
16
|
+
*/
|
|
5
17
|
create(userUniqueId: string, data: CreateBusyBlockRequest): Promise<BusyBlock>;
|
|
18
|
+
/**
|
|
19
|
+
* Delete a busy block for a user, freeing up the time range.
|
|
20
|
+
* @param userUniqueId - The unique identifier of the user.
|
|
21
|
+
* @param uniqueId - The unique identifier of the busy block to delete.
|
|
22
|
+
* @returns Resolves when the busy block has been deleted.
|
|
23
|
+
*/
|
|
6
24
|
delete(userUniqueId: string, uniqueId: string): Promise<void>;
|
|
7
25
|
}
|
|
8
26
|
export declare function createBusyBlocksService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"busy-blocks.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/busy-blocks.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,SAAS,EACT,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAGhC,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"busy-blocks.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/busy-blocks.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,SAAS,EACT,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAGhC,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;IAE1F;;;;;OAKG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAE/E;;;;;OAKG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/D;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,iBAAiB,CAoC3G"}
|
|
@@ -1,12 +1,55 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { CalendarAccount, CreateCalendarAccountRequest, UpdateCalendarAccountRequest, ListCalendarAccountsParams, SyncCalendarRequest, SyncCalendarResponse } from '../types/calendar-account.js';
|
|
3
3
|
export interface CalendarAccountsService {
|
|
4
|
+
/**
|
|
5
|
+
* List calendar accounts for a specific user with optional filtering, pagination, and sorting.
|
|
6
|
+
* @param userUniqueId - The unique identifier of the user.
|
|
7
|
+
* @param params - Optional filtering (status, provider, syncEnabled, search), pagination, and sorting.
|
|
8
|
+
* @returns Paginated result containing CalendarAccount objects and metadata.
|
|
9
|
+
*/
|
|
4
10
|
list(userUniqueId: string, params?: ListCalendarAccountsParams): Promise<PageResult<CalendarAccount>>;
|
|
11
|
+
/**
|
|
12
|
+
* Retrieve a single calendar account for a user.
|
|
13
|
+
* @param userUniqueId - The unique identifier of the user.
|
|
14
|
+
* @param uniqueId - The unique identifier of the calendar account.
|
|
15
|
+
* @returns The matching CalendarAccount object.
|
|
16
|
+
*/
|
|
5
17
|
get(userUniqueId: string, uniqueId: string): Promise<CalendarAccount>;
|
|
18
|
+
/**
|
|
19
|
+
* Create a new calendar account for a user.
|
|
20
|
+
* @param userUniqueId - The unique identifier of the user.
|
|
21
|
+
* @param data - The calendar account creation payload with provider, email, tokens, and sync settings.
|
|
22
|
+
* @returns The newly created CalendarAccount object.
|
|
23
|
+
*/
|
|
6
24
|
create(userUniqueId: string, data: CreateCalendarAccountRequest): Promise<CalendarAccount>;
|
|
25
|
+
/**
|
|
26
|
+
* Update an existing calendar account for a user.
|
|
27
|
+
* @param userUniqueId - The unique identifier of the user.
|
|
28
|
+
* @param uniqueId - The unique identifier of the calendar account to update.
|
|
29
|
+
* @param data - The fields to update on the calendar account.
|
|
30
|
+
* @returns The updated CalendarAccount object.
|
|
31
|
+
* @note Uses PUT (not PATCH) as required by the 23blocks backend.
|
|
32
|
+
*/
|
|
7
33
|
update(userUniqueId: string, uniqueId: string, data: UpdateCalendarAccountRequest): Promise<CalendarAccount>;
|
|
34
|
+
/**
|
|
35
|
+
* Delete a calendar account for a user.
|
|
36
|
+
* @param userUniqueId - The unique identifier of the user.
|
|
37
|
+
* @param uniqueId - The unique identifier of the calendar account to delete.
|
|
38
|
+
* @returns Resolves when the calendar account has been deleted.
|
|
39
|
+
*/
|
|
8
40
|
delete(userUniqueId: string, uniqueId: string): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Trigger a calendar sync for a specific user's calendar accounts.
|
|
43
|
+
* @param userUniqueId - The unique identifier of the user.
|
|
44
|
+
* @param request - Optional sync parameters (forceRefresh, date range).
|
|
45
|
+
* @returns A SyncCalendarResponse with sync results.
|
|
46
|
+
*/
|
|
9
47
|
syncUser(userUniqueId: string, request?: SyncCalendarRequest): Promise<SyncCalendarResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* Trigger a calendar sync for all calendar accounts across the tenant.
|
|
50
|
+
* @param request - Optional sync parameters (forceRefresh, date range).
|
|
51
|
+
* @returns A SyncCalendarResponse with sync results.
|
|
52
|
+
*/
|
|
10
53
|
syncTenant(request?: SyncCalendarRequest): Promise<SyncCalendarResponse>;
|
|
11
54
|
}
|
|
12
55
|
export declare function createCalendarAccountsService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-accounts.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/calendar-accounts.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,eAAe,EACf,4BAA4B,EAC5B,4BAA4B,EAC5B,0BAA0B,EAC1B,mBAAm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mB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAE7F;;;;OAIG;IACH,UAAU,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;CAC1E;AAED,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,uBAAuB,CAgFvH"}
|
|
@@ -6,7 +6,16 @@ export interface CalendarSyncResult {
|
|
|
6
6
|
syncedAt: Date;
|
|
7
7
|
}
|
|
8
8
|
export interface CalendarSyncService {
|
|
9
|
+
/**
|
|
10
|
+
* Trigger a calendar sync for a specific user.
|
|
11
|
+
* @param userUniqueId - The unique identifier of the user whose calendar to sync.
|
|
12
|
+
* @returns A CalendarSyncResult indicating success status, number of synced events, any errors, and sync timestamp.
|
|
13
|
+
*/
|
|
9
14
|
syncUser(userUniqueId: string): Promise<CalendarSyncResult>;
|
|
15
|
+
/**
|
|
16
|
+
* Trigger a calendar sync for the entire tenant.
|
|
17
|
+
* @returns A CalendarSyncResult indicating success status, number of synced events, any errors, and sync timestamp.
|
|
18
|
+
*/
|
|
10
19
|
syncTenant(): Promise<CalendarSyncResult>;
|
|
11
20
|
}
|
|
12
21
|
export declare function createCalendarSyncService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-sync.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/calendar-sync.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,IAAI,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"calendar-sync.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/calendar-sync.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,IAAI,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAE5D;;;OAGG;IACH,UAAU,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAC3C;AAED,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,mBAAmB,CAsB/G"}
|
|
@@ -1,10 +1,37 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { Category, CreateCategoryRequest, UpdateCategoryRequest, ListCategoriesParams } from '../types/category.js';
|
|
3
3
|
export interface CategoriesService {
|
|
4
|
+
/**
|
|
5
|
+
* List categories with optional filtering, pagination, and sorting.
|
|
6
|
+
* @param params - Optional filtering (status, parentUniqueId, search), pagination, and sorting parameters.
|
|
7
|
+
* @returns Paginated result containing Category objects and metadata.
|
|
8
|
+
*/
|
|
4
9
|
list(params?: ListCategoriesParams): Promise<PageResult<Category>>;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieve a single category by its unique identifier.
|
|
12
|
+
* @param uniqueId - The unique identifier of the category.
|
|
13
|
+
* @returns The matching Category object.
|
|
14
|
+
*/
|
|
5
15
|
get(uniqueId: string): Promise<Category>;
|
|
16
|
+
/**
|
|
17
|
+
* Create a new category.
|
|
18
|
+
* @param data - The category creation payload including name, code, and optional hierarchy/display fields.
|
|
19
|
+
* @returns The newly created Category object.
|
|
20
|
+
*/
|
|
6
21
|
create(data: CreateCategoryRequest): Promise<Category>;
|
|
22
|
+
/**
|
|
23
|
+
* Update an existing category.
|
|
24
|
+
* @param uniqueId - The unique identifier of the category to update.
|
|
25
|
+
* @param data - The fields to update on the category.
|
|
26
|
+
* @returns The updated Category object.
|
|
27
|
+
* @note Uses PUT (not PATCH) as required by the 23blocks backend.
|
|
28
|
+
*/
|
|
7
29
|
update(uniqueId: string, data: UpdateCategoryRequest): Promise<Category>;
|
|
30
|
+
/**
|
|
31
|
+
* Delete a category.
|
|
32
|
+
* @param uniqueId - The unique identifier of the category to delete.
|
|
33
|
+
* @returns Resolves when the category has been deleted.
|
|
34
|
+
*/
|
|
8
35
|
delete(uniqueId: string): Promise<void>;
|
|
9
36
|
}
|
|
10
37
|
export declare function createCategoriesService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"categories.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/categories.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,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"categories.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/categories.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,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEnE;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEzC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEvD;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEzE;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzC;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,iBAAiB,CA0D3G"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { Transport } from '@23blocks/contracts';
|
|
2
2
|
import type { UnsubscribeRequest, UnsubscribeResponse } from '../types/communication.js';
|
|
3
3
|
export interface CommunicationsService {
|
|
4
|
+
/**
|
|
5
|
+
* Unsubscribe an email address from communications.
|
|
6
|
+
* @param data - The unsubscribe request containing email, optional reason, and campaign ID.
|
|
7
|
+
* @returns An UnsubscribeResponse with success status, email, and unsubscription timestamp.
|
|
8
|
+
*/
|
|
4
9
|
unsubscribe(data: UnsubscribeRequest): Promise<UnsubscribeResponse>;
|
|
5
10
|
}
|
|
6
11
|
export declare function createCommunicationsService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communications.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/communications.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEzF,MAAM,WAAW,qBAAqB;IACpC,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACrE;AAED,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,qBAAqB,CAkBnH"}
|
|
1
|
+
{"version":3,"file":"communications.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/communications.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEzF,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACrE;AAED,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,qBAAqB,CAkBnH"}
|
|
@@ -1,18 +1,93 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { ContactEvent, CreateContactEventRequest, UpdateContactEventRequest, ListContactEventsParams, ConfirmationRequest, CheckinRequest, CheckoutRequest, EventNotesRequest } from '../types/contact-event.js';
|
|
3
3
|
export interface ContactEventsService {
|
|
4
|
+
/**
|
|
5
|
+
* List contact events with optional filtering, pagination, and sorting.
|
|
6
|
+
* @param params - Optional filtering (status, eventType, contactUniqueId, userUniqueId), pagination, and sorting.
|
|
7
|
+
* @returns Paginated result containing ContactEvent objects and metadata.
|
|
8
|
+
*/
|
|
4
9
|
list(params?: ListContactEventsParams): Promise<PageResult<ContactEvent>>;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieve a single contact event by its unique identifier.
|
|
12
|
+
* @param uniqueId - The unique identifier of the contact event.
|
|
13
|
+
* @returns The matching ContactEvent object.
|
|
14
|
+
*/
|
|
5
15
|
get(uniqueId: string): Promise<ContactEvent>;
|
|
16
|
+
/**
|
|
17
|
+
* Create a new contact event.
|
|
18
|
+
* @param data - The event creation payload with contact, user, type, and scheduling details.
|
|
19
|
+
* @returns The newly created ContactEvent object.
|
|
20
|
+
*/
|
|
6
21
|
create(data: CreateContactEventRequest): Promise<ContactEvent>;
|
|
22
|
+
/**
|
|
23
|
+
* Update an existing contact event.
|
|
24
|
+
* @param uniqueId - The unique identifier of the event to update.
|
|
25
|
+
* @param data - The fields to update on the event.
|
|
26
|
+
* @returns The updated ContactEvent object.
|
|
27
|
+
* @note Uses PUT (not PATCH) as required by the 23blocks backend.
|
|
28
|
+
*/
|
|
7
29
|
update(uniqueId: string, data: UpdateContactEventRequest): Promise<ContactEvent>;
|
|
30
|
+
/**
|
|
31
|
+
* Delete a contact event.
|
|
32
|
+
* @param uniqueId - The unique identifier of the event to delete.
|
|
33
|
+
* @returns Resolves when the event has been deleted.
|
|
34
|
+
*/
|
|
8
35
|
delete(uniqueId: string): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Record a student confirmation for a contact event.
|
|
38
|
+
* @param uniqueId - The unique identifier of the event.
|
|
39
|
+
* @param request - Optional confirmation payload with notes.
|
|
40
|
+
* @returns The updated ContactEvent object reflecting the student confirmation.
|
|
41
|
+
*/
|
|
9
42
|
studentConfirmation(uniqueId: string, request?: ConfirmationRequest): Promise<ContactEvent>;
|
|
43
|
+
/**
|
|
44
|
+
* Record a student check-in for a contact event.
|
|
45
|
+
* @param uniqueId - The unique identifier of the event.
|
|
46
|
+
* @param request - Optional check-in payload with notes.
|
|
47
|
+
* @returns The updated ContactEvent object reflecting the student check-in.
|
|
48
|
+
*/
|
|
10
49
|
studentCheckin(uniqueId: string, request?: CheckinRequest): Promise<ContactEvent>;
|
|
50
|
+
/**
|
|
51
|
+
* Record a teacher confirmation for a contact event.
|
|
52
|
+
* @param uniqueId - The unique identifier of the event.
|
|
53
|
+
* @param request - Optional confirmation payload with notes.
|
|
54
|
+
* @returns The updated ContactEvent object reflecting the teacher confirmation.
|
|
55
|
+
*/
|
|
11
56
|
teacherConfirmation(uniqueId: string, request?: ConfirmationRequest): Promise<ContactEvent>;
|
|
57
|
+
/**
|
|
58
|
+
* Record a teacher check-in for a contact event.
|
|
59
|
+
* @param uniqueId - The unique identifier of the event.
|
|
60
|
+
* @param request - Optional check-in payload with notes.
|
|
61
|
+
* @returns The updated ContactEvent object reflecting the teacher check-in.
|
|
62
|
+
*/
|
|
12
63
|
teacherCheckin(uniqueId: string, request?: CheckinRequest): Promise<ContactEvent>;
|
|
64
|
+
/**
|
|
65
|
+
* Record a teacher/employee checkout for a contact event.
|
|
66
|
+
* @param uniqueId - The unique identifier of the event.
|
|
67
|
+
* @param request - Optional checkout payload with notes.
|
|
68
|
+
* @returns The updated ContactEvent object reflecting the checkout.
|
|
69
|
+
*/
|
|
13
70
|
checkout(uniqueId: string, request?: CheckoutRequest): Promise<ContactEvent>;
|
|
71
|
+
/**
|
|
72
|
+
* Record a student checkout for a contact event.
|
|
73
|
+
* @param uniqueId - The unique identifier of the event.
|
|
74
|
+
* @param request - Optional checkout payload with notes.
|
|
75
|
+
* @returns The updated ContactEvent object reflecting the student checkout.
|
|
76
|
+
*/
|
|
14
77
|
checkoutStudent(uniqueId: string, request?: CheckoutRequest): Promise<ContactEvent>;
|
|
78
|
+
/**
|
|
79
|
+
* Add or update student notes on a contact event.
|
|
80
|
+
* @param uniqueId - The unique identifier of the event.
|
|
81
|
+
* @param request - The notes request containing the notes text.
|
|
82
|
+
* @returns The updated ContactEvent object with the student notes applied.
|
|
83
|
+
*/
|
|
15
84
|
studentNotes(uniqueId: string, request: EventNotesRequest): Promise<ContactEvent>;
|
|
85
|
+
/**
|
|
86
|
+
* Add or update admin notes on a contact event.
|
|
87
|
+
* @param uniqueId - The unique identifier of the event.
|
|
88
|
+
* @param request - The notes request containing the notes text.
|
|
89
|
+
* @returns The updated ContactEvent object with the admin notes applied.
|
|
90
|
+
*/
|
|
16
91
|
adminNotes(uniqueId: string, request: EventNotesRequest): Promise<ContactEvent>;
|
|
17
92
|
}
|
|
18
93
|
export declare function createContactEventsService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-events.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/contact-events.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,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,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":"contact-events.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/contact-events.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,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,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;;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;;OAKG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACjF;AAED,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,oBAAoB,CA4IjH"}
|
|
@@ -1,13 +1,57 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { Contact, CreateContactRequest, UpdateContactRequest, ListContactsParams } from '../types/contact.js';
|
|
3
3
|
export interface ContactsService {
|
|
4
|
+
/**
|
|
5
|
+
* List contacts with optional filtering, pagination, and sorting.
|
|
6
|
+
* @param params - Optional filtering (status, contactStatus, search), pagination, and sorting parameters.
|
|
7
|
+
* @returns Paginated result containing Contact objects and metadata.
|
|
8
|
+
*/
|
|
4
9
|
list(params?: ListContactsParams): Promise<PageResult<Contact>>;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieve a single contact by its unique identifier.
|
|
12
|
+
* @param uniqueId - The unique identifier of the contact.
|
|
13
|
+
* @returns The matching Contact object.
|
|
14
|
+
*/
|
|
5
15
|
get(uniqueId: string): Promise<Contact>;
|
|
16
|
+
/**
|
|
17
|
+
* Create a new contact.
|
|
18
|
+
* @param data - The contact creation payload with name, email, phone, and other fields.
|
|
19
|
+
* @returns The newly created Contact object.
|
|
20
|
+
*/
|
|
6
21
|
create(data: CreateContactRequest): Promise<Contact>;
|
|
22
|
+
/**
|
|
23
|
+
* Update an existing contact.
|
|
24
|
+
* @param uniqueId - The unique identifier of the contact to update.
|
|
25
|
+
* @param data - The fields to update on the contact.
|
|
26
|
+
* @returns The updated Contact object.
|
|
27
|
+
* @note Uses PUT (not PATCH) as required by the 23blocks backend.
|
|
28
|
+
*/
|
|
7
29
|
update(uniqueId: string, data: UpdateContactRequest): Promise<Contact>;
|
|
30
|
+
/**
|
|
31
|
+
* Soft-delete a contact.
|
|
32
|
+
* @param uniqueId - The unique identifier of the contact to delete.
|
|
33
|
+
* @returns Resolves when the contact has been deleted.
|
|
34
|
+
*/
|
|
8
35
|
delete(uniqueId: string): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Recover a previously soft-deleted contact.
|
|
38
|
+
* @param uniqueId - The unique identifier of the contact to recover.
|
|
39
|
+
* @returns The recovered Contact object.
|
|
40
|
+
*/
|
|
9
41
|
recover(uniqueId: string): Promise<Contact>;
|
|
42
|
+
/**
|
|
43
|
+
* Search contacts by a query string with optional pagination.
|
|
44
|
+
* @param query - The search query string.
|
|
45
|
+
* @param params - Optional pagination parameters.
|
|
46
|
+
* @returns Paginated result containing matching Contact objects.
|
|
47
|
+
* @note Performs a server-side POST-based search.
|
|
48
|
+
*/
|
|
10
49
|
search(query: string, params?: ListContactsParams): Promise<PageResult<Contact>>;
|
|
50
|
+
/**
|
|
51
|
+
* List soft-deleted contacts with optional pagination.
|
|
52
|
+
* @param params - Optional pagination parameters.
|
|
53
|
+
* @returns Paginated result containing soft-deleted Contact objects.
|
|
54
|
+
*/
|
|
11
55
|
listDeleted(params?: ListContactsParams): Promise<PageResult<Contact>>;
|
|
12
56
|
}
|
|
13
57
|
export declare function createContactsService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/contacts.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,EACnB,MAAM,qBAAqB,CAAC;AAG7B,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"contacts.service.d.ts","sourceR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@@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { IcsToken, CreateIcsTokenRequest, ListIcsTokensParams } from '../types/ics-token.js';
|
|
3
3
|
export interface IcsTokensService {
|
|
4
|
+
/**
|
|
5
|
+
* List ICS tokens for a specific user with optional filtering, pagination, and sorting.
|
|
6
|
+
* @param userUniqueId - The unique identifier of the user.
|
|
7
|
+
* @param params - Optional filtering (status, search), pagination, and sorting parameters.
|
|
8
|
+
* @returns Paginated result containing IcsToken objects and metadata.
|
|
9
|
+
*/
|
|
4
10
|
list(userUniqueId: string, params?: ListIcsTokensParams): Promise<PageResult<IcsToken>>;
|
|
11
|
+
/**
|
|
12
|
+
* Create a new ICS token for a user, enabling calendar feed access.
|
|
13
|
+
* @param userUniqueId - The unique identifier of the user.
|
|
14
|
+
* @param data - The ICS token creation payload with name, description, and optional expiration.
|
|
15
|
+
* @returns The newly created IcsToken object containing the generated token value.
|
|
16
|
+
*/
|
|
5
17
|
create(userUniqueId: string, data: CreateIcsTokenRequest): Promise<IcsToken>;
|
|
18
|
+
/**
|
|
19
|
+
* Delete an ICS token for a user, revoking calendar feed access.
|
|
20
|
+
* @param userUniqueId - The unique identifier of the user.
|
|
21
|
+
* @param uniqueId - The unique identifier of the ICS token to delete.
|
|
22
|
+
* @returns Resolves when the ICS token has been deleted.
|
|
23
|
+
*/
|
|
6
24
|
delete(userUniqueId: string, uniqueId: string): Promise<void>;
|
|
7
25
|
}
|
|
8
26
|
export declare function createIcsTokensService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ics-tokens.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/ics-tokens.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,QAAQ,EACR,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAG/B,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":"ics-tokens.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/ics-tokens.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,QAAQ,EACR,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAG/B,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,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAE7E;;;;;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,CA8BzG"}
|