@rachelallyson/planning-center-people-ts 2.6.1 → 2.6.3

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 CHANGED
@@ -5,6 +5,122 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.6.3] - 2025-01-10
9
+
10
+ ### 🏢 **CAMPUS ATTRIBUTES ENHANCEMENT**
11
+
12
+ This patch release adds comprehensive campus attributes for better campus management and configuration support.
13
+
14
+ ### Added
15
+
16
+ - **📝 Enhanced CampusAttributes**: Added comprehensive campus configuration attributes
17
+ - **Time Settings**: `twenty_four_hour_time?: boolean` - 24-hour time format preference
18
+ - **Date Settings**: `date_format?: number` - Date format configuration
19
+ - **Features**: `church_center_enabled?: boolean` - Church Center integration status
20
+ - **Contact Info**: `phone_number?: string`, `website?: string` - Campus contact details
21
+ - **Location**: `country?: string` - Country information
22
+ - **Timestamps**: `created_at?: string`, `updated_at?: string` - Audit trail
23
+
24
+ ### Enhanced Campus Management
25
+
26
+ ```typescript
27
+ // Now you get full type safety for campus attributes
28
+ const campus: CampusResource = {
29
+ type: 'Campus',
30
+ id: 'campus-123',
31
+ attributes: {
32
+ name: 'Main Campus',
33
+ street: '123 Main St',
34
+ city: 'Anytown',
35
+ state: 'CA',
36
+ zip: '12345',
37
+ country: 'US',
38
+ phone_number: '555-1234',
39
+ website: 'https://example.com',
40
+ twenty_four_hour_time: true, // ✅ New attribute
41
+ date_format: 1, // ✅ New attribute
42
+ church_center_enabled: true, // ✅ New attribute
43
+ created_at: '2025-01-10T00:00:00Z',
44
+ updated_at: '2025-01-10T00:00:00Z'
45
+ }
46
+ };
47
+
48
+ // Campus configuration management
49
+ const campusConfig = await client.people.getCampusById('campus-123');
50
+ if (campusConfig.attributes.church_center_enabled) {
51
+ console.log('Church Center integration is active');
52
+ }
53
+ ```
54
+
55
+ ### Benefits
56
+
57
+ - **🏢 Complete Campus Data**: Access to all campus configuration options
58
+ - **⚙️ Configuration Management**: Better support for campus settings
59
+ - **🌍 International Support**: Country and date format configuration
60
+ - **📱 Church Center Integration**: Track integration status
61
+ - **🕐 Time Format Support**: 24-hour time format configuration
62
+
63
+ ### Migration
64
+
65
+ No breaking changes - this is a type enhancement release:
66
+
67
+ ```typescript
68
+ // Existing code continues to work
69
+ const campuses = await client.people.getCampuses();
70
+
71
+ // New attributes are available but optional
72
+ campuses.data.forEach(campus => {
73
+ console.log('Campus:', campus.attributes.name);
74
+ console.log('Church Center:', campus.attributes.church_center_enabled);
75
+ console.log('Time Format:', campus.attributes.twenty_four_hour_time);
76
+ });
77
+ ```
78
+
79
+ ## [2.6.2] - 2025-01-10
80
+
81
+ ### 🎯 **TYPE DEFINITION ENHANCEMENT**
82
+
83
+ This patch release adds enhanced type definitions for better TypeScript support and developer experience.
84
+
85
+ ### Added
86
+
87
+ - **📝 FieldDataType Type**: Added comprehensive type definition for field data types
88
+ - **Types**: `'boolean' | 'checkboxes' | 'date' | 'file' | 'number' | 'select' | 'string' | 'text'`
89
+ - **Usage**: Provides type safety for field definition operations
90
+ - **Benefits**: Better IntelliSense and compile-time validation
91
+
92
+ ### Enhanced Type Safety
93
+
94
+ ```typescript
95
+ // Now you get full type safety for field data types
96
+ const fieldDefinition: FieldDefinitionAttributes = {
97
+ data_type: 'select', // ✅ TypeScript knows this is valid
98
+ // ... other properties
99
+ };
100
+
101
+ // Invalid types will be caught at compile time
102
+ const invalidField = {
103
+ data_type: 'invalid', // ❌ TypeScript error
104
+ };
105
+ ```
106
+
107
+ ### Migration
108
+
109
+ No breaking changes - this is a type enhancement release:
110
+
111
+ ```typescript
112
+ // Existing code continues to work
113
+ const fields = await client.people.getFieldDefinitions();
114
+
115
+ // New type safety benefits
116
+ fields.data.forEach(field => {
117
+ if (field.attributes.data_type === 'select') {
118
+ // TypeScript knows this is a select field
119
+ console.log('Select field:', field.attributes.name);
120
+ }
121
+ });
122
+ ```
123
+
8
124
  ## [2.6.1] - 2025-01-10
9
125
 
10
126
  ### 🐛 **CRITICAL BUG FIXES**
@@ -1,6 +1,6 @@
1
1
  import { PcoClientState } from '../core';
2
2
  import type { ErrorContext } from '../error-handling';
3
- import { FieldDataList, FieldDataSingle, FieldDefinitionsList, FieldDefinitionSingle, FieldOptionAttributes, FieldOptionSingle, FieldOptionsList, TabsList } from '../types';
3
+ import { FieldDataList, FieldDataSingle, FieldDataType, FieldDefinitionsList, FieldDefinitionSingle, FieldOptionAttributes, FieldOptionSingle, FieldOptionsList, TabsList } from '../types';
4
4
  /**
5
5
  * Delete field data for a person
6
6
  */
@@ -46,7 +46,7 @@ export declare function getTabs(client: PcoClientState, params?: {
46
46
  */
47
47
  export declare function createFieldDefinition(client: PcoClientState, tabId: string, data: {
48
48
  name: string;
49
- data_type: string;
49
+ data_type: FieldDataType;
50
50
  sequence?: number;
51
51
  slug?: string;
52
52
  config?: string | Record<string, any>;
@@ -128,9 +128,10 @@ export interface SocialProfileResource extends ResourceObject<'SocialProfile', S
128
128
  }
129
129
  export type SocialProfilesList = Paginated<SocialProfileResource>;
130
130
  export type SocialProfileSingle = Response<SocialProfileResource>;
131
+ export type FieldDataType = 'boolean' | 'checkboxes' | 'date' | 'file' | 'number' | 'select' | 'string' | 'text';
131
132
  export interface FieldDefinitionAttributes extends Attributes {
132
133
  config: string | Record<string, any> | null;
133
- data_type: string;
134
+ data_type: FieldDataType;
134
135
  deleted_at: string | null | false;
135
136
  name: string;
136
137
  sequence: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rachelallyson/planning-center-people-ts",
3
- "version": "2.6.1",
3
+ "version": "2.6.3",
4
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",