@hapaul/api 0.1.49 → 0.1.51

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/dist/index.d.ts +371 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -742,6 +742,74 @@ interface paths {
742
742
  patch: operations["updateHealthRecord"];
743
743
  trace?: never;
744
744
  };
745
+ "/medication/createMedication": {
746
+ parameters: {
747
+ query?: never;
748
+ header?: never;
749
+ path?: never;
750
+ cookie?: never;
751
+ };
752
+ get?: never;
753
+ put?: never;
754
+ /** Create medication */
755
+ post: operations["createMedication"];
756
+ delete?: never;
757
+ options?: never;
758
+ head?: never;
759
+ patch?: never;
760
+ trace?: never;
761
+ };
762
+ "/medication/queryMedications": {
763
+ parameters: {
764
+ query?: never;
765
+ header?: never;
766
+ path?: never;
767
+ cookie?: never;
768
+ };
769
+ get?: never;
770
+ put?: never;
771
+ /** Query medications */
772
+ post: operations["queryMedications"];
773
+ delete?: never;
774
+ options?: never;
775
+ head?: never;
776
+ patch?: never;
777
+ trace?: never;
778
+ };
779
+ "/medication/deleteMedication": {
780
+ parameters: {
781
+ query?: never;
782
+ header?: never;
783
+ path?: never;
784
+ cookie?: never;
785
+ };
786
+ get?: never;
787
+ put?: never;
788
+ post?: never;
789
+ /** Delete medication */
790
+ delete: operations["deleteMedication"];
791
+ options?: never;
792
+ head?: never;
793
+ patch?: never;
794
+ trace?: never;
795
+ };
796
+ "/medication/updateMedication": {
797
+ parameters: {
798
+ query?: never;
799
+ header?: never;
800
+ path?: never;
801
+ cookie?: never;
802
+ };
803
+ get?: never;
804
+ put?: never;
805
+ post?: never;
806
+ delete?: never;
807
+ options?: never;
808
+ head?: never;
809
+ /** Update medication */
810
+ patch: operations["updateMedication"];
811
+ trace?: never;
812
+ };
745
813
  "/post/createPost": {
746
814
  parameters: {
747
815
  query?: never;
@@ -867,6 +935,30 @@ interface components {
867
935
  AcceptInvitationDto: {
868
936
  invitationCode: string;
869
937
  };
938
+ ArchiveMetadata: {
939
+ /** Format: int32 */
940
+ fileCount?: number | null;
941
+ /** Format: int64 */
942
+ uncompressedSize?: number | null;
943
+ compressionMethod?: string | null;
944
+ isPasswordProtected?: boolean | null;
945
+ };
946
+ AudioMetadata: {
947
+ /** Format: double */
948
+ duration?: number | null;
949
+ codec?: string | null;
950
+ /** Format: int32 */
951
+ sampleRate?: number | null;
952
+ /** Format: int32 */
953
+ bitDepth?: number | null;
954
+ /** Format: int32 */
955
+ channels?: number | null;
956
+ /** Format: int64 */
957
+ bitrate?: number | null;
958
+ title?: string | null;
959
+ artist?: string | null;
960
+ album?: string | null;
961
+ };
870
962
  Baby: {
871
963
  /** Format: uuid */
872
964
  id: string;
@@ -914,6 +1006,17 @@ interface components {
914
1006
  babyId: string;
915
1007
  relationCode: components["schemas"]["BabyRelationCode"];
916
1008
  };
1009
+ CreateMedicationParams: {
1010
+ /** Format: uuid */
1011
+ babyId: string;
1012
+ medicationType: components["schemas"]["MedicationType"];
1013
+ description?: string | null;
1014
+ /** Format: int32 */
1015
+ quantity: number;
1016
+ unit: components["schemas"]["MedicationUnit"];
1017
+ /** Format: date-time */
1018
+ datetime: string;
1019
+ };
917
1020
  CreatePermissionParams: {
918
1021
  code: string;
919
1022
  kind: string;
@@ -959,6 +1062,16 @@ interface components {
959
1062
  /** Format: uuid */
960
1063
  id: string;
961
1064
  };
1065
+ DocumentMetadata: {
1066
+ /** Format: int32 */
1067
+ pageCount?: number | null;
1068
+ author?: string | null;
1069
+ subject?: string | null;
1070
+ keywords?: string[] | null;
1071
+ createdDate?: string | null;
1072
+ modifiedDate?: string | null;
1073
+ isPasswordProtected?: boolean | null;
1074
+ };
962
1075
  Feeding: {
963
1076
  /** Format: uuid */
964
1077
  id: string;
@@ -977,6 +1090,25 @@ interface components {
977
1090
  };
978
1091
  /** @enum {string} */
979
1092
  FeedingKind: "milkPowder" | "breastMilk" | "leftBreastMilk" | "rightBreastMilk";
1093
+ FileMetadata: (components["schemas"]["ImageMetadata"] & {
1094
+ /** @enum {string} */
1095
+ type: "image";
1096
+ }) | (components["schemas"]["VideoMetadata"] & {
1097
+ /** @enum {string} */
1098
+ type: "video";
1099
+ }) | (components["schemas"]["AudioMetadata"] & {
1100
+ /** @enum {string} */
1101
+ type: "audio";
1102
+ }) | (components["schemas"]["DocumentMetadata"] & {
1103
+ /** @enum {string} */
1104
+ type: "document";
1105
+ }) | (components["schemas"]["ArchiveMetadata"] & {
1106
+ /** @enum {string} */
1107
+ type: "archive";
1108
+ }) | (components["schemas"]["GenericMetadata"] & {
1109
+ /** @enum {string} */
1110
+ type: "generic";
1111
+ });
980
1112
  FilterBabiesParams: {
981
1113
  /** Format: uuid */
982
1114
  createdBy?: string | null;
@@ -998,6 +1130,14 @@ interface components {
998
1130
  /** Format: date-time */
999
1131
  to?: string | null;
1000
1132
  };
1133
+ FilterMedicationParams: {
1134
+ /** Format: uuid */
1135
+ babyId?: string | null;
1136
+ /** Format: date-time */
1137
+ from?: string | null;
1138
+ /** Format: date-time */
1139
+ to?: string | null;
1140
+ };
1001
1141
  FilterUrinationDefecationParams: {
1002
1142
  /** Format: uuid */
1003
1143
  babyId?: string | null;
@@ -1008,6 +1148,15 @@ interface components {
1008
1148
  };
1009
1149
  /** @enum {string} */
1010
1150
  Gender: "unknown" | "male" | "female";
1151
+ GenericMetadata: unknown;
1152
+ GpsMetadata: {
1153
+ /** Format: double */
1154
+ latitude?: number | null;
1155
+ /** Format: double */
1156
+ longitude?: number | null;
1157
+ /** Format: double */
1158
+ altitude?: number | null;
1159
+ };
1011
1160
  HealthRecord: {
1012
1161
  /** Format: uuid */
1013
1162
  id: string;
@@ -1025,6 +1174,20 @@ interface components {
1025
1174
  };
1026
1175
  /** @enum {string} */
1027
1176
  HealthRecordKind: "height" | "weight";
1177
+ ImageMetadata: {
1178
+ /** Format: int32 */
1179
+ width?: number | null;
1180
+ /** Format: int32 */
1181
+ height?: number | null;
1182
+ gps?: null | components["schemas"]["GpsMetadata"];
1183
+ colorSpace?: string | null;
1184
+ /** Format: int32 */
1185
+ bitsPerSample?: number | null;
1186
+ hasAlpha?: boolean | null;
1187
+ orientation?: null | components["schemas"]["ImageOrientation"];
1188
+ };
1189
+ /** @enum {string} */
1190
+ ImageOrientation: "normal" | "flipHorizontal" | "rotate180" | "flipVertical" | "flipHorizontalRotate270" | "rotate90" | "flipHorizontalRotate90" | "rotate270";
1028
1191
  InvitationPreview: {
1029
1192
  /** Format: uuid */
1030
1193
  invitationId: string;
@@ -1051,10 +1214,35 @@ interface components {
1051
1214
  account: string;
1052
1215
  accessToken: string;
1053
1216
  };
1217
+ Medication: {
1218
+ /** Format: uuid */
1219
+ id: string;
1220
+ /** Format: uuid */
1221
+ baby_id: string;
1222
+ medication_type: components["schemas"]["MedicationType"];
1223
+ description?: string | null;
1224
+ /** Format: int32 */
1225
+ quantity: number;
1226
+ unit: components["schemas"]["MedicationUnit"];
1227
+ /** Format: date-time */
1228
+ datetime: string;
1229
+ /** Format: date-time */
1230
+ created_at: string;
1231
+ /** Format: date-time */
1232
+ updated_at: string;
1233
+ };
1234
+ /** @enum {string} */
1235
+ MedicationType: "health" | "prescription";
1236
+ /** @enum {string} */
1237
+ MedicationUnit: "pill" | "piece" | "milliliter" | "milligram" | "gram" | "bottle" | "bag";
1054
1238
  MergeFileChunksDto: {
1055
1239
  /** Format: uuid */
1056
1240
  uploadId: string;
1057
1241
  };
1242
+ /** @enum {string} */
1243
+ MimeKind: "unknown" | "image" | "video" | "audio" | "archive" | "book" | "document" | "font" | "application";
1244
+ /** @description MIME type string (e.g., 'image/jpeg', 'application/pdf') */
1245
+ MimeType: string;
1058
1246
  /** @default null */
1059
1247
  Null: unknown;
1060
1248
  PageableQueryDto_FilterBabiesParams: {
@@ -1099,6 +1287,21 @@ interface components {
1099
1287
  };
1100
1288
  sorts?: components["schemas"]["QuerySortDto_SortHealthRecordsParams"][] | null;
1101
1289
  };
1290
+ PageableQueryDto_FilterMedicationParams_SortMedicationParams: {
1291
+ /** Format: int64 */
1292
+ page?: number | null;
1293
+ /** Format: int64 */
1294
+ pageSize?: number | null;
1295
+ filters?: {
1296
+ /** Format: uuid */
1297
+ babyId?: string | null;
1298
+ /** Format: date-time */
1299
+ from?: string | null;
1300
+ /** Format: date-time */
1301
+ to?: string | null;
1302
+ };
1303
+ sorts?: components["schemas"]["QuerySortDto_SortMedicationParams"][] | null;
1304
+ };
1102
1305
  PageableQueryDto_FilterUrinationDefecationParams_SortUrinationDefecationParams: {
1103
1306
  /** Format: int64 */
1104
1307
  page?: number | null;
@@ -1215,6 +1418,11 @@ interface components {
1215
1418
  field: "datetime";
1216
1419
  order: components["schemas"]["QueryOrder"];
1217
1420
  };
1421
+ QuerySortDto_SortMedicationParams: {
1422
+ /** @enum {string} */
1423
+ field: "datetime";
1424
+ order: components["schemas"]["QueryOrder"];
1425
+ };
1218
1426
  QuerySortDto_SortUrinationDefecationParams: {
1219
1427
  /** @enum {string} */
1220
1428
  field: "datetime";
@@ -1304,6 +1512,27 @@ interface components {
1304
1512
  /** Format: int64 */
1305
1513
  total: number;
1306
1514
  };
1515
+ ResponseJson_PaginatedData_Medication: {
1516
+ records: {
1517
+ /** Format: uuid */
1518
+ id: string;
1519
+ /** Format: uuid */
1520
+ baby_id: string;
1521
+ medication_type: components["schemas"]["MedicationType"];
1522
+ description?: string | null;
1523
+ /** Format: int32 */
1524
+ quantity: number;
1525
+ unit: components["schemas"]["MedicationUnit"];
1526
+ /** Format: date-time */
1527
+ datetime: string;
1528
+ /** Format: date-time */
1529
+ created_at: string;
1530
+ /** Format: date-time */
1531
+ updated_at: string;
1532
+ }[];
1533
+ /** Format: int64 */
1534
+ total: number;
1535
+ };
1307
1536
  ResponseJson_PaginatedData_Permission: {
1308
1537
  records: {
1309
1538
  /** Format: uuid */
@@ -1469,6 +1698,8 @@ interface components {
1469
1698
  /** @enum {string} */
1470
1699
  SortHealthRecordsParams: "datetime";
1471
1700
  /** @enum {string} */
1701
+ SortMedicationParams: "datetime";
1702
+ /** @enum {string} */
1472
1703
  SortUrinationDefecationParams: "datetime";
1473
1704
  /** @enum {string} */
1474
1705
  ThirdParty: "wechat" | "github";
@@ -1499,6 +1730,17 @@ interface components {
1499
1730
  /** Format: date-time */
1500
1731
  datetime?: string | null;
1501
1732
  };
1733
+ UpdateMedicationParams: {
1734
+ /** Format: uuid */
1735
+ id: string;
1736
+ medicationType?: null | components["schemas"]["MedicationType"];
1737
+ description?: string | null;
1738
+ /** Format: int32 */
1739
+ quantity?: number | null;
1740
+ unit?: null | components["schemas"]["MedicationUnit"];
1741
+ /** Format: date-time */
1742
+ datetime?: string | null;
1743
+ };
1502
1744
  UpdatePermissionParams: {
1503
1745
  /** Format: uuid */
1504
1746
  id: string;
@@ -1534,6 +1776,9 @@ interface components {
1534
1776
  status: components["schemas"]["UploadStatus"];
1535
1777
  /** Format: date-time */
1536
1778
  merged_at?: string | null;
1779
+ mime_type: components["schemas"]["MimeType"];
1780
+ kind: components["schemas"]["MimeKind"];
1781
+ metadata?: null | components["schemas"]["FileMetadata"];
1537
1782
  /** Format: date-time */
1538
1783
  created_at: string;
1539
1784
  /** Format: date-time */
@@ -1611,6 +1856,21 @@ interface components {
1611
1856
  UserFilterDto: {
1612
1857
  account?: string | null;
1613
1858
  };
1859
+ VideoMetadata: {
1860
+ /** Format: double */
1861
+ duration?: number | null;
1862
+ /** Format: int32 */
1863
+ width?: number | null;
1864
+ /** Format: int32 */
1865
+ height?: number | null;
1866
+ videoCodec?: string | null;
1867
+ audioCodec?: string | null;
1868
+ /** Format: double */
1869
+ frameRate?: number | null;
1870
+ /** Format: int64 */
1871
+ bitrate?: number | null;
1872
+ hasAudio?: boolean | null;
1873
+ };
1614
1874
  };
1615
1875
  responses: never;
1616
1876
  parameters: never;
@@ -2081,6 +2341,15 @@ interface operations {
2081
2341
  "application/octet-stream": number[];
2082
2342
  };
2083
2343
  };
2344
+ /** @description partial content */
2345
+ 206: {
2346
+ headers: {
2347
+ [name: string]: unknown;
2348
+ };
2349
+ content: {
2350
+ "application/octet-stream": number[];
2351
+ };
2352
+ };
2084
2353
  /** @description not found */
2085
2354
  404: {
2086
2355
  headers: {
@@ -2088,6 +2357,13 @@ interface operations {
2088
2357
  };
2089
2358
  content?: never;
2090
2359
  };
2360
+ /** @description range not satisfiable */
2361
+ 416: {
2362
+ headers: {
2363
+ [name: string]: unknown;
2364
+ };
2365
+ content?: never;
2366
+ };
2091
2367
  };
2092
2368
  };
2093
2369
  createUpload: {
@@ -2651,6 +2927,100 @@ interface operations {
2651
2927
  };
2652
2928
  };
2653
2929
  };
2930
+ createMedication: {
2931
+ parameters: {
2932
+ query?: never;
2933
+ header?: never;
2934
+ path?: never;
2935
+ cookie?: never;
2936
+ };
2937
+ requestBody: {
2938
+ content: {
2939
+ "application/json": components["schemas"]["CreateMedicationParams"];
2940
+ };
2941
+ };
2942
+ responses: {
2943
+ /** @description ok */
2944
+ 200: {
2945
+ headers: {
2946
+ [name: string]: unknown;
2947
+ };
2948
+ content: {
2949
+ "application/json": components["schemas"]["ResponseJson_String"];
2950
+ };
2951
+ };
2952
+ };
2953
+ };
2954
+ queryMedications: {
2955
+ parameters: {
2956
+ query?: never;
2957
+ header?: never;
2958
+ path?: never;
2959
+ cookie?: never;
2960
+ };
2961
+ requestBody: {
2962
+ content: {
2963
+ "application/json": components["schemas"]["PageableQueryDto_FilterMedicationParams_SortMedicationParams"];
2964
+ };
2965
+ };
2966
+ responses: {
2967
+ /** @description ok */
2968
+ 200: {
2969
+ headers: {
2970
+ [name: string]: unknown;
2971
+ };
2972
+ content: {
2973
+ "application/json": components["schemas"]["ResponseJson_PaginatedData_Medication"];
2974
+ };
2975
+ };
2976
+ };
2977
+ };
2978
+ deleteMedication: {
2979
+ parameters: {
2980
+ query: {
2981
+ id: string;
2982
+ };
2983
+ header?: never;
2984
+ path?: never;
2985
+ cookie?: never;
2986
+ };
2987
+ requestBody?: never;
2988
+ responses: {
2989
+ /** @description ok */
2990
+ 200: {
2991
+ headers: {
2992
+ [name: string]: unknown;
2993
+ };
2994
+ content: {
2995
+ "application/json": components["schemas"]["ResponseJson"];
2996
+ };
2997
+ };
2998
+ };
2999
+ };
3000
+ updateMedication: {
3001
+ parameters: {
3002
+ query?: never;
3003
+ header?: never;
3004
+ path?: never;
3005
+ cookie?: never;
3006
+ };
3007
+ requestBody: {
3008
+ content: {
3009
+ "application/json": components["schemas"]["UpdateMedicationParams"];
3010
+ };
3011
+ };
3012
+ responses: {
3013
+ /** @description ok */
3014
+ 200: {
3015
+ headers: {
3016
+ [name: string]: unknown;
3017
+ };
3018
+ content: {
3019
+ "application/json": components["schemas"]["ResponseJson_Null"];
3020
+ };
3021
+ };
3022
+ };
3023
+ };
2654
3024
  createPost: {
2655
3025
  parameters: {
2656
3026
  query?: never;
@@ -2678,7 +3048,7 @@ interface operations {
2678
3048
  queryPostsTimeline: {
2679
3049
  parameters: {
2680
3050
  query: {
2681
- babyId?: string | null;
3051
+ babyId: string;
2682
3052
  createdBy?: string | null;
2683
3053
  limit: number;
2684
3054
  cursor?: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hapaul/api",
3
- "version": "0.1.49",
3
+ "version": "0.1.51",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [