@rachelallyson/planning-center-check-ins-ts 1.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 +19 -0
- package/LICENSE +22 -0
- package/README.md +102 -0
- package/dist/client.d.ts +95 -0
- package/dist/client.js +167 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +38 -0
- package/dist/modules/attendance-types.d.ts +27 -0
- package/dist/modules/attendance-types.js +44 -0
- package/dist/modules/check-in-groups.d.ts +27 -0
- package/dist/modules/check-in-groups.js +44 -0
- package/dist/modules/check-in-times.d.ts +27 -0
- package/dist/modules/check-in-times.js +44 -0
- package/dist/modules/check-ins.d.ts +88 -0
- package/dist/modules/check-ins.js +157 -0
- package/dist/modules/event-periods.d.ts +57 -0
- package/dist/modules/event-periods.js +75 -0
- package/dist/modules/event-times.d.ts +51 -0
- package/dist/modules/event-times.js +69 -0
- package/dist/modules/events.d.ts +93 -0
- package/dist/modules/events.js +101 -0
- package/dist/modules/headcounts.d.ts +27 -0
- package/dist/modules/headcounts.js +44 -0
- package/dist/modules/integration-links.d.ts +27 -0
- package/dist/modules/integration-links.js +44 -0
- package/dist/modules/labels.d.ts +51 -0
- package/dist/modules/labels.js +108 -0
- package/dist/modules/locations.d.ts +51 -0
- package/dist/modules/locations.js +63 -0
- package/dist/modules/options.d.ts +27 -0
- package/dist/modules/options.js +44 -0
- package/dist/modules/organization.d.ts +13 -0
- package/dist/modules/organization.js +19 -0
- package/dist/modules/passes.d.ts +27 -0
- package/dist/modules/passes.js +44 -0
- package/dist/modules/person-events.d.ts +27 -0
- package/dist/modules/person-events.js +44 -0
- package/dist/modules/pre-checks.d.ts +27 -0
- package/dist/modules/pre-checks.js +44 -0
- package/dist/modules/roster-list-persons.d.ts +27 -0
- package/dist/modules/roster-list-persons.js +44 -0
- package/dist/modules/stations.d.ts +27 -0
- package/dist/modules/stations.js +44 -0
- package/dist/modules/themes.d.ts +27 -0
- package/dist/modules/themes.js +44 -0
- package/dist/types/check-ins.d.ts +325 -0
- package/dist/types/check-ins.js +6 -0
- package/dist/types/client.d.ts +12 -0
- package/dist/types/client.js +5 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +18 -0
- package/package.json +75 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Passes Module for Check-Ins API
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PassesModule = void 0;
|
|
7
|
+
const planning_center_base_ts_1 = require("@rachelallyson/planning-center-base-ts");
|
|
8
|
+
class PassesModule extends planning_center_base_ts_1.BaseModule {
|
|
9
|
+
constructor(httpClient, paginationHelper, eventEmitter) {
|
|
10
|
+
super(httpClient, paginationHelper, eventEmitter);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Get all passes with optional filtering
|
|
14
|
+
*/
|
|
15
|
+
async getAll(options = {}) {
|
|
16
|
+
const params = {};
|
|
17
|
+
if (options.where) {
|
|
18
|
+
Object.entries(options.where).forEach(([key, value]) => {
|
|
19
|
+
params[`where[${key}]`] = value;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
if (options.include) {
|
|
23
|
+
params.include = options.include.join(',');
|
|
24
|
+
}
|
|
25
|
+
if (options.perPage) {
|
|
26
|
+
params.per_page = options.perPage;
|
|
27
|
+
}
|
|
28
|
+
if (options.page) {
|
|
29
|
+
params.page = options.page;
|
|
30
|
+
}
|
|
31
|
+
return this.getList('/check-ins/v2/passes', params);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Get a single pass by ID
|
|
35
|
+
*/
|
|
36
|
+
async getById(id, include) {
|
|
37
|
+
const params = {};
|
|
38
|
+
if (include) {
|
|
39
|
+
params.include = include.join(',');
|
|
40
|
+
}
|
|
41
|
+
return this.getSingle(`/check-ins/v2/passes/${id}`, params);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.PassesModule = PassesModule;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PersonEvents Module for Check-Ins API
|
|
3
|
+
*/
|
|
4
|
+
import { BaseModule } from '@rachelallyson/planning-center-base-ts';
|
|
5
|
+
import type { PcoHttpClient, PaginationHelper, PcoEventEmitter } from '@rachelallyson/planning-center-base-ts';
|
|
6
|
+
import type { PersonEventResource } from '../types';
|
|
7
|
+
export interface PersonEventsListOptions {
|
|
8
|
+
where?: Record<string, any>;
|
|
9
|
+
include?: string[];
|
|
10
|
+
perPage?: number;
|
|
11
|
+
page?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class PersonEventsModule extends BaseModule {
|
|
14
|
+
constructor(httpClient: PcoHttpClient, paginationHelper: PaginationHelper, eventEmitter: PcoEventEmitter);
|
|
15
|
+
/**
|
|
16
|
+
* Get all person events with optional filtering
|
|
17
|
+
*/
|
|
18
|
+
getAll(options?: PersonEventsListOptions): Promise<{
|
|
19
|
+
data: PersonEventResource[];
|
|
20
|
+
meta?: any;
|
|
21
|
+
links?: any;
|
|
22
|
+
}>;
|
|
23
|
+
/**
|
|
24
|
+
* Get a single person event by ID
|
|
25
|
+
*/
|
|
26
|
+
getById(id: string, include?: string[]): Promise<PersonEventResource>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* PersonEvents Module for Check-Ins API
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PersonEventsModule = void 0;
|
|
7
|
+
const planning_center_base_ts_1 = require("@rachelallyson/planning-center-base-ts");
|
|
8
|
+
class PersonEventsModule extends planning_center_base_ts_1.BaseModule {
|
|
9
|
+
constructor(httpClient, paginationHelper, eventEmitter) {
|
|
10
|
+
super(httpClient, paginationHelper, eventEmitter);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Get all person events with optional filtering
|
|
14
|
+
*/
|
|
15
|
+
async getAll(options = {}) {
|
|
16
|
+
const params = {};
|
|
17
|
+
if (options.where) {
|
|
18
|
+
Object.entries(options.where).forEach(([key, value]) => {
|
|
19
|
+
params[`where[${key}]`] = value;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
if (options.include) {
|
|
23
|
+
params.include = options.include.join(',');
|
|
24
|
+
}
|
|
25
|
+
if (options.perPage) {
|
|
26
|
+
params.per_page = options.perPage;
|
|
27
|
+
}
|
|
28
|
+
if (options.page) {
|
|
29
|
+
params.page = options.page;
|
|
30
|
+
}
|
|
31
|
+
return this.getList('/check-ins/v2/person_events', params);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Get a single person event by ID
|
|
35
|
+
*/
|
|
36
|
+
async getById(id, include) {
|
|
37
|
+
const params = {};
|
|
38
|
+
if (include) {
|
|
39
|
+
params.include = include.join(',');
|
|
40
|
+
}
|
|
41
|
+
return this.getSingle(`/check-ins/v2/person_events/${id}`, params);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.PersonEventsModule = PersonEventsModule;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PreChecks Module for Check-Ins API
|
|
3
|
+
*/
|
|
4
|
+
import { BaseModule } from '@rachelallyson/planning-center-base-ts';
|
|
5
|
+
import type { PcoHttpClient, PaginationHelper, PcoEventEmitter } from '@rachelallyson/planning-center-base-ts';
|
|
6
|
+
import type { PreCheckResource } from '../types';
|
|
7
|
+
export interface PreChecksListOptions {
|
|
8
|
+
where?: Record<string, any>;
|
|
9
|
+
include?: string[];
|
|
10
|
+
perPage?: number;
|
|
11
|
+
page?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class PreChecksModule extends BaseModule {
|
|
14
|
+
constructor(httpClient: PcoHttpClient, paginationHelper: PaginationHelper, eventEmitter: PcoEventEmitter);
|
|
15
|
+
/**
|
|
16
|
+
* Get all pre-checks with optional filtering
|
|
17
|
+
*/
|
|
18
|
+
getAll(options?: PreChecksListOptions): Promise<{
|
|
19
|
+
data: PreCheckResource[];
|
|
20
|
+
meta?: any;
|
|
21
|
+
links?: any;
|
|
22
|
+
}>;
|
|
23
|
+
/**
|
|
24
|
+
* Get a single pre-check by ID
|
|
25
|
+
*/
|
|
26
|
+
getById(id: string, include?: string[]): Promise<PreCheckResource>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* PreChecks Module for Check-Ins API
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PreChecksModule = void 0;
|
|
7
|
+
const planning_center_base_ts_1 = require("@rachelallyson/planning-center-base-ts");
|
|
8
|
+
class PreChecksModule extends planning_center_base_ts_1.BaseModule {
|
|
9
|
+
constructor(httpClient, paginationHelper, eventEmitter) {
|
|
10
|
+
super(httpClient, paginationHelper, eventEmitter);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Get all pre-checks with optional filtering
|
|
14
|
+
*/
|
|
15
|
+
async getAll(options = {}) {
|
|
16
|
+
const params = {};
|
|
17
|
+
if (options.where) {
|
|
18
|
+
Object.entries(options.where).forEach(([key, value]) => {
|
|
19
|
+
params[`where[${key}]`] = value;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
if (options.include) {
|
|
23
|
+
params.include = options.include.join(',');
|
|
24
|
+
}
|
|
25
|
+
if (options.perPage) {
|
|
26
|
+
params.per_page = options.perPage;
|
|
27
|
+
}
|
|
28
|
+
if (options.page) {
|
|
29
|
+
params.page = options.page;
|
|
30
|
+
}
|
|
31
|
+
return this.getList('/check-ins/v2/pre_checks', params);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Get a single pre-check by ID
|
|
35
|
+
*/
|
|
36
|
+
async getById(id, include) {
|
|
37
|
+
const params = {};
|
|
38
|
+
if (include) {
|
|
39
|
+
params.include = include.join(',');
|
|
40
|
+
}
|
|
41
|
+
return this.getSingle(`/check-ins/v2/pre_checks/${id}`, params);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.PreChecksModule = PreChecksModule;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RosterListPersons Module for Check-Ins API
|
|
3
|
+
*/
|
|
4
|
+
import { BaseModule } from '@rachelallyson/planning-center-base-ts';
|
|
5
|
+
import type { PcoHttpClient, PaginationHelper, PcoEventEmitter } from '@rachelallyson/planning-center-base-ts';
|
|
6
|
+
import type { RosterListPersonResource } from '../types';
|
|
7
|
+
export interface RosterListPersonsListOptions {
|
|
8
|
+
where?: Record<string, any>;
|
|
9
|
+
include?: string[];
|
|
10
|
+
perPage?: number;
|
|
11
|
+
page?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class RosterListPersonsModule extends BaseModule {
|
|
14
|
+
constructor(httpClient: PcoHttpClient, paginationHelper: PaginationHelper, eventEmitter: PcoEventEmitter);
|
|
15
|
+
/**
|
|
16
|
+
* Get all roster list persons with optional filtering
|
|
17
|
+
*/
|
|
18
|
+
getAll(options?: RosterListPersonsListOptions): Promise<{
|
|
19
|
+
data: RosterListPersonResource[];
|
|
20
|
+
meta?: any;
|
|
21
|
+
links?: any;
|
|
22
|
+
}>;
|
|
23
|
+
/**
|
|
24
|
+
* Get a single roster list person by ID
|
|
25
|
+
*/
|
|
26
|
+
getById(id: string, include?: string[]): Promise<RosterListPersonResource>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* RosterListPersons Module for Check-Ins API
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.RosterListPersonsModule = void 0;
|
|
7
|
+
const planning_center_base_ts_1 = require("@rachelallyson/planning-center-base-ts");
|
|
8
|
+
class RosterListPersonsModule extends planning_center_base_ts_1.BaseModule {
|
|
9
|
+
constructor(httpClient, paginationHelper, eventEmitter) {
|
|
10
|
+
super(httpClient, paginationHelper, eventEmitter);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Get all roster list persons with optional filtering
|
|
14
|
+
*/
|
|
15
|
+
async getAll(options = {}) {
|
|
16
|
+
const params = {};
|
|
17
|
+
if (options.where) {
|
|
18
|
+
Object.entries(options.where).forEach(([key, value]) => {
|
|
19
|
+
params[`where[${key}]`] = value;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
if (options.include) {
|
|
23
|
+
params.include = options.include.join(',');
|
|
24
|
+
}
|
|
25
|
+
if (options.perPage) {
|
|
26
|
+
params.per_page = options.perPage;
|
|
27
|
+
}
|
|
28
|
+
if (options.page) {
|
|
29
|
+
params.page = options.page;
|
|
30
|
+
}
|
|
31
|
+
return this.getList('/check-ins/v2/roster_list_persons', params);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Get a single roster list person by ID
|
|
35
|
+
*/
|
|
36
|
+
async getById(id, include) {
|
|
37
|
+
const params = {};
|
|
38
|
+
if (include) {
|
|
39
|
+
params.include = include.join(',');
|
|
40
|
+
}
|
|
41
|
+
return this.getSingle(`/check-ins/v2/roster_list_persons/${id}`, params);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.RosterListPersonsModule = RosterListPersonsModule;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stations Module for Check-Ins API
|
|
3
|
+
*/
|
|
4
|
+
import { BaseModule } from '@rachelallyson/planning-center-base-ts';
|
|
5
|
+
import type { PcoHttpClient, PaginationHelper, PcoEventEmitter } from '@rachelallyson/planning-center-base-ts';
|
|
6
|
+
import type { StationResource } from '../types';
|
|
7
|
+
export interface StationsListOptions {
|
|
8
|
+
where?: Record<string, any>;
|
|
9
|
+
include?: string[];
|
|
10
|
+
perPage?: number;
|
|
11
|
+
page?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class StationsModule extends BaseModule {
|
|
14
|
+
constructor(httpClient: PcoHttpClient, paginationHelper: PaginationHelper, eventEmitter: PcoEventEmitter);
|
|
15
|
+
/**
|
|
16
|
+
* Get all stations with optional filtering
|
|
17
|
+
*/
|
|
18
|
+
getAll(options?: StationsListOptions): Promise<{
|
|
19
|
+
data: StationResource[];
|
|
20
|
+
meta?: any;
|
|
21
|
+
links?: any;
|
|
22
|
+
}>;
|
|
23
|
+
/**
|
|
24
|
+
* Get a single station by ID
|
|
25
|
+
*/
|
|
26
|
+
getById(id: string, include?: string[]): Promise<StationResource>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Stations Module for Check-Ins API
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.StationsModule = void 0;
|
|
7
|
+
const planning_center_base_ts_1 = require("@rachelallyson/planning-center-base-ts");
|
|
8
|
+
class StationsModule extends planning_center_base_ts_1.BaseModule {
|
|
9
|
+
constructor(httpClient, paginationHelper, eventEmitter) {
|
|
10
|
+
super(httpClient, paginationHelper, eventEmitter);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Get all stations with optional filtering
|
|
14
|
+
*/
|
|
15
|
+
async getAll(options = {}) {
|
|
16
|
+
const params = {};
|
|
17
|
+
if (options.where) {
|
|
18
|
+
Object.entries(options.where).forEach(([key, value]) => {
|
|
19
|
+
params[`where[${key}]`] = value;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
if (options.include) {
|
|
23
|
+
params.include = options.include.join(',');
|
|
24
|
+
}
|
|
25
|
+
if (options.perPage) {
|
|
26
|
+
params.per_page = options.perPage;
|
|
27
|
+
}
|
|
28
|
+
if (options.page) {
|
|
29
|
+
params.page = options.page;
|
|
30
|
+
}
|
|
31
|
+
return this.getList('/check-ins/v2/stations', params);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Get a single station by ID
|
|
35
|
+
*/
|
|
36
|
+
async getById(id, include) {
|
|
37
|
+
const params = {};
|
|
38
|
+
if (include) {
|
|
39
|
+
params.include = include.join(',');
|
|
40
|
+
}
|
|
41
|
+
return this.getSingle(`/check-ins/v2/stations/${id}`, params);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.StationsModule = StationsModule;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Themes Module for Check-Ins API
|
|
3
|
+
*/
|
|
4
|
+
import { BaseModule } from '@rachelallyson/planning-center-base-ts';
|
|
5
|
+
import type { PcoHttpClient, PaginationHelper, PcoEventEmitter } from '@rachelallyson/planning-center-base-ts';
|
|
6
|
+
import type { ThemeResource } from '../types';
|
|
7
|
+
export interface ThemesListOptions {
|
|
8
|
+
where?: Record<string, any>;
|
|
9
|
+
include?: string[];
|
|
10
|
+
perPage?: number;
|
|
11
|
+
page?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class ThemesModule extends BaseModule {
|
|
14
|
+
constructor(httpClient: PcoHttpClient, paginationHelper: PaginationHelper, eventEmitter: PcoEventEmitter);
|
|
15
|
+
/**
|
|
16
|
+
* Get all themes with optional filtering
|
|
17
|
+
*/
|
|
18
|
+
getAll(options?: ThemesListOptions): Promise<{
|
|
19
|
+
data: ThemeResource[];
|
|
20
|
+
meta?: any;
|
|
21
|
+
links?: any;
|
|
22
|
+
}>;
|
|
23
|
+
/**
|
|
24
|
+
* Get a single theme by ID
|
|
25
|
+
*/
|
|
26
|
+
getById(id: string, include?: string[]): Promise<ThemeResource>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Themes Module for Check-Ins API
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ThemesModule = void 0;
|
|
7
|
+
const planning_center_base_ts_1 = require("@rachelallyson/planning-center-base-ts");
|
|
8
|
+
class ThemesModule extends planning_center_base_ts_1.BaseModule {
|
|
9
|
+
constructor(httpClient, paginationHelper, eventEmitter) {
|
|
10
|
+
super(httpClient, paginationHelper, eventEmitter);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Get all themes with optional filtering
|
|
14
|
+
*/
|
|
15
|
+
async getAll(options = {}) {
|
|
16
|
+
const params = {};
|
|
17
|
+
if (options.where) {
|
|
18
|
+
Object.entries(options.where).forEach(([key, value]) => {
|
|
19
|
+
params[`where[${key}]`] = value;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
if (options.include) {
|
|
23
|
+
params.include = options.include.join(',');
|
|
24
|
+
}
|
|
25
|
+
if (options.perPage) {
|
|
26
|
+
params.per_page = options.perPage;
|
|
27
|
+
}
|
|
28
|
+
if (options.page) {
|
|
29
|
+
params.page = options.page;
|
|
30
|
+
}
|
|
31
|
+
return this.getList('/check-ins/v2/themes', params);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Get a single theme by ID
|
|
35
|
+
*/
|
|
36
|
+
async getById(id, include) {
|
|
37
|
+
const params = {};
|
|
38
|
+
if (include) {
|
|
39
|
+
params.include = include.join(',');
|
|
40
|
+
}
|
|
41
|
+
return this.getSingle(`/check-ins/v2/themes/${id}`, params);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.ThemesModule = ThemesModule;
|