@dsptch-work/api-client 0.25.0 → 0.27.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.
@@ -291,6 +291,27 @@ export class ApprenticeshipEmployers {
291
291
  ...options
292
292
  });
293
293
  }
294
+ /**
295
+ * Show apprenticeship employer
296
+ *
297
+ * Returns one employer roster row in a program the key's company sponsors
298
+ * or is enrolled in as an employer. The object matches the list, create,
299
+ * and update door. A missing, mismatched, or out-of-scope id reads as
300
+ * not found.
301
+ *
302
+ *
303
+ * **Required scope:**
304
+ *
305
+ * `apprenticeship.programs.employers:read`
306
+ *
307
+ */
308
+ static getEmployer(options) {
309
+ return (options.client ?? client).get({
310
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
311
+ url: '/api/v1/apprenticeship/programs/{program_id}/employers/{id}',
312
+ ...options
313
+ });
314
+ }
294
315
  /**
295
316
  * Update apprenticeship employer
296
317
  *
@@ -440,6 +461,48 @@ export class ApprenticeshipWageSchedulePeriods {
440
461
  }
441
462
  });
442
463
  }
464
+ /**
465
+ * Delete apprenticeship wage schedule period
466
+ *
467
+ * Deletes an unused non-opening period nested under the wage schedule in
468
+ * the path. Period 0 (the entry step) and a period with active apprentices
469
+ * are refused with a `422`. An unused later period returns `204`. Deletes
470
+ * are sponsor-only; an enrolled employer is `403`. A missing, out-of-scope,
471
+ * or mismatched schedule/period pair is `404`.
472
+ *
473
+ *
474
+ * **Required scope:**
475
+ *
476
+ * `apprenticeship.wage_schedules.periods:delete`
477
+ *
478
+ */
479
+ static deletePeriod(options) {
480
+ return (options.client ?? client).delete({
481
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
482
+ url: '/api/v1/apprenticeship/wage_schedules/{wage_schedule_id}/periods/{id}',
483
+ ...options
484
+ });
485
+ }
486
+ /**
487
+ * Show apprenticeship wage schedule period
488
+ *
489
+ * Returns one period nested under the wage schedule in the path. The
490
+ * object matches the list, create, and update door. A missing, out-of-scope,
491
+ * or mismatched schedule/period pair is not found.
492
+ *
493
+ *
494
+ * **Required scope:**
495
+ *
496
+ * `apprenticeship.wage_schedules.periods:read`
497
+ *
498
+ */
499
+ static getPeriod(options) {
500
+ return (options.client ?? client).get({
501
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
502
+ url: '/api/v1/apprenticeship/wage_schedules/{wage_schedule_id}/periods/{id}',
503
+ ...options
504
+ });
505
+ }
443
506
  /**
444
507
  * Update apprenticeship wage schedule period
445
508
  *
@@ -2127,6 +2190,44 @@ export class CertificationPackages {
2127
2190
  }
2128
2191
  }
2129
2192
  export class UserCertifications {
2193
+ /**
2194
+ * Revoke user certification approval
2195
+ *
2196
+ * Revokes the approval on a certification held by a worker.
2197
+ *
2198
+ * **Required scope:**
2199
+ *
2200
+ * `certifications.user_certifications.approvals:delete`
2201
+ *
2202
+ */
2203
+ static revokeUserCertificationApproval(options) {
2204
+ return (options.client ?? client).delete({
2205
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2206
+ url: '/api/v1/certifications/user_certifications/{user_certification_id}/approval',
2207
+ ...options
2208
+ });
2209
+ }
2210
+ /**
2211
+ * Approve user certification
2212
+ *
2213
+ * Records who approved a certification held by a worker and stamps when. A user key approves in its own user's name; a company key names the approver. A company key must name a visible admin, manager, or safety manager at its company. A user key needs an approving role at a company that employs the holder. The approver cannot be the holder.
2214
+ *
2215
+ * **Required scope:**
2216
+ *
2217
+ * `certifications.user_certifications.approvals:create`
2218
+ *
2219
+ */
2220
+ static approveUserCertification(options) {
2221
+ return (options.client ?? client).post({
2222
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2223
+ url: '/api/v1/certifications/user_certifications/{user_certification_id}/approval',
2224
+ ...options,
2225
+ headers: {
2226
+ 'Content-Type': 'application/json',
2227
+ ...options.headers
2228
+ }
2229
+ });
2230
+ }
2130
2231
  /**
2131
2232
  * List user certifications
2132
2233
  *
@@ -2336,8 +2437,9 @@ export class CompaniesDepartments {
2336
2437
  *
2337
2438
  * Deletes a department that has no employment assignments. A department still
2338
2439
  * assigned on any employment is refused with a `422` — reassign those
2339
- * employments first. An unused department returns `204` and is gone from a
2340
- * later GET.
2440
+ * employments first. Deleting a department clears its assignment on jobs
2441
+ * while preserving those jobs. A successful deletion returns `204` and the
2442
+ * department is gone from a later GET.
2341
2443
  *
2342
2444
  *
2343
2445
  * **Required scope:**
@@ -2641,6 +2743,21 @@ export class Forms {
2641
2743
  ...options
2642
2744
  });
2643
2745
  }
2746
+ /**
2747
+ * Show form definition
2748
+ *
2749
+ * **Required scope:**
2750
+ *
2751
+ * `form_definitions:read`
2752
+ *
2753
+ */
2754
+ static getFormDefinition(options) {
2755
+ return (options.client ?? client).get({
2756
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2757
+ url: '/api/v1/form_definitions/{id}',
2758
+ ...options
2759
+ });
2760
+ }
2644
2761
  /**
2645
2762
  * List form submission versions
2646
2763
  *
@@ -2861,10 +2978,400 @@ export class Groups {
2861
2978
  });
2862
2979
  }
2863
2980
  }
2981
+ export class Jobs {
2982
+ /**
2983
+ * List form assignment tasks for job
2984
+ *
2985
+ * Returns form-completion tasks nested on the named job.
2986
+ * `{id}` is the `Tasks::JobFormAssignmentTask` id, not the web
2987
+ * show `Task#uid`. A missing or out-of-scope job reads as not
2988
+ * found.
2989
+ *
2990
+ *
2991
+ * **Required scope:**
2992
+ *
2993
+ * `jobs.form_assignment_tasks:read`
2994
+ *
2995
+ */
2996
+ static listJobFormAssignmentTasks(options) {
2997
+ return (options.client ?? client).get({
2998
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2999
+ url: '/api/v1/jobs/{job_id}/form_assignment_tasks',
3000
+ ...options
3001
+ });
3002
+ }
3003
+ /**
3004
+ * Create form assignment task for job
3005
+ *
3006
+ * Creates a form-completion task on the named job. `job_id` is
3007
+ * the path only. `form_definition_id` and
3008
+ * `task_attributes.created_by_user_id` are required.
3009
+ *
3010
+ *
3011
+ * **Required scope:**
3012
+ *
3013
+ * `jobs.form_assignment_tasks:create`
3014
+ *
3015
+ */
3016
+ static createJobFormAssignmentTask(options) {
3017
+ return (options.client ?? client).post({
3018
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3019
+ url: '/api/v1/jobs/{job_id}/form_assignment_tasks',
3020
+ ...options,
3021
+ headers: {
3022
+ 'Content-Type': 'application/json',
3023
+ ...options.headers
3024
+ }
3025
+ });
3026
+ }
3027
+ /**
3028
+ * Show form assignment task on job
3029
+ *
3030
+ * Returns one form-completion task on the named job. `{id}` is
3031
+ * the `Tasks::JobFormAssignmentTask` id. A missing, misnested,
3032
+ * or out-of-scope id reads as not found.
3033
+ *
3034
+ *
3035
+ * **Required scope:**
3036
+ *
3037
+ * `jobs.form_assignment_tasks:read`
3038
+ *
3039
+ */
3040
+ static getJobFormAssignmentTask(options) {
3041
+ return (options.client ?? client).get({
3042
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3043
+ url: '/api/v1/jobs/{job_id}/form_assignment_tasks/{id}',
3044
+ ...options
3045
+ });
3046
+ }
3047
+ /**
3048
+ * Update form assignment task on job
3049
+ *
3050
+ * Updates the existing task in place. `job_id` is the path only.
3051
+ * Replacing `task_assignee_user_ids` does not insert join rows
3052
+ * before authorize.
3053
+ *
3054
+ *
3055
+ * **Required scope:**
3056
+ *
3057
+ * `jobs.form_assignment_tasks:update`
3058
+ *
3059
+ */
3060
+ static updateJobFormAssignmentTask(options) {
3061
+ return (options.client ?? client).patch({
3062
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3063
+ url: '/api/v1/jobs/{job_id}/form_assignment_tasks/{id}',
3064
+ ...options,
3065
+ headers: {
3066
+ 'Content-Type': 'application/json',
3067
+ ...options.headers
3068
+ }
3069
+ });
3070
+ }
3071
+ /**
3072
+ * List sites for job
3073
+ *
3074
+ * Returns the job-site join rows on the named job. `{id}` is the
3075
+ * join row, not the Site. A missing or out-of-scope job reads as
3076
+ * not found.
3077
+ *
3078
+ *
3079
+ * **Required scope:**
3080
+ *
3081
+ * `jobs.sites:read`
3082
+ *
3083
+ */
3084
+ static listJobSites(options) {
3085
+ return (options.client ?? client).get({
3086
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3087
+ url: '/api/v1/jobs/{job_id}/sites',
3088
+ ...options
3089
+ });
3090
+ }
3091
+ /**
3092
+ * Create site for job
3093
+ *
3094
+ * Attaches a Site to the named job. `job_id` is the path only.
3095
+ * `site_id` is required; `feature_ids` is optional and replaced
3096
+ * as a set. Duplicate (job, site) pairs are rejected.
3097
+ *
3098
+ *
3099
+ * **Required scope:**
3100
+ *
3101
+ * `jobs.sites:create`
3102
+ *
3103
+ */
3104
+ static createJobSite(options) {
3105
+ return (options.client ?? client).post({
3106
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3107
+ url: '/api/v1/jobs/{job_id}/sites',
3108
+ ...options,
3109
+ headers: {
3110
+ 'Content-Type': 'application/json',
3111
+ ...options.headers
3112
+ }
3113
+ });
3114
+ }
3115
+ /**
3116
+ * Delete site on job
3117
+ *
3118
+ * Removes the job-site join. The Site itself is not deleted.
3119
+ * Job-site features cascade with the join. A job may have zero
3120
+ * sites afterward.
3121
+ *
3122
+ *
3123
+ * **Required scope:**
3124
+ *
3125
+ * `jobs.sites:delete`
3126
+ *
3127
+ */
3128
+ static deleteJobSite(options) {
3129
+ return (options.client ?? client).delete({
3130
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3131
+ url: '/api/v1/jobs/{job_id}/sites/{id}',
3132
+ ...options
3133
+ });
3134
+ }
3135
+ /**
3136
+ * Show site on job
3137
+ *
3138
+ * Returns one job-site join on the named job. `{id}` is the join
3139
+ * row. A missing, misnested, or out-of-scope id reads as not found.
3140
+ *
3141
+ *
3142
+ * **Required scope:**
3143
+ *
3144
+ * `jobs.sites:read`
3145
+ *
3146
+ */
3147
+ static getJobSite(options) {
3148
+ return (options.client ?? client).get({
3149
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3150
+ url: '/api/v1/jobs/{job_id}/sites/{id}',
3151
+ ...options
3152
+ });
3153
+ }
3154
+ /**
3155
+ * Update site on job
3156
+ *
3157
+ * Replaces `feature_ids` on an existing job-site join. `site_id`
3158
+ * cannot be changed. An empty array clears every feature.
3159
+ *
3160
+ *
3161
+ * **Required scope:**
3162
+ *
3163
+ * `jobs.sites:update`
3164
+ *
3165
+ */
3166
+ static updateJobSite(options) {
3167
+ return (options.client ?? client).patch({
3168
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3169
+ url: '/api/v1/jobs/{job_id}/sites/{id}',
3170
+ ...options,
3171
+ headers: {
3172
+ 'Content-Type': 'application/json',
3173
+ ...options.headers
3174
+ }
3175
+ });
3176
+ }
3177
+ /**
3178
+ * List jobs
3179
+ *
3180
+ * **Required scope:**
3181
+ *
3182
+ * `jobs:read`
3183
+ *
3184
+ */
3185
+ static listJobs(options) {
3186
+ return (options?.client ?? client).get({
3187
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3188
+ url: '/api/v1/jobs',
3189
+ ...options
3190
+ });
3191
+ }
3192
+ /**
3193
+ * Create job
3194
+ *
3195
+ * **Required scope:**
3196
+ *
3197
+ * `jobs:create`
3198
+ *
3199
+ */
3200
+ static createJob(options) {
3201
+ return (options.client ?? client).post({
3202
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3203
+ url: '/api/v1/jobs',
3204
+ ...options,
3205
+ headers: {
3206
+ 'Content-Type': 'application/json',
3207
+ ...options.headers
3208
+ }
3209
+ });
3210
+ }
3211
+ /**
3212
+ * Show job
3213
+ *
3214
+ * **Required scope:**
3215
+ *
3216
+ * `jobs:read`
3217
+ *
3218
+ */
3219
+ static getJob(options) {
3220
+ return (options.client ?? client).get({
3221
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3222
+ url: '/api/v1/jobs/{id}',
3223
+ ...options
3224
+ });
3225
+ }
3226
+ /**
3227
+ * Update job
3228
+ *
3229
+ * **Required scope:**
3230
+ *
3231
+ * `jobs:update`
3232
+ *
3233
+ */
3234
+ static updateJob(options) {
3235
+ return (options.client ?? client).patch({
3236
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3237
+ url: '/api/v1/jobs/{id}',
3238
+ ...options,
3239
+ headers: {
3240
+ 'Content-Type': 'application/json',
3241
+ ...options.headers
3242
+ }
3243
+ });
3244
+ }
3245
+ /**
3246
+ * List positions for job
3247
+ *
3248
+ * **Required scope:**
3249
+ *
3250
+ * `jobs.positions:read`
3251
+ *
3252
+ */
3253
+ static listPositions(options) {
3254
+ return (options.client ?? client).get({
3255
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3256
+ url: '/api/v1/jobs/{job_id}/positions',
3257
+ ...options
3258
+ });
3259
+ }
3260
+ /**
3261
+ * Create position for job
3262
+ *
3263
+ * cash_fringe_rate_cents, hourly_rate_cents, pwa_wage_pay_rate_cents and
3264
+ * wage_adder_rate_cents are admin only on user-scoped keys.
3265
+ *
3266
+ *
3267
+ * **Required scope:**
3268
+ *
3269
+ * `jobs.positions:create`
3270
+ *
3271
+ */
3272
+ static createPosition(options) {
3273
+ return (options.client ?? client).post({
3274
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3275
+ url: '/api/v1/jobs/{job_id}/positions',
3276
+ ...options,
3277
+ headers: {
3278
+ 'Content-Type': 'application/json',
3279
+ ...options.headers
3280
+ }
3281
+ });
3282
+ }
3283
+ /**
3284
+ * Delete position on job
3285
+ *
3286
+ * Deletes a position that has no logged work and no restricting
3287
+ * associations. A position still referenced by time entries,
3288
+ * time-card per diems, completion positions, or aggregate logged
3289
+ * work is refused with a `422`. An unused position returns `204`
3290
+ * and is gone from a later GET.
3291
+ *
3292
+ *
3293
+ * **Required scope:**
3294
+ *
3295
+ * `jobs.positions:delete`
3296
+ *
3297
+ */
3298
+ static deletePosition(options) {
3299
+ return (options.client ?? client).delete({
3300
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3301
+ url: '/api/v1/jobs/{job_id}/positions/{id}',
3302
+ ...options
3303
+ });
3304
+ }
3305
+ /**
3306
+ * Show position on job
3307
+ *
3308
+ * Returns one position on the named job. A missing, misnested, or
3309
+ * out-of-scope id reads as not found.
3310
+ *
3311
+ *
3312
+ * **Required scope:**
3313
+ *
3314
+ * `jobs.positions:read`
3315
+ *
3316
+ */
3317
+ static getPosition(options) {
3318
+ return (options.client ?? client).get({
3319
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3320
+ url: '/api/v1/jobs/{job_id}/positions/{id}',
3321
+ ...options
3322
+ });
3323
+ }
3324
+ /**
3325
+ * Update position on job
3326
+ *
3327
+ * cash_fringe_rate_cents, hourly_rate_cents, pwa_wage_pay_rate_cents and
3328
+ * wage_adder_rate_cents are admin only on user-scoped keys.
3329
+ *
3330
+ *
3331
+ * **Required scope:**
3332
+ *
3333
+ * `jobs.positions:update`
3334
+ *
3335
+ */
3336
+ static updatePosition(options) {
3337
+ return (options.client ?? client).patch({
3338
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3339
+ url: '/api/v1/jobs/{job_id}/positions/{id}',
3340
+ ...options,
3341
+ headers: {
3342
+ 'Content-Type': 'application/json',
3343
+ ...options.headers
3344
+ }
3345
+ });
3346
+ }
3347
+ /**
3348
+ * List job templates
3349
+ *
3350
+ * **Required scope:**
3351
+ *
3352
+ * `jobs.templates:read`
3353
+ *
3354
+ */
3355
+ static listTemplates(options) {
3356
+ return (options?.client ?? client).get({
3357
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3358
+ url: '/api/v1/jobs/templates',
3359
+ ...options
3360
+ });
3361
+ }
3362
+ }
2864
3363
  export class ProductionJobScopePrices {
2865
3364
  /**
2866
3365
  * List production job scope prices
2867
3366
  *
3367
+ * Scope prices on a production-tracked job. Company keys,
3368
+ * and user keys held by an administrator, manager, safety
3369
+ * manager, or field lead of the company that owns the job,
3370
+ * receive `unit_price` and `contracted_count`. Other user
3371
+ * keys, held by crew on the job, receive the same rows
3372
+ * without those two fields.
3373
+ *
3374
+ *
2868
3375
  * **Required scope:**
2869
3376
  *
2870
3377
  * `jobs.production.job_scope_prices:read`
@@ -2914,6 +3421,14 @@ export class ProductionJobScopePrices {
2914
3421
  /**
2915
3422
  * Show production job scope price
2916
3423
  *
3424
+ * One scope price on a production-tracked job. Company keys,
3425
+ * and user keys held by an administrator, manager, safety
3426
+ * manager, or field lead of the company that owns the job,
3427
+ * receive `unit_price` and `contracted_count`. Other user
3428
+ * keys, held by crew on the job, receive the price without
3429
+ * those two fields.
3430
+ *
3431
+ *
2917
3432
  * **Required scope:**
2918
3433
  *
2919
3434
  * `jobs.production.job_scope_prices:read`
@@ -3439,102 +3954,116 @@ export class JobWageDeterminations {
3439
3954
  });
3440
3955
  }
3441
3956
  }
3442
- export class Jobs {
3957
+ export class OpenApi {
3443
3958
  /**
3444
- * List jobs
3959
+ * Show OpenAPI spec
3445
3960
  *
3446
- * **Required scope:**
3961
+ * **No scope required:**
3447
3962
  *
3448
- * `jobs:read`
3963
+ * Every authenticated API key may call this endpoint. It returns the machine-readable OpenAPI
3964
+ * document that describes this API.
3965
+ *
3966
+ * **Stability:**
3967
+ *
3968
+ * The document is static between contract changes: it changes only when the API surface
3969
+ * does — an endpoint, field, or schema added or altered — on no fixed schedule. Fetch it
3970
+ * when your integration starts, or when you regenerate a client, rather than on a poll.
3449
3971
  *
3450
3972
  */
3451
- static listJobs(options) {
3973
+ static getOpenapiDocument(options) {
3452
3974
  return (options?.client ?? client).get({
3453
3975
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3454
- url: '/api/v1/jobs',
3976
+ url: '/api/v1/openapi',
3455
3977
  ...options
3456
3978
  });
3457
3979
  }
3980
+ }
3981
+ export class OversiteSiteCheckIns {
3458
3982
  /**
3459
- * Create job
3460
- *
3461
- * **Required scope:**
3983
+ * List Site Check-ins
3462
3984
  *
3463
- * `jobs:create`
3985
+ * Returns only the check-ins visible to the API key's company: those made by its
3986
+ * currently-employed members, plus all of the site's check-ins when the company
3987
+ * holds a claim on it with check-in features enabled. Other check-ins are
3988
+ * omitted, so a visible site can return an empty list.
3464
3989
  *
3465
- */
3466
- static createJob(options) {
3467
- return (options.client ?? client).post({
3468
- security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3469
- url: '/api/v1/jobs',
3470
- ...options,
3471
- headers: {
3472
- 'Content-Type': 'application/json',
3473
- ...options.headers
3474
- }
3475
- });
3476
- }
3477
- /**
3478
- * Show job
3479
3990
  *
3480
3991
  * **Required scope:**
3481
3992
  *
3482
- * `jobs:read`
3993
+ * `oversite.sites.check_ins:read`
3483
3994
  *
3484
3995
  */
3485
- static getJob(options) {
3996
+ static listSiteCheckIns(options) {
3486
3997
  return (options.client ?? client).get({
3487
3998
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3488
- url: '/api/v1/jobs/{id}',
3999
+ url: '/api/v1/oversite/sites/{site_id}/check_ins',
3489
4000
  ...options
3490
4001
  });
3491
4002
  }
3492
4003
  /**
3493
- * Update job
4004
+ * Show Site Check-in
4005
+ *
4006
+ * A check-in is visible to the API key's company when its author is a
4007
+ * currently-employed member, or when the company holds a claim on the site
4008
+ * with check-in features enabled; requesting one outside that visibility
4009
+ * returns `404`.
4010
+ *
3494
4011
  *
3495
4012
  * **Required scope:**
3496
4013
  *
3497
- * `jobs:update`
4014
+ * `oversite.sites.check_ins:read`
3498
4015
  *
3499
4016
  */
3500
- static updateJob(options) {
3501
- return (options.client ?? client).patch({
4017
+ static getSiteCheckIn(options) {
4018
+ return (options.client ?? client).get({
3502
4019
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3503
- url: '/api/v1/jobs/{id}',
3504
- ...options,
3505
- headers: {
3506
- 'Content-Type': 'application/json',
3507
- ...options.headers
3508
- }
4020
+ url: '/api/v1/oversite/sites/{site_id}/check_ins/{id}',
4021
+ ...options
3509
4022
  });
3510
4023
  }
4024
+ }
4025
+ export class OversiteFeatureFormAssignmentTasks {
3511
4026
  /**
3512
- * List positions for job
4027
+ * List form assignment tasks for feature
4028
+ *
4029
+ * Returns form-completion tasks nested on the named feature.
4030
+ * `{id}` is the `Tasks::FeatureFormAssignmentTask` id, not the
4031
+ * web show `Task#uid`. Sites and features are shared; only this
4032
+ * company's nested tasks are listed. A missing site, a feature
4033
+ * not on that site, or a site without a company SiteClaim with
4034
+ * site_forms enabled, reads as not found.
4035
+ *
3513
4036
  *
3514
4037
  * **Required scope:**
3515
4038
  *
3516
- * `jobs.positions:read`
4039
+ * `oversite.sites.features.form_assignment_tasks:read`
3517
4040
  *
3518
4041
  */
3519
- static listPositions(options) {
4042
+ static listFeatureFormAssignmentTasks(options) {
3520
4043
  return (options.client ?? client).get({
3521
4044
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3522
- url: '/api/v1/jobs/{job_id}/positions',
4045
+ url: '/api/v1/oversite/sites/{site_id}/features/{feature_id}/form_assignment_tasks',
3523
4046
  ...options
3524
4047
  });
3525
4048
  }
3526
4049
  /**
3527
- * Create position for job
4050
+ * Create form assignment task for feature
4051
+ *
4052
+ * Creates a form-completion task on the named feature. `site_id`
4053
+ * and `feature_id` are the path only. `form_definition_id` and
4054
+ * `task_attributes.created_by_user_id` are required. An empty
4055
+ * `task_assignee_user_ids` list is valid.
4056
+ *
3528
4057
  *
3529
4058
  * **Required scope:**
3530
4059
  *
3531
- * `jobs.positions:create`
4060
+ * `oversite.sites.features.form_assignment_tasks:create`
3532
4061
  *
3533
4062
  */
3534
- static createPosition(options) {
4063
+ static createFeatureFormAssignmentTask(options) {
3535
4064
  return (options.client ?? client).post({
3536
4065
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3537
- url: '/api/v1/jobs/{job_id}/positions',
4066
+ url: '/api/v1/oversite/sites/{site_id}/features/{feature_id}/form_assignment_tasks',
3538
4067
  ...options,
3539
4068
  headers: {
3540
4069
  'Content-Type': 'application/json',
@@ -3543,58 +4072,44 @@ export class Jobs {
3543
4072
  });
3544
4073
  }
3545
4074
  /**
3546
- * Delete position on job
4075
+ * Show form assignment task on feature
3547
4076
  *
3548
- * Deletes a position that has no logged work and no restricting
3549
- * associations. A position still referenced by time entries,
3550
- * time-card per diems, completion positions, or aggregate logged
3551
- * work is refused with a `422`. An unused position returns `204`
3552
- * and is gone from a later GET.
4077
+ * Returns one form-completion task on the named feature. `{id}`
4078
+ * is the `Tasks::FeatureFormAssignmentTask` id. A missing,
4079
+ * misnested, or other-company id on this shared feature reads as
4080
+ * not found.
3553
4081
  *
3554
4082
  *
3555
4083
  * **Required scope:**
3556
4084
  *
3557
- * `jobs.positions:delete`
4085
+ * `oversite.sites.features.form_assignment_tasks:read`
3558
4086
  *
3559
4087
  */
3560
- static deletePosition(options) {
3561
- return (options.client ?? client).delete({
4088
+ static getFeatureFormAssignmentTask(options) {
4089
+ return (options.client ?? client).get({
3562
4090
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3563
- url: '/api/v1/jobs/{job_id}/positions/{id}',
4091
+ url: '/api/v1/oversite/sites/{site_id}/features/{feature_id}/form_assignment_tasks/{id}',
3564
4092
  ...options
3565
4093
  });
3566
4094
  }
3567
4095
  /**
3568
- * Show position on job
3569
- *
3570
- * Returns one position on the named job. A missing, misnested, or
3571
- * out-of-scope id reads as not found.
3572
- *
3573
- *
3574
- * **Required scope:**
4096
+ * Update form assignment task on feature
3575
4097
  *
3576
- * `jobs.positions:read`
4098
+ * Updates the existing task in place. `site_id` and
4099
+ * `feature_id` are the path only. Replacing
4100
+ * `task_assignee_user_ids` does not insert join rows before
4101
+ * authorize.
3577
4102
  *
3578
- */
3579
- static getPosition(options) {
3580
- return (options.client ?? client).get({
3581
- security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3582
- url: '/api/v1/jobs/{job_id}/positions/{id}',
3583
- ...options
3584
- });
3585
- }
3586
- /**
3587
- * Update position on job
3588
4103
  *
3589
4104
  * **Required scope:**
3590
4105
  *
3591
- * `jobs.positions:update`
4106
+ * `oversite.sites.features.form_assignment_tasks:update`
3592
4107
  *
3593
4108
  */
3594
- static updatePosition(options) {
4109
+ static updateFeatureFormAssignmentTask(options) {
3595
4110
  return (options.client ?? client).patch({
3596
4111
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3597
- url: '/api/v1/jobs/{job_id}/positions/{id}',
4112
+ url: '/api/v1/oversite/sites/{site_id}/features/{feature_id}/form_assignment_tasks/{id}',
3598
4113
  ...options,
3599
4114
  headers: {
3600
4115
  'Content-Type': 'application/json',
@@ -3602,87 +4117,97 @@ export class Jobs {
3602
4117
  }
3603
4118
  });
3604
4119
  }
4120
+ }
4121
+ export class OversiteSiteFormAssignmentTasks {
3605
4122
  /**
3606
- * List job templates
4123
+ * List form assignment tasks for site
4124
+ *
4125
+ * Returns form-completion tasks nested on the named site.
4126
+ * `{id}` is the `Tasks::SiteFormAssignmentTask` id, not the
4127
+ * web show `Task#uid`. Sites are shared; only this company's
4128
+ * nested tasks are listed. A missing site, or one without a
4129
+ * company SiteClaim with site_forms enabled, reads as not found.
4130
+ *
3607
4131
  *
3608
4132
  * **Required scope:**
3609
4133
  *
3610
- * `jobs.templates:read`
4134
+ * `oversite.sites.form_assignment_tasks:read`
3611
4135
  *
3612
4136
  */
3613
- static listTemplates(options) {
3614
- return (options?.client ?? client).get({
4137
+ static listSiteFormAssignmentTasks(options) {
4138
+ return (options.client ?? client).get({
3615
4139
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3616
- url: '/api/v1/jobs/templates',
4140
+ url: '/api/v1/oversite/sites/{site_id}/form_assignment_tasks',
3617
4141
  ...options
3618
4142
  });
3619
4143
  }
3620
- }
3621
- export class OpenApi {
3622
4144
  /**
3623
- * Show OpenAPI spec
4145
+ * Create form assignment task for site
3624
4146
  *
3625
- * **No scope required:**
4147
+ * Creates a form-completion task on the named site. `site_id`
4148
+ * is the path only. `form_definition_id` and
4149
+ * `task_attributes.created_by_user_id` are required. An empty
4150
+ * `task_assignee_user_ids` list is valid.
3626
4151
  *
3627
- * Every authenticated API key may call this endpoint. It returns the machine-readable OpenAPI
3628
- * document that describes this API.
3629
4152
  *
3630
- * **Stability:**
4153
+ * **Required scope:**
3631
4154
  *
3632
- * The document is static between contract changes: it changes only when the API surface
3633
- * does — an endpoint, field, or schema added or altered — on no fixed schedule. Fetch it
3634
- * when your integration starts, or when you regenerate a client, rather than on a poll.
4155
+ * `oversite.sites.form_assignment_tasks:create`
3635
4156
  *
3636
4157
  */
3637
- static getOpenapiDocument(options) {
3638
- return (options?.client ?? client).get({
4158
+ static createSiteFormAssignmentTask(options) {
4159
+ return (options.client ?? client).post({
3639
4160
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3640
- url: '/api/v1/openapi',
3641
- ...options
4161
+ url: '/api/v1/oversite/sites/{site_id}/form_assignment_tasks',
4162
+ ...options,
4163
+ headers: {
4164
+ 'Content-Type': 'application/json',
4165
+ ...options.headers
4166
+ }
3642
4167
  });
3643
4168
  }
3644
- }
3645
- export class OversiteSiteCheckIns {
3646
4169
  /**
3647
- * List Site Check-ins
4170
+ * Show form assignment task on site
3648
4171
  *
3649
- * Returns only the check-ins visible to the API key's company: those made by its
3650
- * currently-employed members, plus all of the site's check-ins when the company
3651
- * holds a claim on it with check-in features enabled. Other check-ins are
3652
- * omitted, so a visible site can return an empty list.
4172
+ * Returns one form-completion task on the named site. `{id}` is
4173
+ * the `Tasks::SiteFormAssignmentTask` id. A missing, misnested,
4174
+ * or other-company id on this shared site reads as not found.
3653
4175
  *
3654
4176
  *
3655
4177
  * **Required scope:**
3656
4178
  *
3657
- * `oversite.sites.check_ins:read`
4179
+ * `oversite.sites.form_assignment_tasks:read`
3658
4180
  *
3659
4181
  */
3660
- static listSiteCheckIns(options) {
4182
+ static getSiteFormAssignmentTask(options) {
3661
4183
  return (options.client ?? client).get({
3662
4184
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3663
- url: '/api/v1/oversite/sites/{site_id}/check_ins',
4185
+ url: '/api/v1/oversite/sites/{site_id}/form_assignment_tasks/{id}',
3664
4186
  ...options
3665
4187
  });
3666
4188
  }
3667
4189
  /**
3668
- * Show Site Check-in
4190
+ * Update form assignment task on site
3669
4191
  *
3670
- * A check-in is visible to the API key's company when its author is a
3671
- * currently-employed member, or when the company holds a claim on the site
3672
- * with check-in features enabled; requesting one outside that visibility
3673
- * returns `404`.
4192
+ * Updates the existing task in place. `site_id` is the path
4193
+ * only. Replacing `task_assignee_user_ids` does not insert join
4194
+ * rows before authorize.
3674
4195
  *
3675
4196
  *
3676
4197
  * **Required scope:**
3677
4198
  *
3678
- * `oversite.sites.check_ins:read`
4199
+ * `oversite.sites.form_assignment_tasks:update`
3679
4200
  *
3680
4201
  */
3681
- static getSiteCheckIn(options) {
3682
- return (options.client ?? client).get({
4202
+ static updateSiteFormAssignmentTask(options) {
4203
+ return (options.client ?? client).patch({
3683
4204
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3684
- url: '/api/v1/oversite/sites/{site_id}/check_ins/{id}',
3685
- ...options
4205
+ url: '/api/v1/oversite/sites/{site_id}/form_assignment_tasks/{id}',
4206
+ ...options,
4207
+ headers: {
4208
+ 'Content-Type': 'application/json',
4209
+ ...options.headers
4210
+ }
3686
4211
  });
3687
4212
  }
3688
4213
  }
@@ -4752,6 +5277,11 @@ export class PayrollRuns {
4752
5277
  /**
4753
5278
  * Create payroll run
4754
5279
  *
5280
+ * Company-scoped keys and user-scoped keys belonging to company
5281
+ * admins can create payroll runs with the same fields. Manager
5282
+ * and technician user keys cannot create runs.
5283
+ *
5284
+ *
4755
5285
  * **Required scope:**
4756
5286
  *
4757
5287
  * `payrolls.payroll_runs:create`
@@ -4801,6 +5331,12 @@ export class PayrollRuns {
4801
5331
  /**
4802
5332
  * Update payroll run
4803
5333
  *
5334
+ * Company-scoped keys and user-scoped keys belonging to company
5335
+ * admins can update the same payroll run fields. Manager and
5336
+ * technician user keys cannot update runs. The owning company is
5337
+ * fixed at creation; company_id is rejected on update.
5338
+ *
5339
+ *
4804
5340
  * **Required scope:**
4805
5341
  *
4806
5342
  * `payrolls.payroll_runs:update`
@@ -5077,9 +5613,10 @@ export class People {
5077
5613
  *
5078
5614
  * Every valid-time version of one employment stint, newest first. Each
5079
5615
  * entry uses `people_employment_id` rather than an entry-level id and
5080
- * includes prior recorded corrections. Company managers may read
5081
- * coworker history, but direct monetary fields are limited to their
5082
- * own employment in versions and corrections.
5616
+ * includes prior corrections recorded at the credential company.
5617
+ * Company managers may read coworker history, but direct monetary
5618
+ * fields are limited to their own employment in versions and
5619
+ * corrections.
5083
5620
  *
5084
5621
  *
5085
5622
  * **Required scope:**
@@ -5633,6 +6170,119 @@ export class ProductionCompletions {
5633
6170
  });
5634
6171
  }
5635
6172
  }
6173
+ export class ProjectSites {
6174
+ /**
6175
+ * List project sites
6176
+ *
6177
+ * Returns the project's site assignments (`ProjectSite` joins). Path `{id}`
6178
+ * on the member routes is the join id, not the Site id. A participating-company
6179
+ * key may list joins on a project it can see; a user-scoped key of a
6180
+ * participating company cannot, because web project visibility does not include
6181
+ * participating projects.
6182
+ *
6183
+ *
6184
+ * **Required scope:**
6185
+ *
6186
+ * `projects.sites:read`
6187
+ *
6188
+ */
6189
+ static listProjectSites(options) {
6190
+ return (options.client ?? client).get({
6191
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
6192
+ url: '/api/v1/projects/{project_id}/sites',
6193
+ ...options
6194
+ });
6195
+ }
6196
+ /**
6197
+ * Create a project site
6198
+ *
6199
+ * Attaches a site to the project. `site_id` is required; `feature_ids` is
6200
+ * optional and scopes which of that site's features apply. The project is
6201
+ * taken from the path. Writes are owner-only: a participating-company key
6202
+ * that can GET the project receives 403. Duplicate `(project, site)` pairs
6203
+ * are 422. A site that is not public and not owned by the project's owner
6204
+ * is 422 when visible, or 404 when the key cannot see the site.
6205
+ *
6206
+ *
6207
+ * **Required scope:**
6208
+ *
6209
+ * `projects.sites:create`
6210
+ *
6211
+ */
6212
+ static createProjectSite(options) {
6213
+ return (options.client ?? client).post({
6214
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
6215
+ url: '/api/v1/projects/{project_id}/sites',
6216
+ ...options,
6217
+ headers: {
6218
+ 'Content-Type': 'application/json',
6219
+ ...options.headers
6220
+ }
6221
+ });
6222
+ }
6223
+ /**
6224
+ * Delete a project site
6225
+ *
6226
+ * Removes the project–site join. The Site itself is not destroyed. Writes
6227
+ * are owner-only.
6228
+ *
6229
+ *
6230
+ * **Required scope:**
6231
+ *
6232
+ * `projects.sites:delete`
6233
+ *
6234
+ */
6235
+ static deleteProjectSite(options) {
6236
+ return (options.client ?? client).delete({
6237
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
6238
+ url: '/api/v1/projects/{project_id}/sites/{id}',
6239
+ ...options
6240
+ });
6241
+ }
6242
+ /**
6243
+ * Show a project site
6244
+ *
6245
+ * Returns one project–site join. A missing, mismatched, or out-of-scope id
6246
+ * reads as not found.
6247
+ *
6248
+ *
6249
+ * **Required scope:**
6250
+ *
6251
+ * `projects.sites:read`
6252
+ *
6253
+ */
6254
+ static getProjectSite(options) {
6255
+ return (options.client ?? client).get({
6256
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
6257
+ url: '/api/v1/projects/{project_id}/sites/{id}',
6258
+ ...options
6259
+ });
6260
+ }
6261
+ /**
6262
+ * Update a project site
6263
+ *
6264
+ * Replaces `feature_ids` on the join. Send an empty array to clear features.
6265
+ * `site_id` is create-only; naming it on PATCH is a 400. Writes are
6266
+ * owner-only.
6267
+ *
6268
+ *
6269
+ * **Required scope:**
6270
+ *
6271
+ * `projects.sites:update`
6272
+ *
6273
+ */
6274
+ static updateProjectSite(options) {
6275
+ return (options.client ?? client).patch({
6276
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
6277
+ url: '/api/v1/projects/{project_id}/sites/{id}',
6278
+ ...options,
6279
+ headers: {
6280
+ 'Content-Type': 'application/json',
6281
+ ...options.headers
6282
+ }
6283
+ });
6284
+ }
6285
+ }
5636
6286
  export class Projects {
5637
6287
  /**
5638
6288
  * List projects
@@ -5722,9 +6372,11 @@ export class Projects {
5722
6372
  * switching it to `none` clears the stored values and forces `asset_owner`
5723
6373
  * false, and sending one of them while federal tracking is off — even as null —
5724
6374
  * returns 422. `budget_currency` defaults to USD when blank. `parent_id` moves
5725
- * or detaches the project, and `participating_company_ids` replaces the complete
5726
- * set of participating companies. Remove a participant's jobs before removing
5727
- * it from this set. Only the owning company may update the project.
6375
+ * or detaches the project; a project whose parent no longer lists its owner
6376
+ * still accepts updates that keep that parent. `participating_company_ids`
6377
+ * replaces the complete set of participating companies. Remove a participant's
6378
+ * jobs before removing it from this set. Only the owning company may update the
6379
+ * project.
5728
6380
  *
5729
6381
  *
5730
6382
  * **Required scope:**
@@ -5960,6 +6612,14 @@ export class Users {
5960
6612
  /**
5961
6613
  * List users
5962
6614
  *
6615
+ * Workers the credential company sees: people it employs, has
6616
+ * granted a role, or has invited. Direct monetary employment
6617
+ * fields (`hourly_rate`, `training_annual_amount`,
6618
+ * `employer_combined_health_amount`, `employer_combined_savings`)
6619
+ * are present for company keys, company administrators, and the
6620
+ * employed person, and omitted for other user keys.
6621
+ *
6622
+ *
5963
6623
  * **Required scope:**
5964
6624
  *
5965
6625
  * `users:read`
@@ -5994,6 +6654,13 @@ export class Users {
5994
6654
  /**
5995
6655
  * Show user
5996
6656
  *
6657
+ * Direct monetary employment fields (`hourly_rate`,
6658
+ * `training_annual_amount`, `employer_combined_health_amount`,
6659
+ * `employer_combined_savings`) are present for company keys,
6660
+ * company administrators, and the employed person, and omitted
6661
+ * for other user keys.
6662
+ *
6663
+ *
5997
6664
  * **Required scope:**
5998
6665
  *
5999
6666
  * `users:read`
@@ -6094,6 +6761,27 @@ export class PwaTradeApprenticeScope {
6094
6761
  ...options
6095
6762
  });
6096
6763
  }
6764
+ /**
6765
+ * Show apprentice scope decision
6766
+ *
6767
+ * Returns one reviewed (occupation, craft) pair on this trade. The payload is
6768
+ * the same object create, update, and destroy already serialize. A missing,
6769
+ * mismatched, or out-of-scope id is not found. Reading follows the trade;
6770
+ * employer enrollment is not required.
6771
+ *
6772
+ *
6773
+ * **Required scope:**
6774
+ *
6775
+ * `pwa.trades.apprenticeship_occupations:read`
6776
+ *
6777
+ */
6778
+ static getApprenticeshipOccupation(options) {
6779
+ return (options.client ?? client).get({
6780
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
6781
+ url: '/api/v1/pwa/trades/{trade_id}/apprenticeship_occupations/{id}',
6782
+ ...options
6783
+ });
6784
+ }
6097
6785
  /**
6098
6786
  * Flip an apprentice scope decision
6099
6787
  *
@@ -6355,7 +7043,8 @@ export class PriorPeriodAdjustments {
6355
7043
  * Permanently remove an adjustment, for undoing one recorded in error. The removed
6356
7044
  * adjustment is returned. Its allocation is freed back to the funding line item and
6357
7045
  * the time card's actuals rebuild, so the job's balance due rises by this amount.
6358
- * Adjustments cannot be edited — delete and re-create to change one.
7046
+ * To change amount, job, rationale, notes, or PWA eligibility, PATCH the same
7047
+ * resource instead.
6359
7048
  *
6360
7049
  *
6361
7050
  * **Required scope:**
@@ -6385,6 +7074,31 @@ export class PriorPeriodAdjustments {
6385
7074
  ...options
6386
7075
  });
6387
7076
  }
7077
+ /**
7078
+ * Update Prior Period Adjustment
7079
+ *
7080
+ * Change amount, job, rationale, notes, or PWA eligibility on an existing
7081
+ * adjustment. The updated adjustment is returned and the time card's actuals
7082
+ * rebuild. The funding line item, recording user, time card, and adjustment
7083
+ * type cannot be changed on this path.
7084
+ *
7085
+ *
7086
+ * **Required scope:**
7087
+ *
7088
+ * `time_cards.prior_period_adjustments:update`
7089
+ *
7090
+ */
7091
+ static updatePriorPeriodAdjustment(options) {
7092
+ return (options.client ?? client).patch({
7093
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
7094
+ url: '/api/v1/time_cards/{time_card_id}/prior_period_adjustments/{id}',
7095
+ ...options,
7096
+ headers: {
7097
+ 'Content-Type': 'application/json',
7098
+ ...options.headers
7099
+ }
7100
+ });
7101
+ }
6388
7102
  }
6389
7103
  export class TimeCardPwaCompliance {
6390
7104
  /**
@@ -6485,7 +7199,8 @@ export class TimeEntries {
6485
7199
  * Create time entry
6486
7200
  *
6487
7201
  * Create a time entry. Required: timekeeping_time_card_id, start_time, and end_time;
6488
- * user_id is derived server-side from the time card. Both start_time and
7202
+ * user_id is derived server-side from the time card, and a time card outside
7203
+ * the key's scope is not found (404). Both start_time and
6489
7204
  * end_time must fall on a whole-minute boundary (nonzero seconds are
6490
7205
  * rejected); start_time must fall within the time card's pay period, and
6491
7206
  * end_time must be after start_time. Optional job_id (the worker must have a
@@ -6493,10 +7208,8 @@ export class TimeEntries {
6493
7208
  * company's default timecodes), state, description, hourly_rate_cents (derived
6494
7209
  * from the position/user default when omitted), and feature_ids. Supplying
6495
7210
  * feature_ids — or setting feature_allocation_acknowledged true — satisfies a
6496
- * job that requires a feature allocation. A user-scoped key may send
6497
- * hourly_rate_cents only when its user is an admin in the entry's company;
6498
- * any other user-scoped key that sends it, null included, is forbidden (403)
6499
- * and nothing is created.
7211
+ * job that requires a feature allocation. hourly_rate_cents is admin only on
7212
+ * user-scoped keys.
6500
7213
  *
6501
7214
  *
6502
7215
  * **Required scope:**
@@ -6565,16 +7278,15 @@ export class TimeEntries {
6565
7278
  *
6566
7279
  * Update an existing time entry by id; every field in the parameters is
6567
7280
  * optional and only supplied fields change. An entry outside the key's scope
6568
- * is not found (404). Authorization is re-checked after attributes are
6569
- * assigned, so moving the entry to a time card in another company is
6570
- * forbidden (403). If the change would push categorized allocation
6571
- * minutes past the time card's overtime eligible minutes, the request returns
7281
+ * is not found (404). An edit the key may not make to the entry as assigned,
7282
+ * such as a technician putting it on a job that requires clock-in, is
7283
+ * forbidden (403).
7284
+ * If the change would push categorized allocation minutes past the time card's
7285
+ * overtime eligible minutes, the request returns
6572
7286
  * 422 unless confirm_allocation_conflict is sent true. The feature-allocation cap is
6573
7287
  * enforced, and because a persisted feature_ids= writes its join rows
6574
7288
  * immediately, a rejected save rolls them back within the enclosing
6575
- * transaction. A user-scoped key may send hourly_rate_cents only when its user
6576
- * is an admin in the entry's company; any other user-scoped key that sends
6577
- * it, null included, is forbidden (403) and the entry is left unchanged.
7289
+ * transaction. hourly_rate_cents is admin only on user-scoped keys.
6578
7290
  *
6579
7291
  *
6580
7292
  * **Required scope:**
@@ -7037,6 +7749,27 @@ export class PaySchedules {
7037
7749
  ...options
7038
7750
  });
7039
7751
  }
7752
+ /**
7753
+ * Create pay schedule
7754
+ *
7755
+ * Creates the company’s only pay schedule. The effective date starts its valid-time window at midnight in the supplied timezone. Existing schedules, including future or ended schedules, return 409. Time and payroll modes inherit company defaults; pay periods are generated asynchronously.
7756
+ *
7757
+ * **Required scope:**
7758
+ *
7759
+ * `timekeeping.pay_period_configs:create`
7760
+ *
7761
+ */
7762
+ static createPayPeriodConfig(options) {
7763
+ return (options.client ?? client).post({
7764
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
7765
+ url: '/api/v1/timekeeping/pay_period_configs',
7766
+ ...options,
7767
+ headers: {
7768
+ 'Content-Type': 'application/json',
7769
+ ...options.headers
7770
+ }
7771
+ });
7772
+ }
7040
7773
  /**
7041
7774
  * Show pay schedule
7042
7775
  *