@bagelink/sdk 1.2.52 → 1.2.56

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.cjs CHANGED
@@ -288,42 +288,6 @@ function generateFunctionForOperation(method, path, operation) {
288
288
  functionComment += ` *
289
289
  * @endpoint ${method.toUpperCase()} ${path}
290
290
  `;
291
- if (operation.parameters?.length) {
292
- functionComment += " *\n";
293
- operation.parameters.forEach((param) => {
294
- const paramType = schemaToType(param.schema);
295
- const paramName = toCamelCase(param.name);
296
- const required = param.required ? "" : "?";
297
- functionComment += ` * @param {${paramType}} ${paramName}${required}`;
298
- if (param.description) {
299
- functionComment += ` - ${param.description}`;
300
- } else {
301
- functionComment += ` - ${param.name} parameter`;
302
- }
303
- functionComment += "\n";
304
- });
305
- }
306
- if (operation.requestBody && requestBodyParam) {
307
- const bodyParamName = requestBodyParam.split(":")[0].trim();
308
- const bodyParamType = requestBodyParam.split(":")[1]?.split("=")[0]?.trim() || "any";
309
- functionComment += ` * @param {${bodyParamType}} ${bodyParamName}`;
310
- if (operation.requestBody.description) {
311
- functionComment += ` - ${operation.requestBody.description}`;
312
- } else {
313
- functionComment += ` - Request body`;
314
- }
315
- functionComment += "\n";
316
- }
317
- if (responseType) {
318
- functionComment += ` * @returns {Promise<AxiosResponse<${responseType}>>} The API response
319
- `;
320
- for (const [statusCode, response] of Object.entries(operation.responses)) {
321
- if (statusCode.startsWith("2") && response.description) {
322
- functionComment += ` * @response ${statusCode} - ${response.description}
323
- `;
324
- }
325
- }
326
- }
327
291
  functionComment += " */\n";
328
292
  return functionComment + generateAxiosFunction(
329
293
  method,
package/dist/index.mjs CHANGED
@@ -282,42 +282,6 @@ function generateFunctionForOperation(method, path, operation) {
282
282
  functionComment += ` *
283
283
  * @endpoint ${method.toUpperCase()} ${path}
284
284
  `;
285
- if (operation.parameters?.length) {
286
- functionComment += " *\n";
287
- operation.parameters.forEach((param) => {
288
- const paramType = schemaToType(param.schema);
289
- const paramName = toCamelCase(param.name);
290
- const required = param.required ? "" : "?";
291
- functionComment += ` * @param {${paramType}} ${paramName}${required}`;
292
- if (param.description) {
293
- functionComment += ` - ${param.description}`;
294
- } else {
295
- functionComment += ` - ${param.name} parameter`;
296
- }
297
- functionComment += "\n";
298
- });
299
- }
300
- if (operation.requestBody && requestBodyParam) {
301
- const bodyParamName = requestBodyParam.split(":")[0].trim();
302
- const bodyParamType = requestBodyParam.split(":")[1]?.split("=")[0]?.trim() || "any";
303
- functionComment += ` * @param {${bodyParamType}} ${bodyParamName}`;
304
- if (operation.requestBody.description) {
305
- functionComment += ` - ${operation.requestBody.description}`;
306
- } else {
307
- functionComment += ` - Request body`;
308
- }
309
- functionComment += "\n";
310
- }
311
- if (responseType) {
312
- functionComment += ` * @returns {Promise<AxiosResponse<${responseType}>>} The API response
313
- `;
314
- for (const [statusCode, response] of Object.entries(operation.responses)) {
315
- if (statusCode.startsWith("2") && response.description) {
316
- functionComment += ` * @response ${statusCode} - ${response.description}
317
- `;
318
- }
319
- }
320
- }
321
285
  functionComment += " */\n";
322
286
  return functionComment + generateAxiosFunction(
323
287
  method,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/sdk",
3
3
  "type": "module",
4
- "version": "1.2.52",
4
+ "version": "1.2.56",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -399,55 +399,6 @@ function generateFunctionForOperation(
399
399
  // Add endpoint path and method information
400
400
  functionComment += ` *\n * @endpoint ${method.toUpperCase()} ${path}\n`
401
401
 
402
- // Add parameter documentation if available
403
- if (operation.parameters?.length) {
404
- functionComment += ' *\n'
405
- operation.parameters.forEach((param) => {
406
- const paramType = schemaToType(param.schema)
407
- const paramName = toCamelCase(param.name)
408
- const required = param.required ? '' : '?'
409
-
410
- functionComment += ` * @param {${paramType}} ${paramName}${required}`
411
-
412
- // Add parameter description if available
413
- if (param.description) {
414
- functionComment += ` - ${param.description}`
415
- } else {
416
- functionComment += ` - ${param.name} parameter`
417
- }
418
-
419
- functionComment += '\n'
420
- })
421
- }
422
-
423
- // Add requestBody documentation if available
424
- if (operation.requestBody && requestBodyParam) {
425
- const bodyParamName = requestBodyParam.split(':')[0].trim()
426
- const bodyParamType = requestBodyParam.split(':')[1]?.split('=')[0]?.trim() || 'any'
427
-
428
- functionComment += ` * @param {${bodyParamType}} ${bodyParamName}`
429
-
430
- if (operation.requestBody.description) {
431
- functionComment += ` - ${operation.requestBody.description}`
432
- } else {
433
- functionComment += ` - Request body`
434
- }
435
-
436
- functionComment += '\n'
437
- }
438
-
439
- // Add response documentation
440
- if (responseType) {
441
- functionComment += ` * @returns {Promise<AxiosResponse<${responseType}>>} The API response\n`
442
-
443
- // Include any response descriptions for 2xx status codes
444
- for (const [statusCode, response] of Object.entries(operation.responses)) {
445
- if (statusCode.startsWith('2') && response.description) {
446
- functionComment += ` * @response ${statusCode} - ${response.description}\n`
447
- }
448
- }
449
- }
450
-
451
402
  functionComment += ' */\n'
452
403
 
453
404
  return functionComment + generateAxiosFunction(