@back23/promptly-sdk 2.3.2 → 2.4.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/dist/index.d.mts CHANGED
@@ -94,16 +94,15 @@ interface Member {
94
94
  id: number;
95
95
  name: string;
96
96
  email: string;
97
- phone?: string;
98
- avatar?: string;
99
- is_active: boolean;
97
+ phone: string | null;
98
+ avatar: string | null;
99
+ provider: string | null;
100
+ is_social_login: boolean;
100
101
  created_at: string;
101
- updated_at: string;
102
102
  }
103
103
  interface AuthResponse {
104
- member: Member;
105
104
  token: string;
106
- token_type: string;
105
+ user: Member;
107
106
  }
108
107
  interface ForgotPasswordData {
109
108
  email: string;
@@ -137,49 +136,44 @@ interface UpdateProfileData {
137
136
 
138
137
  interface Board {
139
138
  id: number;
140
- slug: string;
141
139
  name: string;
142
- description?: string;
143
- settings: BoardSettings;
144
- posts_count?: number;
140
+ slug: string;
141
+ description: string | null;
142
+ is_active: boolean;
145
143
  created_at: string;
146
- updated_at: string;
147
- }
148
- interface BoardSettings {
149
- allow_comments: boolean;
150
- allow_attachments: boolean;
151
- require_login_to_view: boolean;
152
- require_login_to_write: boolean;
153
- posts_per_page: number;
154
144
  }
155
145
  interface BoardPost {
156
146
  id: number;
157
- board_id: number;
158
- board?: Board;
159
- member_id?: number;
160
- member?: Member;
161
147
  title: string;
162
- content: string;
163
- excerpt?: string;
148
+ excerpt: string;
164
149
  author: string;
165
- is_notice: boolean;
166
- is_private: boolean;
167
150
  views: number;
168
- comment_count: number;
169
- attachments?: Media[];
151
+ is_notice: boolean;
170
152
  created_at: string;
171
- updated_at: string;
153
+ content?: string;
154
+ updated_at?: string;
155
+ board?: {
156
+ id: number;
157
+ name: string;
158
+ slug: string;
159
+ };
172
160
  }
173
161
  interface BoardComment {
174
162
  id: number;
175
- post_id: number;
176
- member_id?: number;
177
- member?: Member;
178
- parent_id?: number;
163
+ parent_id: number | null;
164
+ depth: number;
165
+ author: {
166
+ name: string;
167
+ is_member: boolean;
168
+ };
179
169
  content: string;
180
- replies?: BoardComment[];
170
+ is_secret: boolean;
171
+ is_pinned: boolean;
172
+ likes: number;
173
+ is_mine: boolean;
181
174
  created_at: string;
182
175
  updated_at: string;
176
+ replies: BoardComment[];
183
177
  }
184
178
  interface BoardListParams extends ListParams {
185
179
  }
@@ -216,21 +210,15 @@ interface UpdateCommentData {
216
210
 
217
211
  interface BlogPost {
218
212
  id: number;
219
- slug: string;
220
213
  title: string;
221
- content: string;
222
- excerpt?: string;
223
- featured_image?: string;
224
- category?: string;
225
- tags?: string[];
226
- author_name?: string;
227
- is_published: boolean;
228
- published_at?: string;
229
- view_count: number;
230
- seo_title?: string;
231
- seo_description?: string;
214
+ slug: string;
215
+ excerpt: string;
216
+ featured_image: string | null;
217
+ author: string;
218
+ status: string;
232
219
  created_at: string;
233
- updated_at: string;
220
+ content?: string;
221
+ updated_at?: string;
234
222
  }
235
223
  interface BlogListParams extends ListParams {
236
224
  category?: string;
@@ -238,23 +226,24 @@ interface BlogListParams extends ListParams {
238
226
  search?: string;
239
227
  }
240
228
 
241
- type CommentType = 'board_post' | 'blog_post' | 'page';
242
229
  interface Comment {
243
230
  id: number;
244
- type: CommentType;
245
- author_name: string;
246
- author_avatar: string | null;
231
+ parent_id: number | null;
232
+ depth: number;
233
+ author: {
234
+ name: string;
235
+ is_member: boolean;
236
+ };
247
237
  content: string;
248
- is_approved: boolean;
249
- is_pinned: boolean;
250
238
  is_secret: boolean;
239
+ is_pinned: boolean;
251
240
  likes: number;
252
- depth: number;
241
+ is_mine: boolean;
253
242
  created_at: string;
243
+ updated_at: string;
254
244
  replies: Comment[];
255
245
  }
256
- interface CommentListResponse extends ListResponse<Comment> {
257
- }
246
+ type CommentListResponse = ListResponse<Comment>;
258
247
  interface CommentListParams extends ListParams {
259
248
  include_unapproved?: boolean;
260
249
  }
@@ -1604,4 +1593,4 @@ declare class Promptly {
1604
1593
  getApiKey(): string | null;
1605
1594
  }
1606
1595
 
1607
- export { type AddToCartData, type ApiError, type ApiResponse, type ApplyCouponData, type AuthResponse, type AvailableDatesParams, type AvailableSlotsParams, type BlogListParams, type BlogPost, type Board, type BoardComment, type BoardListParams, type BoardPost, type BoardSettings, type Cart, type CartItem, type Comment, type CommentCreateData, type CommentDeleteData, type CommentListParams, type CommentListResponse, type CommentType, type CommentUpdateData, type Coupon, type CouponType, type CouponValidation, type CreateCommentData, type CreateEntityData, type CreateEntityRecordData, type CreateOrderData, type CreatePostData, type CreateReservationData, type CreateReservationResult, type CustomEntity, type EntityField, type EntityListParams, type EntityRecord, type EntitySchema, type ForgotPasswordData, type Form, type FormField, type FormFieldOption, type FormFieldType, type FormFieldValidation, type FormListParams, type FormSettings, type FormSubmission, type ListParams, type ListResponse, type LoginCredentials, type Media, type Member, type Order, type OrderItem, type OrderListParams, type OrderStatus, type PaginatedResponse, type PaginationMeta, type Payment, type PaymentCancelData, type PaymentConfirmData, type PaymentMethod, type PaymentReadyData, type PaymentStatus, type PostListParams, type Product, type ProductCategory, type ProductListParams, type ProductOption, type ProductOptionValue, type ProductStatus, type ProductVariant, Promptly, type PromptlyConfig, PromptlyError, type RegisterData, type Reservation, type ReservationListParams, type ReservationService, type ReservationSettings, type ReservationSlot, type ReservationStaff, type ReservationStaffSummary, type ResetPasswordData, type SocialAuthUrl, type SocialProvider, type SubmissionListParams, type SubmitFormData, type UpdateCartItemData, type UpdateCommentData, type UpdateEntityData, type UpdateEntityRecordData, type UpdatePostData, type UpdateProfileData, Promptly as default };
1596
+ export { type AddToCartData, type ApiError, type ApiResponse, type ApplyCouponData, type AuthResponse, type AvailableDatesParams, type AvailableSlotsParams, type BlogListParams, type BlogPost, type Board, type BoardComment, type BoardListParams, type BoardPost, type Cart, type CartItem, type Comment, type CommentCreateData, type CommentDeleteData, type CommentListParams, type CommentListResponse, type CommentUpdateData, type Coupon, type CouponType, type CouponValidation, type CreateCommentData, type CreateEntityData, type CreateEntityRecordData, type CreateOrderData, type CreatePostData, type CreateReservationData, type CreateReservationResult, type CustomEntity, type EntityField, type EntityListParams, type EntityRecord, type EntitySchema, type ForgotPasswordData, type Form, type FormField, type FormFieldOption, type FormFieldType, type FormFieldValidation, type FormListParams, type FormSettings, type FormSubmission, type ListParams, type ListResponse, type LoginCredentials, type Media, type Member, type Order, type OrderItem, type OrderListParams, type OrderStatus, type PaginatedResponse, type PaginationMeta, type Payment, type PaymentCancelData, type PaymentConfirmData, type PaymentMethod, type PaymentReadyData, type PaymentStatus, type PostListParams, type Product, type ProductCategory, type ProductListParams, type ProductOption, type ProductOptionValue, type ProductStatus, type ProductVariant, Promptly, type PromptlyConfig, PromptlyError, type RegisterData, type Reservation, type ReservationListParams, type ReservationService, type ReservationSettings, type ReservationSlot, type ReservationStaff, type ReservationStaffSummary, type ResetPasswordData, type SocialAuthUrl, type SocialProvider, type SubmissionListParams, type SubmitFormData, type UpdateCartItemData, type UpdateCommentData, type UpdateEntityData, type UpdateEntityRecordData, type UpdatePostData, type UpdateProfileData, Promptly as default };
package/dist/index.d.ts CHANGED
@@ -94,16 +94,15 @@ interface Member {
94
94
  id: number;
95
95
  name: string;
96
96
  email: string;
97
- phone?: string;
98
- avatar?: string;
99
- is_active: boolean;
97
+ phone: string | null;
98
+ avatar: string | null;
99
+ provider: string | null;
100
+ is_social_login: boolean;
100
101
  created_at: string;
101
- updated_at: string;
102
102
  }
103
103
  interface AuthResponse {
104
- member: Member;
105
104
  token: string;
106
- token_type: string;
105
+ user: Member;
107
106
  }
108
107
  interface ForgotPasswordData {
109
108
  email: string;
@@ -137,49 +136,44 @@ interface UpdateProfileData {
137
136
 
138
137
  interface Board {
139
138
  id: number;
140
- slug: string;
141
139
  name: string;
142
- description?: string;
143
- settings: BoardSettings;
144
- posts_count?: number;
140
+ slug: string;
141
+ description: string | null;
142
+ is_active: boolean;
145
143
  created_at: string;
146
- updated_at: string;
147
- }
148
- interface BoardSettings {
149
- allow_comments: boolean;
150
- allow_attachments: boolean;
151
- require_login_to_view: boolean;
152
- require_login_to_write: boolean;
153
- posts_per_page: number;
154
144
  }
155
145
  interface BoardPost {
156
146
  id: number;
157
- board_id: number;
158
- board?: Board;
159
- member_id?: number;
160
- member?: Member;
161
147
  title: string;
162
- content: string;
163
- excerpt?: string;
148
+ excerpt: string;
164
149
  author: string;
165
- is_notice: boolean;
166
- is_private: boolean;
167
150
  views: number;
168
- comment_count: number;
169
- attachments?: Media[];
151
+ is_notice: boolean;
170
152
  created_at: string;
171
- updated_at: string;
153
+ content?: string;
154
+ updated_at?: string;
155
+ board?: {
156
+ id: number;
157
+ name: string;
158
+ slug: string;
159
+ };
172
160
  }
173
161
  interface BoardComment {
174
162
  id: number;
175
- post_id: number;
176
- member_id?: number;
177
- member?: Member;
178
- parent_id?: number;
163
+ parent_id: number | null;
164
+ depth: number;
165
+ author: {
166
+ name: string;
167
+ is_member: boolean;
168
+ };
179
169
  content: string;
180
- replies?: BoardComment[];
170
+ is_secret: boolean;
171
+ is_pinned: boolean;
172
+ likes: number;
173
+ is_mine: boolean;
181
174
  created_at: string;
182
175
  updated_at: string;
176
+ replies: BoardComment[];
183
177
  }
184
178
  interface BoardListParams extends ListParams {
185
179
  }
@@ -216,21 +210,15 @@ interface UpdateCommentData {
216
210
 
217
211
  interface BlogPost {
218
212
  id: number;
219
- slug: string;
220
213
  title: string;
221
- content: string;
222
- excerpt?: string;
223
- featured_image?: string;
224
- category?: string;
225
- tags?: string[];
226
- author_name?: string;
227
- is_published: boolean;
228
- published_at?: string;
229
- view_count: number;
230
- seo_title?: string;
231
- seo_description?: string;
214
+ slug: string;
215
+ excerpt: string;
216
+ featured_image: string | null;
217
+ author: string;
218
+ status: string;
232
219
  created_at: string;
233
- updated_at: string;
220
+ content?: string;
221
+ updated_at?: string;
234
222
  }
235
223
  interface BlogListParams extends ListParams {
236
224
  category?: string;
@@ -238,23 +226,24 @@ interface BlogListParams extends ListParams {
238
226
  search?: string;
239
227
  }
240
228
 
241
- type CommentType = 'board_post' | 'blog_post' | 'page';
242
229
  interface Comment {
243
230
  id: number;
244
- type: CommentType;
245
- author_name: string;
246
- author_avatar: string | null;
231
+ parent_id: number | null;
232
+ depth: number;
233
+ author: {
234
+ name: string;
235
+ is_member: boolean;
236
+ };
247
237
  content: string;
248
- is_approved: boolean;
249
- is_pinned: boolean;
250
238
  is_secret: boolean;
239
+ is_pinned: boolean;
251
240
  likes: number;
252
- depth: number;
241
+ is_mine: boolean;
253
242
  created_at: string;
243
+ updated_at: string;
254
244
  replies: Comment[];
255
245
  }
256
- interface CommentListResponse extends ListResponse<Comment> {
257
- }
246
+ type CommentListResponse = ListResponse<Comment>;
258
247
  interface CommentListParams extends ListParams {
259
248
  include_unapproved?: boolean;
260
249
  }
@@ -1604,4 +1593,4 @@ declare class Promptly {
1604
1593
  getApiKey(): string | null;
1605
1594
  }
1606
1595
 
1607
- export { type AddToCartData, type ApiError, type ApiResponse, type ApplyCouponData, type AuthResponse, type AvailableDatesParams, type AvailableSlotsParams, type BlogListParams, type BlogPost, type Board, type BoardComment, type BoardListParams, type BoardPost, type BoardSettings, type Cart, type CartItem, type Comment, type CommentCreateData, type CommentDeleteData, type CommentListParams, type CommentListResponse, type CommentType, type CommentUpdateData, type Coupon, type CouponType, type CouponValidation, type CreateCommentData, type CreateEntityData, type CreateEntityRecordData, type CreateOrderData, type CreatePostData, type CreateReservationData, type CreateReservationResult, type CustomEntity, type EntityField, type EntityListParams, type EntityRecord, type EntitySchema, type ForgotPasswordData, type Form, type FormField, type FormFieldOption, type FormFieldType, type FormFieldValidation, type FormListParams, type FormSettings, type FormSubmission, type ListParams, type ListResponse, type LoginCredentials, type Media, type Member, type Order, type OrderItem, type OrderListParams, type OrderStatus, type PaginatedResponse, type PaginationMeta, type Payment, type PaymentCancelData, type PaymentConfirmData, type PaymentMethod, type PaymentReadyData, type PaymentStatus, type PostListParams, type Product, type ProductCategory, type ProductListParams, type ProductOption, type ProductOptionValue, type ProductStatus, type ProductVariant, Promptly, type PromptlyConfig, PromptlyError, type RegisterData, type Reservation, type ReservationListParams, type ReservationService, type ReservationSettings, type ReservationSlot, type ReservationStaff, type ReservationStaffSummary, type ResetPasswordData, type SocialAuthUrl, type SocialProvider, type SubmissionListParams, type SubmitFormData, type UpdateCartItemData, type UpdateCommentData, type UpdateEntityData, type UpdateEntityRecordData, type UpdatePostData, type UpdateProfileData, Promptly as default };
1596
+ export { type AddToCartData, type ApiError, type ApiResponse, type ApplyCouponData, type AuthResponse, type AvailableDatesParams, type AvailableSlotsParams, type BlogListParams, type BlogPost, type Board, type BoardComment, type BoardListParams, type BoardPost, type Cart, type CartItem, type Comment, type CommentCreateData, type CommentDeleteData, type CommentListParams, type CommentListResponse, type CommentUpdateData, type Coupon, type CouponType, type CouponValidation, type CreateCommentData, type CreateEntityData, type CreateEntityRecordData, type CreateOrderData, type CreatePostData, type CreateReservationData, type CreateReservationResult, type CustomEntity, type EntityField, type EntityListParams, type EntityRecord, type EntitySchema, type ForgotPasswordData, type Form, type FormField, type FormFieldOption, type FormFieldType, type FormFieldValidation, type FormListParams, type FormSettings, type FormSubmission, type ListParams, type ListResponse, type LoginCredentials, type Media, type Member, type Order, type OrderItem, type OrderListParams, type OrderStatus, type PaginatedResponse, type PaginationMeta, type Payment, type PaymentCancelData, type PaymentConfirmData, type PaymentMethod, type PaymentReadyData, type PaymentStatus, type PostListParams, type Product, type ProductCategory, type ProductListParams, type ProductOption, type ProductOptionValue, type ProductStatus, type ProductVariant, Promptly, type PromptlyConfig, PromptlyError, type RegisterData, type Reservation, type ReservationListParams, type ReservationService, type ReservationSettings, type ReservationSlot, type ReservationStaff, type ReservationStaffSummary, type ResetPasswordData, type SocialAuthUrl, type SocialProvider, type SubmissionListParams, type SubmitFormData, type UpdateCartItemData, type UpdateCommentData, type UpdateEntityData, type UpdateEntityRecordData, type UpdatePostData, type UpdateProfileData, Promptly as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@back23/promptly-sdk",
3
- "version": "2.3.2",
3
+ "version": "2.4.0",
4
4
  "description": "Promptly AI CMS SDK for JavaScript/TypeScript",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",