@rachelallyson/planning-center-people-ts 2.14.1 → 3.1.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.
Files changed (77) hide show
  1. package/CHANGELOG.md +82 -7
  2. package/README.md +42 -4
  3. package/dist/auth.d.ts +1 -1
  4. package/dist/auth.js +14 -6
  5. package/dist/client.d.ts +33 -8
  6. package/dist/client.js +47 -22
  7. package/dist/core.d.ts +4 -2
  8. package/dist/core.js +3 -2
  9. package/dist/error-handling.d.ts +4 -4
  10. package/dist/error-handling.js +13 -2
  11. package/dist/error-scenarios.d.ts +11 -7
  12. package/dist/error-scenarios.js +26 -10
  13. package/dist/helpers.d.ts +124 -48
  14. package/dist/helpers.js +237 -93
  15. package/dist/index.d.ts +10 -8
  16. package/dist/index.js +31 -72
  17. package/dist/matching/matcher.d.ts +8 -4
  18. package/dist/matching/matcher.js +51 -58
  19. package/dist/matching/scoring.d.ts +9 -6
  20. package/dist/matching/scoring.js +18 -14
  21. package/dist/modules/campus.d.ts +31 -36
  22. package/dist/modules/campus.js +36 -49
  23. package/dist/modules/contacts.d.ts +33 -29
  24. package/dist/modules/contacts.js +36 -12
  25. package/dist/modules/fields.d.ts +39 -55
  26. package/dist/modules/fields.js +65 -105
  27. package/dist/modules/forms.d.ts +35 -24
  28. package/dist/modules/forms.js +41 -23
  29. package/dist/modules/households.d.ts +17 -19
  30. package/dist/modules/households.js +25 -34
  31. package/dist/modules/lists.d.ts +38 -28
  32. package/dist/modules/lists.js +62 -42
  33. package/dist/modules/notes.d.ts +32 -30
  34. package/dist/modules/notes.js +40 -52
  35. package/dist/modules/people.d.ts +83 -71
  36. package/dist/modules/people.js +323 -172
  37. package/dist/modules/reports.d.ts +18 -32
  38. package/dist/modules/reports.js +28 -40
  39. package/dist/modules/service-time.d.ts +19 -24
  40. package/dist/modules/service-time.js +28 -28
  41. package/dist/modules/workflows.d.ts +42 -47
  42. package/dist/modules/workflows.js +52 -53
  43. package/dist/performance.d.ts +14 -10
  44. package/dist/performance.js +61 -25
  45. package/dist/testing/recorder.js +11 -2
  46. package/dist/testing/simple-builders.d.ts +6 -4
  47. package/dist/testing/simple-builders.js +36 -49
  48. package/dist/testing/types.d.ts +4 -0
  49. package/dist/types/api-options.d.ts +380 -0
  50. package/dist/types/api-options.js +6 -0
  51. package/dist/types/client.d.ts +4 -2
  52. package/dist/types/client.js +1 -1
  53. package/dist/types/index.d.ts +1 -1
  54. package/dist/types/people.d.ts +61 -9
  55. package/package.json +7 -7
  56. package/dist/core/http.d.ts +0 -56
  57. package/dist/core/http.js +0 -360
  58. package/dist/core/pagination.d.ts +0 -34
  59. package/dist/core/pagination.js +0 -178
  60. package/dist/people/contacts.d.ts +0 -43
  61. package/dist/people/contacts.js +0 -122
  62. package/dist/people/core.d.ts +0 -28
  63. package/dist/people/core.js +0 -69
  64. package/dist/people/fields.d.ts +0 -68
  65. package/dist/people/fields.js +0 -305
  66. package/dist/people/households.d.ts +0 -15
  67. package/dist/people/households.js +0 -31
  68. package/dist/people/index.d.ts +0 -8
  69. package/dist/people/index.js +0 -25
  70. package/dist/people/lists.d.ts +0 -34
  71. package/dist/people/lists.js +0 -48
  72. package/dist/people/notes.d.ts +0 -30
  73. package/dist/people/notes.js +0 -37
  74. package/dist/people/organization.d.ts +0 -12
  75. package/dist/people/organization.js +0 -15
  76. package/dist/people/workflows.d.ts +0 -37
  77. package/dist/people/workflows.js +0 -75
@@ -7,95 +7,83 @@ exports.NotesModule = void 0;
7
7
  const planning_center_base_ts_1 = require("@rachelallyson/planning-center-base-ts");
8
8
  class NotesModule extends planning_center_base_ts_1.BaseModule {
9
9
  /**
10
- * Get all notes
10
+ * Get all notes across all pages
11
11
  */
12
12
  async getAll(options = {}) {
13
- const params = {};
14
- if (options.where) {
15
- Object.entries(options.where).forEach(([key, value]) => {
16
- params[`where[${key}]`] = value;
17
- });
18
- }
19
- if (options.include) {
20
- params.include = options.include.join(',');
21
- }
22
- if (options.perPage) {
23
- params.per_page = options.perPage;
24
- }
25
- if (options.page) {
26
- params.page = options.page;
27
- }
28
- return this.getList('/notes', params);
13
+ this.debugLog('notes.getAll', { options });
14
+ return await this.getAllPages('/notes', {
15
+ where: options.where,
16
+ include: options.include,
17
+ order: options.order
18
+ });
29
19
  }
30
20
  /**
31
- * Get all notes across all pages
21
+ * Get a single page of notes 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 options - List options including where, include, perPage, page, and order
24
+ * @returns A single page of results with meta and links for pagination
32
25
  */
33
- async getAllPagesPaginated(options = {}, paginationOptions) {
34
- const params = {};
35
- if (options.where) {
36
- Object.entries(options.where).forEach(([key, value]) => {
37
- params[`where[${key}]`] = value;
38
- });
39
- }
40
- if (options.include) {
41
- params.include = options.include.join(',');
42
- }
43
- return this.getAllPages('/notes', params, paginationOptions);
26
+ async getPage(options = {}) {
27
+ this.debugLog('notes.getPage', { options });
28
+ return this.getList('/notes', {
29
+ where: options.where,
30
+ include: options.include,
31
+ per_page: options.perPage,
32
+ page: options.page,
33
+ order: options.order
34
+ });
44
35
  }
45
36
  /**
46
37
  * Get a single note by ID
47
38
  */
48
39
  async getById(id, include) {
49
- const params = {};
50
- if (include) {
51
- params.include = include.join(',');
52
- }
53
- return this.getSingle(`/notes/${id}`, params);
40
+ this.debugLog('notes.getById', { id, include });
41
+ return this.getSingle(`/notes/${id}`, include);
54
42
  }
55
43
  /**
56
44
  * Get notes for a specific person
57
45
  */
58
46
  async getNotesForPerson(personId, options = {}) {
59
- const params = {};
60
- if (options.where) {
61
- Object.entries(options.where).forEach(([key, value]) => {
62
- params[`where[${key}]`] = value;
63
- });
64
- }
65
- if (options.include) {
66
- params.include = options.include.join(',');
67
- }
68
- if (options.perPage) {
69
- params.per_page = options.perPage;
70
- }
71
- if (options.page) {
72
- params.page = options.page;
73
- }
74
- return this.getList(`/people/${personId}/notes`, params);
47
+ this.debugLog('notes.getNotesForPerson', { personId, options });
48
+ return this.getList(`/people/${personId}/notes`, {
49
+ where: options.where,
50
+ include: options.include,
51
+ per_page: options.perPage,
52
+ page: options.page,
53
+ order: options.order
54
+ });
75
55
  }
76
56
  /**
77
57
  * Create a note for a person
78
58
  */
79
59
  async create(personId, data) {
60
+ this.debugLog('notes.create', { personId, data });
80
61
  return this.createResource(`/people/${personId}/notes`, data);
81
62
  }
82
63
  /**
83
64
  * Update a note
84
65
  */
85
66
  async update(id, data) {
67
+ this.debugLog('notes.update', { id, data });
86
68
  return this.updateResource(`/notes/${id}`, data);
87
69
  }
88
70
  /**
89
71
  * Delete a note
90
72
  */
91
73
  async delete(id) {
74
+ this.debugLog('notes.delete', { id });
92
75
  return this.deleteResource(`/notes/${id}`);
93
76
  }
94
77
  /**
95
78
  * Get all note categories
79
+ * @param options - Optional pagination options
96
80
  */
97
- async getNoteCategories() {
98
- return this.getList('/note_categories');
81
+ async getNoteCategories(options) {
82
+ this.debugLog('notes.getNoteCategories', { options });
83
+ return this.getList('/note_categories', options ? {
84
+ per_page: options.perPage,
85
+ page: options.page,
86
+ } : undefined);
99
87
  }
100
88
  /**
101
89
  * Get a single note category by ID
@@ -2,14 +2,11 @@
2
2
  * v2.0.0 People Module
3
3
  */
4
4
  import { BaseModule } from '@rachelallyson/planning-center-base-ts';
5
- import type { PcoHttpClient, PaginationHelper, PcoEventEmitter, PaginationOptions, PaginationResult } from '@rachelallyson/planning-center-base-ts';
6
- import type { PersonResource, EmailResource, EmailAttributes, PhoneNumberResource, PhoneNumberAttributes, AddressResource, AddressAttributes, SocialProfileResource, SocialProfileAttributes, CampusResource, HouseholdResource } from '../types';
7
- export interface PeopleListOptions {
8
- where?: Record<string, any>;
9
- include?: string[];
10
- perPage?: number;
11
- page?: number;
12
- }
5
+ import type { PcoHttpClient, PaginationHelper, PcoEventEmitter, PcoClientConfig } from '@rachelallyson/planning-center-base-ts';
6
+ import type { PersonResource, PersonAttributes, PersonRelationshipMap, EmailResource, EmailAttributes, PhoneNumberResource, PhoneNumberAttributes, AddressResource, AddressAttributes, SocialProfileAttributes, CampusResource, HouseholdResource, PeopleIncluded, FlattenedPersonResource } from '../types';
7
+ import type { Meta, TopLevelLinks } from '../types/json-api';
8
+ import type { PersonListOptions, PersonPageOptions } from '../types/api-options';
9
+ export type PeopleListOptions = PersonListOptions;
13
10
  export interface PersonCreateOptions {
14
11
  firstName?: string;
15
12
  lastName?: string;
@@ -147,23 +144,26 @@ export declare const DEFAULT_INITIAL_RETRY_CONFIG: Required<Omit<RetryConfig, 'e
147
144
  export declare const DEFAULT_AGGRESSIVE_RETRY_CONFIG: Required<Omit<RetryConfig, 'enabled'>>;
148
145
  export declare class PeopleModule extends BaseModule {
149
146
  private personMatcher;
150
- constructor(httpClient: PcoHttpClient, paginationHelper: PaginationHelper, eventEmitter: PcoEventEmitter);
147
+ constructor(httpClient: PcoHttpClient, paginationHelper: PaginationHelper, eventEmitter: PcoEventEmitter, getConfig?: () => PcoClientConfig);
151
148
  /**
152
- * Get all people with optional filtering
149
+ * Get all people across all pages with optional filtering
153
150
  */
154
- getAll(options?: PeopleListOptions): Promise<{
155
- data: PersonResource[];
156
- meta?: any;
157
- links?: any;
158
- }>;
151
+ getAll(options?: PersonListOptions): Promise<import("@rachelallyson/planning-center-base-ts").PaginationResult<PersonResource, PeopleIncluded, PersonRelationshipMap>>;
159
152
  /**
160
- * Get all people across all pages
153
+ * Get a single page of people with optional filtering and pagination control
154
+ * Use this when you need a specific page or want to limit the number of results
155
+ * @param options - List options including where, include, perPage, page, and order
156
+ * @returns A single page of results with meta and links for pagination
161
157
  */
162
- getAllPagesPaginated(options?: PeopleListOptions, paginationOptions?: PaginationOptions): Promise<PaginationResult<PersonResource>>;
158
+ getPage(options?: PersonPageOptions): Promise<{
159
+ data: FlattenedPersonResource[];
160
+ meta?: Meta;
161
+ links?: TopLevelLinks;
162
+ }>;
163
163
  /**
164
164
  * Get a single person by ID
165
165
  */
166
- getById(id: string, include?: string[]): Promise<PersonResource>;
166
+ getById(id: string, include?: string[]): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Person", PersonAttributes, import("../types").PersonRelationships>>;
167
167
  /**
168
168
  * Verify that a person exists in PCO
169
169
  *
@@ -176,7 +176,7 @@ export declare class PeopleModule extends BaseModule {
176
176
  * @returns True if person exists, false if not found
177
177
  * @throws Error if request times out or other error occurs (except 404)
178
178
  *
179
- * @example
179
+ * @gmail.com
180
180
  * ```typescript
181
181
  * const exists = await client.people.verifyPersonExists(cachedPersonId);
182
182
  * if (!exists) {
@@ -188,14 +188,21 @@ export declare class PeopleModule extends BaseModule {
188
188
  verifyPersonExists(personId: string, options?: {
189
189
  timeout?: number;
190
190
  }): Promise<boolean>;
191
+ /**
192
+ * Transform PersonCreateOptions (camelCase) to API format (snake_case)
193
+ * Also handles snake_case input directly (passes through)
194
+ */
195
+ private transformPersonData;
191
196
  /**
192
197
  * Create a new person
198
+ * Accepts both camelCase (PersonCreateOptions) and snake_case (PersonAttributes) fields
193
199
  */
194
- create(data: PersonCreateOptions): Promise<PersonResource>;
200
+ create(data: PersonCreateOptions | Partial<PersonAttributes>): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Person", PersonAttributes, import("../types").PersonRelationships>>;
195
201
  /**
196
202
  * Update a person
203
+ * Accepts both camelCase (PersonCreateOptions) and snake_case (PersonAttributes) fields
197
204
  */
198
- update(id: string, data: Partial<PersonCreateOptions>): Promise<PersonResource>;
205
+ update(id: string, data: Partial<PersonCreateOptions> | Partial<PersonAttributes>): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Person", PersonAttributes, import("../types").PersonRelationships>>;
199
206
  /**
200
207
  * Delete a person
201
208
  */
@@ -203,42 +210,46 @@ export declare class PeopleModule extends BaseModule {
203
210
  /**
204
211
  * Get a person's primary campus
205
212
  */
206
- getPrimaryCampus(personId: string): Promise<CampusResource | null>;
213
+ getPrimaryCampus(personId: string): Promise<CampusResource | import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Campus", import("../types").CampusAttributes, import("../types").CampusRelationships> | null>;
207
214
  /**
208
215
  * Set a person's primary campus
209
216
  */
210
- setPrimaryCampus(personId: string, campusId: string): Promise<PersonResource>;
217
+ setPrimaryCampus(personId: string, campusId: string): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Person", PersonAttributes, import("../types").PersonRelationships>>;
211
218
  /**
212
219
  * Remove a person's primary campus
213
220
  */
214
- removePrimaryCampus(personId: string): Promise<PersonResource>;
221
+ removePrimaryCampus(personId: string): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Person", PersonAttributes, import("../types").PersonRelationships>>;
215
222
  /**
216
223
  * Get a person's household
217
224
  */
218
- getHousehold(personId: string): Promise<HouseholdResource | null>;
225
+ getHousehold(personId: string): Promise<HouseholdResource | import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Household", import("../types").HouseholdAttributes, import("../types").HouseholdRelationships> | null>;
219
226
  /**
220
227
  * Set a person's household
228
+ * Uses the household_memberships endpoint to create a membership record
221
229
  */
222
- setHousehold(personId: string, householdId: string): Promise<PersonResource>;
230
+ setHousehold(personId: string, householdId: string): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Person", PersonAttributes, import("../types").PersonRelationships>>;
223
231
  /**
224
232
  * Remove a person from their household
233
+ * Uses the household_memberships endpoint to delete the membership record
225
234
  */
226
- removeFromHousehold(personId: string): Promise<PersonResource>;
235
+ removeFromHousehold(personId: string): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Person", PersonAttributes, import("../types").PersonRelationships>>;
227
236
  /**
228
237
  * Get all people in a specific household
238
+ * Note: This uses getList() internally, so it returns a single page. Use getAll() with where[household_id] for all pages.
229
239
  */
230
- getHouseholdMembers(householdId: string, options?: PeopleListOptions): Promise<{
231
- data: PersonResource[];
232
- meta?: any;
233
- links?: any;
240
+ getHouseholdMembers(householdId: string, options?: PersonPageOptions): Promise<{
241
+ data: import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Person", PersonAttributes, import("../types").PersonRelationships, Record<string, never>>[];
242
+ meta?: import("@rachelallyson/planning-center-base-ts").Meta;
243
+ links?: import("@rachelallyson/planning-center-base-ts").TopLevelLinks;
234
244
  }>;
235
245
  /**
236
246
  * Get people by campus
247
+ * Note: This uses getList() internally, so it returns a single page. Use getAll() with where[primary_campus_id] for all pages.
237
248
  */
238
- getByCampus(campusId: string, options?: PeopleListOptions): Promise<{
239
- data: PersonResource[];
240
- meta?: any;
241
- links?: any;
249
+ getByCampus(campusId: string, options?: PersonPageOptions): Promise<{
250
+ data: import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Person", PersonAttributes, import("../types").PersonRelationships, Record<string, never>>[];
251
+ meta?: import("@rachelallyson/planning-center-base-ts").Meta;
252
+ links?: import("@rachelallyson/planning-center-base-ts").TopLevelLinks;
242
253
  }>;
243
254
  /**
244
255
  * Get a person's workflow cards
@@ -248,9 +259,9 @@ export declare class PeopleModule extends BaseModule {
248
259
  perPage?: number;
249
260
  page?: number;
250
261
  }): Promise<{
251
- data: any[];
252
- meta?: any;
253
- links?: any;
262
+ data: import("@rachelallyson/planning-center-base-ts").FlattenedResource<"WorkflowCard", import("../types").WorkflowCardAttributes, import("../types").WorkflowCardRelationships, Record<string, never>>[];
263
+ meta?: import("@rachelallyson/planning-center-base-ts").Meta;
264
+ links?: import("@rachelallyson/planning-center-base-ts").TopLevelLinks;
254
265
  }>;
255
266
  /**
256
267
  * Get a person's notes
@@ -260,9 +271,9 @@ export declare class PeopleModule extends BaseModule {
260
271
  perPage?: number;
261
272
  page?: number;
262
273
  }): Promise<{
263
- data: any[];
264
- meta?: any;
265
- links?: any;
274
+ data: import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Note", import("../types").NoteAttributes, import("../types").NoteRelationships, Record<string, never>>[];
275
+ meta?: import("@rachelallyson/planning-center-base-ts").Meta;
276
+ links?: import("@rachelallyson/planning-center-base-ts").TopLevelLinks;
266
277
  }>;
267
278
  /**
268
279
  * Get a person's field data
@@ -272,9 +283,9 @@ export declare class PeopleModule extends BaseModule {
272
283
  perPage?: number;
273
284
  page?: number;
274
285
  }): Promise<{
275
- data: any[];
276
- meta?: any;
277
- links?: any;
286
+ data: import("@rachelallyson/planning-center-base-ts").FlattenedResource<"FieldDatum", import("../types").FieldDatumAttributes, import("../types").FieldDatumRelationships, Record<string, never>>[];
287
+ meta?: import("@rachelallyson/planning-center-base-ts").Meta;
288
+ links?: import("@rachelallyson/planning-center-base-ts").TopLevelLinks;
278
289
  }>;
279
290
  /**
280
291
  * Get a person's social profiles
@@ -284,9 +295,9 @@ export declare class PeopleModule extends BaseModule {
284
295
  perPage?: number;
285
296
  page?: number;
286
297
  }): Promise<{
287
- data: any[];
288
- meta?: any;
289
- links?: any;
298
+ data: import("@rachelallyson/planning-center-base-ts").FlattenedResource<"SocialProfile", SocialProfileAttributes, import("../types").SocialProfileRelationships, Record<string, never>>[];
299
+ meta?: import("@rachelallyson/planning-center-base-ts").Meta;
300
+ links?: import("@rachelallyson/planning-center-base-ts").TopLevelLinks;
290
301
  }>;
291
302
  /**
292
303
  * Find or create a person with smart matching
@@ -299,13 +310,13 @@ export declare class PeopleModule extends BaseModule {
299
310
  * to a person's profile when a match is found. The contacts are added as non-primary
300
311
  * to preserve existing primary contacts.
301
312
  *
302
- * @example
313
+ * @gmail.com
303
314
  * ```typescript
304
315
  * // Basic find or create
305
316
  * const person = await client.people.findOrCreate({
306
317
  * firstName: 'John',
307
318
  * lastName: 'Doe',
308
- * email: 'john@example.com',
319
+ * email: 'john@gmail.com',
309
320
  * phone: '+1234567890'
310
321
  * });
311
322
  *
@@ -313,7 +324,7 @@ export declare class PeopleModule extends BaseModule {
313
324
  * const person = await client.people.findOrCreate({
314
325
  * firstName: 'Jane',
315
326
  * lastName: 'Smith',
316
- * email: 'jane@example.com',
327
+ * email: 'jane@gmail.com',
317
328
  * phone: '+1987654321',
318
329
  * addMissingContactInfo: true // Will add phone if person only has email
319
330
  * });
@@ -321,7 +332,7 @@ export declare class PeopleModule extends BaseModule {
321
332
  *
322
333
  * @returns The found or newly created person
323
334
  */
324
- findOrCreate(options: PersonMatchOptions): Promise<PersonResource>;
335
+ findOrCreate(options: PersonMatchOptions): Promise<FlattenedPersonResource>;
325
336
  /**
326
337
  * Search people by multiple criteria
327
338
  */
@@ -331,27 +342,28 @@ export declare class PeopleModule extends BaseModule {
331
342
  phone?: string;
332
343
  status?: string;
333
344
  perPage?: number;
345
+ page?: number;
334
346
  }): Promise<{
335
- data: PersonResource[];
336
- meta?: any;
337
- links?: any;
347
+ data: FlattenedPersonResource[];
348
+ meta?: Meta;
349
+ links?: TopLevelLinks;
338
350
  }>;
339
351
  /**
340
352
  * Get person's emails
341
353
  */
342
354
  getEmails(personId: string): Promise<{
343
- data: EmailResource[];
344
- meta?: any;
345
- links?: any;
355
+ data: import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Email", EmailAttributes, import("../types").EmailRelationships, Record<string, never>>[];
356
+ meta?: import("@rachelallyson/planning-center-base-ts").Meta;
357
+ links?: import("@rachelallyson/planning-center-base-ts").TopLevelLinks;
346
358
  }>;
347
359
  /**
348
360
  * Add an email to a person
349
361
  */
350
- addEmail(personId: string, data: EmailAttributes): Promise<EmailResource>;
362
+ addEmail(personId: string, data: EmailAttributes): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Email", EmailAttributes, import("../types").EmailRelationships>>;
351
363
  /**
352
364
  * Update a person's email
353
365
  */
354
- updateEmail(personId: string, emailId: string, data: Partial<EmailAttributes>): Promise<EmailResource>;
366
+ updateEmail(personId: string, emailId: string, data: Partial<EmailAttributes>): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Email", EmailAttributes, import("../types").EmailRelationships>>;
355
367
  /**
356
368
  * Delete a person's email
357
369
  */
@@ -360,18 +372,18 @@ export declare class PeopleModule extends BaseModule {
360
372
  * Get person's phone numbers
361
373
  */
362
374
  getPhoneNumbers(personId: string): Promise<{
363
- data: PhoneNumberResource[];
364
- meta?: any;
365
- links?: any;
375
+ data: import("@rachelallyson/planning-center-base-ts").FlattenedResource<"PhoneNumber", PhoneNumberAttributes, import("../types").PhoneNumberRelationships, Record<string, never>>[];
376
+ meta?: import("@rachelallyson/planning-center-base-ts").Meta;
377
+ links?: import("@rachelallyson/planning-center-base-ts").TopLevelLinks;
366
378
  }>;
367
379
  /**
368
380
  * Add a phone number to a person
369
381
  */
370
- addPhoneNumber(personId: string, data: PhoneNumberAttributes): Promise<PhoneNumberResource>;
382
+ addPhoneNumber(personId: string, data: PhoneNumberAttributes): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"PhoneNumber", PhoneNumberAttributes, import("../types").PhoneNumberRelationships>>;
371
383
  /**
372
384
  * Update a person's phone number
373
385
  */
374
- updatePhoneNumber(personId: string, phoneId: string, data: Partial<PhoneNumberAttributes>): Promise<PhoneNumberResource>;
386
+ updatePhoneNumber(personId: string, phoneId: string, data: Partial<PhoneNumberAttributes>): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"PhoneNumber", PhoneNumberAttributes, import("../types").PhoneNumberRelationships>>;
375
387
  /**
376
388
  * Delete a person's phone number
377
389
  */
@@ -380,18 +392,18 @@ export declare class PeopleModule extends BaseModule {
380
392
  * Get person's addresses
381
393
  */
382
394
  getAddresses(personId: string): Promise<{
383
- data: AddressResource[];
384
- meta?: any;
385
- links?: any;
395
+ data: import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Address", AddressAttributes, import("../types").AddressRelationships, Record<string, never>>[];
396
+ meta?: import("@rachelallyson/planning-center-base-ts").Meta;
397
+ links?: import("@rachelallyson/planning-center-base-ts").TopLevelLinks;
386
398
  }>;
387
399
  /**
388
400
  * Add an address to a person
389
401
  */
390
- addAddress(personId: string, data: AddressAttributes): Promise<AddressResource>;
402
+ addAddress(personId: string, data: AddressAttributes): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Address", AddressAttributes, import("../types").AddressRelationships>>;
391
403
  /**
392
404
  * Update a person's address
393
405
  */
394
- updateAddress(personId: string, addressId: string, data: Partial<AddressAttributes>): Promise<AddressResource>;
406
+ updateAddress(personId: string, addressId: string, data: Partial<AddressAttributes>): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"Address", AddressAttributes, import("../types").AddressRelationships>>;
395
407
  /**
396
408
  * Delete a person's address
397
409
  */
@@ -399,11 +411,11 @@ export declare class PeopleModule extends BaseModule {
399
411
  /**
400
412
  * Add a social profile to a person
401
413
  */
402
- addSocialProfile(personId: string, data: SocialProfileAttributes): Promise<SocialProfileResource>;
414
+ addSocialProfile(personId: string, data: SocialProfileAttributes): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"SocialProfile", SocialProfileAttributes, import("../types").SocialProfileRelationships>>;
403
415
  /**
404
416
  * Update a person's social profile
405
417
  */
406
- updateSocialProfile(personId: string, profileId: string, data: Partial<SocialProfileAttributes>): Promise<SocialProfileResource>;
418
+ updateSocialProfile(personId: string, profileId: string, data: Partial<SocialProfileAttributes>): Promise<import("@rachelallyson/planning-center-base-ts").FlattenedResource<"SocialProfile", SocialProfileAttributes, import("../types").SocialProfileRelationships>>;
407
419
  /**
408
420
  * Delete a person's social profile
409
421
  */