@rachelallyson/planning-center-people-ts 1.0.0 → 2.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 +248 -1
- package/README.md +28 -0
- package/dist/auth.d.ts +64 -0
- package/dist/auth.js +98 -0
- package/dist/batch.d.ts +47 -0
- package/dist/batch.js +376 -0
- package/dist/client-manager.d.ts +66 -0
- package/dist/client-manager.js +150 -0
- package/dist/client.d.ts +71 -0
- package/dist/client.js +123 -0
- package/dist/core/http.d.ts +47 -0
- package/dist/core/http.js +242 -0
- package/dist/core/pagination.d.ts +34 -0
- package/dist/core/pagination.js +164 -0
- package/dist/core.d.ts +5 -0
- package/dist/core.js +12 -0
- package/dist/helpers.d.ts +125 -100
- package/dist/helpers.js +315 -275
- package/dist/index.d.ts +17 -5
- package/dist/index.js +39 -5
- package/dist/matching/matcher.d.ts +41 -0
- package/dist/matching/matcher.js +161 -0
- package/dist/matching/scoring.d.ts +35 -0
- package/dist/matching/scoring.js +141 -0
- package/dist/matching/strategies.d.ts +35 -0
- package/dist/matching/strategies.js +79 -0
- package/dist/modules/base.d.ts +46 -0
- package/dist/modules/base.js +82 -0
- package/dist/modules/contacts.d.ts +103 -0
- package/dist/modules/contacts.js +130 -0
- package/dist/modules/fields.d.ts +157 -0
- package/dist/modules/fields.js +294 -0
- package/dist/modules/households.d.ts +42 -0
- package/dist/modules/households.js +74 -0
- package/dist/modules/lists.d.ts +62 -0
- package/dist/modules/lists.js +92 -0
- package/dist/modules/notes.d.ts +74 -0
- package/dist/modules/notes.js +125 -0
- package/dist/modules/people.d.ts +196 -0
- package/dist/modules/people.js +221 -0
- package/dist/modules/workflows.d.ts +131 -0
- package/dist/modules/workflows.js +221 -0
- package/dist/monitoring.d.ts +53 -0
- package/dist/monitoring.js +142 -0
- package/dist/people/contacts.d.ts +43 -0
- package/dist/people/contacts.js +122 -0
- package/dist/people/core.d.ts +28 -0
- package/dist/people/core.js +69 -0
- package/dist/people/fields.d.ts +62 -0
- package/dist/people/fields.js +293 -0
- package/dist/people/households.d.ts +15 -0
- package/dist/people/households.js +31 -0
- package/dist/people/index.d.ts +8 -0
- package/dist/people/index.js +25 -0
- package/dist/people/lists.d.ts +30 -0
- package/dist/people/lists.js +37 -0
- package/dist/people/notes.d.ts +30 -0
- package/dist/people/notes.js +37 -0
- package/dist/people/organization.d.ts +12 -0
- package/dist/people/organization.js +15 -0
- package/dist/people/workflows.d.ts +37 -0
- package/dist/people/workflows.js +75 -0
- package/dist/testing/index.d.ts +9 -0
- package/dist/testing/index.js +24 -0
- package/dist/testing/recorder.d.ts +58 -0
- package/dist/testing/recorder.js +195 -0
- package/dist/testing/simple-builders.d.ts +33 -0
- package/dist/testing/simple-builders.js +124 -0
- package/dist/testing/simple-factories.d.ts +91 -0
- package/dist/testing/simple-factories.js +279 -0
- package/dist/testing/types.d.ts +160 -0
- package/dist/testing/types.js +5 -0
- package/dist/types/batch.d.ts +50 -0
- package/dist/types/batch.js +5 -0
- package/dist/types/client.d.ts +81 -0
- package/dist/types/client.js +5 -0
- package/dist/types/events.d.ts +85 -0
- package/dist/types/events.js +5 -0
- package/dist/types/people.d.ts +73 -79
- package/package.json +14 -3
- package/dist/people.d.ts +0 -205
- package/dist/people.js +0 -598
package/dist/types/people.d.ts
CHANGED
|
@@ -37,21 +37,12 @@ export interface PersonAttributes extends Attributes {
|
|
|
37
37
|
resource_permission_flags?: Record<string, boolean>;
|
|
38
38
|
}
|
|
39
39
|
export interface PersonRelationships {
|
|
40
|
-
household?: Relationship;
|
|
41
40
|
emails?: Relationship;
|
|
42
41
|
phone_numbers?: Relationship;
|
|
43
|
-
addresses?: Relationship;
|
|
44
|
-
social_profiles?: Relationship;
|
|
45
|
-
field_data?: Relationship;
|
|
46
|
-
lists?: Relationship;
|
|
47
|
-
notes?: Relationship;
|
|
48
|
-
workflows?: Relationship;
|
|
49
|
-
organizations?: Relationship;
|
|
50
42
|
primary_campus?: Relationship;
|
|
51
43
|
gender?: Relationship;
|
|
52
44
|
}
|
|
53
45
|
export interface PersonResource extends ResourceObject<'Person', PersonAttributes, PersonRelationships> {
|
|
54
|
-
type: 'Person';
|
|
55
46
|
}
|
|
56
47
|
export type PeopleList = Paginated<PersonResource, PeopleIncluded>;
|
|
57
48
|
export type PersonSingle = Response<PersonResource>;
|
|
@@ -67,7 +58,6 @@ export interface EmailRelationships {
|
|
|
67
58
|
person?: Relationship;
|
|
68
59
|
}
|
|
69
60
|
export interface EmailResource extends ResourceObject<'Email', EmailAttributes, EmailRelationships> {
|
|
70
|
-
type: 'Email';
|
|
71
61
|
}
|
|
72
62
|
export type EmailsList = Paginated<EmailResource>;
|
|
73
63
|
export type EmailSingle = Response<EmailResource>;
|
|
@@ -82,17 +72,17 @@ export interface PhoneNumberRelationships {
|
|
|
82
72
|
person?: Relationship;
|
|
83
73
|
}
|
|
84
74
|
export interface PhoneNumberResource extends ResourceObject<'PhoneNumber', PhoneNumberAttributes, PhoneNumberRelationships> {
|
|
85
|
-
type: 'PhoneNumber';
|
|
86
75
|
}
|
|
87
76
|
export type PhoneNumbersList = Paginated<PhoneNumberResource>;
|
|
88
77
|
export type PhoneNumberSingle = Response<PhoneNumberResource>;
|
|
89
78
|
export interface AddressAttributes extends Attributes {
|
|
90
|
-
|
|
91
|
-
|
|
79
|
+
street_line_1?: string;
|
|
80
|
+
street_line_2?: string;
|
|
92
81
|
city?: string;
|
|
93
82
|
state?: string;
|
|
94
83
|
zip?: string;
|
|
95
|
-
|
|
84
|
+
country_code?: string;
|
|
85
|
+
country_name?: string;
|
|
96
86
|
location?: string;
|
|
97
87
|
primary?: boolean;
|
|
98
88
|
created_at?: string;
|
|
@@ -103,7 +93,6 @@ export interface AddressRelationships {
|
|
|
103
93
|
household?: Relationship;
|
|
104
94
|
}
|
|
105
95
|
export interface AddressResource extends ResourceObject<'Address', AddressAttributes, AddressRelationships> {
|
|
106
|
-
type: 'Address';
|
|
107
96
|
}
|
|
108
97
|
export type AddressesList = Paginated<AddressResource>;
|
|
109
98
|
export type AddressSingle = Response<AddressResource>;
|
|
@@ -114,58 +103,62 @@ export interface HouseholdAttributes extends Attributes {
|
|
|
114
103
|
}
|
|
115
104
|
export interface HouseholdRelationships {
|
|
116
105
|
people?: Relationship;
|
|
117
|
-
|
|
106
|
+
primary_contact?: Relationship;
|
|
118
107
|
}
|
|
119
108
|
export interface HouseholdResource extends ResourceObject<'Household', HouseholdAttributes, HouseholdRelationships> {
|
|
120
|
-
type: 'Household';
|
|
121
109
|
}
|
|
122
110
|
export type HouseholdsList = Paginated<HouseholdResource>;
|
|
123
111
|
export type HouseholdSingle = Response<HouseholdResource>;
|
|
124
112
|
export interface SocialProfileAttributes extends Attributes {
|
|
125
|
-
|
|
126
|
-
username?: string;
|
|
113
|
+
site?: string;
|
|
127
114
|
url?: string;
|
|
128
115
|
verified?: boolean;
|
|
129
116
|
created_at?: string;
|
|
130
117
|
updated_at?: string;
|
|
131
118
|
}
|
|
132
119
|
export interface SocialProfileRelationships {
|
|
133
|
-
person?: Relationship;
|
|
134
120
|
}
|
|
135
121
|
export interface SocialProfileResource extends ResourceObject<'SocialProfile', SocialProfileAttributes, SocialProfileRelationships> {
|
|
136
|
-
type: 'SocialProfile';
|
|
137
122
|
}
|
|
138
123
|
export type SocialProfilesList = Paginated<SocialProfileResource>;
|
|
139
124
|
export type SocialProfileSingle = Response<SocialProfileResource>;
|
|
140
125
|
export interface FieldDefinitionAttributes extends Attributes {
|
|
141
|
-
|
|
142
|
-
data_type
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
updated_at?: string;
|
|
126
|
+
config: string | Record<string, any> | null;
|
|
127
|
+
data_type: string;
|
|
128
|
+
deleted_at: string | null | false;
|
|
129
|
+
name: string;
|
|
130
|
+
sequence: number;
|
|
131
|
+
slug: string;
|
|
132
|
+
tab_id: number;
|
|
149
133
|
}
|
|
150
134
|
export interface FieldDefinitionRelationships {
|
|
151
|
-
|
|
135
|
+
tab?: Relationship;
|
|
152
136
|
}
|
|
153
137
|
export interface FieldDefinitionResource extends ResourceObject<'FieldDefinition', FieldDefinitionAttributes, FieldDefinitionRelationships> {
|
|
154
|
-
type: 'FieldDefinition';
|
|
155
138
|
}
|
|
156
139
|
export type FieldDefinitionsList = Paginated<FieldDefinitionResource>;
|
|
157
140
|
export type FieldDefinitionSingle = Response<FieldDefinitionResource>;
|
|
158
|
-
export interface
|
|
159
|
-
|
|
141
|
+
export interface TabAttributes extends Attributes {
|
|
142
|
+
name?: string;
|
|
160
143
|
sequence?: string | number;
|
|
161
144
|
created_at?: string;
|
|
162
145
|
updated_at?: string;
|
|
163
146
|
}
|
|
147
|
+
export interface TabRelationships {
|
|
148
|
+
field_definitions?: Relationship;
|
|
149
|
+
}
|
|
150
|
+
export interface TabResource extends ResourceObject<'Tab', TabAttributes, TabRelationships> {
|
|
151
|
+
}
|
|
152
|
+
export type TabsList = Paginated<TabResource>;
|
|
153
|
+
export type TabSingle = Response<TabResource>;
|
|
154
|
+
export interface FieldOptionAttributes extends Attributes {
|
|
155
|
+
value: string;
|
|
156
|
+
sequence: string | number;
|
|
157
|
+
}
|
|
164
158
|
export interface FieldOptionRelationships {
|
|
165
159
|
field_definition?: Relationship;
|
|
166
160
|
}
|
|
167
161
|
export interface FieldOptionResource extends ResourceObject<'FieldOption', FieldOptionAttributes, FieldOptionRelationships> {
|
|
168
|
-
type: 'FieldOption';
|
|
169
162
|
}
|
|
170
163
|
export type FieldOptionsList = Paginated<FieldOptionResource>;
|
|
171
164
|
export type FieldOptionSingle = Response<FieldOptionResource>;
|
|
@@ -173,12 +166,11 @@ export interface FieldDatumAttributes extends Attributes {
|
|
|
173
166
|
value?: string | null;
|
|
174
167
|
file?: {
|
|
175
168
|
url?: string | null;
|
|
169
|
+
[key: string]: any;
|
|
176
170
|
} | null;
|
|
177
171
|
file_content_type?: string | null;
|
|
178
172
|
file_name?: string | null;
|
|
179
173
|
file_size?: string | number | null;
|
|
180
|
-
created_at?: string;
|
|
181
|
-
updated_at?: string;
|
|
182
174
|
}
|
|
183
175
|
export interface FieldDatumRelationships {
|
|
184
176
|
field_definition?: Relationship;
|
|
@@ -186,7 +178,6 @@ export interface FieldDatumRelationships {
|
|
|
186
178
|
customizable?: Relationship;
|
|
187
179
|
}
|
|
188
180
|
export interface FieldDatumResource extends ResourceObject<'FieldDatum', FieldDatumAttributes, FieldDatumRelationships> {
|
|
189
|
-
type: 'FieldDatum';
|
|
190
181
|
}
|
|
191
182
|
export type FieldDataList = Paginated<FieldDatumResource>;
|
|
192
183
|
export type FieldDataSingle = Response<FieldDatumResource>;
|
|
@@ -196,27 +187,20 @@ export interface ListAttributes extends Attributes {
|
|
|
196
187
|
created_at?: string;
|
|
197
188
|
updated_at?: string;
|
|
198
189
|
}
|
|
199
|
-
export interface
|
|
200
|
-
category?: Relationship;
|
|
201
|
-
people?: Relationship;
|
|
202
|
-
shares?: Relationship;
|
|
203
|
-
stars?: Relationship;
|
|
204
|
-
}
|
|
205
|
-
export interface ListResource extends ResourceObject<'List', ListAttributes, ListRelationships> {
|
|
206
|
-
type: 'List';
|
|
190
|
+
export interface ListResource extends ResourceObject<'List', ListAttributes, {}> {
|
|
207
191
|
}
|
|
208
192
|
export type ListsList = Paginated<ListResource>;
|
|
209
193
|
export type ListSingle = Response<ListResource>;
|
|
210
194
|
export interface ListCategoryAttributes extends Attributes {
|
|
211
195
|
name?: string;
|
|
212
|
-
created_at
|
|
213
|
-
updated_at
|
|
196
|
+
created_at: string;
|
|
197
|
+
updated_at: string;
|
|
198
|
+
organization_id: string;
|
|
214
199
|
}
|
|
215
200
|
export interface ListCategoryRelationships {
|
|
216
|
-
|
|
201
|
+
organization?: Relationship;
|
|
217
202
|
}
|
|
218
203
|
export interface ListCategoryResource extends ResourceObject<'ListCategory', ListCategoryAttributes, ListCategoryRelationships> {
|
|
219
|
-
type: 'ListCategory';
|
|
220
204
|
}
|
|
221
205
|
export type ListCategoriesList = Paginated<ListCategoryResource>;
|
|
222
206
|
export type ListCategorySingle = Response<ListCategoryResource>;
|
|
@@ -230,7 +214,6 @@ export interface ListShareRelationships {
|
|
|
230
214
|
person?: Relationship;
|
|
231
215
|
}
|
|
232
216
|
export interface ListShareResource extends ResourceObject<'ListShare', ListShareAttributes, ListShareRelationships> {
|
|
233
|
-
type: 'ListShare';
|
|
234
217
|
}
|
|
235
218
|
export type ListSharesList = Paginated<ListShareResource>;
|
|
236
219
|
export type ListShareSingle = Response<ListShareResource>;
|
|
@@ -243,7 +226,6 @@ export interface ListStarRelationships {
|
|
|
243
226
|
person?: Relationship;
|
|
244
227
|
}
|
|
245
228
|
export interface ListStarResource extends ResourceObject<'ListStar', ListStarAttributes, ListStarRelationships> {
|
|
246
|
-
type: 'ListStar';
|
|
247
229
|
}
|
|
248
230
|
export type ListStarsList = Paginated<ListStarResource>;
|
|
249
231
|
export type ListStarSingle = Response<ListStarResource>;
|
|
@@ -254,25 +236,27 @@ export interface NoteAttributes extends Attributes {
|
|
|
254
236
|
}
|
|
255
237
|
export interface NoteRelationships {
|
|
256
238
|
person?: Relationship;
|
|
257
|
-
|
|
239
|
+
note_category?: Relationship;
|
|
240
|
+
organization?: Relationship;
|
|
241
|
+
created_by?: Relationship;
|
|
258
242
|
}
|
|
259
243
|
export interface NoteResource extends ResourceObject<'Note', NoteAttributes, NoteRelationships> {
|
|
260
|
-
type: 'Note';
|
|
261
244
|
}
|
|
262
245
|
export type NotesList = Paginated<NoteResource>;
|
|
263
246
|
export type NoteSingle = Response<NoteResource>;
|
|
264
247
|
export interface NoteCategoryAttributes extends Attributes {
|
|
265
|
-
name
|
|
266
|
-
|
|
267
|
-
|
|
248
|
+
name: string;
|
|
249
|
+
locked: boolean;
|
|
250
|
+
organization_id: number;
|
|
251
|
+
created_at: string;
|
|
252
|
+
updated_at: string;
|
|
268
253
|
}
|
|
269
254
|
export interface NoteCategoryRelationships {
|
|
270
|
-
|
|
255
|
+
organization?: Relationship;
|
|
271
256
|
shares?: Relationship;
|
|
272
257
|
subscriptions?: Relationship;
|
|
273
258
|
}
|
|
274
259
|
export interface NoteCategoryResource extends ResourceObject<'NoteCategory', NoteCategoryAttributes, NoteCategoryRelationships> {
|
|
275
|
-
type: 'NoteCategory';
|
|
276
260
|
}
|
|
277
261
|
export type NoteCategoriesList = Paginated<NoteCategoryResource>;
|
|
278
262
|
export type NoteCategorySingle = Response<NoteCategoryResource>;
|
|
@@ -286,7 +270,6 @@ export interface NoteCategoryShareRelationships {
|
|
|
286
270
|
person?: Relationship;
|
|
287
271
|
}
|
|
288
272
|
export interface NoteCategoryShareResource extends ResourceObject<'NoteCategoryShare', NoteCategoryShareAttributes, NoteCategoryShareRelationships> {
|
|
289
|
-
type: 'NoteCategoryShare';
|
|
290
273
|
}
|
|
291
274
|
export type NoteCategorySharesList = Paginated<NoteCategoryShareResource>;
|
|
292
275
|
export type NoteCategoryShareSingle = Response<NoteCategoryShareResource>;
|
|
@@ -299,7 +282,6 @@ export interface NoteCategorySubscriptionRelationships {
|
|
|
299
282
|
person?: Relationship;
|
|
300
283
|
}
|
|
301
284
|
export interface NoteCategorySubscriptionResource extends ResourceObject<'NoteCategorySubscription', NoteCategorySubscriptionAttributes, NoteCategorySubscriptionRelationships> {
|
|
302
|
-
type: 'NoteCategorySubscription';
|
|
303
285
|
}
|
|
304
286
|
export type NoteCategorySubscriptionsList = Paginated<NoteCategorySubscriptionResource>;
|
|
305
287
|
export type NoteCategorySubscriptionSingle = Response<NoteCategorySubscriptionResource>;
|
|
@@ -310,11 +292,10 @@ export interface WorkflowAttributes extends Attributes {
|
|
|
310
292
|
updated_at?: string;
|
|
311
293
|
}
|
|
312
294
|
export interface WorkflowRelationships {
|
|
313
|
-
|
|
314
|
-
|
|
295
|
+
workflow_category?: Relationship;
|
|
296
|
+
campus?: Relationship;
|
|
315
297
|
}
|
|
316
298
|
export interface WorkflowResource extends ResourceObject<'Workflow', WorkflowAttributes, WorkflowRelationships> {
|
|
317
|
-
type: 'Workflow';
|
|
318
299
|
}
|
|
319
300
|
export type WorkflowsList = Paginated<WorkflowResource>;
|
|
320
301
|
export type WorkflowSingle = Response<WorkflowResource>;
|
|
@@ -324,47 +305,61 @@ export interface WorkflowCardAttributes extends Attributes {
|
|
|
324
305
|
status?: string;
|
|
325
306
|
created_at?: string;
|
|
326
307
|
updated_at?: string;
|
|
308
|
+
stage?: string;
|
|
327
309
|
completed_at?: string | null;
|
|
328
|
-
|
|
310
|
+
overdue?: boolean;
|
|
311
|
+
calculated_due_at_in_days_ago?: number;
|
|
312
|
+
flagged_for_notification_at?: string | null;
|
|
313
|
+
moved_to_step_at?: string | null;
|
|
329
314
|
snooze_until?: string | null;
|
|
315
|
+
removed_at?: string | null;
|
|
330
316
|
overdue_at?: string | null;
|
|
331
317
|
stage_id?: string;
|
|
332
318
|
}
|
|
319
|
+
export interface WorkflowCardAssignableAttributes {
|
|
320
|
+
sticky_assignment?: boolean;
|
|
321
|
+
assignee_id?: string;
|
|
322
|
+
person_id?: string;
|
|
323
|
+
}
|
|
324
|
+
export interface WorkflowCardSnoozeAttributes {
|
|
325
|
+
duration: number;
|
|
326
|
+
}
|
|
327
|
+
export interface WorkflowCardEmailAttributes {
|
|
328
|
+
subject: string;
|
|
329
|
+
note: string;
|
|
330
|
+
}
|
|
333
331
|
export interface WorkflowCardRelationships {
|
|
334
332
|
workflow?: Relationship;
|
|
335
333
|
person?: Relationship;
|
|
334
|
+
assignee?: Relationship;
|
|
335
|
+
current_step?: Relationship;
|
|
336
336
|
}
|
|
337
337
|
export interface WorkflowCardResource extends ResourceObject<'WorkflowCard', WorkflowCardAttributes, WorkflowCardRelationships> {
|
|
338
|
-
type: 'WorkflowCard';
|
|
339
338
|
}
|
|
340
339
|
export type WorkflowCardsList = Paginated<WorkflowCardResource>;
|
|
341
340
|
export type WorkflowCardSingle = Response<WorkflowCardResource>;
|
|
342
341
|
export interface WorkflowCardNoteAttributes extends Attributes {
|
|
343
342
|
note?: string;
|
|
344
|
-
created_at?: string;
|
|
345
|
-
updated_at?: string;
|
|
346
|
-
}
|
|
347
|
-
export interface WorkflowCardNoteRelationships {
|
|
348
|
-
workflow_card?: Relationship;
|
|
349
|
-
person?: Relationship;
|
|
350
343
|
}
|
|
351
|
-
export interface WorkflowCardNoteResource extends ResourceObject<'WorkflowCardNote', WorkflowCardNoteAttributes,
|
|
352
|
-
type: 'WorkflowCardNote';
|
|
344
|
+
export interface WorkflowCardNoteResource extends ResourceObject<'WorkflowCardNote', WorkflowCardNoteAttributes, {}> {
|
|
353
345
|
}
|
|
354
346
|
export type WorkflowCardNotesList = Paginated<WorkflowCardNoteResource>;
|
|
355
347
|
export type WorkflowCardNoteSingle = Response<WorkflowCardNoteResource>;
|
|
356
348
|
export interface OrganizationAttributes extends Attributes {
|
|
357
|
-
|
|
358
|
-
|
|
349
|
+
avatar_url?: string | null;
|
|
350
|
+
church_center_subdomain?: string;
|
|
351
|
+
contact_website?: string | null;
|
|
352
|
+
country_code?: string;
|
|
359
353
|
created_at?: string;
|
|
360
|
-
|
|
354
|
+
date_format?: string;
|
|
355
|
+
name?: string;
|
|
356
|
+
time_zone?: string;
|
|
361
357
|
}
|
|
362
358
|
export interface OrganizationRelationships {
|
|
363
359
|
people?: Relationship;
|
|
364
360
|
statistics?: Relationship;
|
|
365
361
|
}
|
|
366
362
|
export interface OrganizationResource extends ResourceObject<'Organization', OrganizationAttributes, OrganizationRelationships> {
|
|
367
|
-
type: 'Organization';
|
|
368
363
|
}
|
|
369
364
|
export type OrganizationsList = Paginated<OrganizationResource>;
|
|
370
365
|
export type OrganizationSingle = Response<OrganizationResource>;
|
|
@@ -378,8 +373,7 @@ export interface OrganizationStatisticRelationships {
|
|
|
378
373
|
organization?: Relationship;
|
|
379
374
|
}
|
|
380
375
|
export interface OrganizationStatisticResource extends ResourceObject<'OrganizationStatistic', OrganizationStatisticAttributes, OrganizationStatisticRelationships> {
|
|
381
|
-
type: 'OrganizationStatistic';
|
|
382
376
|
}
|
|
383
377
|
export type OrganizationStatisticsList = Paginated<OrganizationStatisticResource>;
|
|
384
378
|
export type OrganizationStatisticSingle = Response<OrganizationStatisticResource>;
|
|
385
|
-
export type PeopleIncluded = EmailResource | AddressResource | PhoneNumberResource | HouseholdResource | SocialProfileResource | FieldDatumResource;
|
|
379
|
+
export type PeopleIncluded = EmailResource | AddressResource | PhoneNumberResource | HouseholdResource | SocialProfileResource | FieldDatumResource | TabResource;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rachelallyson/planning-center-people-ts",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "A strictly typed TypeScript client for Planning Center Online People API",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "A strictly typed TypeScript client for Planning Center Online People API with smart matching, batch operations, and enhanced developer experience",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
"test:coverage": "jest --coverage --testPathIgnorePatterns=integration.test.ts",
|
|
15
15
|
"test:ci": "jest --ci --coverage --watchAll=false --testPathIgnorePatterns=integration.test.ts",
|
|
16
16
|
"test:integration": "dotenv -e .env.test -- jest --testPathPatterns=integration.test.ts --setupFilesAfterEnv='<rootDir>/tests/integration-setup.ts' --testTimeout=30000",
|
|
17
|
+
"test:integration:people-all": "dotenv -e .env.test -- jest --testPathPatterns=integration/people-.*.integration.test.ts --setupFilesAfterEnv='<rootDir>/tests/integration-setup.ts' --testTimeout=30000",
|
|
18
|
+
"test:integration:v2:all": "dotenv -e .env.test -- jest --testPathPatterns=integration/v2/.*.integration.test.ts --setupFilesAfterEnv='<rootDir>/tests/integration-setup.ts' --testTimeout=30000",
|
|
17
19
|
"test:edge-cases": "jest --testPathPatterns=edge-cases.test.ts --testTimeout=30000",
|
|
18
20
|
"test:all": "npm run test && npm run test:edge-cases",
|
|
19
21
|
"prepublishOnly": "npm run build"
|
|
@@ -33,7 +35,12 @@
|
|
|
33
35
|
"rate-limiting",
|
|
34
36
|
"error-handling",
|
|
35
37
|
"performance",
|
|
36
|
-
"caching"
|
|
38
|
+
"caching",
|
|
39
|
+
"batch-operations",
|
|
40
|
+
"smart-matching",
|
|
41
|
+
"fluent-api",
|
|
42
|
+
"event-system",
|
|
43
|
+
"client-manager"
|
|
37
44
|
],
|
|
38
45
|
"author": "Rachel Higley",
|
|
39
46
|
"license": "MIT",
|
|
@@ -63,5 +70,9 @@
|
|
|
63
70
|
},
|
|
64
71
|
"publishConfig": {
|
|
65
72
|
"access": "public"
|
|
73
|
+
},
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"axios": "^1.12.2",
|
|
76
|
+
"form-data": "^4.0.4"
|
|
66
77
|
}
|
|
67
78
|
}
|
package/dist/people.d.ts
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import { PcoClientState } from './core';
|
|
2
|
-
import type { ErrorContext } from './error-handling';
|
|
3
|
-
import { AddressAttributes, AddressesList, AddressSingle, EmailAttributes, EmailSingle, EmailsList, FieldDataList, FieldDataSingle, FieldDefinitionsList, FieldOptionAttributes, FieldOptionSingle, FieldOptionsList, HouseholdSingle, HouseholdsList, ListCategoriesList, ListSingle, ListsList, NoteCategoriesList, NoteSingle, NotesList, OrganizationSingle, PeopleList, PersonAttributes, PersonSingle, PhoneNumberAttributes, PhoneNumberSingle, PhoneNumbersList, SocialProfileAttributes, SocialProfileSingle, SocialProfilesList, WorkflowCardNoteAttributes, WorkflowCardNoteSingle, WorkflowCardNotesList, WorkflowCardSingle, WorkflowCardsList, WorkflowSingle, WorkflowsList } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* Get all people with optional filtering and pagination
|
|
6
|
-
*/
|
|
7
|
-
export declare function getPeople(client: PcoClientState, params?: {
|
|
8
|
-
where?: Record<string, any>;
|
|
9
|
-
include?: string[];
|
|
10
|
-
per_page?: number;
|
|
11
|
-
page?: number;
|
|
12
|
-
}, context?: Partial<ErrorContext>): Promise<PeopleList>;
|
|
13
|
-
/**
|
|
14
|
-
* Get a single person by ID
|
|
15
|
-
*/
|
|
16
|
-
export declare function getPerson(client: PcoClientState, id: string, include?: string[], context?: Partial<ErrorContext>): Promise<PersonSingle>;
|
|
17
|
-
/**
|
|
18
|
-
* Create a new person
|
|
19
|
-
*/
|
|
20
|
-
export declare function createPerson(client: PcoClientState, data: Partial<PersonAttributes>, context?: Partial<ErrorContext>): Promise<PersonSingle>;
|
|
21
|
-
/**
|
|
22
|
-
* Update a person
|
|
23
|
-
*/
|
|
24
|
-
export declare function updatePerson(client: PcoClientState, id: string, data: Partial<PersonAttributes>, context?: Partial<ErrorContext>): Promise<PersonSingle>;
|
|
25
|
-
/**
|
|
26
|
-
* Delete a person
|
|
27
|
-
*/
|
|
28
|
-
export declare function deletePerson(client: PcoClientState, id: string, context?: Partial<ErrorContext>): Promise<void>;
|
|
29
|
-
/**
|
|
30
|
-
* Get all emails for a person
|
|
31
|
-
*/
|
|
32
|
-
export declare function getPersonEmails(client: PcoClientState, personId: string, context?: Partial<ErrorContext>): Promise<EmailsList>;
|
|
33
|
-
/**
|
|
34
|
-
* Create an email for a person
|
|
35
|
-
*/
|
|
36
|
-
export declare function createPersonEmail(client: PcoClientState, personId: string, data: Partial<EmailAttributes>, context?: Partial<ErrorContext>): Promise<EmailSingle>;
|
|
37
|
-
/**
|
|
38
|
-
* Get all phone numbers for a person
|
|
39
|
-
*/
|
|
40
|
-
export declare function getPersonPhoneNumbers(client: PcoClientState, personId: string, context?: Partial<ErrorContext>): Promise<PhoneNumbersList>;
|
|
41
|
-
/**
|
|
42
|
-
* Create a phone number for a person
|
|
43
|
-
*/
|
|
44
|
-
export declare function createPersonPhoneNumber(client: PcoClientState, personId: string, data: Partial<PhoneNumberAttributes>, context?: Partial<ErrorContext>): Promise<PhoneNumberSingle>;
|
|
45
|
-
/**
|
|
46
|
-
* Get all addresses for a person
|
|
47
|
-
*/
|
|
48
|
-
export declare function getPersonAddresses(client: PcoClientState, personId: string, context?: Partial<ErrorContext>): Promise<AddressesList>;
|
|
49
|
-
/**
|
|
50
|
-
* Create field data for a person
|
|
51
|
-
*/
|
|
52
|
-
export declare function createPersonFieldData(client: PcoClientState, personId: string, fieldDefinitionId: string, value: string, context?: Partial<ErrorContext>): Promise<FieldDataSingle>;
|
|
53
|
-
/**
|
|
54
|
-
* Delete field data for a person
|
|
55
|
-
*/
|
|
56
|
-
export declare function deletePersonFieldData(client: PcoClientState, personId: string, fieldDataId: string, context?: Partial<ErrorContext>): Promise<void>;
|
|
57
|
-
/**
|
|
58
|
-
* Create an address for a person
|
|
59
|
-
*/
|
|
60
|
-
export declare function createPersonAddress(client: PcoClientState, personId: string, data: Partial<AddressAttributes>, context?: Partial<ErrorContext>): Promise<AddressSingle>;
|
|
61
|
-
/**
|
|
62
|
-
* Update an address for a person
|
|
63
|
-
*/
|
|
64
|
-
export declare function updatePersonAddress(client: PcoClientState, personId: string, addressId: string, data: Partial<AddressAttributes>, context?: Partial<ErrorContext>): Promise<AddressSingle>;
|
|
65
|
-
/**
|
|
66
|
-
* Get field data for a person (custom fields)
|
|
67
|
-
*/
|
|
68
|
-
export declare function getPersonFieldData(client: PcoClientState, personId: string, context?: Partial<ErrorContext>): Promise<FieldDataList>;
|
|
69
|
-
/**
|
|
70
|
-
* Upload a file to PCO and create field data
|
|
71
|
-
*/
|
|
72
|
-
export declare function createPersonFileFieldData(client: PcoClientState, personId: string, fieldDefinitionId: string, fileUrl: string, context?: Partial<ErrorContext>): Promise<FieldDataSingle>;
|
|
73
|
-
/**
|
|
74
|
-
* Get all households
|
|
75
|
-
*/
|
|
76
|
-
export declare function getHouseholds(client: PcoClientState, params?: {
|
|
77
|
-
include?: string[];
|
|
78
|
-
per_page?: number;
|
|
79
|
-
page?: number;
|
|
80
|
-
}, context?: Partial<ErrorContext>): Promise<HouseholdsList>;
|
|
81
|
-
/**
|
|
82
|
-
* Get a single household by ID
|
|
83
|
-
*/
|
|
84
|
-
export declare function getHousehold(client: PcoClientState, id: string, include?: string[], context?: Partial<ErrorContext>): Promise<HouseholdSingle>;
|
|
85
|
-
/**
|
|
86
|
-
* Get field definitions
|
|
87
|
-
*/
|
|
88
|
-
export declare function getFieldDefinitions(client: PcoClientState, params?: {
|
|
89
|
-
include?: string[];
|
|
90
|
-
per_page?: number;
|
|
91
|
-
page?: number;
|
|
92
|
-
}, context?: Partial<ErrorContext>): Promise<FieldDefinitionsList>;
|
|
93
|
-
/**
|
|
94
|
-
* Get social profiles for a person
|
|
95
|
-
*/
|
|
96
|
-
export declare function getPersonSocialProfiles(client: PcoClientState, personId: string, context?: Partial<ErrorContext>): Promise<SocialProfilesList>;
|
|
97
|
-
/**
|
|
98
|
-
* Create a social profile for a person
|
|
99
|
-
*/
|
|
100
|
-
export declare function createPersonSocialProfile(client: PcoClientState, personId: string, data: Partial<SocialProfileAttributes>, context?: Partial<ErrorContext>): Promise<SocialProfileSingle>;
|
|
101
|
-
/**
|
|
102
|
-
* Get field options for a field definition
|
|
103
|
-
*/
|
|
104
|
-
export declare function getFieldOptions(client: PcoClientState, fieldDefinitionId: string, context?: Partial<ErrorContext>): Promise<FieldOptionsList>;
|
|
105
|
-
/**
|
|
106
|
-
* Create a field option for a field definition
|
|
107
|
-
*/
|
|
108
|
-
export declare function createFieldOption(client: PcoClientState, fieldDefinitionId: string, data: Partial<FieldOptionAttributes>, context?: Partial<ErrorContext>): Promise<FieldOptionSingle>;
|
|
109
|
-
/**
|
|
110
|
-
* List notes for a workflow card
|
|
111
|
-
*/
|
|
112
|
-
export declare function getWorkflowCardNotes(client: PcoClientState, personId: string, workflowCardId: string, context?: Partial<ErrorContext>): Promise<WorkflowCardNotesList>;
|
|
113
|
-
/**
|
|
114
|
-
* Create a note for a workflow card
|
|
115
|
-
*/
|
|
116
|
-
export declare function createWorkflowCardNote(client: PcoClientState, personId: string, workflowCardId: string, data: Partial<WorkflowCardNoteAttributes>, context?: Partial<ErrorContext>): Promise<WorkflowCardNoteSingle>;
|
|
117
|
-
/**
|
|
118
|
-
* List workflow cards for a person
|
|
119
|
-
*/
|
|
120
|
-
export declare function getWorkflowCards(client: PcoClientState, personId: string, context?: Partial<ErrorContext>): Promise<WorkflowCardsList>;
|
|
121
|
-
/**
|
|
122
|
-
* Create a workflow card in a workflow for a person
|
|
123
|
-
*/
|
|
124
|
-
export declare function createWorkflowCard(client: PcoClientState, workflowId: string, personId: string, context?: Partial<ErrorContext>): Promise<WorkflowCardSingle>;
|
|
125
|
-
/**
|
|
126
|
-
* Get all lists
|
|
127
|
-
*/
|
|
128
|
-
export declare function getLists(client: PcoClientState, params?: {
|
|
129
|
-
where?: Record<string, any>;
|
|
130
|
-
include?: string[];
|
|
131
|
-
per_page?: number;
|
|
132
|
-
page?: number;
|
|
133
|
-
}, context?: Partial<ErrorContext>): Promise<ListsList>;
|
|
134
|
-
/**
|
|
135
|
-
* Get a single list
|
|
136
|
-
*/
|
|
137
|
-
export declare function getListById(client: PcoClientState, listId: string, params?: {
|
|
138
|
-
where?: Record<string, any>;
|
|
139
|
-
include?: string[];
|
|
140
|
-
per_page?: number;
|
|
141
|
-
page?: number;
|
|
142
|
-
}, context?: Partial<ErrorContext>): Promise<ListSingle>;
|
|
143
|
-
/**
|
|
144
|
-
* Get all list categories
|
|
145
|
-
*/
|
|
146
|
-
export declare function getListCategories(client: PcoClientState, params?: {
|
|
147
|
-
where?: Record<string, any>;
|
|
148
|
-
include?: string[];
|
|
149
|
-
per_page?: number;
|
|
150
|
-
page?: number;
|
|
151
|
-
}, context?: Partial<ErrorContext>): Promise<ListCategoriesList>;
|
|
152
|
-
/**
|
|
153
|
-
* Get all notes
|
|
154
|
-
*/
|
|
155
|
-
export declare function getNotes(client: PcoClientState, params?: {
|
|
156
|
-
where?: Record<string, any>;
|
|
157
|
-
include?: string[];
|
|
158
|
-
per_page?: number;
|
|
159
|
-
page?: number;
|
|
160
|
-
}, context?: Partial<ErrorContext>): Promise<NotesList>;
|
|
161
|
-
/**
|
|
162
|
-
* Get a single note
|
|
163
|
-
*/
|
|
164
|
-
export declare function getNote(client: PcoClientState, noteId: string, params?: {
|
|
165
|
-
where?: Record<string, any>;
|
|
166
|
-
include?: string[];
|
|
167
|
-
per_page?: number;
|
|
168
|
-
page?: number;
|
|
169
|
-
}, context?: Partial<ErrorContext>): Promise<NoteSingle>;
|
|
170
|
-
/**
|
|
171
|
-
* Get all note categories
|
|
172
|
-
*/
|
|
173
|
-
export declare function getNoteCategories(client: PcoClientState, params?: {
|
|
174
|
-
where?: Record<string, any>;
|
|
175
|
-
include?: string[];
|
|
176
|
-
per_page?: number;
|
|
177
|
-
page?: number;
|
|
178
|
-
}, context?: Partial<ErrorContext>): Promise<NoteCategoriesList>;
|
|
179
|
-
/**
|
|
180
|
-
* Get all workflows
|
|
181
|
-
*/
|
|
182
|
-
export declare function getWorkflows(client: PcoClientState, params?: {
|
|
183
|
-
where?: Record<string, any>;
|
|
184
|
-
include?: string[];
|
|
185
|
-
per_page?: number;
|
|
186
|
-
page?: number;
|
|
187
|
-
}, context?: Partial<ErrorContext>): Promise<WorkflowsList>;
|
|
188
|
-
/**
|
|
189
|
-
* Get a single workflow
|
|
190
|
-
*/
|
|
191
|
-
export declare function getWorkflow(client: PcoClientState, workflowId: string, params?: {
|
|
192
|
-
where?: Record<string, any>;
|
|
193
|
-
include?: string[];
|
|
194
|
-
per_page?: number;
|
|
195
|
-
page?: number;
|
|
196
|
-
}, context?: Partial<ErrorContext>): Promise<WorkflowSingle>;
|
|
197
|
-
/**
|
|
198
|
-
* Get organization information
|
|
199
|
-
*/
|
|
200
|
-
export declare function getOrganization(client: PcoClientState, params?: {
|
|
201
|
-
where?: Record<string, any>;
|
|
202
|
-
include?: string[];
|
|
203
|
-
per_page?: number;
|
|
204
|
-
page?: number;
|
|
205
|
-
}, context?: Partial<ErrorContext>): Promise<OrganizationSingle>;
|