basecamp-client 1.0.9 → 1.0.10
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.mts +1466 -388
- package/dist/index.d.ts +1466 -388
- package/dist/index.js +170 -91
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +170 -91
- package/dist/index.mjs.map +1 -1
- package/openapi.json +1025 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -130,7 +130,7 @@ async function asyncPagedToArray(options) {
|
|
|
130
130
|
import { initClient as tsRestInitClient } from "@ts-rest/core";
|
|
131
131
|
|
|
132
132
|
// src/contract/index.ts
|
|
133
|
-
import { z as
|
|
133
|
+
import { z as z71 } from "zod";
|
|
134
134
|
|
|
135
135
|
// src/contract/c.ts
|
|
136
136
|
import { initContract } from "@ts-rest/core";
|
|
@@ -2229,7 +2229,7 @@ var CardTableCardUpdateBodySchema = z48.object({
|
|
|
2229
2229
|
);
|
|
2230
2230
|
var CardTableCardMoveBodySchema = z48.object({
|
|
2231
2231
|
column_id: BasecampIdSchema,
|
|
2232
|
-
position: z48.number().int().
|
|
2232
|
+
position: z48.number().int().positive().optional()
|
|
2233
2233
|
});
|
|
2234
2234
|
|
|
2235
2235
|
// src/contract/resources/kanban/card-tables.ts
|
|
@@ -2904,26 +2904,104 @@ var questionsRouter = c.router({
|
|
|
2904
2904
|
}
|
|
2905
2905
|
});
|
|
2906
2906
|
|
|
2907
|
-
// src/contract/resources/
|
|
2907
|
+
// src/contract/resources/scheduling/question-answers.ts
|
|
2908
2908
|
import { z as z62 } from "zod";
|
|
2909
2909
|
|
|
2910
|
-
// src/contract/schemas/
|
|
2910
|
+
// src/contract/schemas/scheduling/question-answers.ts
|
|
2911
2911
|
import { z as z61 } from "zod";
|
|
2912
|
+
var QuestionAnswerSchema = RecordingBaseSchema.extend({
|
|
2913
|
+
type: z61.literal("Question::Answer"),
|
|
2914
|
+
content: HtmlStringSchema,
|
|
2915
|
+
group_on: z61.string()
|
|
2916
|
+
});
|
|
2917
|
+
var QuestionAnswerListResponseSchema = z61.array(QuestionAnswerSchema);
|
|
2918
|
+
var QuestionAnswerListQuerySchema = z61.object({
|
|
2919
|
+
page: z61.coerce.number().int().positive().optional()
|
|
2920
|
+
});
|
|
2921
|
+
var QuestionAnswerCreateBodySchema = z61.object({
|
|
2922
|
+
content: HtmlStringSchema.min(1),
|
|
2923
|
+
group_on: z61.string()
|
|
2924
|
+
});
|
|
2925
|
+
|
|
2926
|
+
// src/contract/resources/scheduling/question-answers.ts
|
|
2927
|
+
var bucketAndQuestionPathParams2 = z62.object({
|
|
2928
|
+
bucketId: BasecampIdParamSchema,
|
|
2929
|
+
questionId: BasecampIdParamSchema
|
|
2930
|
+
});
|
|
2931
|
+
var bucketAndAnswerPathParams = z62.object({
|
|
2932
|
+
bucketId: BasecampIdParamSchema,
|
|
2933
|
+
answerId: BasecampIdParamSchema
|
|
2934
|
+
});
|
|
2935
|
+
var questionAnswersRouter = c.router({
|
|
2936
|
+
list: {
|
|
2937
|
+
summary: "List question answers",
|
|
2938
|
+
description: "Returns a paginated list of answers for a specific check-in question.",
|
|
2939
|
+
metadata: {
|
|
2940
|
+
tag: "Question Answers",
|
|
2941
|
+
operationId: "questionAnswers.list",
|
|
2942
|
+
docsPath: "/docs/basecamp-api-specs/sections/question_answers.md#get-question-answers"
|
|
2943
|
+
},
|
|
2944
|
+
method: "GET",
|
|
2945
|
+
path: "/buckets/:bucketId/questions/:questionId/answers",
|
|
2946
|
+
pathParams: bucketAndQuestionPathParams2,
|
|
2947
|
+
query: QuestionAnswerListQuerySchema,
|
|
2948
|
+
responses: {
|
|
2949
|
+
200: QuestionAnswerListResponseSchema
|
|
2950
|
+
}
|
|
2951
|
+
},
|
|
2952
|
+
get: {
|
|
2953
|
+
summary: "Get a question answer",
|
|
2954
|
+
description: "Returns a single question answer by its ID.",
|
|
2955
|
+
metadata: {
|
|
2956
|
+
tag: "Question Answers",
|
|
2957
|
+
operationId: "questionAnswers.get",
|
|
2958
|
+
docsPath: "/docs/basecamp-api-specs/sections/question_answers.md#get-a-question-answer"
|
|
2959
|
+
},
|
|
2960
|
+
method: "GET",
|
|
2961
|
+
path: "/buckets/:bucketId/question_answers/:answerId",
|
|
2962
|
+
pathParams: bucketAndAnswerPathParams,
|
|
2963
|
+
responses: {
|
|
2964
|
+
200: QuestionAnswerSchema
|
|
2965
|
+
}
|
|
2966
|
+
},
|
|
2967
|
+
create: {
|
|
2968
|
+
summary: "Create a question answer",
|
|
2969
|
+
description: "Create a new answer for a check-in question.",
|
|
2970
|
+
metadata: {
|
|
2971
|
+
tag: "Question Answers",
|
|
2972
|
+
operationId: "questionAnswers.create",
|
|
2973
|
+
docsPath: "/docs/basecamp-api-specs/sections/question_answers.md#get-question-answers"
|
|
2974
|
+
},
|
|
2975
|
+
method: "POST",
|
|
2976
|
+
path: "/buckets/:bucketId/questions/:questionId/answers",
|
|
2977
|
+
pathParams: bucketAndQuestionPathParams2,
|
|
2978
|
+
body: QuestionAnswerCreateBodySchema,
|
|
2979
|
+
responses: {
|
|
2980
|
+
201: QuestionAnswerSchema
|
|
2981
|
+
}
|
|
2982
|
+
}
|
|
2983
|
+
});
|
|
2984
|
+
|
|
2985
|
+
// src/contract/resources/tasks/todosets.ts
|
|
2986
|
+
import { z as z64 } from "zod";
|
|
2987
|
+
|
|
2988
|
+
// src/contract/schemas/tasks/todosets.ts
|
|
2989
|
+
import { z as z63 } from "zod";
|
|
2912
2990
|
var TodoSetSchema = RecordingBaseSchema.omit({
|
|
2913
2991
|
subscription_url: true,
|
|
2914
2992
|
comments_count: true,
|
|
2915
2993
|
comments_url: true
|
|
2916
2994
|
}).extend({
|
|
2917
|
-
completed:
|
|
2918
|
-
completed_ratio:
|
|
2919
|
-
name:
|
|
2920
|
-
todolists_count:
|
|
2921
|
-
todolists_url:
|
|
2922
|
-
app_todoslists_url:
|
|
2995
|
+
completed: z63.boolean(),
|
|
2996
|
+
completed_ratio: z63.string(),
|
|
2997
|
+
name: z63.string(),
|
|
2998
|
+
todolists_count: z63.number().int().nonnegative(),
|
|
2999
|
+
todolists_url: z63.string().url(),
|
|
3000
|
+
app_todoslists_url: z63.string().url()
|
|
2923
3001
|
});
|
|
2924
3002
|
|
|
2925
3003
|
// src/contract/resources/tasks/todosets.ts
|
|
2926
|
-
var bucketPathParams2 =
|
|
3004
|
+
var bucketPathParams2 = z64.object({
|
|
2927
3005
|
bucketId: BasecampIdParamSchema
|
|
2928
3006
|
});
|
|
2929
3007
|
var bucketAndTodoSetPathParams = bucketPathParams2.extend({
|
|
@@ -2948,42 +3026,42 @@ var todoSetsRouter = c.router({
|
|
|
2948
3026
|
});
|
|
2949
3027
|
|
|
2950
3028
|
// src/contract/resources/tasks/todolists.ts
|
|
2951
|
-
import { z as
|
|
3029
|
+
import { z as z66 } from "zod";
|
|
2952
3030
|
|
|
2953
3031
|
// src/contract/schemas/tasks/todolists.ts
|
|
2954
|
-
import { z as
|
|
3032
|
+
import { z as z65 } from "zod";
|
|
2955
3033
|
var TodoListBaseSchema = RecordingBaseSchema.extend({
|
|
2956
|
-
type:
|
|
3034
|
+
type: z65.literal("Todolist"),
|
|
2957
3035
|
description: HtmlStringSchema.optional(),
|
|
2958
|
-
completed:
|
|
2959
|
-
completed_ratio:
|
|
2960
|
-
name:
|
|
2961
|
-
todos_url:
|
|
2962
|
-
app_todos_url:
|
|
3036
|
+
completed: z65.boolean(),
|
|
3037
|
+
completed_ratio: z65.string(),
|
|
3038
|
+
name: z65.string(),
|
|
3039
|
+
todos_url: z65.string().url(),
|
|
3040
|
+
app_todos_url: z65.string().url()
|
|
2963
3041
|
});
|
|
2964
3042
|
var TodoTopLevelListSchema = TodoListBaseSchema.extend({
|
|
2965
|
-
groups_url:
|
|
3043
|
+
groups_url: z65.string().url()
|
|
2966
3044
|
});
|
|
2967
3045
|
var TodoListGroupSchema = TodoListBaseSchema.extend({
|
|
2968
|
-
group_position_url:
|
|
3046
|
+
group_position_url: z65.string().url()
|
|
2969
3047
|
});
|
|
2970
|
-
var TodoListSchema =
|
|
2971
|
-
var TodoListsResponseSchema =
|
|
2972
|
-
var TodoListQuerySchema =
|
|
2973
|
-
status:
|
|
2974
|
-
page:
|
|
3048
|
+
var TodoListSchema = z65.union([TodoTopLevelListSchema, TodoListGroupSchema]);
|
|
3049
|
+
var TodoListsResponseSchema = z65.array(TodoTopLevelListSchema);
|
|
3050
|
+
var TodoListQuerySchema = z65.object({
|
|
3051
|
+
status: z65.enum(["active", "archived", "trashed"]).or(z65.string()).optional(),
|
|
3052
|
+
page: z65.coerce.number().int().positive().optional()
|
|
2975
3053
|
});
|
|
2976
|
-
var TodoListCreateBodySchema =
|
|
2977
|
-
name:
|
|
3054
|
+
var TodoListCreateBodySchema = z65.object({
|
|
3055
|
+
name: z65.string().min(1),
|
|
2978
3056
|
description: HtmlStringSchema.nullable().optional()
|
|
2979
3057
|
});
|
|
2980
|
-
var TodoListUpdateBodySchema =
|
|
2981
|
-
name:
|
|
3058
|
+
var TodoListUpdateBodySchema = z65.object({
|
|
3059
|
+
name: z65.string().min(1),
|
|
2982
3060
|
description: HtmlStringSchema.nullable().optional()
|
|
2983
3061
|
});
|
|
2984
3062
|
|
|
2985
3063
|
// src/contract/resources/tasks/todolists.ts
|
|
2986
|
-
var bucketPathParams3 =
|
|
3064
|
+
var bucketPathParams3 = z66.object({
|
|
2987
3065
|
bucketId: BasecampIdParamSchema
|
|
2988
3066
|
});
|
|
2989
3067
|
var bucketAndTodoSetPathParams2 = bucketPathParams3.extend({
|
|
@@ -3075,31 +3153,31 @@ var todoListsRouter = c.router({
|
|
|
3075
3153
|
});
|
|
3076
3154
|
|
|
3077
3155
|
// src/contract/resources/tasks/todolist-groups.ts
|
|
3078
|
-
import { z as
|
|
3156
|
+
import { z as z68 } from "zod";
|
|
3079
3157
|
|
|
3080
3158
|
// src/contract/schemas/tasks/todolist-groups.ts
|
|
3081
|
-
import { z as
|
|
3159
|
+
import { z as z67 } from "zod";
|
|
3082
3160
|
var TodoListBaseSchema2 = RecordingBaseSchema.extend({
|
|
3083
|
-
type:
|
|
3161
|
+
type: z67.literal("Todolist"),
|
|
3084
3162
|
description: HtmlStringSchema.optional(),
|
|
3085
|
-
completed:
|
|
3086
|
-
completed_ratio:
|
|
3087
|
-
name:
|
|
3088
|
-
todos_url:
|
|
3089
|
-
app_todos_url:
|
|
3163
|
+
completed: z67.boolean(),
|
|
3164
|
+
completed_ratio: z67.string(),
|
|
3165
|
+
name: z67.string(),
|
|
3166
|
+
todos_url: z67.string().url(),
|
|
3167
|
+
app_todos_url: z67.string().url()
|
|
3090
3168
|
});
|
|
3091
3169
|
var TodoListGroupSchema2 = TodoListBaseSchema2.extend({
|
|
3092
|
-
group_position_url:
|
|
3170
|
+
group_position_url: z67.string().url()
|
|
3093
3171
|
});
|
|
3094
3172
|
var TodoListSchema2 = TodoListGroupSchema2;
|
|
3095
|
-
var TodoListGroupsResponseSchema =
|
|
3096
|
-
var TodoListGroupQuerySchema =
|
|
3097
|
-
status:
|
|
3098
|
-
page:
|
|
3173
|
+
var TodoListGroupsResponseSchema = z67.array(TodoListGroupSchema2);
|
|
3174
|
+
var TodoListGroupQuerySchema = z67.object({
|
|
3175
|
+
status: z67.enum(["active", "archived", "trashed"]).or(z67.string()).optional(),
|
|
3176
|
+
page: z67.coerce.number().int().positive().optional()
|
|
3099
3177
|
});
|
|
3100
|
-
var TodoListGroupCreateBodySchema =
|
|
3101
|
-
name:
|
|
3102
|
-
color:
|
|
3178
|
+
var TodoListGroupCreateBodySchema = z67.object({
|
|
3179
|
+
name: z67.string().min(1),
|
|
3180
|
+
color: z67.enum([
|
|
3103
3181
|
"white",
|
|
3104
3182
|
"red",
|
|
3105
3183
|
"orange",
|
|
@@ -3111,14 +3189,14 @@ var TodoListGroupCreateBodySchema = z65.object({
|
|
|
3111
3189
|
"gray",
|
|
3112
3190
|
"pink",
|
|
3113
3191
|
"brown"
|
|
3114
|
-
]).or(
|
|
3192
|
+
]).or(z67.string()).optional()
|
|
3115
3193
|
});
|
|
3116
|
-
var TodoListGroupRepositionBodySchema =
|
|
3117
|
-
position:
|
|
3194
|
+
var TodoListGroupRepositionBodySchema = z67.object({
|
|
3195
|
+
position: z67.number().int().gte(1)
|
|
3118
3196
|
});
|
|
3119
3197
|
|
|
3120
3198
|
// src/contract/resources/tasks/todolist-groups.ts
|
|
3121
|
-
var bucketPathParams4 =
|
|
3199
|
+
var bucketPathParams4 = z68.object({
|
|
3122
3200
|
bucketId: BasecampIdParamSchema
|
|
3123
3201
|
});
|
|
3124
3202
|
var bucketAndTodoListPathParams2 = bucketPathParams4.extend({
|
|
@@ -3179,56 +3257,56 @@ var todoListGroupsRouter = c.router({
|
|
|
3179
3257
|
});
|
|
3180
3258
|
|
|
3181
3259
|
// src/contract/resources/tasks/todos.ts
|
|
3182
|
-
import { z as
|
|
3260
|
+
import { z as z70 } from "zod";
|
|
3183
3261
|
|
|
3184
3262
|
// src/contract/schemas/tasks/todos.ts
|
|
3185
|
-
import { z as
|
|
3186
|
-
var TodoCompletionSchema =
|
|
3263
|
+
import { z as z69 } from "zod";
|
|
3264
|
+
var TodoCompletionSchema = z69.object({
|
|
3187
3265
|
created_at: IsoDateTimeSchema,
|
|
3188
3266
|
creator: PersonSummarySchema
|
|
3189
3267
|
});
|
|
3190
3268
|
var TodoSchema = RecordingBaseSchema.extend({
|
|
3191
|
-
type:
|
|
3269
|
+
type: z69.literal("Todo"),
|
|
3192
3270
|
description: HtmlStringSchema.optional(),
|
|
3193
|
-
completed:
|
|
3271
|
+
completed: z69.boolean(),
|
|
3194
3272
|
completion: TodoCompletionSchema.optional(),
|
|
3195
|
-
content:
|
|
3196
|
-
starts_on:
|
|
3197
|
-
due_on:
|
|
3198
|
-
assignees:
|
|
3199
|
-
completion_subscribers:
|
|
3200
|
-
completion_url:
|
|
3201
|
-
});
|
|
3202
|
-
var TodoCollectionResponseSchema =
|
|
3203
|
-
var TodoQuerySchema =
|
|
3204
|
-
status:
|
|
3205
|
-
completed:
|
|
3206
|
-
page:
|
|
3207
|
-
});
|
|
3208
|
-
var TodoCreateBodySchema =
|
|
3209
|
-
content:
|
|
3273
|
+
content: z69.string(),
|
|
3274
|
+
starts_on: z69.string().date().nullable().optional(),
|
|
3275
|
+
due_on: z69.string().date().nullable().optional(),
|
|
3276
|
+
assignees: z69.array(PersonSummarySchema),
|
|
3277
|
+
completion_subscribers: z69.array(PersonSummarySchema),
|
|
3278
|
+
completion_url: z69.string().url()
|
|
3279
|
+
});
|
|
3280
|
+
var TodoCollectionResponseSchema = z69.array(TodoSchema);
|
|
3281
|
+
var TodoQuerySchema = z69.object({
|
|
3282
|
+
status: z69.enum(["active", "archived", "trashed"]).or(z69.string()).optional(),
|
|
3283
|
+
completed: z69.literal(true).optional(),
|
|
3284
|
+
page: z69.coerce.number().int().positive().optional()
|
|
3285
|
+
});
|
|
3286
|
+
var TodoCreateBodySchema = z69.object({
|
|
3287
|
+
content: z69.string().min(1),
|
|
3210
3288
|
description: HtmlStringSchema.nullable().optional(),
|
|
3211
|
-
assignee_ids:
|
|
3212
|
-
completion_subscriber_ids:
|
|
3213
|
-
notify:
|
|
3214
|
-
due_on:
|
|
3215
|
-
starts_on:
|
|
3216
|
-
});
|
|
3217
|
-
var TodoUpdateBodySchema =
|
|
3218
|
-
content:
|
|
3289
|
+
assignee_ids: z69.array(BasecampIdSchema).optional(),
|
|
3290
|
+
completion_subscriber_ids: z69.array(BasecampIdSchema).optional(),
|
|
3291
|
+
notify: z69.boolean().optional(),
|
|
3292
|
+
due_on: z69.string().date().nullable().optional(),
|
|
3293
|
+
starts_on: z69.string().date().nullable().optional()
|
|
3294
|
+
});
|
|
3295
|
+
var TodoUpdateBodySchema = z69.object({
|
|
3296
|
+
content: z69.string().min(1),
|
|
3219
3297
|
description: HtmlStringSchema.nullable().optional(),
|
|
3220
|
-
assignee_ids:
|
|
3221
|
-
completion_subscriber_ids:
|
|
3222
|
-
notify:
|
|
3223
|
-
due_on:
|
|
3224
|
-
starts_on:
|
|
3298
|
+
assignee_ids: z69.array(BasecampIdSchema).optional(),
|
|
3299
|
+
completion_subscriber_ids: z69.array(BasecampIdSchema).optional(),
|
|
3300
|
+
notify: z69.boolean().optional(),
|
|
3301
|
+
due_on: z69.string().date().nullable().optional(),
|
|
3302
|
+
starts_on: z69.string().date().nullable().optional()
|
|
3225
3303
|
});
|
|
3226
|
-
var TodoRepositionBodySchema =
|
|
3227
|
-
position:
|
|
3304
|
+
var TodoRepositionBodySchema = z69.object({
|
|
3305
|
+
position: z69.number().int().gte(1)
|
|
3228
3306
|
});
|
|
3229
3307
|
|
|
3230
3308
|
// src/contract/resources/tasks/todos.ts
|
|
3231
|
-
var bucketPathParams5 =
|
|
3309
|
+
var bucketPathParams5 = z70.object({
|
|
3232
3310
|
bucketId: BasecampIdParamSchema
|
|
3233
3311
|
});
|
|
3234
3312
|
var bucketAndTodoListPathParams3 = bucketPathParams5.extend({
|
|
@@ -3399,6 +3477,7 @@ var contract = c.router(
|
|
|
3399
3477
|
scheduleEntries: scheduleEntriesRouter,
|
|
3400
3478
|
questionnaires: questionnairesRouter,
|
|
3401
3479
|
questions: questionsRouter,
|
|
3480
|
+
questionAnswers: questionAnswersRouter,
|
|
3402
3481
|
documents: documentsRouter,
|
|
3403
3482
|
vaults: vaultsRouter,
|
|
3404
3483
|
uploads: uploadsRouter,
|
|
@@ -3407,10 +3486,10 @@ var contract = c.router(
|
|
|
3407
3486
|
},
|
|
3408
3487
|
{
|
|
3409
3488
|
strictStatusCodes: true,
|
|
3410
|
-
baseHeaders:
|
|
3411
|
-
Authorization:
|
|
3412
|
-
"User-Agent":
|
|
3413
|
-
Accept:
|
|
3489
|
+
baseHeaders: z71.object({
|
|
3490
|
+
Authorization: z71.string().min(1),
|
|
3491
|
+
"User-Agent": z71.string().min(1).optional(),
|
|
3492
|
+
Accept: z71.literal("application/json").optional()
|
|
3414
3493
|
})
|
|
3415
3494
|
}
|
|
3416
3495
|
);
|