@vitable-inc/vitable-connect 2.0.0 → 3.0.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 (108) 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 +2 -2
  37. package/dist/cjs/api/resources/organizations/client/Client.js +2 -2
  38. package/dist/cjs/api/resources/organizations/client/requests/CreateOrganizationRequest.d.ts +1 -1
  39. package/dist/cjs/api/types/OrganizationMembership.d.ts +38 -0
  40. package/dist/cjs/api/types/OrganizationMembership.js +3 -0
  41. package/dist/cjs/api/types/OrganizationType.d.ts +5 -5
  42. package/dist/cjs/api/types/OrganizationType.js +5 -5
  43. package/dist/cjs/api/types/OrganizationUserRole.d.ts +13 -0
  44. package/dist/cjs/api/types/OrganizationUserRole.js +16 -0
  45. package/dist/cjs/api/types/OrganizationsListResponse.d.ts +1 -1
  46. package/dist/cjs/api/types/XVitableOrganization.d.ts +4 -0
  47. package/dist/cjs/api/types/XVitableOrganization.js +3 -0
  48. package/dist/cjs/api/types/index.d.ts +3 -1
  49. package/dist/cjs/api/types/index.js +3 -1
  50. package/dist/cjs/version.d.ts +1 -1
  51. package/dist/cjs/version.js +1 -1
  52. package/dist/esm/BaseClient.mjs +2 -2
  53. package/dist/esm/api/resources/employers/client/Client.d.mts +2 -1
  54. package/dist/esm/api/resources/employers/client/Client.mjs +41 -38
  55. package/dist/esm/api/resources/employers/client/requests/CreateEmployerRequest.d.mts +2 -0
  56. package/dist/esm/api/resources/employers/client/requests/EnsurePayrollIntegrationEmailEmployersRequest.d.mts +2 -0
  57. package/dist/esm/api/resources/employers/client/requests/GetBenefitPlanYearEmployersRequest.d.mts +2 -0
  58. package/dist/esm/api/resources/employers/client/requests/GetEmployersRequest.d.mts +2 -0
  59. package/dist/esm/api/resources/employers/client/requests/GetHrisEmployersRequest.d.mts +2 -0
  60. package/dist/esm/api/resources/employers/client/requests/GetInvoicePdfEmployersRequest.d.mts +2 -0
  61. package/dist/esm/api/resources/employers/client/requests/GetPayrollAccessSetupEmployersRequest.d.mts +2 -0
  62. package/dist/esm/api/resources/employers/client/requests/ListBenefitPlanYearEnrollmentsEmployersRequest.d.mts +2 -0
  63. package/dist/esm/api/resources/employers/client/requests/ListBenefitPlanYearsEmployersRequest.d.mts +2 -0
  64. package/dist/esm/api/resources/employers/client/requests/ListEmployeesEmployersRequest.d.mts +2 -0
  65. package/dist/esm/api/resources/employers/client/requests/ListEmployersRequest.d.mts +2 -0
  66. package/dist/esm/api/resources/employers/client/requests/ListHrisProvidersEmployersRequest.d.mts +9 -0
  67. package/dist/esm/api/resources/employers/client/requests/ListHrisProvidersEmployersRequest.mjs +2 -0
  68. package/dist/esm/api/resources/employers/client/requests/ListInvoicesEmployersRequest.d.mts +2 -0
  69. package/dist/esm/api/resources/employers/client/requests/ListPayrollDeductionStatementsEmployersRequest.d.mts +2 -0
  70. package/dist/esm/api/resources/employers/client/requests/SubmitPayrollAccessSetupRequest.d.mts +2 -0
  71. package/dist/esm/api/resources/employers/client/requests/UpdateEmployerRequest.d.mts +2 -0
  72. package/dist/esm/api/resources/employers/client/requests/UpdateEmployerSettingsRequest.d.mts +2 -0
  73. package/dist/esm/api/resources/employers/client/requests/index.d.mts +1 -0
  74. package/dist/esm/api/resources/enrollments/client/Client.mjs +7 -7
  75. package/dist/esm/api/resources/enrollments/client/requests/GetEnrollmentsRequest.d.mts +2 -0
  76. package/dist/esm/api/resources/enrollments/client/requests/ReissueEnrollmentRequest.d.mts +2 -0
  77. package/dist/esm/api/resources/enrollments/client/requests/TerminateEnrollmentRequest.d.mts +2 -0
  78. package/dist/esm/api/resources/members/client/Client.mjs +17 -17
  79. package/dist/esm/api/resources/members/client/requests/GetHouseholdMembersRequest.d.mts +2 -0
  80. package/dist/esm/api/resources/members/client/requests/GetMembersRequest.d.mts +2 -0
  81. package/dist/esm/api/resources/members/client/requests/ListDependentsMembersRequest.d.mts +2 -0
  82. package/dist/esm/api/resources/members/client/requests/ListEmploymentsMembersRequest.d.mts +2 -0
  83. package/dist/esm/api/resources/members/client/requests/ListEnrollmentsMembersRequest.d.mts +2 -0
  84. package/dist/esm/api/resources/members/client/requests/ListIdCardsMembersRequest.d.mts +2 -0
  85. package/dist/esm/api/resources/members/client/requests/ListMembersRequest.d.mts +2 -0
  86. package/dist/esm/api/resources/members/client/requests/ListQualifyingLifeEventsMembersRequest.d.mts +2 -0
  87. package/dist/esm/api/resources/organizations/client/Client.d.mts +2 -2
  88. package/dist/esm/api/resources/organizations/client/Client.mjs +2 -2
  89. package/dist/esm/api/resources/organizations/client/requests/CreateOrganizationRequest.d.mts +1 -1
  90. package/dist/esm/api/types/OrganizationMembership.d.mts +38 -0
  91. package/dist/esm/api/types/OrganizationMembership.mjs +2 -0
  92. package/dist/esm/api/types/OrganizationType.d.mts +5 -5
  93. package/dist/esm/api/types/OrganizationType.mjs +5 -5
  94. package/dist/esm/api/types/OrganizationUserRole.d.mts +13 -0
  95. package/dist/esm/api/types/OrganizationUserRole.mjs +13 -0
  96. package/dist/esm/api/types/OrganizationsListResponse.d.mts +1 -1
  97. package/dist/esm/api/types/XVitableOrganization.d.mts +4 -0
  98. package/dist/esm/api/types/XVitableOrganization.mjs +2 -0
  99. package/dist/esm/api/types/index.d.mts +3 -1
  100. package/dist/esm/api/types/index.mjs +3 -1
  101. package/dist/esm/version.d.mts +1 -1
  102. package/dist/esm/version.mjs +1 -1
  103. package/package.json +1 -1
  104. package/reference.md +11 -3
  105. package/dist/cjs/api/types/CreateOrganizationRequestType.d.ts +0 -17
  106. package/dist/cjs/api/types/CreateOrganizationRequestType.js +0 -20
  107. package/dist/esm/api/types/CreateOrganizationRequestType.d.mts +0 -17
  108. package/dist/esm/api/types/CreateOrganizationRequestType.mjs +0 -17
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  return t;
21
21
  };
