@vitable-inc/vitable-connect 2.0.0 → 2.1.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 (88) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/employers/client/Client.d.ts +2 -1
  3. package/dist/cjs/api/resources/employers/client/Client.js +40 -37
  4. package/dist/cjs/api/resources/employers/client/requests/CreateEmployerRequest.d.ts +2 -0
  5. package/dist/cjs/api/resources/employers/client/requests/EnsurePayrollIntegrationEmailEmployersRequest.d.ts +2 -0
  6. package/dist/cjs/api/resources/employers/client/requests/GetBenefitPlanYearEmployersRequest.d.ts +2 -0
  7. package/dist/cjs/api/resources/employers/client/requests/GetEmployersRequest.d.ts +2 -0
  8. package/dist/cjs/api/resources/employers/client/requests/GetHrisEmployersRequest.d.ts +2 -0
  9. package/dist/cjs/api/resources/employers/client/requests/GetInvoicePdfEmployersRequest.d.ts +2 -0
  10. package/dist/cjs/api/resources/employers/client/requests/GetPayrollAccessSetupEmployersRequest.d.ts +2 -0
  11. package/dist/cjs/api/resources/employers/client/requests/ListBenefitPlanYearEnrollmentsEmployersRequest.d.ts +2 -0
  12. package/dist/cjs/api/resources/employers/client/requests/ListBenefitPlanYearsEmployersRequest.d.ts +2 -0
  13. package/dist/cjs/api/resources/employers/client/requests/ListEmployeesEmployersRequest.d.ts +2 -0
  14. package/dist/cjs/api/resources/employers/client/requests/ListEmployersRequest.d.ts +2 -0
  15. package/dist/cjs/api/resources/employers/client/requests/ListHrisProvidersEmployersRequest.d.ts +9 -0
  16. package/dist/cjs/api/resources/employers/client/requests/ListHrisProvidersEmployersRequest.js +3 -0
  17. package/dist/cjs/api/resources/employers/client/requests/ListInvoicesEmployersRequest.d.ts +2 -0
  18. package/dist/cjs/api/resources/employers/client/requests/ListPayrollDeductionStatementsEmployersRequest.d.ts +2 -0
  19. package/dist/cjs/api/resources/employers/client/requests/SubmitPayrollAccessSetupRequest.d.ts +2 -0
  20. package/dist/cjs/api/resources/employers/client/requests/UpdateEmployerRequest.d.ts +2 -0
  21. package/dist/cjs/api/resources/employers/client/requests/UpdateEmployerSettingsRequest.d.ts +2 -0
  22. package/dist/cjs/api/resources/employers/client/requests/index.d.ts +1 -0
  23. package/dist/cjs/api/resources/enrollments/client/Client.js +6 -6
  24. package/dist/cjs/api/resources/enrollments/client/requests/GetEnrollmentsRequest.d.ts +2 -0
  25. package/dist/cjs/api/resources/enrollments/client/requests/ReissueEnrollmentRequest.d.ts +2 -0
  26. package/dist/cjs/api/resources/enrollments/client/requests/TerminateEnrollmentRequest.d.ts +2 -0
  27. package/dist/cjs/api/resources/members/client/Client.js +16 -16
  28. package/dist/cjs/api/resources/members/client/requests/GetHouseholdMembersRequest.d.ts +2 -0
  29. package/dist/cjs/api/resources/members/client/requests/GetMembersRequest.d.ts +2 -0
  30. package/dist/cjs/api/resources/members/client/requests/ListDependentsMembersRequest.d.ts +2 -0
  31. package/dist/cjs/api/resources/members/client/requests/ListEmploymentsMembersRequest.d.ts +2 -0
  32. package/dist/cjs/api/resources/members/client/requests/ListEnrollmentsMembersRequest.d.ts +2 -0
  33. package/dist/cjs/api/resources/members/client/requests/ListIdCardsMembersRequest.d.ts +2 -0
  34. package/dist/cjs/api/resources/members/client/requests/ListMembersRequest.d.ts +2 -0
  35. package/dist/cjs/api/resources/members/client/requests/ListQualifyingLifeEventsMembersRequest.d.ts +2 -0
  36. package/dist/cjs/api/resources/organizations/client/Client.d.ts +1 -1
  37. package/dist/cjs/api/resources/organizations/client/Client.js +1 -1
  38. package/dist/cjs/api/types/XVitableOrganization.d.ts +4 -0
  39. package/dist/cjs/api/types/XVitableOrganization.js +3 -0
  40. package/dist/cjs/api/types/index.d.ts +1 -0
  41. package/dist/cjs/api/types/index.js +1 -0
  42. package/dist/cjs/version.d.ts +1 -1
  43. package/dist/cjs/version.js +1 -1
  44. package/dist/esm/BaseClient.mjs +2 -2
  45. package/dist/esm/api/resources/employers/client/Client.d.mts +2 -1
  46. package/dist/esm/api/resources/employers/client/Client.mjs +41 -38
  47. package/dist/esm/api/resources/employers/client/requests/CreateEmployerRequest.d.mts +2 -0
  48. package/dist/esm/api/resources/employers/client/requests/EnsurePayrollIntegrationEmailEmployersRequest.d.mts +2 -0
  49. package/dist/esm/api/resources/employers/client/requests/GetBenefitPlanYearEmployersRequest.d.mts +2 -0
  50. package/dist/esm/api/resources/employers/client/requests/GetEmployersRequest.d.mts +2 -0
  51. package/dist/esm/api/resources/employers/client/requests/GetHrisEmployersRequest.d.mts +2 -0
  52. package/dist/esm/api/resources/employers/client/requests/GetInvoicePdfEmployersRequest.d.mts +2 -0
  53. package/dist/esm/api/resources/employers/client/requests/GetPayrollAccessSetupEmployersRequest.d.mts +2 -0
  54. package/dist/esm/api/resources/employers/client/requests/ListBenefitPlanYearEnrollmentsEmployersRequest.d.mts +2 -0
  55. package/dist/esm/api/resources/employers/client/requests/ListBenefitPlanYearsEmployersRequest.d.mts +2 -0
  56. package/dist/esm/api/resources/employers/client/requests/ListEmployeesEmployersRequest.d.mts +2 -0
  57. package/dist/esm/api/resources/employers/client/requests/ListEmployersRequest.d.mts +2 -0
  58. package/dist/esm/api/resources/employers/client/requests/ListHrisProvidersEmployersRequest.d.mts +9 -0
  59. package/dist/esm/api/resources/employers/client/requests/ListHrisProvidersEmployersRequest.mjs +2 -0
  60. package/dist/esm/api/resources/employers/client/requests/ListInvoicesEmployersRequest.d.mts +2 -0
  61. package/dist/esm/api/resources/employers/client/requests/ListPayrollDeductionStatementsEmployersRequest.d.mts +2 -0
  62. package/dist/esm/api/resources/employers/client/requests/SubmitPayrollAccessSetupRequest.d.mts +2 -0
  63. package/dist/esm/api/resources/employers/client/requests/UpdateEmployerRequest.d.mts +2 -0
  64. package/dist/esm/api/resources/employers/client/requests/UpdateEmployerSettingsRequest.d.mts +2 -0
  65. package/dist/esm/api/resources/employers/client/requests/index.d.mts +1 -0
  66. package/dist/esm/api/resources/enrollments/client/Client.mjs +7 -7
  67. package/dist/esm/api/resources/enrollments/client/requests/GetEnrollmentsRequest.d.mts +2 -0
  68. package/dist/esm/api/resources/enrollments/client/requests/ReissueEnrollmentRequest.d.mts +2 -0
  69. package/dist/esm/api/resources/enrollments/client/requests/TerminateEnrollmentRequest.d.mts +2 -0
  70. package/dist/esm/api/resources/members/client/Client.mjs +17 -17
  71. package/dist/esm/api/resources/members/client/requests/GetHouseholdMembersRequest.d.mts +2 -0
  72. package/dist/esm/api/resources/members/client/requests/GetMembersRequest.d.mts +2 -0
  73. package/dist/esm/api/resources/members/client/requests/ListDependentsMembersRequest.d.mts +2 -0
  74. package/dist/esm/api/resources/members/client/requests/ListEmploymentsMembersRequest.d.mts +2 -0
  75. package/dist/esm/api/resources/members/client/requests/ListEnrollmentsMembersRequest.d.mts +2 -0
  76. package/dist/esm/api/resources/members/client/requests/ListIdCardsMembersRequest.d.mts +2 -0
  77. package/dist/esm/api/resources/members/client/requests/ListMembersRequest.d.mts +2 -0
  78. package/dist/esm/api/resources/members/client/requests/ListQualifyingLifeEventsMembersRequest.d.mts +2 -0
  79. package/dist/esm/api/resources/organizations/client/Client.d.mts +1 -1
  80. package/dist/esm/api/resources/organizations/client/Client.mjs +1 -1
  81. package/dist/esm/api/types/XVitableOrganization.d.mts +4 -0
  82. package/dist/esm/api/types/XVitableOrganization.mjs +2 -0
  83. package/dist/esm/api/types/index.d.mts +1 -0
  84. package/dist/esm/api/types/index.mjs +1 -0
  85. package/dist/esm/version.d.mts +1 -1
  86. package/dist/esm/version.mjs +1 -1
  87. package/package.json +1 -1
  88. package/reference.md +10 -2
