@37signals/basecamp 0.2.2 → 0.3.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.
Files changed (41) hide show
  1. package/README.md +39 -14
  2. package/dist/client.d.ts +3 -1
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +65 -45
  5. package/dist/client.js.map +1 -1
  6. package/dist/generated/metadata.json +28 -1
  7. package/dist/generated/openapi-stripped.json +243 -10
  8. package/dist/generated/path-mapping.d.ts.map +1 -1
  9. package/dist/generated/path-mapping.js +2 -0
  10. package/dist/generated/path-mapping.js.map +1 -1
  11. package/dist/generated/path-mapping.ts +2 -0
  12. package/dist/generated/schema.d.ts +175 -3
  13. package/dist/generated/services/campfires.d.ts +32 -0
  14. package/dist/generated/services/campfires.d.ts.map +1 -1
  15. package/dist/generated/services/campfires.js +58 -0
  16. package/dist/generated/services/campfires.js.map +1 -1
  17. package/dist/generated/services/campfires.ts +75 -0
  18. package/dist/generated/services/search.d.ts +3 -5
  19. package/dist/generated/services/search.d.ts.map +1 -1
  20. package/dist/generated/services/search.js +4 -4
  21. package/dist/generated/services/search.js.map +1 -1
  22. package/dist/generated/services/search.ts +4 -6
  23. package/dist/oauth/discovery.d.ts.map +1 -1
  24. package/dist/oauth/discovery.js +1 -0
  25. package/dist/oauth/discovery.js.map +1 -1
  26. package/dist/oauth/interactive-login.d.ts.map +1 -1
  27. package/dist/oauth/interactive-login.js +3 -2
  28. package/dist/oauth/interactive-login.js.map +1 -1
  29. package/dist/oauth/types.d.ts +2 -0
  30. package/dist/oauth/types.d.ts.map +1 -1
  31. package/dist/services/base.d.ts +3 -1
  32. package/dist/services/base.d.ts.map +1 -1
  33. package/dist/services/base.js +8 -5
  34. package/dist/services/base.js.map +1 -1
  35. package/package.json +1 -1
  36. package/src/generated/metadata.json +28 -1
  37. package/src/generated/openapi-stripped.json +243 -10
  38. package/src/generated/path-mapping.ts +2 -0
  39. package/src/generated/schema.d.ts +175 -3
  40. package/src/generated/services/campfires.ts +75 -0
  41. package/src/generated/services/search.ts +4 -6
@@ -3627,6 +3627,201 @@
3627
3627
  }
3628
3628
  }
3629
3629
  },