22
22
  import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
23
- import { mergeHeaders } from "../../../../core/headers.mjs";
23
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
24
24
  import * as core from "../../../../core/index.mjs";
25
25
  import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.mjs";
26
26
  import * as environments from "../../../../environments.mjs";
@@ -61,7 +61,7 @@ export class EmployersClient {
61
61
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
62
62
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
63
63
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
64
- const { benefit_family: benefitFamily, benefit_lifecycle_stage: benefitLifecycleStage, hris_provider: hrisProvider, hris_status: hrisStatus, include_cancelled: includeCancelled, limit, page, search, } = request;
64
+ 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;
65
65
  const _queryParams = {
66
66
  benefit_family: Array.isArray(benefitFamily)
67
67
  ? benefitFamily.map((item) => item)
@@ -85,7 +85,7 @@ export class EmployersClient {
85
85
  search,
86
86
  };
87
87
  const _authRequest = yield this._options.authProvider.getAuthRequest();
88
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
88
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
89
89
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
90
90
  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"),
91
91
  method: "GET",
@@ -190,8 +190,9 @@ export class EmployersClient {
190
190
  __create(request, requestOptions) {
191
191
  return __awaiter(this, void 0, void 0, function* () {
192
192
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
193
+ const { "X-Vitable-Organization": vitableOrganization } = request, _body = __rest(request, ["X-Vitable-Organization"]);
193
194
  const _authRequest = yield this._options.authProvider.getAuthRequest();
194
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
195
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
195
196
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
196
197
  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"),
197
198
  method: "POST",
@@ -199,7 +200,7 @@ export class EmployersClient {
199
200
  contentType: "application/json",
200
201
  queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
201
202
  requestType: "json",
202
- body: mergeAdditionalBodyParameters(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
203
+ body: mergeAdditionalBodyParameters(_body, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
203
204
  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,
204
205
  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,
205
206
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -268,9 +269,9 @@ export class EmployersClient {
268
269
  __get(request, requestOptions) {
269
270
  return __awaiter(this, void 0, void 0, function* () {
270
271
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
271
- const { employer_id: employerId } = request;
272
+ const { employer_id: employerId, "X-Vitable-Organization": vitableOrganization } = request;
272
273
  const _authRequest = yield this._options.authProvider.getAuthRequest();
273
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
274
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
274
275
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
275
276
  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)}`),
276
277
  method: "GET",
@@ -343,9 +344,9 @@ export class EmployersClient {
343
344
  __update(request, requestOptions) {
344
345
  return __awaiter(this, void 0, void 0, function* () {
345
346
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
346
- const { employer_id: employerId } = request, _body = __rest(request, ["employer_id"]);
347
+ const { employer_id: employerId, "X-Vitable-Organization": vitableOrganization } = request, _body = __rest(request, ["employer_id", "X-Vitable-Organization"]);
347
348
  const _authRequest = yield this._options.authProvider.getAuthRequest();
348
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
349
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
349
350
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
350
351
  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)}`),
351
352
  method: "PUT",
@@ -422,9 +423,9 @@ export class EmployersClient {
422
423
  __listBenefitPlanYears(request, requestOptions) {
423
424
  return __awaiter(this, void 0, void 0, function* () {
424
425
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
425
- const { employer_id: employerId } = request;
426
+ const { employer_id: employerId, "X-Vitable-Organization": vitableOrganization } = request;
426
427
  const _authRequest = yield this._options.authProvider.getAuthRequest();
427
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
428
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
428
429
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
429
430
  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`),
430
431
  method: "GET",
@@ -500,9 +501,9 @@ export class EmployersClient {
500
501
  __getBenefitPlanYear(request, requestOptions) {
501
502
  return __awaiter(this, void 0, void 0, function* () {
502
503
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
503
- const { employer_id: employerId, benefit_plan_year_id: benefitPlanYearId } = request;
504
+ const { employer_id: employerId, benefit_plan_year_id: benefitPlanYearId, "X-Vitable-Organization": vitableOrganization, } = request;
504
505
  const _authRequest = yield this._options.authProvider.getAuthRequest();
505
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
506
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
506
507
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
507
508
  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)}`),
508
509
  method: "GET",
@@ -578,7 +579,7 @@ export class EmployersClient {
578
579
  return __awaiter(this, void 0, void 0, function* () {
579
580
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
580
581
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
581
- const { employer_id: employerId, benefit_plan_year_id: benefitPlanYearId, election_status: electionStatus, limit, page, search, } = request;
582
+ const { employer_id: employerId, benefit_plan_year_id: benefitPlanYearId, election_status: electionStatus, limit, page, search, "X-Vitable-Organization": vitableOrganization, } = request;
582
583
  const _queryParams = {
583
584
  election_status: Array.isArray(electionStatus)
584
585
  ? electionStatus.map((item) => item)
@@ -590,7 +591,7 @@ export class EmployersClient {
590
591
  search,
591
592
  };
592
593
  const _authRequest = yield this._options.authProvider.getAuthRequest();
593
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
594
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
594
595
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
595
596
  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`),
596
597
  method: "GET",
@@ -791,7 +792,7 @@ export class EmployersClient {
791
792
  return __awaiter(this, void 0, void 0, function* () {
792
793
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
793
794
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
794
- const { employer_id: employerId, employment_status: employmentStatus, limit, page, search } = request;
795
+ const { employer_id: employerId, employment_status: employmentStatus, limit, page, search, "X-Vitable-Organization": vitableOrganization, } = request;
795
796
  const _queryParams = {
796
797
  employment_status: employmentStatus != null ? employmentStatus : undefined,
797
798
  limit,
@@ -799,7 +800,7 @@ export class EmployersClient {
799
800
  search,
800
801
  };
801
802
  const _authRequest = yield this._options.authProvider.getAuthRequest();
802
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
803
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
803
804
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
804
805
  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`),
805
806
  method: "GET",
@@ -893,9 +894,9 @@ export class EmployersClient {
893
894
  __getHris(request, requestOptions) {
894
895
  return __awaiter(this, void 0, void 0, function* () {
895
896
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
896
- const { employer_id: employerId } = request;
897
+ const { employer_id: employerId, "X-Vitable-Organization": vitableOrganization } = request;
897
898
  const _authRequest = yield this._options.authProvider.getAuthRequest();
898
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
899
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
899
900
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
900
901
  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`),
901
902
  method: "GET",
@@ -969,13 +970,13 @@ export class EmployersClient {
969
970
  __listInvoices(request, requestOptions) {
970
971
  return __awaiter(this, void 0, void 0, function* () {
971
972
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
972
- const { employer_id: employerId, limit, offset } = request;
973
+ const { employer_id: employerId, limit, offset, "X-Vitable-Organization": vitableOrganization } = request;
973
974
  const _queryParams = {
974
975
  limit,
975
976
  offset,
976
977
  };
977
978
  const _authRequest = yield this._options.authProvider.getAuthRequest();
978
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
979
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
979
980
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
980
981
  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`),
981
982
  method: "GET",
@@ -1057,9 +1058,9 @@ export class EmployersClient {
1057
1058
  __getInvoicePdf(request, requestOptions) {
1058
1059
  return __awaiter(this, void 0, void 0, function* () {
1059
1060
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1060
- const { employer_id: employerId, invoice_id: invoiceId } = request;
1061
+ const { employer_id: employerId, invoice_id: invoiceId, "X-Vitable-Organization": vitableOrganization, } = request;
1061
1062
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1062
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1063
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1063
1064
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1064
1065
  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`),
1065
1066
  method: "GET",
@@ -1134,9 +1135,9 @@ export class EmployersClient {
1134
1135
  __getPayrollAccessSetup(request, requestOptions) {
1135
1136
  return __awaiter(this, void 0, void 0, function* () {
1136
1137
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1137
- const { employer_id: employerId } = request;
1138
+ const { employer_id: employerId, "X-Vitable-Organization": vitableOrganization } = request;
1138
1139
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1139
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1140
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1140
1141
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1141
1142
  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`),
1142
1143
  method: "GET",
@@ -1218,9 +1219,9 @@ export class EmployersClient {
1218
1219
  __submitPayrollAccessSetup(request, requestOptions) {
1219
1220
  return __awaiter(this, void 0, void 0, function* () {
1220
1221
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1221
- const { employer_id: employerId } = request, _body = __rest(request, ["employer_id"]);
1222
+ const { employer_id: employerId, "X-Vitable-Organization": vitableOrganization } = request, _body = __rest(request, ["employer_id", "X-Vitable-Organization"]);
1222
1223
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1223
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1224
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1224
1225
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1225
1226
  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`),
1226
1227
  method: "PUT",
@@ -1299,13 +1300,13 @@ export class EmployersClient {
1299
1300
  return __awaiter(this, void 0, void 0, function* () {
1300
1301
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
1301
1302
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1302
- const { employer_id: employerId, limit, page } = request;
1303
+ const { employer_id: employerId, limit, page, "X-Vitable-Organization": vitableOrganization } = request;
1303
1304
  const _queryParams = {
1304
1305
  limit,
1305
1306
  page,
1306
1307
  };
1307
1308
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1308
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1309
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1309
1310
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1310
1311
  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`),
1311
1312
  method: "GET",
@@ -1399,9 +1400,9 @@ export class EmployersClient {
1399
1400
  __ensurePayrollIntegrationEmail(request, requestOptions) {
1400
1401
  return __awaiter(this, void 0, void 0, function* () {
1401
1402
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1402
- const { employer_id: employerId } = request;
1403
+ const { employer_id: employerId, "X-Vitable-Organization": vitableOrganization } = request;
1403
1404
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1404
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1405
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1405
1406
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1406
1407
  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`),
1407
1408
  method: "PUT",
@@ -1477,9 +1478,9 @@ export class EmployersClient {
1477
1478
  __updateSettings(request, requestOptions) {
1478
1479
  return __awaiter(this, void 0, void 0, function* () {
1479
1480
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1480
- const { employer_id: employerId } = request, _body = __rest(request, ["employer_id"]);
1481
+ const { employer_id: employerId, "X-Vitable-Organization": vitableOrganization } = request, _body = __rest(request, ["employer_id", "X-Vitable-Organization"]);
1481
1482
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1482
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1483
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1483
1484
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1484
1485
  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`),
1485
1486
  method: "PUT",
@@ -1532,6 +1533,7 @@ export class EmployersClient {
1532
1533
  /**
1533
1534
  * 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.
1534
1535
  *
1536
+ * @param {VitableConnect.ListHrisProvidersEmployersRequest} request
1535
1537
  * @param {EmployersClient.RequestOptions} requestOptions - Request-specific configuration.
1536
1538
  *
1537
1539
  * @throws {@link VitableConnect.BadRequestError}
@@ -1548,14 +1550,15 @@ export class EmployersClient {
1548
1550
  * @example
1549
1551
  * await client.employers.listHrisProviders()
1550
1552
  */
1551
- listHrisProviders(requestOptions) {
1552
- return core.HttpResponsePromise.fromPromise(this.__listHrisProviders(requestOptions));
1553
+ listHrisProviders(request = {}, requestOptions) {
1554
+ return core.HttpResponsePromise.fromPromise(this.__listHrisProviders(request, requestOptions));
1553
1555
  }
1554
- __listHrisProviders(requestOptions) {
1555
- return __awaiter(this, void 0, void 0, function* () {
1556
+ __listHrisProviders() {
1557
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
1556
1558
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1559
+ const { "X-Vitable-Organization": vitableOrganization } = request;
1557
1560
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1558
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1561
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1559
1562
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1560
1563
  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"),
1561
1564
  method: "GET",
@@ -18,6 +18,8 @@ import type * as VitableConnect from "../../../../index.mjs";
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.mjs";
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.mjs";
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.mjs";
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.mjs";
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.mjs";
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.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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.mjs";
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.mjs";
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.mjs";
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.mjs";
11
11
  export type { ListEmployeesEmployersRequest } from "./ListEmployeesEmployersRequest.mjs";
12
12
  export type { ListEmployersRequest } from "./ListEmployersRequest.mjs";
13
+ export type { ListHrisProvidersEmployersRequest } from "./ListHrisProvidersEmployersRequest.mjs";
13
14
  export type { ListInvoicesEmployersRequest } from "./ListInvoicesEmployersRequest.mjs";
14
15
  export type { ListPayrollDeductionStatementsEmployersRequest } from "./ListPayrollDeductionStatementsEmployersRequest.mjs";
15
16
  export type { SubmitPayrollAccessSetupRequest } from "./SubmitPayrollAccessSetupRequest.mjs";
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  return t;
21
21
  };
22
22
  import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
23
- import { mergeHeaders } from "../../../../core/headers.mjs";
23
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
24
24
  import * as core from "../../../../core/index.mjs";
25
25
  import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.mjs";
26
26
  import * as environments from "../../../../environments.mjs";
@@ -62,9 +62,9 @@ export class EnrollmentsClient {
62
62
  __get(request, requestOptions) {
63
63
  return __awaiter(this, void 0, void 0, function* () {
64
64
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
65
- const { enrollment_id: enrollmentId } = request;
65
+ const { enrollment_id: enrollmentId, "X-Vitable-Organization": vitableOrganization } = request;
66
66
  const _authRequest = yield this._options.authProvider.getAuthRequest();
67
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
67
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
68
68
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
69
69
  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)}`),
70
70
  method: "GET",
@@ -146,9 +146,9 @@ export class EnrollmentsClient {
146
146
  __reissue(request, requestOptions) {
147
147
  return __awaiter(this, void 0, void 0, function* () {
148
148
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
149
- const { enrollment_id: enrollmentId } = request, _body = __rest(request, ["enrollment_id"]);
149
+ const { enrollment_id: enrollmentId, "X-Vitable-Organization": vitableOrganization } = request, _body = __rest(request, ["enrollment_id", "X-Vitable-Organization"]);
150
150
  const _authRequest = yield this._options.authProvider.getAuthRequest();
151
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
151
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
152
152
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
153
153
  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`),
154
154
  method: "POST",
@@ -238,9 +238,9 @@ export class EnrollmentsClient {
238
238
  __terminate(request, requestOptions) {
239
239
  return __awaiter(this, void 0, void 0, function* () {
240
240
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
241
- const { enrollment_id: enrollmentId } = request, _body = __rest(request, ["enrollment_id"]);
241
+ const { enrollment_id: enrollmentId, "X-Vitable-Organization": vitableOrganization } = request, _body = __rest(request, ["enrollment_id", "X-Vitable-Organization"]);
242
242
  const _authRequest = yield this._options.authProvider.getAuthRequest();
243
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
243
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Vitable-Organization": vitableOrganization }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
244
244
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
245
245
  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`),
246
246
  method: "POST",
@@ -8,4 +8,6 @@ import type * as VitableConnect from "../../../../index.mjs";
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.mjs";
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.mjs";
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 */