@@ -44,8 +44,8 @@ function normalizeClientOptions(options) {
44
44
  const headers = (0, headers_js_1.mergeHeaders)({
45
45
  "X-Fern-Language": "JavaScript",
46
46
  "X-Fern-SDK-Name": "@vitable-inc/vitable-connect",
47
- "X-Fern-SDK-Version": "2.0.0",
48
- "User-Agent": "@vitable-inc/vitable-connect/2.0.0",
47
+ "X-Fern-SDK-Version": "2.1.0",
48
+ "User-Agent": "@vitable-inc/vitable-connect/2.1.0",
49
49
  "X-Fern-Runtime": core.RUNTIME.type,
50
50
  "X-Fern-Runtime-Version": core.RUNTIME.version,
51
51
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -484,6 +484,7 @@ export declare class EmployersClient {
484
484
  /**
485
485
  * Returns the distinct HRIS/payroll providers across the same book `GET /v1/employers` returns, sorted for display. Use these as the values for the employers list's `hris_provider` filter — filter on `provider`, show `provider_label`. The stored providers are free text, so they cannot be enumerated in advance.
486
486
  *
487
+ * @param {VitableConnect.ListHrisProvidersEmployersRequest} request
487
488
  * @param {EmployersClient.RequestOptions} requestOptions - Request-specific configuration.
488
489
  *
489
490
  * @throws {@link VitableConnect.BadRequestError}
@@ -500,6 +501,6 @@ export declare class EmployersClient {
500
501
  * @example
501
502
  * await client.employers.listHrisProviders()
502
503
  */
503
- listHrisProviders(requestOptions?: EmployersClient.RequestOptions): core.HttpResponsePromise<VitableConnect.OrganizationHrisProvidersResponse>;
504
+ listHrisProviders(request?: VitableConnect.ListHrisProvidersEmployersRequest, requestOptions?: EmployersClient.RequestOptions): core.HttpResponsePromise<VitableConnect.OrganizationHrisProvidersResponse>;
504
505
  private __listHrisProviders;
505
506
  }
@@ -97,7 +97,7 @@ class EmployersClient {
97
97
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
98
98
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
99
99
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
100
- const { benefit_family: benefitFamily, benefit_lifecycle_stage: benefitLifecycleStage, hris_provider: hrisProvider, hris_status: hrisStatus, include_cancelled: includeCancelled, limit, page, search, } = request;
100
+ const { benefit_family: benefitFamily, benefit_lifecycle_stage: benefitLifecycleStage, hris_provider: hrisProvider, hris_status: hrisStatus, include_cancelled: includeCancelled, limit, page, search, "X-Vitable-Organization": vitableOrganization, } = request;
101
101
  const _queryParams = {
102
102
  benefit_family: Array.isArray(benefitFamily)
103
103
  ? benefitFamily.map((item) => item)
@@ -121,7 +121,7 @@ class EmployersClient {
121
121
  search,
122
122
  };
123
123
  const _authRequest = yield this._options.authProvider.getAuthRequest();
124
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
124
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
125
125
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
126
126
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, "v1/employers"),
127
127
  method: "GET",
@@ -226,8 +226,9 @@ class EmployersClient {
226
226
  __create(request, requestOptions) {
227
227
  return __awaiter(this, void 0, void 0, function* () {
228
228
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
229
+ const { "X-Vitable-Organization": vitableOrganization } = request, _body = __rest(request, ["X-Vitable-Organization"]);
229
230
  const _authRequest = yield this._options.authProvider.getAuthRequest();
230
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
231
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
231
232
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
232
233
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, "v1/employers"),
233
234
  method: "POST",
@@ -235,7 +236,7 @@ class EmployersClient {
235
236
  contentType: "application/json",
236
237
  queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
237
238
  requestType: "json",
238
- body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
239
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(_body, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
239
240
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
240
241
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
241
242
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -304,9 +305,9 @@ class EmployersClient {
304
305
  __get(request, requestOptions) {
305
306
  return __awaiter(this, void 0, void 0, function* () {
306
307
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
307
- const { employer_id: employerId } = request;
308
+ const { employer_id: employerId, "X-Vitable-Organization": vitableOrganization } = request;
308
309
  const _authRequest = yield this._options.authProvider.getAuthRequest();
309
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
310
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
310
311
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
311
312
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, `v1/employers/${core.url.encodePathParam(employerId)}`),
312
313
  method: "GET",
@@ -379,9 +380,9 @@ class EmployersClient {
379
380
  __update(request, requestOptions) {
380
381
  return __awaiter(this, void 0, void 0, function* () {
381
382
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
382
- const { employer_id: employerId } = request, _body = __rest(request, ["employer_id"]);
383
+ const { employer_id: employerId, "X-Vitable-Organization": vitableOrganization } = request, _body = __rest(request, ["employer_id", "X-Vitable-Organization"]);
383
384
  const _authRequest = yield this._options.authProvider.getAuthRequest();
384
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
385
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
385
386
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
386
387
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, `v1/employers/${core.url.encodePathParam(employerId)}`),
387
388
  method: "PUT",
@@ -458,9 +459,9 @@ class EmployersClient {
458
459
  __listBenefitPlanYears(request, requestOptions) {
459
460
  return __awaiter(this, void 0, void 0, function* () {
460
461
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
461
- const { employer_id: employerId } = request;
462
+ const { employer_id: employerId, "X-Vitable-Organization": vitableOrganization } = request;
462
463
  const _authRequest = yield this._options.authProvider.getAuthRequest();
463
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
464
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
464
465
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
465
466
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, `v1/employers/${core.url.encodePathParam(employerId)}/benefit-plan-years`),
466
467
  method: "GET",
@@ -536,9 +537,9 @@ class EmployersClient {
536
537
  __getBenefitPlanYear(request, requestOptions) {
537
538
  return __awaiter(this, void 0, void 0, function* () {
538
539
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
539
- const { employer_id: employerId, benefit_plan_year_id: benefitPlanYearId } = request;
540
+ const { employer_id: employerId, benefit_plan_year_id: benefitPlanYearId, "X-Vitable-Organization": vitableOrganization, } = request;
540
541
  const _authRequest = yield this._options.authProvider.getAuthRequest();
541
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
542
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
542
543
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
543
544
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, `v1/employers/${core.url.encodePathParam(employerId)}/benefit-plan-years/${core.url.encodePathParam(benefitPlanYearId)}`),
544
545
  method: "GET",
@@ -614,7 +615,7 @@ class EmployersClient {
614
615
  return __awaiter(this, void 0, void 0, function* () {
615
616
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
616
617
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
617
- const { employer_id: employerId, benefit_plan_year_id: benefitPlanYearId, election_status: electionStatus, limit, page, search, } = request;
618
+ const { employer_id: employerId, benefit_plan_year_id: benefitPlanYearId, election_status: electionStatus, limit, page, search, "X-Vitable-Organization": vitableOrganization, } = request;
618
619
  const _queryParams = {
619
620
  election_status: Array.isArray(electionStatus)
620
621
  ? electionStatus.map((item) => item)
@@ -626,7 +627,7 @@ class EmployersClient {
626
627
  search,
627
628
  };
628
629
  const _authRequest = yield this._options.authProvider.getAuthRequest();
629
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
630
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
630
631
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
631
632
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, `v1/employers/${core.url.encodePathParam(employerId)}/benefit-plan-years/${core.url.encodePathParam(benefitPlanYearId)}/enrollments`),
632
633
  method: "GET",
@@ -827,7 +828,7 @@ class EmployersClient {
827
828
  return __awaiter(this, void 0, void 0, function* () {
828
829
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
829
830
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
830
- const { employer_id: employerId, employment_status: employmentStatus, limit, page, search } = request;
831
+ const { employer_id: employerId, employment_status: employmentStatus, limit, page, search, "X-Vitable-Organization": vitableOrganization, } = request;
831
832
  const _queryParams = {
832
833
  employment_status: employmentStatus != null ? employmentStatus : undefined,
833
834
  limit,
@@ -835,7 +836,7 @@ class EmployersClient {
835
836
  search,
836
837
  };
837
838
  const _authRequest = yield this._options.authProvider.getAuthRequest();
838
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
839
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
839
840
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
840
841
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, `v1/employers/${core.url.encodePathParam(employerId)}/employees`),
841
842
  method: "GET",
@@ -929,9 +930,9 @@ class EmployersClient {
929
930
  __getHris(request, requestOptions) {
930
931
  return __awaiter(this, void 0, void 0, function* () {
931
932
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
932
- const { employer_id: employerId } = request;
933
+ const { employer_id: employerId, "X-Vitable-Organization": vitableOrganization } = request;
933
934
  const _authRequest = yield this._options.authProvider.getAuthRequest();
934
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
935
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
935
936
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
936
937
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, `v1/employers/${core.url.encodePathParam(employerId)}/hris`),
937
938
  method: "GET",
@@ -1005,13 +1006,13 @@ class EmployersClient {
1005
1006
  __listInvoices(request, requestOptions) {
1006
1007
  return __awaiter(this, void 0, void 0, function* () {
1007
1008
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1008
- const { employer_id: employerId, limit, offset } = request;
1009
+ const { employer_id: employerId, limit, offset, "X-Vitable-Organization": vitableOrganization } = request;
1009
1010
  const _queryParams = {
1010
1011
  limit,
1011
1012
  offset,
1012
1013
  };
1013
1014
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1014
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1015
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1015
1016
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1016
1017
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, `v1/employers/${core.url.encodePathParam(employerId)}/invoices`),
1017
1018
  method: "GET",
@@ -1093,9 +1094,9 @@ class EmployersClient {
1093
1094
  __getInvoicePdf(request, requestOptions) {
1094
1095
  return __awaiter(this, void 0, void 0, function* () {
1095
1096
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1096
- const { employer_id: employerId, invoice_id: invoiceId } = request;
1097
+ const { employer_id: employerId, invoice_id: invoiceId, "X-Vitable-Organization": vitableOrganization, } = request;
1097
1098
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1098
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1099
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1099
1100
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1100
1101
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, `v1/employers/${core.url.encodePathParam(employerId)}/invoices/${core.url.encodePathParam(invoiceId)}/pdf`),
1101
1102
  method: "GET",
@@ -1170,9 +1171,9 @@ class EmployersClient {
1170
1171
  __getPayrollAccessSetup(request, requestOptions) {
1171
1172
  return __awaiter(this, void 0, void 0, function* () {
1172
1173
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1173
- const { employer_id: employerId } = request;
1174
+ const { employer_id: employerId, "X-Vitable-Organization": vitableOrganization } = request;
1174
1175
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1175
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1176
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1176
1177
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1177
1178
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, `v1/employers/${core.url.encodePathParam(employerId)}/payroll-access-setup`),
1178
1179
  method: "GET",
@@ -1254,9 +1255,9 @@ class EmployersClient {
1254
1255
  __submitPayrollAccessSetup(request, requestOptions) {
1255
1256
  return __awaiter(this, void 0, void 0, function* () {
1256
1257
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1257
- const { employer_id: employerId } = request, _body = __rest(request, ["employer_id"]);
1258
+ const { employer_id: employerId, "X-Vitable-Organization": vitableOrganization } = request, _body = __rest(request, ["employer_id", "X-Vitable-Organization"]);
1258
1259
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1259
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1260
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1260
1261
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1261
1262
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, `v1/employers/${core.url.encodePathParam(employerId)}/payroll-access-setup`),
1262
1263
  method: "PUT",
@@ -1335,13 +1336,13 @@ class EmployersClient {
1335
1336
  return __awaiter(this, void 0, void 0, function* () {
1336
1337
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
1337
1338
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1338
- const { employer_id: employerId, limit, page } = request;
1339
+ const { employer_id: employerId, limit, page, "X-Vitable-Organization": vitableOrganization } = request;
1339
1340
  const _queryParams = {
1340
1341
  limit,
1341
1342
  page,
1342
1343
  };
1343
1344
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1344
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1345
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1345
1346
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1346
1347
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, `v1/employers/${core.url.encodePathParam(employerId)}/payroll-deduction-statements`),
1347
1348
  method: "GET",
@@ -1435,9 +1436,9 @@ class EmployersClient {
1435
1436
  __ensurePayrollIntegrationEmail(request, requestOptions) {
1436
1437
  return __awaiter(this, void 0, void 0, function* () {
1437
1438
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1438
- const { employer_id: employerId } = request;
1439
+ const { employer_id: employerId, "X-Vitable-Organization": vitableOrganization } = request;
1439
1440
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1440
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1441
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1441
1442
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1442
1443
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, `v1/employers/${core.url.encodePathParam(employerId)}/payroll-integration-email`),
1443
1444
  method: "PUT",
@@ -1513,9 +1514,9 @@ class EmployersClient {
1513
1514
  __updateSettings(request, requestOptions) {
1514
1515
  return __awaiter(this, void 0, void 0, function* () {
1515
1516
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1516
- const { employer_id: employerId } = request, _body = __rest(request, ["employer_id"]);
1517
+ const { employer_id: employerId, "X-Vitable-Organization": vitableOrganization } = request, _body = __rest(request, ["employer_id", "X-Vitable-Organization"]);
1517
1518
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1518
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1519
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1519
1520
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1520
1521
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, `v1/employers/${core.url.encodePathParam(employerId)}/settings`),
1521
1522
  method: "PUT",
@@ -1568,6 +1569,7 @@ class EmployersClient {
1568
1569
  /**
1569
1570
  * Returns the distinct HRIS/payroll providers across the same book `GET /v1/employers` returns, sorted for display. Use these as the values for the employers list's `hris_provider` filter — filter on `provider`, show `provider_label`. The stored providers are free text, so they cannot be enumerated in advance.
1570
1571
  *
1572
+ * @param {VitableConnect.ListHrisProvidersEmployersRequest} request
1571
1573
  * @param {EmployersClient.RequestOptions} requestOptions - Request-specific configuration.
1572
1574
  *
1573
1575
  * @throws {@link VitableConnect.BadRequestError}
@@ -1584,14 +1586,15 @@ class EmployersClient {
1584
1586
  * @example
1585
1587
  * await client.employers.listHrisProviders()
1586
1588
  */
1587
- listHrisProviders(requestOptions) {
1588
- return core.HttpResponsePromise.fromPromise(this.__listHrisProviders(requestOptions));
1589
+ listHrisProviders(request = {}, requestOptions) {
1590
+ return core.HttpResponsePromise.fromPromise(this.__listHrisProviders(request, requestOptions));
1589
1591
  }
1590
- __listHrisProviders(requestOptions) {
1591
- return __awaiter(this, void 0, void 0, function* () {
1592
+ __listHrisProviders() {
1593
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1592
1594
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1595
+ const { "X-Vitable-Organization": vitableOrganization } = request;
1593
1596
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1594
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1597
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1595
1598
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1596
1599
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, "v1/employers/hris-providers"),
1597
1600
  method: "GET",
@@ -18,6 +18,8 @@ import type * as VitableConnect from "../../../../index.js";
18
18
  * }
19
19
  */
20
20
  export interface CreateEmployerRequest {
21
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
22
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
21
23
  /** Employer display name */
22
24
  name: string;
23
25
  /** Legal business name */
@@ -7,4 +7,6 @@ import type * as VitableConnect from "../../../../index.js";
7
7
  */
8
8
  export interface EnsurePayrollIntegrationEmailEmployersRequest {
9
9
  employer_id: VitableConnect.EmployerId;
10
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
11
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
10
12
  }
@@ -11,4 +11,6 @@ export interface GetBenefitPlanYearEmployersRequest {
11
11
  employer_id: VitableConnect.EmployerId;
12
12
  /** Unique benefit-plan-year identifier (plyr_*). */
13
13
  benefit_plan_year_id: VitableConnect.BenefitPlanYearId;
14
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
15
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
14
16
  }
@@ -8,4 +8,6 @@ import type * as VitableConnect from "../../../../index.js";
8
8
  export interface GetEmployersRequest {
9
9
  /** Unique employer identifier (empr_*) */
10
10
  employer_id: VitableConnect.EmployerId;
11
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
12
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
11
13
  }
@@ -8,4 +8,6 @@ import type * as VitableConnect from "../../../../index.js";
8
8
  export interface GetHrisEmployersRequest {
9
9
  /** Unique employer identifier (empr_*) */
10
10
  employer_id: VitableConnect.EmployerId;
11
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
12
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
11
13
  }
@@ -11,4 +11,6 @@ export interface GetInvoicePdfEmployersRequest {
11
11
  employer_id: VitableConnect.EmployerId;
12
12
  /** External Chargebee invoice id (not a prefixed UUID). */
13
13
  invoice_id: VitableConnect.InvoiceId;
14
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
15
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
14
16
  }
@@ -7,4 +7,6 @@ import type * as VitableConnect from "../../../../index.js";
7
7
  */
8
8
  export interface GetPayrollAccessSetupEmployersRequest {
9
9
  employer_id: VitableConnect.EmployerId;
10
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
11
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
10
12
  }
@@ -21,4 +21,6 @@ export interface ListBenefitPlanYearEnrollmentsEmployersRequest {
21
21
  page?: VitableConnect.Page;
22
22
  /** Case-insensitive search. Matches member name partially, and the `member_id` exactly — either your own reference id or the prefixed `grpmbr_<...>` id. */
23
23
  search?: VitableConnect.EmployerSearch;
24
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
25
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
24
26
  }
@@ -8,4 +8,6 @@ import type * as VitableConnect from "../../../../index.js";
8
8
  export interface ListBenefitPlanYearsEmployersRequest {
9
9
  /** Unique employer identifier (empr_*) */
10
10
  employer_id: VitableConnect.EmployerId;
11
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
12
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
11
13
  }
@@ -19,4 +19,6 @@ export interface ListEmployeesEmployersRequest {
19
19
  page?: VitableConnect.Page;
20
20
  /** Case-insensitive search across employee first name, last name, and email */
21
21
  search?: VitableConnect.EmployeeSearch;
22
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
23
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
22
24
  }
@@ -23,4 +23,6 @@ export interface ListEmployersRequest {
23
23
  page?: VitableConnect.Page;
24
24
  /** Employer filter. Matches the display name or the legal name case-insensitively as a substring, or one of these exactly: the EIN (with or without its dash), the employer id, or the contact email of one of the employer's non-disabled admins. */
25
25
  search?: VitableConnect.Search | null;
26
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
27
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
26
28
  }
@@ -0,0 +1,9 @@
1
+ import type * as VitableConnect from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {}
5
+ */
6
+ export interface ListHrisProvidersEmployersRequest {
7
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
8
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -13,4 +13,6 @@ export interface ListInvoicesEmployersRequest {
13
13
  limit?: VitableConnect.Limit;
14
14
  /** Opaque cursor from a previous page's next_offset */
15
15
  offset?: VitableConnect.Offset | null;
16
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
17
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
16
18
  }
@@ -14,4 +14,6 @@ export interface ListPayrollDeductionStatementsEmployersRequest {
14
14
  limit?: VitableConnect.Limit;
15
15
  /** Page number to retrieve (starts at 1) */
16
16
  page?: VitableConnect.Page;
17
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
18
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
17
19
  }
@@ -14,6 +14,8 @@ import type * as VitableConnect from "../../../../index.js";
14
14
  */
15
15
  export interface SubmitPayrollAccessSetupRequest {
16
16
  employer_id: VitableConnect.EmployerId;
17
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
18
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
17
19
  /** Attestation that all benefit-eligible employees appear in the payroll system. */
18
20
  employees_in_payroll_acknowledged: boolean;
19
21
  /** Attestation that changes to payroll data affect benefit eligibility. */
@@ -8,6 +8,8 @@ import type * as VitableConnect from "../../../../index.js";
8
8
  export interface UpdateEmployerRequest {
9
9
  /** Unique employer identifier (empr_*) */
10
10
  employer_id: VitableConnect.EmployerId;
11
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
12
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
11
13
  /** Employer display name */
12
14
  name?: string | null;
13
15
  /** Legal business name */
@@ -9,5 +9,7 @@ import type * as VitableConnect from "../../../../index.js";
9
9
  export interface UpdateEmployerSettingsRequest {
10
10
  /** Unique employer identifier (empr_*) */
11
11
  employer_id: VitableConnect.EmployerId;
12
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
13
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
12
14
  pay_frequency: VitableConnect.DeductionFrequency;
13
15
  }
@@ -10,6 +10,7 @@ export type { ListBenefitPlanYearEnrollmentsEmployersRequest } from "./ListBenef
10
10
  export type { ListBenefitPlanYearsEmployersRequest } from "./ListBenefitPlanYearsEmployersRequest.js";
11
11
  export type { ListEmployeesEmployersRequest } from "./ListEmployeesEmployersRequest.js";
12
12
  export type { ListEmployersRequest } from "./ListEmployersRequest.js";
13
+ export type { ListHrisProvidersEmployersRequest } from "./ListHrisProvidersEmployersRequest.js";
13
14
  export type { ListInvoicesEmployersRequest } from "./ListInvoicesEmployersRequest.js";
14
15
  export type { ListPayrollDeductionStatementsEmployersRequest } from "./ListPayrollDeductionStatementsEmployersRequest.js";
15
16
  export type { SubmitPayrollAccessSetupRequest } from "./SubmitPayrollAccessSetupRequest.js";
@@ -98,9 +98,9 @@ class EnrollmentsClient {
98
98
  __get(request, requestOptions) {
99
99
  return __awaiter(this, void 0, void 0, function* () {
100
100
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
101
- const { enrollment_id: enrollmentId } = request;
101
+ const { enrollment_id: enrollmentId, "X-Vitable-Organization": vitableOrganization } = request;
102
102
  const _authRequest = yield this._options.authProvider.getAuthRequest();
103
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
103
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
104
104
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
105
105
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, `v1/enrollments/${core.url.encodePathParam(enrollmentId)}`),
106
106
  method: "GET",
@@ -182,9 +182,9 @@ class EnrollmentsClient {
182
182
  __reissue(request, requestOptions) {
183
183
  return __awaiter(this, void 0, void 0, function* () {
184
184
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
185
- const { enrollment_id: enrollmentId } = request, _body = __rest(request, ["enrollment_id"]);
185
+ const { enrollment_id: enrollmentId, "X-Vitable-Organization": vitableOrganization } = request, _body = __rest(request, ["enrollment_id", "X-Vitable-Organization"]);
186
186
  const _authRequest = yield this._options.authProvider.getAuthRequest();
187
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
187
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
188
188
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
189
189
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, `v1/enrollments/${core.url.encodePathParam(enrollmentId)}/reissue`),
190
190
  method: "POST",
@@ -274,9 +274,9 @@ class EnrollmentsClient {
274
274
  __terminate(request, requestOptions) {
275
275
  return __awaiter(this, void 0, void 0, function* () {
276
276
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
277
- const { enrollment_id: enrollmentId } = request, _body = __rest(request, ["enrollment_id"]);
277
+ const { enrollment_id: enrollmentId, "X-Vitable-Organization": vitableOrganization } = request, _body = __rest(request, ["enrollment_id", "X-Vitable-Organization"]);
278
278
  const _authRequest = yield this._options.authProvider.getAuthRequest();
279
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
279
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
280
280
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
281
281
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.VitableConnectEnvironment.Production, `v1/enrollments/${core.url.encodePathParam(enrollmentId)}/terminate`),
282
282
  method: "POST",
@@ -8,4 +8,6 @@ import type * as VitableConnect from "../../../../index.js";
8
8
  export interface GetEnrollmentsRequest {
9
9
  /** Unique enrollment identifier (enrl_*) */
10
10
  enrollment_id: VitableConnect.EnrollmentId;
11
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
12
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
11
13
  }
@@ -17,6 +17,8 @@ import type * as VitableConnect from "../../../../index.js";
17
17
  export interface ReissueEnrollmentRequest {
18
18
  /** Unique enrollment identifier (enrl_*) */
19
19
  enrollment_id: VitableConnect.EnrollmentId;
20
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
21
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
20
22
  /** Audit reason for the reissue; required for user-backed callers and optional for long-lived organization API-key callers */
21
23
  reason?: string | null;
22
24
  /** Optional support or operational ticket number */
@@ -17,6 +17,8 @@ import type * as VitableConnect from "../../../../index.js";
17
17
  export interface TerminateEnrollmentRequest {
18
18
  /** Unique enrollment identifier (enrl_*) */
19
19
  enrollment_id: VitableConnect.EnrollmentId;
20
+ /** Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`. */
21
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
20
22
  /** Audit reason for the termination; required for user-backed callers and optional for long-lived organization API-key callers */
21
23
  reason?: string | null;
22
24
  /** Optional support or operational ticket number */