@erp-galoper/types 1.0.2011 → 1.0.2013

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 (2) hide show
  1. package/openapi.ts +128 -4
  2. package/package.json +1 -1
package/openapi.ts CHANGED
@@ -22856,6 +22856,63 @@ export interface paths {
22856
22856
  patch: operations["appointment_views_update_appointment"];
22857
22857
  trace?: never;
22858
22858
  };
22859
+ "/api/v1/appointments/{id}/send-whatsapp/": {
22860
+ parameters: {
22861
+ query?: never;
22862
+ header?: never;
22863
+ path?: never;
22864
+ cookie?: never;
22865
+ };
22866
+ get?: never;
22867
+ put?: never;
22868
+ /**
22869
+ * Send Appointment Whatsapp
22870
+ * @description Endpoint for sending an appointment reminder via WhatsApp.
22871
+ *
22872
+ * Args:
22873
+ * id: Appointment UUID
22874
+ * template_id: Optional WhatsApp template UUID. If not provided, uses the first active template linked to appointments.
22875
+ * Note: Only active templates with entity_type='appointment' will be used when template_id is not specified.
22876
+ * payload.receiver: Optional recipient phone number. If omitted, uses the customer's primary phone number.
22877
+ *
22878
+ * To get available templates for appointments:
22879
+ * GET /api/v1/integration/whatsapp/templates/?entityType=appointment
22880
+ *
22881
+ * Template Validation:
22882
+ * - If template_id is provided, the template must have entity_type='appointment', and active.
22883
+ * - If validation fails, returns 400 error with code 'templateEntityTypeMismatch'
22884
+ *
22885
+ * Responses:
22886
+ * - 200: whatsappMessageSent
22887
+ * - 400: whatsappIntegrationNotConfigured
22888
+ * - whatsappTemplateNotFound
22889
+ * - templateEntityTypeMismatch
22890
+ * - customerPhoneNumberMissing
22891
+ * - invalidPhoneNumber
22892
+ * - numberNotOnWhatsApp
22893
+ * - invalidSenderNumber
22894
+ * - templateNotApproved
22895
+ * - templateVariableMismatch
22896
+ * - rateLimitExceeded
22897
+ * - authenticationFailed
22898
+ * - insufficientBalance
22899
+ * - templateError
22900
+ * - recipientOptedOut
22901
+ * - twilioApiError
22902
+ * - 403: permissionDenied
22903
+ * - noModuleAccess
22904
+ * - 404: appointmentDoesNotExist
22905
+ * - 500: serverError
22906
+ *
22907
+ * Permission key: appointment: ["send"]
22908
+ */
22909
+ post: operations["appointment_views_send_appointment_whatsapp"];
22910
+ delete?: never;
22911
+ options?: never;
22912
+ head?: never;
22913
+ patch?: never;
22914
+ trace?: never;
22915
+ };
22859
22916
  "/api/v1/maintenance/repair-orders/": {
22860
22917
  parameters: {
22861
22918
  query?: never;
@@ -23471,6 +23528,7 @@ export interface paths {
23471
23528
  * - employeeIsInactive
23472
23529
  * - employeeBranchMismatch
23473
23530
  * - employeeShouldBeChild
23531
+ * - employeeShouldBePayable
23474
23532
  * - customerShouldBeChild
23475
23533
  * - customerIsNotActive
23476
23534
  * - defaultGeneralAccountsDoesNotExist
@@ -23559,6 +23617,7 @@ export interface paths {
23559
23617
  * - employeeIsInactive
23560
23618
  * - employeeBranchMismatch
23561
23619
  * - employeeShouldBeChild
23620
+ * - employeeShouldBePayable
23562
23621
  * - customerShouldBeChild
23563
23622
  * - customerIsNotActive
23564
23623
  * - defaultGeneralAccountsDoesNotExist
@@ -49662,7 +49721,7 @@ export interface components {
49662
49721
  * EmployeeDocumentTypeEnum
49663
49722
  * @enum {string}
49664
49723
  */
49665
- EmployeeDocumentTypeEnum: "default" | "salesPerson" | "expensePaymentVoucher";
49724
+ EmployeeDocumentTypeEnum: "default" | "salesPerson" | "expenseVoucher" | "expensePaymentVoucher";
49666
49725
  /**
49667
49726
  * EmployeeTypeEnum
49668
49727
  * @enum {string}
@@ -64357,7 +64416,7 @@ export interface components {
64357
64416
  * @description Enum for entity types that can be linked to WhatsApp templates
64358
64417
  * @enum {string}
64359
64418
  */
64360
- EntityType: "salesOrder" | "salesInvoice" | "salesQuotation" | "goodsDeliveryNote";
64419
+ EntityType: "salesOrder" | "salesInvoice" | "salesQuotation" | "goodsDeliveryNote" | "appointment";
64361
64420
  /**
64362
64421
  * GetTemplatesResponseSchema
64363
64422
  * @description Schema for getting paginated templates from database.
@@ -66099,7 +66158,8 @@ export interface components {
66099
66158
  * Format: uuid
66100
66159
  * @description - Employee id
66101
66160
  * - visible and required when paidBy equals employee
66102
- * - get employees using route /api/v1/employees/?branchId={branch-id}&type=children&document_type=default and filter by isActive equals true
66161
+ * - only employees of type payable are allowed
66162
+ * - get employees using route /api/v1/employees/?type=children&document_type=expenseVoucher and filter by isActive equals true
66103
66163
  */
66104
66164
  employee?: string;
66105
66165
  /**
@@ -94637,7 +94697,7 @@ export interface operations {
94637
94697
  /** @description Type of employee to get */
94638
94698
  type?: "default" | "parent" | "children";
94639
94699
  /** @description Type of document for listing employees */
94640
- document_type?: "default" | "salesPerson" | "expensePaymentVoucher";
94700
+ document_type?: "default" | "salesPerson" | "expenseVoucher" | "expensePaymentVoucher";
94641
94701
  /** @description supplier id, required when document type is expensePaymentVoucher */
94642
94702
  supplier?: string;
94643
94703
  };
@@ -112490,6 +112550,70 @@ export interface operations {
112490
112550
  };
112491
112551
  };
112492
112552
  };
112553
+ appointment_views_send_appointment_whatsapp: {
112554
+ parameters: {
112555
+ query?: {
112556
+ templateId?: string | null;
112557
+ };
112558
+ header?: never;
112559
+ path: {
112560
+ id: string;
112561
+ };
112562
+ cookie?: never;
112563
+ };
112564
+ requestBody?: {
112565
+ content: {
112566
+ "application/json": components["schemas"]["SendWhatsAppSchema"] | null;
112567
+ };
112568
+ };
112569
+ responses: {
112570
+ /** @description OK */
112571
+ 200: {
112572
+ headers: {
112573
+ [name: string]: unknown;
112574
+ };
112575
+ content: {
112576
+ "application/json": components["schemas"]["MessageWithCode"];
112577
+ };
112578
+ };
112579
+ /** @description Bad Request */
112580
+ 400: {
112581
+ headers: {
112582
+ [name: string]: unknown;
112583
+ };
112584
+ content: {
112585
+ "application/json": components["schemas"]["ErrorMessages"];
112586
+ };
112587
+ };
112588
+ /** @description Forbidden */
112589
+ 403: {
112590
+ headers: {
112591
+ [name: string]: unknown;
112592
+ };
112593
+ content: {
112594
+ "application/json": components["schemas"]["MessageWithCode"];
112595
+ };
112596
+ };
112597
+ /** @description Not Found */
112598
+ 404: {
112599
+ headers: {
112600
+ [name: string]: unknown;
112601
+ };
112602
+ content: {
112603
+ "application/json": components["schemas"]["MessageWithCode"];
112604
+ };
112605
+ };
112606
+ /** @description Internal Server Error */
112607
+ 500: {
112608
+ headers: {
112609
+ [name: string]: unknown;
112610
+ };
112611
+ content: {
112612
+ "application/json": components["schemas"]["MessageWithCode"];
112613
+ };
112614
+ };
112615
+ };
112616
+ };
112493
112617
  maintenance_views_list_repair_orders: {
112494
112618
  parameters: {
112495
112619
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erp-galoper/types",
3
- "version": "1.0.2011",
3
+ "version": "1.0.2013",
4
4
  "main": "openapi.ts",
5
5
  "types": "openapi.ts",
6
6
  "files": ["openapi.ts"],