@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
@@ -86,9 +86,9 @@ class MembersClient {
86
86
  __get(request, requestOptions) {
87
87
  return __awaiter(this, void 0, void 0, function* () {
88
88
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
89
- const { member_id: memberId } = request;
89
+ const { member_id: memberId, "X-Vitable-Organization": vitableOrganization } = request;
90
90
  const _authRequest = yield this._options.authProvider.getAuthRequest();
91
- 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);
91
+ 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);
92
92
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
93
93
  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/members/${core.url.encodePathParam(memberId)}`),
94
94
  method: "GET",
@@ -160,9 +160,9 @@ class MembersClient {
160
160
  __listDependents(request, requestOptions) {
161
161
  return __awaiter(this, void 0, void 0, function* () {
162
162
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
163
- const { member_id: memberId } = request;
163
+ const { member_id: memberId, "X-Vitable-Organization": vitableOrganization } = request;
164
164
  const _authRequest = yield this._options.authProvider.getAuthRequest();
165
- 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);
165
+ 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);
166
166
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
167
167
  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/members/${core.url.encodePathParam(memberId)}/dependents`),
168
168
  method: "GET",
@@ -237,9 +237,9 @@ class MembersClient {
237
237
  __listEmployments(request, requestOptions) {
238
238
  return __awaiter(this, void 0, void 0, function* () {
239
239
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
240
- const { member_id: memberId } = request;
240
+ const { member_id: memberId, "X-Vitable-Organization": vitableOrganization } = request;
241
241
  const _authRequest = yield this._options.authProvider.getAuthRequest();
242
- 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);
242
+ 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);
243
243
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
244
244
  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/members/${core.url.encodePathParam(memberId)}/employments`),
245
245
  method: "GET",
@@ -314,9 +314,9 @@ class MembersClient {
314
314
  __listEnrollments(request, requestOptions) {
315
315
  return __awaiter(this, void 0, void 0, function* () {
316
316
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
317
- const { member_id: memberId } = request;
317
+ const { member_id: memberId, "X-Vitable-Organization": vitableOrganization } = request;
318
318
  const _authRequest = yield this._options.authProvider.getAuthRequest();
319
- 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);
319
+ 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);
320
320
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
321
321
  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/members/${core.url.encodePathParam(memberId)}/enrollments`),
322
322
  method: "GET",
@@ -391,9 +391,9 @@ class MembersClient {
391
391
  __getHousehold(request, requestOptions) {
392
392
  return __awaiter(this, void 0, void 0, function* () {
393
393
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
394
- const { member_id: memberId } = request;
394
+ const { member_id: memberId, "X-Vitable-Organization": vitableOrganization } = request;
395
395
  const _authRequest = yield this._options.authProvider.getAuthRequest();
396
- 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);
396
+ 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);
397
397
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
398
398
  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/members/${core.url.encodePathParam(memberId)}/household`),
399
399
  method: "GET",
@@ -468,9 +468,9 @@ class MembersClient {
468
468
  __listIdCards(request, requestOptions) {
469
469
  return __awaiter(this, void 0, void 0, function* () {
470
470
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
471
- const { member_id: memberId } = request;
471
+ const { member_id: memberId, "X-Vitable-Organization": vitableOrganization } = request;
472
472
  const _authRequest = yield this._options.authProvider.getAuthRequest();
473
- 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);
473
+ 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);
474
474
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
475
475
  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/members/${core.url.encodePathParam(memberId)}/id-cards`),
476
476
  method: "GET",
@@ -545,14 +545,14 @@ class MembersClient {
545
545
  return __awaiter(this, void 0, void 0, function* () {
546
546
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
547
547
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
548
- const { member_id: memberId, limit, page, status } = request;
548
+ const { member_id: memberId, limit, page, status, "X-Vitable-Organization": vitableOrganization, } = request;
549
549
  const _queryParams = {
550
550
  limit,
551
551
  page,
552
552
  status: status != null ? status : undefined,
553
553
  };
554
554
  const _authRequest = yield this._options.authProvider.getAuthRequest();
555
- 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);
555
+ 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);
556
556
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
557
557
  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/members/${core.url.encodePathParam(memberId)}/qualifying-life-events`),
558
558
  method: "GET",
@@ -643,14 +643,14 @@ class MembersClient {
643
643
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
644
644
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
645
645
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
646
- const { limit, page, search } = request;
646
+ const { limit, page, search, "X-Vitable-Organization": vitableOrganization } = request;
647
647
  const _queryParams = {
648
648
  limit,
649
649
  page,
650
650
  search,
651
651
  };
652
652
  const _authRequest = yield this._options.authProvider.getAuthRequest();
653
- 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);
653
+ 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);
654
654
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
655
655
  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, "v2/members"),
656
656
  method: "GET",
@@ -7,4 +7,6 @@ import type * as VitableConnect from "../../../../index.js";
7
7
  */
8
8
  export interface GetHouseholdMembersRequest {
9
9
  member_id: VitableConnect.MemberId;
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
  }
@@ -8,4 +8,6 @@ import type * as VitableConnect from "../../../../index.js";
8
8
  export interface GetMembersRequest {
9
9
  /** Unique member identifier (mbr_*) */
10
10
  member_id: VitableConnect.MemberId;
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
  }
@@ -7,4 +7,6 @@ import type * as VitableConnect from "../../../../index.js";
7
7
  */
8
8
  export interface ListDependentsMembersRequest {
9
9
  member_id: VitableConnect.MemberId;
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
  }
@@ -7,4 +7,6 @@ import type * as VitableConnect from "../../../../index.js";
7
7
  */
8
8
  export interface ListEmploymentsMembersRequest {
9
9
  member_id: VitableConnect.MemberId;
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
  }
@@ -7,4 +7,6 @@ import type * as VitableConnect from "../../../../index.js";
7
7
  */
8
8
  export interface ListEnrollmentsMembersRequest {
9
9
  member_id: VitableConnect.MemberId;
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
  }
@@ -7,4 +7,6 @@ import type * as VitableConnect from "../../../../index.js";
7
7
  */
8
8
  export interface ListIdCardsMembersRequest {
9
9
  member_id: VitableConnect.MemberId;
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
  }
@@ -13,4 +13,6 @@ export interface ListMembersRequest {
13
13
  page?: VitableConnect.Page;
14
14
  /** Case-insensitive search across member name, email, and phone number; exact match on member id (prefixed or raw uuid) */
15
15
  search?: VitableConnect.MemberSearch;
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
  }
@@ -16,4 +16,6 @@ export interface ListQualifyingLifeEventsMembersRequest {
16
16
  page?: VitableConnect.Page;
17
17
  /** Optional. Filter to a single QLE status; omit to return all statuses. */
18
18
  status?: VitableConnect.Status;
19
+ /** 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`. */
20
+ "X-Vitable-Organization"?: VitableConnect.XVitableOrganization;
19
21
  }
@@ -35,7 +35,7 @@ export declare class OrganizationsClient {
35
35
  list(requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<VitableConnect.OrganizationsListResponse>;
36
36
  private __list;
37
37
  /**
38
- * Onboards the authenticated user's partner Organization: creates the local Organization + the creator's admin membership atomically, then mirrors it to WorkOS (creates the WorkOS org and binds the creator as admin). 409 `organization_already_exists` when the user already has an organization (v0: one organization per user).
38
+ * Onboards the authenticated user's partner Organization: creates the local Organization + the creator's admin membership atomically, then mirrors it to WorkOS (creates the WorkOS org and binds the creator as admin). A user may hold several organizations and selects which one a request acts as with the `X-Vitable-Organization` header. The founder's email domain is claimed only when no other organization holds it, so a taken domain is left with its owner rather than rejected.
39
39
  *
40
40
  * @param {VitableConnect.CreateOrganizationRequest} request
41
41
  * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -133,7 +133,7 @@ class OrganizationsClient {
133
133
  });
134
134
  }
135
135
  /**
136
- * Onboards the authenticated user's partner Organization: creates the local Organization + the creator's admin membership atomically, then mirrors it to WorkOS (creates the WorkOS org and binds the creator as admin). 409 `organization_already_exists` when the user already has an organization (v0: one organization per user).
136
+ * Onboards the authenticated user's partner Organization: creates the local Organization + the creator's admin membership atomically, then mirrors it to WorkOS (creates the WorkOS org and binds the creator as admin). A user may hold several organizations and selects which one a request acts as with the `X-Vitable-Organization` header. The founder's email domain is claimed only when no other organization holds it, so a taken domain is left with its owner rather than rejected.
137
137
  *
138
138
  * @param {VitableConnect.CreateOrganizationRequest} request
139
139
  * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 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`.
3
+ */
4
+ export type XVitableOrganization = string;
@@ -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 });
@@ -173,3 +173,4 @@ export * from "./WebhookDelivery.js";
173
173
  export * from "./WebhookEvent.js";
174
174
  export * from "./WebhookEventListResponse.js";
175
175
  export * from "./WebhookEventResponse.js";
176
+ export * from "./XVitableOrganization.js";
@@ -189,3 +189,4 @@ __exportStar(require("./WebhookDelivery.js"), exports);
189
189
  __exportStar(require("./WebhookEvent.js"), exports);
190
190
  __exportStar(require("./WebhookEventListResponse.js"), exports);
191
191
  __exportStar(require("./WebhookEventResponse.js"), exports);
192
+ __exportStar(require("./XVitableOrganization.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.0.0";
1
+ export declare const SDK_VERSION = "2.1.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "2.0.0";
4
+ exports.SDK_VERSION = "2.1.0";
@@ -7,8 +7,8 @@ export function normalizeClientOptions(options) {
7
7
  const headers = mergeHeaders({
8
8
  "X-Fern-Language": "JavaScript",
9
9
  "X-Fern-SDK-Name": "@vitable-inc/vitable-connect",
10
- "X-Fern-SDK-Version": "2.0.0",
11
- "User-Agent": "@vitable-inc/vitable-connect/2.0.0",
10
+ "X-Fern-SDK-Version": "2.1.0",
11
+ "User-Agent": "@vitable-inc/vitable-connect/2.1.0",
12
12
  "X-Fern-Runtime": core.RUNTIME.type,
13
13
  "X-Fern-Runtime-Version": core.RUNTIME.version,
14
14
  }, 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
  }
@@ -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
  }