3630
+ "/chats/{campfireId}/uploads.json": {
3631
+ "get": {
3632
+ "description": "List uploaded files in a campfire\n\n**Pagination**: Uses Link header (RFC5988). Follow the `next` rel URL\nto fetch additional pages. X-Total-Count header provides total count.",
3633
+ "operationId": "ListCampfireUploads",
3634
+ "parameters": [
3635
+ {
3636
+ "name": "campfireId",
3637
+ "in": "path",
3638
+ "schema": {
3639
+ "type": "integer",
3640
+ "format": "int64"
3641
+ },
3642
+ "required": true
3643
+ }
3644
+ ],
3645
+ "responses": {
3646
+ "200": {
3647
+ "description": "ListCampfireUploads 200 response",
3648
+ "content": {
3649
+ "application/json": {
3650
+ "schema": {
3651
+ "$ref": "#/components/schemas/ListCampfireUploadsResponseContent"
3652
+ }
3653
+ }
3654
+ }
3655
+ },
3656
+ "401": {
3657
+ "description": "UnauthorizedError 401 response",
3658
+ "content": {
3659
+ "application/json": {
3660
+ "schema": {
3661
+ "$ref": "#/components/schemas/UnauthorizedErrorResponseContent"
3662
+ }
3663
+ }
3664
+ }
3665
+ },
3666
+ "403": {
3667
+ "description": "ForbiddenError 403 response",
3668
+ "content": {
3669
+ "application/json": {
3670
+ "schema": {
3671
+ "$ref": "#/components/schemas/ForbiddenErrorResponseContent"
3672
+ }
3673
+ }
3674
+ }
3675
+ },
3676
+ "429": {
3677
+ "description": "RateLimitError 429 response",
3678
+ "content": {
3679
+ "application/json": {
3680
+ "schema": {
3681
+ "$ref": "#/components/schemas/RateLimitErrorResponseContent"
3682
+ }
3683
+ }
3684
+ }
3685
+ },
3686
+ "500": {
3687
+ "description": "InternalServerError 500 response",
3688
+ "content": {
3689
+ "application/json": {
3690
+ "schema": {
3691
+ "$ref": "#/components/schemas/InternalServerErrorResponseContent"
3692
+ }
3693
+ }
3694
+ }
3695
+ }
3696
+ },
3697
+ "tags": [
3698
+ "Campfire"
3699
+ ],
3700
+ "x-basecamp-pagination": {
3701
+ "style": "link",
3702
+ "totalCountHeader": "X-Total-Count",
3703
+ "maxPageSize": 50
3704
+ },
3705
+ "x-basecamp-retry": {
3706
+ "maxAttempts": 3,
3707
+ "baseDelayMs": 1000,
3708
+ "backoff": "exponential",
3709
+ "retryOn": [
3710
+ 429,
3711
+ 503
3712
+ ]
3713
+ }
3714
+ },
3715
+ "post": {
3716
+ "description": "Upload a file to a campfire",
3717
+ "operationId": "CreateCampfireUpload",
3718
+ "requestBody": {
3719
+ "content": {
3720
+ "application/octet-stream": {
3721
+ "schema": {
3722
+ "$ref": "#/components/schemas/CreateCampfireUploadInputPayload"
3723
+ }
3724
+ }
3725
+ },
3726
+ "required": true
3727
+ },
3728
+ "parameters": [
3729
+ {
3730
+ "name": "campfireId",
3731
+ "in": "path",
3732
+ "schema": {
3733
+ "type": "integer",
3734
+ "format": "int64"
3735
+ },
3736
+ "required": true
3737
+ },
3738
+ {
3739
+ "name": "name",
3740
+ "in": "query",
3741
+ "description": "Filename for the uploaded file (e.g. \"report.pdf\").",
3742
+ "schema": {
3743
+ "type": "string",
3744
+ "description": "Filename for the uploaded file (e.g. \"report.pdf\")."
3745
+ },
3746
+ "required": true
3747
+ }
3748
+ ],
3749
+ "responses": {
3750
+ "201": {
3751
+ "description": "CreateCampfireUpload 201 response",
3752
+ "content": {
3753
+ "application/json": {
3754
+ "schema": {
3755
+ "$ref": "#/components/schemas/CreateCampfireUploadResponseContent"
3756
+ }
3757
+ }
3758
+ }
3759
+ },
3760
+ "401": {
3761
+ "description": "UnauthorizedError 401 response",
3762
+ "content": {
3763
+ "application/json": {
3764
+ "schema": {
3765
+ "$ref": "#/components/schemas/UnauthorizedErrorResponseContent"
3766
+ }
3767
+ }
3768
+ }
3769
+ },
3770
+ "403": {
3771
+ "description": "ForbiddenError 403 response",
3772
+ "content": {
3773
+ "application/json": {
3774
+ "schema": {
3775
+ "$ref": "#/components/schemas/ForbiddenErrorResponseContent"
3776
+ }
3777
+ }
3778
+ }
3779
+ },
3780
+ "422": {
3781
+ "description": "ValidationError 422 response",
3782
+ "content": {
3783
+ "application/json": {
3784
+ "schema": {
3785
+ "$ref": "#/components/schemas/ValidationErrorResponseContent"
3786
+ }
3787
+ }
3788
+ }
3789
+ },
3790
+ "429": {
3791
+ "description": "RateLimitError 429 response",
3792
+ "content": {
3793
+ "application/json": {
3794
+ "schema": {
3795
+ "$ref": "#/components/schemas/RateLimitErrorResponseContent"
3796
+ }
3797
+ }
3798
+ }
3799
+ },
3800
+ "500": {
3801
+ "description": "InternalServerError 500 response",
3802
+ "content": {
3803
+ "application/json": {
3804
+ "schema": {
3805
+ "$ref": "#/components/schemas/InternalServerErrorResponseContent"
3806
+ }
3807
+ }
3808
+ }
3809
+ }
3810
+ },
3811
+ "tags": [
3812
+ "Campfire"
3813
+ ],
3814
+ "x-basecamp-retry": {
3815
+ "maxAttempts": 3,
3816
+ "baseDelayMs": 2000,
3817
+ "backoff": "exponential",
3818
+ "retryOn": [
3819
+ 429,
3820
+ 503
3821
+ ]
3822
+ }
3823
+ }
3824
+ },
3630
3825
  "/circles/people.json": {
3631
3826
  "get": {
3632
3827
  "description": "List all account users who can be pinged\n\n**Pagination**: Uses Link header (RFC5988). Follow the `next` rel URL\nto fetch additional pages. X-Total-Count header provides total count.",
@@ -12100,7 +12295,7 @@
12100
12295
  "operationId": "Search",
12101
12296
  "parameters": [
12102
12297
  {
12103
- "name": "query",
12298
+ "name": "q",
12104
12299
  "in": "query",
12105
12300
  "schema": {
12106
12301
  "type": "string"
@@ -12115,14 +12310,6 @@
12115
12310
  "type": "string",
12116
12311
  "description": "created_at|updated_at"
12117
12312
  }
12118
- },
12119
- {
12120
- "name": "page",
12121
- "in": "query",
12122
- "schema": {
12123
- "type": "integer",
12124
- "format": "int32"
12125
- }
12126
12313
  }
12127
12314
  ],
12128
12315
  "responses": {
@@ -16025,6 +16212,9 @@
16025
16212
  },
16026
16213
  "lines_url": {
16027
16214
  "type": "string"
16215
+ },
16216
+ "files_url": {
16217
+ "type": "string"
16028
16218
  }
16029
16219
  },
16030
16220
  "required": [
@@ -16082,6 +16272,12 @@
16082
16272
  "content": {
16083
16273
  "type": "string"
16084
16274
  },
16275
+ "attachments": {
16276
+ "type": "array",
16277
+ "items": {
16278
+ "$ref": "#/components/schemas/CampfireLineAttachment"
16279
+ }
16280
+ },
16085
16281
  "parent": {
16086
16282
  "$ref": "#/components/schemas/RecordingParent"
16087
16283
  },
@@ -16102,7 +16298,6 @@
16102
16298
  "required": [
16103
16299
  "app_url",
16104
16300
  "bucket",
16105
- "content",
16106
16301
  "created_at",
16107
16302
  "creator",
16108
16303
  "id",
@@ -16116,6 +16311,30 @@
16116
16311
  "visible_to_clients"
16117
16312
  ]
16118
16313
  },
16314
+ "CampfireLineAttachment": {
16315
+ "type": "object",
16316
+ "properties": {
16317
+ "title": {
16318
+ "type": "string"
16319
+ },
16320
+ "url": {
16321
+ "type": "string"
16322
+ },
16323
+ "filename": {
16324
+ "type": "string"
16325
+ },
16326
+ "content_type": {
16327
+ "type": "string"
16328
+ },
16329
+ "byte_size": {
16330
+ "type": "integer",
16331
+ "format": "int64"
16332
+ },
16333
+ "download_url": {
16334
+ "type": "string"
16335
+ }
16336
+ }
16337
+ },
16119
16338
  "Card": {
16120
16339
  "type": "object",
16121
16340
  "properties": {
@@ -16969,6 +17188,14 @@
16969
17188
  "CreateCampfireLineResponseContent": {
16970
17189
  "$ref": "#/components/schemas/CampfireLine"
16971
17190
  },
17191
+ "CreateCampfireUploadInputPayload": {
17192
+ "type": "string",
17193
+ "description": "Raw binary content of the file. Set the Content-Type header to match\nthe file's media type (e.g. \"image/png\", \"application/pdf\").",
17194
+ "contentEncoding": "byte"
17195
+ },
17196
+ "CreateCampfireUploadResponseContent": {
17197
+ "$ref": "#/components/schemas/CampfireLine"
17198
+ },
16972
17199
  "CreateCardColumnRequestContent": {
16973
17200
  "type": "object",
16974
17201
  "properties": {
@@ -18211,6 +18438,12 @@
18211
18438
  "$ref": "#/components/schemas/CampfireLine"
18212
18439
  }
18213
18440
  },
18441
+ "ListCampfireUploadsResponseContent": {
18442
+ "type": "array",
18443
+ "items": {
18444
+ "$ref": "#/components/schemas/CampfireLine"
18445
+ }
18446
+ },
18214
18447
  "ListCampfiresResponseContent": {
18215
18448
  "type": "array",
18216
18449
  "items": {
@@ -49,6 +49,8 @@ export const PATH_TO_OPERATION: Record<string, string> = {
49
49
  "POST:/{accountId}/chats/{campfireId}/lines.json": "CreateCampfireLine",
50
50
  "DELETE:/{accountId}/chats/{campfireId}/lines/{lineId}": "DeleteCampfireLine",
51
51
  "GET:/{accountId}/chats/{campfireId}/lines/{lineId}": "GetCampfireLine",
52
+ "GET:/{accountId}/chats/{campfireId}/uploads.json": "ListCampfireUploads",
53
+ "POST:/{accountId}/chats/{campfireId}/uploads.json": "CreateCampfireUpload",
52
54
  "GET:/{accountId}/client/approvals.json": "ListClientApprovals",
53
55
  "GET:/{accountId}/client/approvals/{approvalId}": "GetClientApproval",
54
56
  "GET:/{accountId}/client/correspondences.json": "ListClientCorrespondences",
@@ -474,6 +474,29 @@ export interface paths {
474
474
  patch?: never;
475
475
  trace?: never;
476
476
  };
477
+ "/chats/{campfireId}/uploads.json": {
478
+ parameters: {
479
+ query?: never;
480
+ header?: never;
481
+ path?: never;
482
+ cookie?: never;
483
+ };
484
+ /**
485
+ * @description List uploaded files in a campfire
486
+ *
487
+ * **Pagination**: Uses Link header (RFC5988). Follow the `next` rel URL
488
+ * to fetch additional pages. X-Total-Count header provides total count.
489
+ */
490
+ get: operations["ListCampfireUploads"];
491
+ put?: never;
492
+ /** @description Upload a file to a campfire */
493
+ post: operations["CreateCampfireUpload"];
494
+ delete?: never;
495
+ options?: never;
496
+ head?: never;
497
+ patch?: never;
498
+ trace?: never;
499
+ };
477
500
  "/circles/people.json": {
478
501
  parameters: {
479
502
  query?: never;
@@ -2229,6 +2252,7 @@ export interface components {
2229
2252
  creator: components["schemas"]["Person"];
2230
2253
  topic?: string;
2231
2254
  lines_url?: string;
2255
+ files_url?: string;
2232
2256
  };
2233
2257
  CampfireLine: {
2234
2258
  /** Format: int64 */
@@ -2243,7 +2267,8 @@ export interface components {
2243
2267
  url: string;
2244
2268
  app_url: string;
2245
2269
  bookmark_url?: string;
2246
- content: string;
2270
+ content?: string;
2271
+ attachments?: components["schemas"]["CampfireLineAttachment"][];
2247
2272
  parent: components["schemas"]["RecordingParent"];
2248
2273
  bucket: components["schemas"]["TodoBucket"];
2249
2274
  creator: components["schemas"]["Person"];
@@ -2251,6 +2276,15 @@ export interface components {
2251
2276
  boosts_count?: number;
2252
2277
  boosts_url?: string;
2253
2278
  };
2279
+ CampfireLineAttachment: {
2280
+ title?: string;
2281
+ url?: string;
2282
+ filename?: string;
2283
+ content_type?: string;
2284
+ /** Format: int64 */
2285
+ byte_size?: number;
2286
+ download_url?: string;
2287
+ };
2254
2288
  Card: {
2255
2289
  /** Format: int64 */
2256
2290
  id: number;
@@ -2504,6 +2538,12 @@ export interface components {
2504
2538
  content_type?: string;
2505
2539
  };
2506
2540
  CreateCampfireLineResponseContent: components["schemas"]["CampfireLine"];
2541
+ /**
2542
+ * @description Raw binary content of the file. Set the Content-Type header to match
2543
+ * the file's media type (e.g. "image/png", "application/pdf").
2544
+ */
2545
+ CreateCampfireUploadInputPayload: string;
2546
+ CreateCampfireUploadResponseContent: components["schemas"]["CampfireLine"];
2507
2547
  CreateCardColumnRequestContent: {
2508
2548
  title: string;
2509
2549
  description?: string;
@@ -2857,6 +2897,7 @@ export interface components {
2857
2897
  ListAnswersResponseContent: components["schemas"]["QuestionAnswer"][];
2858
2898
  ListAssignablePeopleResponseContent: components["schemas"]["Person"][];
2859
2899
  ListCampfireLinesResponseContent: components["schemas"]["CampfireLine"][];
2900
+ ListCampfireUploadsResponseContent: components["schemas"]["CampfireLine"][];
2860
2901
  ListCampfiresResponseContent: components["schemas"]["Campfire"][];
2861
2902
  ListCardsResponseContent: components["schemas"]["Card"][];
2862
2903
  ListChatbotsResponseContent: components["schemas"]["Chatbot"][];
@@ -6375,6 +6416,138 @@ export interface operations {
6375
6416
  };
6376
6417
  };
6377
6418
  };
6419
+ ListCampfireUploads: {
6420
+ parameters: {
6421
+ query?: never;
6422
+ header?: never;
6423
+ path: {
6424
+ campfireId: number;
6425
+ };
6426
+ cookie?: never;
6427
+ };
6428
+ requestBody?: never;
6429
+ responses: {
6430
+ /** @description ListCampfireUploads 200 response */
6431
+ 200: {
6432
+ headers: {
6433
+ [name: string]: unknown;
6434
+ };
6435
+ content: {
6436
+ "application/json": components["schemas"]["ListCampfireUploadsResponseContent"];
6437
+ };
6438
+ };
6439
+ /** @description UnauthorizedError 401 response */
6440
+ 401: {
6441
+ headers: {
6442
+ [name: string]: unknown;
6443
+ };
6444
+ content: {
6445
+ "application/json": components["schemas"]["UnauthorizedErrorResponseContent"];
6446
+ };
6447
+ };
6448
+ /** @description ForbiddenError 403 response */
6449
+ 403: {
6450
+ headers: {
6451
+ [name: string]: unknown;
6452
+ };
6453
+ content: {
6454
+ "application/json": components["schemas"]["ForbiddenErrorResponseContent"];
6455
+ };
6456
+ };
6457
+ /** @description RateLimitError 429 response */
6458
+ 429: {
6459
+ headers: {
6460
+ [name: string]: unknown;
6461
+ };
6462
+ content: {
6463
+ "application/json": components["schemas"]["RateLimitErrorResponseContent"];
6464
+ };
6465
+ };
6466
+ /** @description InternalServerError 500 response */
6467
+ 500: {
6468
+ headers: {
6469
+ [name: string]: unknown;
6470
+ };
6471
+ content: {
6472
+ "application/json": components["schemas"]["InternalServerErrorResponseContent"];
6473
+ };
6474
+ };
6475
+ };
6476
+ };
6477
+ CreateCampfireUpload: {
6478
+ parameters: {
6479
+ query: {
6480
+ /** @description Filename for the uploaded file (e.g. "report.pdf"). */
6481
+ name: string;
6482
+ };
6483
+ header?: never;
6484
+ path: {
6485
+ campfireId: number;
6486
+ };
6487
+ cookie?: never;
6488
+ };
6489
+ requestBody: {
6490
+ content: {
6491
+ "application/octet-stream": components["schemas"]["CreateCampfireUploadInputPayload"];
6492
+ };
6493
+ };
6494
+ responses: {
6495
+ /** @description CreateCampfireUpload 201 response */
6496
+ 201: {
6497
+ headers: {
6498
+ [name: string]: unknown;
6499
+ };
6500
+ content: {
6501
+ "application/json": components["schemas"]["CreateCampfireUploadResponseContent"];
6502
+ };
6503
+ };
6504
+ /** @description UnauthorizedError 401 response */
6505
+ 401: {
6506
+ headers: {
6507
+ [name: string]: unknown;
6508
+ };
6509
+ content: {
6510
+ "application/json": components["schemas"]["UnauthorizedErrorResponseContent"];
6511
+ };
6512
+ };
6513
+ /** @description ForbiddenError 403 response */
6514
+ 403: {
6515
+ headers: {
6516
+ [name: string]: unknown;
6517
+ };
6518
+ content: {
6519
+ "application/json": components["schemas"]["ForbiddenErrorResponseContent"];
6520
+ };
6521
+ };
6522
+ /** @description ValidationError 422 response */
6523
+ 422: {
6524
+ headers: {
6525
+ [name: string]: unknown;
6526
+ };
6527
+ content: {
6528
+ "application/json": components["schemas"]["ValidationErrorResponseContent"];
6529
+ };
6530
+ };
6531
+ /** @description RateLimitError 429 response */
6532
+ 429: {
6533
+ headers: {
6534
+ [name: string]: unknown;
6535
+ };
6536
+ content: {
6537
+ "application/json": components["schemas"]["RateLimitErrorResponseContent"];
6538
+ };
6539
+ };
6540
+ /** @description InternalServerError 500 response */
6541
+ 500: {
6542
+ headers: {
6543
+ [name: string]: unknown;
6544
+ };
6545
+ content: {
6546
+ "application/json": components["schemas"]["InternalServerErrorResponseContent"];
6547
+ };
6548
+ };
6549
+ };
6550
+ };
6378
6551
  ListPingablePeople: {
6379
6552
  parameters: {
6380
6553
  query?: never;
@@ -12276,10 +12449,9 @@ export interface operations {
12276
12449
  Search: {
12277
12450
  parameters: {
12278
12451
  query: {
12279
- query: string;
12452
+ q: string;
12280
12453
  /** @description created_at|updated_at */
12281
12454
  sort?: string;
12282
- page?: number;
12283
12455
  };
12284
12456
  header?: never;
12285
12457
  path?: never;
@@ -69,6 +69,12 @@ export interface CreateLineCampfireRequest {
69
69
  contentType?: string;
70
70
  }
71
71
 
72
+ /**
73
+ * Options for listUploads.
74
+ */
75
+ export interface ListUploadsCampfireOptions extends PaginationOptions {
76
+ }
77
+
72
78
 
73
79
  // =============================================================================
74
80
  // Service
@@ -430,4 +436,73 @@ export class CampfiresService extends BaseService {
430
436
  })
431
437
  );
432
438
  }
439
+
440
+ /**
441
+ * List uploaded files in a campfire
442
+ * @param campfireId - The campfire ID
443
+ * @param options - Optional query parameters
444
+ * @returns All CampfireLine across all pages, with .meta.totalCount
445
+ *
446
+ * @example
447
+ * ```ts
448
+ * const result = await client.campfires.listUploads(123);
449
+ * ```
450
+ */
451
+ async listUploads(campfireId: number, options?: ListUploadsCampfireOptions): Promise<ListResult<CampfireLine>> {
452
+ return this.requestPaginated(
453
+ {
454
+ service: "Campfires",
455
+ operation: "ListCampfireUploads",
456
+ resourceType: "campfire_upload",
457
+ isMutation: false,
458
+ resourceId: campfireId,
459
+ },
460
+ () =>
461
+ this.client.GET("/chats/{campfireId}/uploads.json", {
462
+ params: {
463
+ path: { campfireId },
464
+ },
465
+ })
466
+ , options
467
+ );
468
+ }
469
+
470
+ /**
471
+ * Upload a file to a campfire
472
+ * @param campfireId - The campfire ID
473
+ * @param data - Binary file data to upload
474
+ * @param contentType - MIME type of the file (e.g., "image/png", "application/pdf")
475
+ * @param name - Filename for the uploaded file (e.g. "report.pdf").
476
+ * @returns The CampfireLine
477
+ * @throws {BasecampError} If required fields are missing or invalid
478
+ *
479
+ * @example
480
+ * ```ts
481
+ * const result = await client.campfires.createUpload(123, fileData, "image/png", "name");
482
+ * ```
483
+ */
484
+ async createUpload(campfireId: number, data: ArrayBuffer | Uint8Array | string, contentType: string, name: string): Promise<CampfireLine> {
485
+ const response = await this.request(
486
+ {
487
+ service: "Campfires",
488
+ operation: "CreateCampfireUpload",
489
+ resourceType: "campfire_upload",
490
+ isMutation: true,
491
+ resourceId: campfireId,
492
+ },
493
+ () =>
494
+ this.client.POST("/chats/{campfireId}/uploads.json", {
495
+ params: {
496
+ path: { campfireId },
497
+ query: { name: name },
498
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
499
+ header: { "Content-Type": contentType } as any,
500
+ },
501
+ body: data as unknown as string,
502
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
503
+ bodySerializer: (body: unknown) => body as any,
504
+ })
505
+ );
506
+ return response;
507
+ }
433
508
  }
@@ -20,8 +20,6 @@ import type { PaginationOptions } from "../../pagination.js";
20
20
  export interface SearchSearchOptions extends PaginationOptions {
21
21
  /** Filter by sort */
22
22
  sort?: "created_at" | "updated_at";
23
- /** Page */
24
- page?: number;
25
23
  }
26
24
 
27
25
 
@@ -36,16 +34,16 @@ export class SearchService extends BaseService {
36
34
 
37
35
  /**
38
36
  * Search for content across the account
39
- * @param query - query
37
+ * @param q - q
40
38
  * @param options - Optional query parameters
41
39
  * @returns All results across all pages, with .meta.totalCount
42
40
  *
43
41
  * @example
44
42
  * ```ts
45
- * const result = await client.search.search("query");
43
+ * const result = await client.search.search("q");
46
44
  * ```
47
45
  */
48
- async search(query: string, options?: SearchSearchOptions): Promise<components["schemas"]["SearchResponseContent"]> {
46
+ async search(q: string, options?: SearchSearchOptions): Promise<components["schemas"]["SearchResponseContent"]> {
49
47
  return this.requestPaginated(
50
48
  {
51
49
  service: "Search",
@@ -56,7 +54,7 @@ export class SearchService extends BaseService {
56
54
  () =>
57
55
  this.client.GET("/search.json", {
58
56
  params: {
59
- query: { query: query, sort: options?.sort, page: options?.page },
57
+ query: { q: q, sort: options?.sort },
60
58
  },
61
59
  })
62
60
  , options