@rachelallyson/planning-center-people-ts 2.14.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +93 -7
- package/README.md +42 -4
- package/dist/auth.d.ts +1 -1
- package/dist/auth.js +14 -6
- package/dist/client.d.ts +33 -8
- package/dist/client.js +47 -22
- package/dist/core.d.ts +4 -2
- package/dist/core.js +3 -2
- package/dist/error-handling.d.ts +4 -4
- package/dist/error-handling.js +13 -2
- package/dist/error-scenarios.d.ts +11 -7
- package/dist/error-scenarios.js +26 -10
- package/dist/helpers.d.ts +124 -48
- package/dist/helpers.js +236 -93
- package/dist/index.d.ts +9 -7
- package/dist/index.js +31 -71
- package/dist/matching/matcher.d.ts +8 -4
- package/dist/matching/matcher.js +51 -58
- package/dist/matching/scoring.d.ts +9 -6
- package/dist/matching/scoring.js +18 -14
- package/dist/modules/campus.d.ts +31 -36
- package/dist/modules/campus.js +36 -49
- package/dist/modules/contacts.d.ts +33 -29
- package/dist/modules/contacts.js +36 -12
- package/dist/modules/fields.d.ts +42 -54
- package/dist/modules/fields.js +70 -100
- package/dist/modules/forms.d.ts +35 -24
- package/dist/modules/forms.js +41 -23
- package/dist/modules/households.d.ts +17 -19
- package/dist/modules/households.js +25 -34
- package/dist/modules/lists.d.ts +30 -28
- package/dist/modules/lists.js +55 -42
- package/dist/modules/notes.d.ts +32 -30
- package/dist/modules/notes.js +40 -52
- package/dist/modules/people.d.ts +83 -71
- package/dist/modules/people.js +323 -172
- package/dist/modules/reports.d.ts +18 -32
- package/dist/modules/reports.js +28 -40
- package/dist/modules/service-time.d.ts +19 -24
- package/dist/modules/service-time.js +28 -28
- package/dist/modules/workflows.d.ts +42 -47
- package/dist/modules/workflows.js +50 -53
- package/dist/performance.d.ts +14 -10
- package/dist/performance.js +61 -25
- package/dist/testing/recorder.js +11 -2
- package/dist/testing/simple-builders.d.ts +6 -4
- package/dist/testing/simple-builders.js +36 -49
- package/dist/testing/types.d.ts +4 -0
- package/dist/types/api-options.d.ts +380 -0
- package/dist/types/api-options.js +6 -0
- package/dist/types/client.d.ts +4 -2
- package/dist/types/client.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/people.d.ts +47 -9
- package/package.json +7 -7
- package/dist/core/http.d.ts +0 -56
- package/dist/core/http.js +0 -360
- package/dist/core/pagination.d.ts +0 -34
- package/dist/core/pagination.js +0 -178
- package/dist/people/contacts.d.ts +0 -43
- package/dist/people/contacts.js +0 -122
- package/dist/people/core.d.ts +0 -28
- package/dist/people/core.js +0 -69
- package/dist/people/fields.d.ts +0 -62
- package/dist/people/fields.js +0 -294
- package/dist/people/households.d.ts +0 -15
- package/dist/people/households.js +0 -31
- package/dist/people/index.d.ts +0 -8
- package/dist/people/index.js +0 -25
- package/dist/people/lists.d.ts +0 -34
- package/dist/people/lists.js +0 -48
- package/dist/people/notes.d.ts +0 -30
- package/dist/people/notes.js +0 -37
- package/dist/people/organization.d.ts +0 -12
- package/dist/people/organization.js +0 -15
- package/dist/people/workflows.d.ts +0 -37
- package/dist/people/workflows.js +0 -75
|
@@ -1,53 +1,39 @@
|
|
|
1
1
|
import { BaseModule } from '@rachelallyson/planning-center-base-ts';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type { PcoEventEmitter } from '@rachelallyson/planning-center-base-ts';
|
|
5
|
-
import type { PaginationOptions, PaginationResult } from '@rachelallyson/planning-center-base-ts';
|
|
6
|
-
import type { ReportResource, ReportAttributes, ReportsList, PersonResource } from '../types';
|
|
2
|
+
import type { ReportResource, ReportAttributes } from '../types';
|
|
3
|
+
import type { ReportListOptions, ReportPageOptions } from '../types/api-options';
|
|
7
4
|
/**
|
|
8
5
|
* Reports module for managing report-related operations
|
|
9
6
|
*/
|
|
10
7
|
export declare class ReportsModule extends BaseModule {
|
|
11
|
-
constructor(httpClient: PcoHttpClient, paginationHelper: PaginationHelper, eventEmitter: PcoEventEmitter);
|
|
12
8
|
/**
|
|
13
|
-
* Get all reports
|
|
9
|
+
* Get all reports across all pages
|
|
14
10
|
*/
|
|
15
|
-
getAll(params?:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
getAll(params?: ReportListOptions): Promise<import("@rachelallyson/planning-center-base-ts").PaginationResult<ReportResource, import("@rachelallyson/planning-center-base-ts").ResourceObject<string, any, any>, Record<string, never>>>;
|
|
12
|
+
/**
|
|
13
|
+
* Get a single page of reports with optional filtering and pagination control
|
|
14
|
+
* Use this when you need a specific page or want to limit the number of results
|
|
15
|
+
* @param params - List parameters including where, include, perPage, page, and order
|
|
16
|
+
* @returns A single page of results with meta and links for pagination
|
|
17
|
+
*/
|
|
18
|
+
getPage(params?: ReportPageOptions): Promise<{
|
|
19
|
+
data: import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Report", ReportAttributes, import("../types").ReportRelationships, Record<string, never>>[];
|
|
20
|
+
meta?: import("@rachelallyson/planning-center-base-ts").Meta;
|
|
21
|
+
links?: import("@rachelallyson/planning-center-base-ts").TopLevelLinks;
|
|
22
|
+
}>;
|
|
21
23
|
/**
|
|
22
24
|
* Get a specific report by ID
|
|
23
25
|
*/
|
|
24
|
-
getById(id: string, include?: string[]): Promise<
|
|
26
|
+
getById(id: string, include?: string[]): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Report", ReportAttributes, import("../types").ReportRelationships>>;
|
|
25
27
|
/**
|
|
26
28
|
* Create a new report
|
|
27
29
|
*/
|
|
28
|
-
create(data: ReportAttributes): Promise<
|
|
30
|
+
create(data: ReportAttributes): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Report", ReportAttributes, import("../types").ReportRelationships>>;
|
|
29
31
|
/**
|
|
30
32
|
* Update an existing report
|
|
31
33
|
*/
|
|
32
|
-
update(id: string, data: Partial<ReportAttributes>): Promise<
|
|
34
|
+
update(id: string, data: Partial<ReportAttributes>): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Report", ReportAttributes, import("../types").ReportRelationships>>;
|
|
33
35
|
/**
|
|
34
36
|
* Delete a report
|
|
35
37
|
*/
|
|
36
38
|
delete(id: string): Promise<void>;
|
|
37
|
-
/**
|
|
38
|
-
* Get the person who created a report
|
|
39
|
-
*/
|
|
40
|
-
getCreatedBy(reportId: string): Promise<PersonResource>;
|
|
41
|
-
/**
|
|
42
|
-
* Get the person who last updated a report
|
|
43
|
-
*/
|
|
44
|
-
getUpdatedBy(reportId: string): Promise<PersonResource>;
|
|
45
|
-
/**
|
|
46
|
-
* Get all reports with pagination support
|
|
47
|
-
*/
|
|
48
|
-
getAllPagesPaginated(params?: {
|
|
49
|
-
where?: Record<string, any>;
|
|
50
|
-
include?: string[];
|
|
51
|
-
per_page?: number;
|
|
52
|
-
}, paginationOptions?: PaginationOptions): Promise<PaginationResult<ReportResource>>;
|
|
53
39
|
}
|
package/dist/modules/reports.js
CHANGED
|
@@ -6,72 +6,60 @@ const planning_center_base_ts_1 = require("@rachelallyson/planning-center-base-t
|
|
|
6
6
|
* Reports module for managing report-related operations
|
|
7
7
|
*/
|
|
8
8
|
class ReportsModule extends planning_center_base_ts_1.BaseModule {
|
|
9
|
-
constructor(httpClient, paginationHelper, eventEmitter) {
|
|
10
|
-
super(httpClient, paginationHelper, eventEmitter);
|
|
11
|
-
}
|
|
12
9
|
/**
|
|
13
|
-
* Get all reports
|
|
10
|
+
* Get all reports across all pages
|
|
14
11
|
*/
|
|
15
12
|
async getAll(params) {
|
|
16
|
-
|
|
13
|
+
this.debugLog('reports.getAll', { params });
|
|
14
|
+
return await this.getAllPages('/reports', {
|
|
15
|
+
where: params?.where,
|
|
16
|
+
include: params?.include,
|
|
17
|
+
order: params?.order
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Get a single page of reports with optional filtering and pagination control
|
|
22
|
+
* Use this when you need a specific page or want to limit the number of results
|
|
23
|
+
* @param params - List parameters including where, include, perPage, page, and order
|
|
24
|
+
* @returns A single page of results with meta and links for pagination
|
|
25
|
+
*/
|
|
26
|
+
async getPage(params) {
|
|
27
|
+
this.debugLog('reports.getPage', { params });
|
|
28
|
+
return this.getList('/reports', {
|
|
29
|
+
where: params?.where,
|
|
30
|
+
include: params?.include,
|
|
31
|
+
per_page: params?.perPage,
|
|
32
|
+
page: params?.page,
|
|
33
|
+
order: params?.order
|
|
34
|
+
});
|
|
17
35
|
}
|
|
18
36
|
/**
|
|
19
37
|
* Get a specific report by ID
|
|
20
38
|
*/
|
|
21
39
|
async getById(id, include) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
params.include = include.join(',');
|
|
25
|
-
}
|
|
26
|
-
return this.getSingle(`/reports/${id}`, params);
|
|
40
|
+
this.debugLog('reports.getById', { id, include });
|
|
41
|
+
return this.getSingle(`/reports/${id}`, include);
|
|
27
42
|
}
|
|
28
43
|
/**
|
|
29
44
|
* Create a new report
|
|
30
45
|
*/
|
|
31
46
|
async create(data) {
|
|
47
|
+
this.debugLog('reports.create', { data });
|
|
32
48
|
return this.createResource('/reports', data);
|
|
33
49
|
}
|
|
34
50
|
/**
|
|
35
51
|
* Update an existing report
|
|
36
52
|
*/
|
|
37
53
|
async update(id, data) {
|
|
54
|
+
this.debugLog('reports.update', { id, data });
|
|
38
55
|
return this.updateResource(`/reports/${id}`, data);
|
|
39
56
|
}
|
|
40
57
|
/**
|
|
41
58
|
* Delete a report
|
|
42
59
|
*/
|
|
43
60
|
async delete(id) {
|
|
61
|
+
this.debugLog('reports.delete', { id });
|
|
44
62
|
return this.deleteResource(`/reports/${id}`);
|
|
45
63
|
}
|
|
46
|
-
/**
|
|
47
|
-
* Get the person who created a report
|
|
48
|
-
*/
|
|
49
|
-
async getCreatedBy(reportId) {
|
|
50
|
-
return this.getSingle(`/reports/${reportId}/created_by`);
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Get the person who last updated a report
|
|
54
|
-
*/
|
|
55
|
-
async getUpdatedBy(reportId) {
|
|
56
|
-
return this.getSingle(`/reports/${reportId}/updated_by`);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Get all reports with pagination support
|
|
60
|
-
*/
|
|
61
|
-
async getAllPagesPaginated(params, paginationOptions) {
|
|
62
|
-
const queryParams = {};
|
|
63
|
-
if (params?.where) {
|
|
64
|
-
Object.entries(params.where).forEach(([key, value]) => {
|
|
65
|
-
queryParams[`where[${key}]`] = value;
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
if (params?.include) {
|
|
69
|
-
queryParams.include = params.include.join(',');
|
|
70
|
-
}
|
|
71
|
-
if (params?.per_page) {
|
|
72
|
-
queryParams.per_page = params.per_page;
|
|
73
|
-
}
|
|
74
|
-
return this.getAllPages('/reports', queryParams, paginationOptions);
|
|
75
|
-
}
|
|
76
64
|
}
|
|
77
65
|
exports.ReportsModule = ReportsModule;
|
|
@@ -1,46 +1,41 @@
|
|
|
1
1
|
import { BaseModule } from '@rachelallyson/planning-center-base-ts';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type { PcoEventEmitter } from '@rachelallyson/planning-center-base-ts';
|
|
5
|
-
import type { PaginationOptions, PaginationResult } from '@rachelallyson/planning-center-base-ts';
|
|
6
|
-
import type { ServiceTimeResource, ServiceTimeAttributes, ServiceTimesList } from '../types';
|
|
2
|
+
import type { ServiceTimeResource, ServiceTimeAttributes } from '../types';
|
|
3
|
+
import type { ServiceTimeListOptions, ServiceTimePageOptions } from '../types/api-options';
|
|
7
4
|
/**
|
|
8
5
|
* ServiceTime module for managing service time-related operations
|
|
9
6
|
* ServiceTimes are campus-scoped resources
|
|
10
7
|
*/
|
|
11
8
|
export declare class ServiceTimeModule extends BaseModule {
|
|
12
|
-
constructor(httpClient: PcoHttpClient, paginationHelper: PaginationHelper, eventEmitter: PcoEventEmitter);
|
|
13
9
|
/**
|
|
14
|
-
* Get all service times for a specific campus
|
|
10
|
+
* Get all service times for a specific campus across all pages
|
|
15
11
|
*/
|
|
16
|
-
getAll(campusId: string, params?:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
getAll(campusId: string, params?: ServiceTimeListOptions): Promise<import("@rachelallyson/planning-center-base-ts").PaginationResult<ServiceTimeResource, import("@rachelallyson/planning-center-base-ts").ResourceObject<string, any, any>, Record<string, never>>>;
|
|
13
|
+
/**
|
|
14
|
+
* Get a single page of service times for a campus with optional filtering and pagination control
|
|
15
|
+
* Use this when you need a specific page or want to limit the number of results
|
|
16
|
+
* @param campusId - The campus ID
|
|
17
|
+
* @param params - List parameters including where, include, perPage, page, and order
|
|
18
|
+
* @returns A single page of results with meta and links for pagination
|
|
19
|
+
*/
|
|
20
|
+
getPage(campusId: string, params?: ServiceTimePageOptions): Promise<{
|
|
21
|
+
data: import("@rachelallyson/planning-center-base-ts").FlattenedResource<"ServiceTime", ServiceTimeAttributes, import("../types").ServiceTimeRelationships, Record<string, never>>[];
|
|
22
|
+
meta?: import("@rachelallyson/planning-center-base-ts").Meta;
|
|
23
|
+
links?: import("@rachelallyson/planning-center-base-ts").TopLevelLinks;
|
|
24
|
+
}>;
|
|
22
25
|
/**
|
|
23
26
|
* Get a specific service time by ID for a campus
|
|
24
27
|
*/
|
|
25
|
-
getById(campusId: string, id: string, include?: string[]): Promise<
|
|
28
|
+
getById(campusId: string, id: string, include?: string[]): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"ServiceTime", ServiceTimeAttributes, import("../types").ServiceTimeRelationships>>;
|
|
26
29
|
/**
|
|
27
30
|
* Create a new service time for a campus
|
|
28
31
|
*/
|
|
29
|
-
create(campusId: string, data: ServiceTimeAttributes): Promise<
|
|
32
|
+
create(campusId: string, data: ServiceTimeAttributes): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"ServiceTime", ServiceTimeAttributes, import("../types").ServiceTimeRelationships>>;
|
|
30
33
|
/**
|
|
31
34
|
* Update an existing service time for a campus
|
|
32
35
|
*/
|
|
33
|
-
update(campusId: string, id: string, data: Partial<ServiceTimeAttributes>): Promise<
|
|
36
|
+
update(campusId: string, id: string, data: Partial<ServiceTimeAttributes>): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"ServiceTime", ServiceTimeAttributes, import("../types").ServiceTimeRelationships>>;
|
|
34
37
|
/**
|
|
35
38
|
* Delete a service time for a campus
|
|
36
39
|
*/
|
|
37
40
|
delete(campusId: string, id: string): Promise<void>;
|
|
38
|
-
/**
|
|
39
|
-
* Get all service times for a campus with pagination support
|
|
40
|
-
*/
|
|
41
|
-
getAllPagesPaginated(campusId: string, params?: {
|
|
42
|
-
where?: Record<string, any>;
|
|
43
|
-
include?: string[];
|
|
44
|
-
per_page?: number;
|
|
45
|
-
}, paginationOptions?: PaginationOptions): Promise<PaginationResult<ServiceTimeResource>>;
|
|
46
41
|
}
|
|
@@ -7,60 +7,60 @@ const planning_center_base_ts_1 = require("@rachelallyson/planning-center-base-t
|
|
|
7
7
|
* ServiceTimes are campus-scoped resources
|
|
8
8
|
*/
|
|
9
9
|
class ServiceTimeModule extends planning_center_base_ts_1.BaseModule {
|
|
10
|
-
constructor(httpClient, paginationHelper, eventEmitter) {
|
|
11
|
-
super(httpClient, paginationHelper, eventEmitter);
|
|
12
|
-
}
|
|
13
10
|
/**
|
|
14
|
-
* Get all service times for a specific campus
|
|
11
|
+
* Get all service times for a specific campus across all pages
|
|
15
12
|
*/
|
|
16
13
|
async getAll(campusId, params) {
|
|
17
|
-
|
|
14
|
+
this.debugLog('serviceTime.getAll', { campusId, params });
|
|
15
|
+
return this.getAllPages(`/campuses/${campusId}/service_times`, {
|
|
16
|
+
where: params?.where,
|
|
17
|
+
include: params?.include,
|
|
18
|
+
order: params?.order
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get a single page of service times for a campus with optional filtering and pagination control
|
|
23
|
+
* Use this when you need a specific page or want to limit the number of results
|
|
24
|
+
* @param campusId - The campus ID
|
|
25
|
+
* @param params - List parameters including where, include, perPage, page, and order
|
|
26
|
+
* @returns A single page of results with meta and links for pagination
|
|
27
|
+
*/
|
|
28
|
+
async getPage(campusId, params) {
|
|
29
|
+
return this.getList(`/campuses/${campusId}/service_times`, {
|
|
30
|
+
where: params?.where,
|
|
31
|
+
include: params?.include,
|
|
32
|
+
per_page: params?.perPage,
|
|
33
|
+
page: params?.page,
|
|
34
|
+
order: params?.order
|
|
35
|
+
});
|
|
18
36
|
}
|
|
19
37
|
/**
|
|
20
38
|
* Get a specific service time by ID for a campus
|
|
21
39
|
*/
|
|
22
40
|
async getById(campusId, id, include) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
params.include = include.join(',');
|
|
26
|
-
}
|
|
27
|
-
return this.getSingle(`/campuses/${campusId}/service_times/${id}`, params);
|
|
41
|
+
this.debugLog('serviceTime.getById', { campusId, id, include });
|
|
42
|
+
return this.getSingle(`/campuses/${campusId}/service_times/${id}`, include);
|
|
28
43
|
}
|
|
29
44
|
/**
|
|
30
45
|
* Create a new service time for a campus
|
|
31
46
|
*/
|
|
32
47
|
async create(campusId, data) {
|
|
48
|
+
this.debugLog('serviceTime.create', { campusId, data });
|
|
33
49
|
return this.createResource(`/campuses/${campusId}/service_times`, data);
|
|
34
50
|
}
|
|
35
51
|
/**
|
|
36
52
|
* Update an existing service time for a campus
|
|
37
53
|
*/
|
|
38
54
|
async update(campusId, id, data) {
|
|
55
|
+
this.debugLog('serviceTime.update', { campusId, id, data });
|
|
39
56
|
return this.updateResource(`/campuses/${campusId}/service_times/${id}`, data);
|
|
40
57
|
}
|
|
41
58
|
/**
|
|
42
59
|
* Delete a service time for a campus
|
|
43
60
|
*/
|
|
44
61
|
async delete(campusId, id) {
|
|
62
|
+
this.debugLog('serviceTime.delete', { campusId, id });
|
|
45
63
|
return this.deleteResource(`/campuses/${campusId}/service_times/${id}`);
|
|
46
64
|
}
|
|
47
|
-
/**
|
|
48
|
-
* Get all service times for a campus with pagination support
|
|
49
|
-
*/
|
|
50
|
-
async getAllPagesPaginated(campusId, params, paginationOptions) {
|
|
51
|
-
const queryParams = {};
|
|
52
|
-
if (params?.where) {
|
|
53
|
-
Object.entries(params.where).forEach(([key, value]) => {
|
|
54
|
-
queryParams[`where[${key}]`] = value;
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
if (params?.include) {
|
|
58
|
-
queryParams.include = params.include.join(',');
|
|
59
|
-
}
|
|
60
|
-
if (params?.per_page) {
|
|
61
|
-
queryParams.per_page = params.per_page;
|
|
62
|
-
}
|
|
63
|
-
return this.getAllPages(`/campuses/${campusId}/service_times`, queryParams, paginationOptions);
|
|
64
|
-
}
|
|
65
65
|
}
|
|
66
66
|
exports.ServiceTimeModule = ServiceTimeModule;
|
|
@@ -2,14 +2,9 @@
|
|
|
2
2
|
* v2.0.0 Workflows Module
|
|
3
3
|
*/
|
|
4
4
|
import { BaseModule } from '@rachelallyson/planning-center-base-ts';
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
export
|
|
8
|
-
where?: Record<string, any>;
|
|
9
|
-
include?: string[];
|
|
10
|
-
perPage?: number;
|
|
11
|
-
page?: number;
|
|
12
|
-
}
|
|
5
|
+
import type { WorkflowResource, WorkflowAttributes, WorkflowCardResource, WorkflowCardAttributes, WorkflowCardAssignableAttributes, WorkflowCardSnoozeAttributes, WorkflowCardEmailAttributes, WorkflowCardNoteResource, WorkflowCardNoteAttributes, Meta, TopLevelLinks } from '../types';
|
|
6
|
+
import type { WorkflowListOptions, WorkflowPageOptions } from '../types/api-options';
|
|
7
|
+
export type { WorkflowListOptions };
|
|
13
8
|
export interface AddPersonToWorkflowOptions {
|
|
14
9
|
note?: string;
|
|
15
10
|
skipIfExists?: boolean;
|
|
@@ -18,73 +13,73 @@ export interface AddPersonToWorkflowOptions {
|
|
|
18
13
|
}
|
|
19
14
|
export declare class WorkflowsModule extends BaseModule {
|
|
20
15
|
/**
|
|
21
|
-
* Get all workflows
|
|
16
|
+
* Get all workflows across all pages
|
|
22
17
|
*/
|
|
23
|
-
getAll(options?: WorkflowListOptions): Promise<
|
|
24
|
-
data: WorkflowResource[];
|
|
25
|
-
meta?: any;
|
|
26
|
-
links?: any;
|
|
27
|
-
}>;
|
|
18
|
+
getAll(options?: WorkflowListOptions): Promise<import("@rachelallyson/planning-center-base-ts").PaginationResult<WorkflowResource, import("@rachelallyson/planning-center-base-ts").ResourceObject<string, any, any>, Record<string, never>>>;
|
|
28
19
|
/**
|
|
29
|
-
* Get
|
|
20
|
+
* Get a single page of workflows with optional filtering and pagination control
|
|
21
|
+
* Use this when you need a specific page or want to limit the number of results
|
|
22
|
+
* @param options - List options including where, include, perPage, and page
|
|
23
|
+
* @returns A single page of results with meta and links for pagination
|
|
30
24
|
*/
|
|
31
|
-
|
|
25
|
+
getPage(options?: WorkflowPageOptions): Promise<{
|
|
26
|
+
data: import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Workflow", WorkflowAttributes, import("../types").WorkflowRelationships, Record<string, never>>[];
|
|
27
|
+
meta?: Meta;
|
|
28
|
+
links?: TopLevelLinks;
|
|
29
|
+
}>;
|
|
32
30
|
/**
|
|
33
31
|
* Get a single workflow by ID
|
|
34
32
|
*/
|
|
35
|
-
getById(id: string, include?: string[]): Promise<
|
|
33
|
+
getById(id: string, include?: string[]): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Workflow", WorkflowAttributes, import("../types").WorkflowRelationships>>;
|
|
36
34
|
/**
|
|
37
35
|
* Create a workflow
|
|
38
36
|
*/
|
|
39
|
-
create(data: WorkflowAttributes): Promise<
|
|
37
|
+
create(data: WorkflowAttributes): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Workflow", WorkflowAttributes, import("../types").WorkflowRelationships>>;
|
|
40
38
|
/**
|
|
41
39
|
* Update a workflow
|
|
42
40
|
*/
|
|
43
|
-
update(id: string, data: Partial<WorkflowAttributes>): Promise<
|
|
41
|
+
update(id: string, data: Partial<WorkflowAttributes>): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Workflow", WorkflowAttributes, import("../types").WorkflowRelationships>>;
|
|
44
42
|
/**
|
|
45
43
|
* Delete a workflow
|
|
46
44
|
*/
|
|
47
45
|
delete(id: string): Promise<void>;
|
|
48
46
|
/**
|
|
49
47
|
* Get workflow cards for a person
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
* @param personId - The person ID
|
|
49
|
+
* @param options - Optional pagination options
|
|
50
|
+
*/
|
|
51
|
+
getPersonWorkflowCards(personId: string, options?: {
|
|
52
|
+
perPage?: number;
|
|
53
|
+
page?: number;
|
|
54
|
+
}): Promise<{
|
|
55
|
+
data: import("@rachelallyson/planning-center-base-ts").FlattenedResource<"WorkflowCard", WorkflowCardAttributes, import("../types").WorkflowCardRelationships, Record<string, never>>[];
|
|
56
|
+
meta?: Meta;
|
|
57
|
+
links?: TopLevelLinks;
|
|
55
58
|
}>;
|
|
56
59
|
/**
|
|
57
60
|
* Add a person to a workflow with smart duplicate detection
|
|
58
61
|
*/
|
|
59
|
-
addPersonToWorkflow(personId: string, workflowId: string, options?: AddPersonToWorkflowOptions): Promise<
|
|
62
|
+
addPersonToWorkflow(personId: string, workflowId: string, options?: AddPersonToWorkflowOptions): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"WorkflowCard", WorkflowCardAttributes, import("../types").WorkflowCardRelationships>>;
|
|
60
63
|
/**
|
|
61
64
|
* Create a workflow card
|
|
62
65
|
*/
|
|
63
|
-
createWorkflowCard(workflowId: string, personId: string): Promise<
|
|
66
|
+
createWorkflowCard(workflowId: string, personId: string): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"WorkflowCard", WorkflowCardAttributes, import("../types").WorkflowCardRelationships>>;
|
|
64
67
|
/**
|
|
65
68
|
* Update a workflow card
|
|
66
69
|
*/
|
|
67
|
-
updateWorkflowCard(workflowCardId: string, data: Partial<WorkflowCardAssignableAttributes>, personId?: string): Promise<
|
|
70
|
+
updateWorkflowCard(workflowCardId: string, data: Partial<WorkflowCardAssignableAttributes>, personId?: string): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"WorkflowCard", WorkflowCardAttributes, import("../types").WorkflowCardRelationships>>;
|
|
68
71
|
/**
|
|
69
72
|
* Get workflow card notes
|
|
70
73
|
*/
|
|
71
74
|
getWorkflowCardNotes(personId: string, workflowCardId: string): Promise<{
|
|
72
|
-
data:
|
|
73
|
-
meta?:
|
|
74
|
-
links?:
|
|
75
|
+
data: import("@rachelallyson/planning-center-base-ts").FlattenedResource<"WorkflowCardNote", WorkflowCardNoteAttributes, {}, Record<string, never>>[];
|
|
76
|
+
meta?: Meta;
|
|
77
|
+
links?: TopLevelLinks;
|
|
75
78
|
}>;
|
|
76
79
|
/**
|
|
77
80
|
* Create a workflow card note
|
|
78
81
|
*/
|
|
79
|
-
createWorkflowCardNote(personId: string, workflowCardId: string, data: WorkflowCardNoteAttributes): Promise<
|
|
80
|
-
/**
|
|
81
|
-
* Update a workflow card note
|
|
82
|
-
*/
|
|
83
|
-
updateWorkflowCardNote(personId: string, workflowCardId: string, noteId: string, data: Partial<WorkflowCardNoteAttributes>): Promise<WorkflowCardNoteResource>;
|
|
84
|
-
/**
|
|
85
|
-
* Delete a workflow card note
|
|
86
|
-
*/
|
|
87
|
-
deleteWorkflowCardNote(personId: string, workflowCardId: string, noteId: string): Promise<void>;
|
|
82
|
+
createWorkflowCardNote(personId: string, workflowCardId: string, data: WorkflowCardNoteAttributes): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"WorkflowCardNote", WorkflowCardNoteAttributes, {}>>;
|
|
88
83
|
/**
|
|
89
84
|
* Create a workflow card with a note
|
|
90
85
|
*/
|
|
@@ -95,35 +90,35 @@ export declare class WorkflowsModule extends BaseModule {
|
|
|
95
90
|
/**
|
|
96
91
|
* Move a workflow card back to the previous step
|
|
97
92
|
*/
|
|
98
|
-
goBackWorkflowCard(personId: string, workflowCardId: string): Promise<
|
|
93
|
+
goBackWorkflowCard(personId: string, workflowCardId: string): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"WorkflowCard", WorkflowCardAttributes, import("../types").WorkflowCardRelationships>>;
|
|
99
94
|
/**
|
|
100
95
|
* Move a workflow card to the next step
|
|
101
96
|
*/
|
|
102
|
-
promoteWorkflowCard(personId: string, workflowCardId: string): Promise<
|
|
97
|
+
promoteWorkflowCard(personId: string, workflowCardId: string): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"WorkflowCard", WorkflowCardAttributes, import("../types").WorkflowCardRelationships>>;
|
|
103
98
|
/**
|
|
104
99
|
* Remove a workflow card
|
|
105
100
|
*/
|
|
106
|
-
removeWorkflowCard(personId: string, workflowCardId: string): Promise<
|
|
101
|
+
removeWorkflowCard(personId: string, workflowCardId: string): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"WorkflowCard", WorkflowCardAttributes, import("../types").WorkflowCardRelationships>>;
|
|
107
102
|
/**
|
|
108
103
|
* Restore a workflow card
|
|
109
104
|
*/
|
|
110
|
-
restoreWorkflowCard(personId: string, workflowCardId: string): Promise<
|
|
105
|
+
restoreWorkflowCard(personId: string, workflowCardId: string): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"WorkflowCard", WorkflowCardAttributes, import("../types").WorkflowCardRelationships>>;
|
|
111
106
|
/**
|
|
112
107
|
* Send an email to the subject of the workflow card
|
|
113
108
|
*/
|
|
114
|
-
sendEmailWorkflowCard(personId: string, workflowCardId: string, data: WorkflowCardEmailAttributes): Promise<
|
|
109
|
+
sendEmailWorkflowCard(personId: string, workflowCardId: string, data: WorkflowCardEmailAttributes): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"WorkflowCard", WorkflowCardAttributes, import("../types").WorkflowCardRelationships>>;
|
|
115
110
|
/**
|
|
116
111
|
* Move a workflow card to the next step without completing the current step
|
|
117
112
|
*/
|
|
118
|
-
skipStepWorkflowCard(personId: string, workflowCardId: string): Promise<
|
|
113
|
+
skipStepWorkflowCard(personId: string, workflowCardId: string): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"WorkflowCard", WorkflowCardAttributes, import("../types").WorkflowCardRelationships>>;
|
|
119
114
|
/**
|
|
120
115
|
* Snooze a workflow card for a specific duration
|
|
121
116
|
*/
|
|
122
|
-
snoozeWorkflowCard(personId: string, workflowCardId: string, data: WorkflowCardSnoozeAttributes): Promise<
|
|
117
|
+
snoozeWorkflowCard(personId: string, workflowCardId: string, data: WorkflowCardSnoozeAttributes): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"WorkflowCard", WorkflowCardAttributes, import("../types").WorkflowCardRelationships>>;
|
|
123
118
|
/**
|
|
124
119
|
* Unsnooze a workflow card
|
|
125
120
|
*/
|
|
126
|
-
unsnoozeWorkflowCard(personId: string, workflowCardId: string): Promise<
|
|
121
|
+
unsnoozeWorkflowCard(personId: string, workflowCardId: string): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"WorkflowCard", WorkflowCardAttributes, import("../types").WorkflowCardRelationships>>;
|
|
127
122
|
/**
|
|
128
123
|
* Format note template with variables
|
|
129
124
|
*/
|