@hapaul/api 0.1.47 → 0.1.49

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.ts CHANGED
@@ -1184,6 +1184,10 @@ interface components {
1184
1184
  index: number;
1185
1185
  };
1186
1186
  PostWithAttachments: components["schemas"]["Post"] & {
1187
+ /** Format: uuid */
1188
+ authorId: string;
1189
+ authorName: string;
1190
+ authorAvatar?: string | null;
1187
1191
  attachments: components["schemas"]["PostAttachmentInfo"][];
1188
1192
  };
1189
1193
  /** @enum {string} */
@@ -1407,6 +1411,10 @@ interface components {
1407
1411
  updatedAt: string;
1408
1412
  }[];
1409
1413
  ResponseJson_Vec_PostWithAttachments: (components["schemas"]["Post"] & {
1414
+ /** Format: uuid */
1415
+ authorId: string;
1416
+ authorName: string;
1417
+ authorAvatar?: string | null;
1410
1418
  attachments: components["schemas"]["PostAttachmentInfo"][];
1411
1419
  })[];
1412
1420
  ResponseJson_Vec_SessionDto: {
package/dist/index.js CHANGED
@@ -129,13 +129,15 @@ function mergeHeaders(...allHeaders) {
129
129
  return finalHeaders;
130
130
  }
131
131
  function defaultQuerySerializer(query) {
132
- let str = "";
132
+ const chunks = [];
133
133
  Object.entries(query).forEach(([key, val]) => {
134
- if (Array.isArray(val)) str += `${key}=${val}`;
135
- else if (isObject(val)) str += `${key}=${JSON.stringify(val)}`;
136
- else str += `${key}=${val}`;
134
+ if (Array.isArray(val)) val.forEach((item) => {
135
+ chunks.push(`${key}=${item}`);
136
+ });
137
+ else if (isObject(val)) chunks.push(`${key}=${JSON.stringify(val)}`);
138
+ else if (val !== void 0 && val !== null) chunks.push(`${key}=${val}`);
137
139
  });
138
- return str;
140
+ return chunks.join("&");
139
141
  }
140
142
  async function defaultBodySerializer(body, headers) {
141
143
  if (body instanceof FormData) return body;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hapaul/api",
3
- "version": "0.1.47",
3
+ "version": "0.1.49",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [