@back23/promptly-sdk 2.3.1 → 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,48 +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;
149
+ author: string;
150
+ views: number;
164
151
  is_notice: boolean;
165
- is_private: boolean;
166
- view_count: number;
167
- comment_count: number;
168
- attachments?: Media[];
169
152
  created_at: string;
170
- updated_at: string;
153
+ content?: string;
154
+ updated_at?: string;
155
+ board?: {
156
+ id: number;
157
+ name: string;
158
+ slug: string;
159
+ };
171
160
  }
172
161
  interface BoardComment {
173
162
  id: number;
174
- post_id: number;
175
- member_id?: number;
176
- member?: Member;
177
- parent_id?: number;
163
+ parent_id: number | null;
164
+ depth: number;
165
+ author: {
166
+ name: string;
167
+ is_member: boolean;
168
+ };
178
169
  content: string;
179
- replies?: BoardComment[];
170
+ is_secret: boolean;
171
+ is_pinned: boolean;
172
+ likes: number;
173
+ is_mine: boolean;
180
174
  created_at: string;
181
175
  updated_at: string;
176
+ replies: BoardComment[];
182
177
  }
183
178
  interface BoardListParams extends ListParams {
184
179
  }
@@ -215,21 +210,15 @@ interface UpdateCommentData {
215
210
 
216
211
  interface BlogPost {
217
212
  id: number;
218
- slug: string;
219
213
  title: string;
220
- content: string;
221
- excerpt?: string;
222
- featured_image?: string;
223
- category?: string;
224
- tags?: string[];
225
- author_name?: string;
226
- is_published: boolean;
227
- published_at?: string;
228
- view_count: number;
229
- seo_title?: string;
230
- seo_description?: string;
214
+ slug: string;
215
+ excerpt: string;
216
+ featured_image: string | null;
217
+ author: string;
218
+ status: string;
231
219
  created_at: string;
232
- updated_at: string;
220
+ content?: string;
221
+ updated_at?: string;
233
222
  }
234
223
  interface BlogListParams extends ListParams {
235
224
  category?: string;
@@ -237,23 +226,24 @@ interface BlogListParams extends ListParams {
237
226
  search?: string;
238
227
  }
239
228
 
240
- type CommentType = 'board_post' | 'blog_post' | 'page';
241
229
  interface Comment {
242
230
  id: number;
243
- type: CommentType;
244
- author_name: string;
245
- author_avatar: string | null;
231
+ parent_id: number | null;
232
+ depth: number;
233
+ author: {
234
+ name: string;
235
+ is_member: boolean;
236
+ };
246
237
  content: string;
247
- is_approved: boolean;
248
- is_pinned: boolean;
249
238
  is_secret: boolean;
239
+ is_pinned: boolean;
250
240
  likes: number;
251
- depth: number;
241
+ is_mine: boolean;
252
242
  created_at: string;
243
+ updated_at: string;
253
244
  replies: Comment[];
254
245
  }
255
- interface CommentListResponse extends ListResponse<Comment> {
256
- }
246
+ type CommentListResponse = ListResponse<Comment>;
257
247
  interface CommentListParams extends ListParams {
258
248
  include_unapproved?: boolean;
259
249
  }
@@ -1603,4 +1593,4 @@ declare class Promptly {
1603
1593
  getApiKey(): string | null;
1604
1594
  }
1605
1595
 
1606
- 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,48 +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;
149
+ author: string;
150
+ views: number;
164
151
  is_notice: boolean;
165
- is_private: boolean;
166
- view_count: number;
167
- comment_count: number;
168
- attachments?: Media[];
169
152
  created_at: string;
170
- updated_at: string;
153
+ content?: string;
154
+ updated_at?: string;
155
+ board?: {
156
+ id: number;
157
+ name: string;
158
+ slug: string;
159
+ };
171
160
  }
172
161
  interface BoardComment {
173
162
  id: number;
174
- post_id: number;
175
- member_id?: number;
176
- member?: Member;
177
- parent_id?: number;
163
+ parent_id: number | null;
164
+ depth: number;
165
+ author: {
166
+ name: string;
167
+ is_member: boolean;
168
+ };
178
169
  content: string;
179
- replies?: BoardComment[];
170
+ is_secret: boolean;
171
+ is_pinned: boolean;
172
+ likes: number;
173
+ is_mine: boolean;
180
174
  created_at: string;
181
175
  updated_at: string;
176
+ replies: BoardComment[];
182
177
  }
183
178
  interface BoardListParams extends ListParams {
184
179
  }
@@ -215,21 +210,15 @@ interface UpdateCommentData {
215
210
 
216
211
  interface BlogPost {
217
212
  id: number;
218
- slug: string;
219
213
  title: string;
220
- content: string;
221
- excerpt?: string;
222
- featured_image?: string;
223
- category?: string;
224
- tags?: string[];
225
- author_name?: string;
226
- is_published: boolean;
227
- published_at?: string;
228
- view_count: number;
229
- seo_title?: string;
230
- seo_description?: string;
214
+ slug: string;
215
+ excerpt: string;
216
+ featured_image: string | null;
217
+ author: string;
218
+ status: string;
231
219
  created_at: string;
232
- updated_at: string;
220
+ content?: string;
221
+ updated_at?: string;
233
222
  }
234
223
  interface BlogListParams extends ListParams {
235
224
  category?: string;
@@ -237,23 +226,24 @@ interface BlogListParams extends ListParams {
237
226
  search?: string;
238
227
  }
239
228
 
240
- type CommentType = 'board_post' | 'blog_post' | 'page';
241
229
  interface Comment {
242
230
  id: number;
243
- type: CommentType;
244
- author_name: string;
245
- author_avatar: string | null;
231
+ parent_id: number | null;
232
+ depth: number;
233
+ author: {
234
+ name: string;
235
+ is_member: boolean;
236
+ };
246
237
  content: string;
247
- is_approved: boolean;
248
- is_pinned: boolean;
249
238
  is_secret: boolean;
239
+ is_pinned: boolean;
250
240
  likes: number;
251
- depth: number;
241
+ is_mine: boolean;
252
242
  created_at: string;
243
+ updated_at: string;
253
244
  replies: Comment[];
254
245
  }
255
- interface CommentListResponse extends ListResponse<Comment> {
256
- }
246
+ type CommentListResponse = ListResponse<Comment>;
257
247
  interface CommentListParams extends ListParams {
258
248
  include_unapproved?: boolean;
259
249
  }
@@ -1603,4 +1593,4 @@ declare class Promptly {
1603
1593
  getApiKey(): string | null;
1604
1594
  }
1605
1595
 
1606
- 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.1",
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",