@vitable-inc/vitable-connect 1.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 (96) 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/GroupMemberSyncFailure.d.ts +1 -1
  39. package/dist/cjs/api/types/GroupMemberSyncFailureOperation.d.ts +9 -0
  40. package/dist/cjs/api/types/{Operation.js → GroupMemberSyncFailureOperation.js} +2 -2
  41. package/dist/cjs/api/types/XVitableOrganization.d.ts +4 -0
  42. package/dist/cjs/api/types/XVitableOrganization.js +3 -0
  43. package/dist/cjs/api/types/index.d.ts +2 -1
  44. package/dist/cjs/api/types/index.js +2 -1
  45. package/dist/cjs/version.d.ts +1 -1
  46. package/dist/cjs/version.js +1 -1
  47. package/dist/esm/BaseClient.mjs +2 -2
  48. package/dist/esm/api/resources/employers/client/Client.d.mts +2 -1
  49. package/dist/esm/api/resources/employers/client/Client.mjs +41 -38
  50. package/dist/esm/api/resources/employers/client/requests/CreateEmployerRequest.d.mts +2 -0
  51. package/dist/esm/api/resources/employers/client/requests/EnsurePayrollIntegrationEmailEmployersRequest.d.mts +2 -0
  52. package/dist/esm/api/resources/employers/client/requests/GetBenefitPlanYearEmployersRequest.d.mts +2 -0
  53. package/dist/esm/api/resources/employers/client/requests/GetEmployersRequest.d.mts +2 -0
  54. package/dist/esm/api/resources/employers/client/requests/GetHrisEmployersRequest.d.mts +2 -0
  55. package/dist/esm/api/resources/employers/client/requests/GetInvoicePdfEmployersRequest.d.mts +2 -0
  56. package/dist/esm/api/resources/employers/client/requests/GetPayrollAccessSetupEmployersRequest.d.mts +2 -0
  57. package/dist/esm/api/resources/employers/client/requests/ListBenefitPlanYearEnrollmentsEmployersRequest.d.mts +2 -0
  58. package/dist/esm/api/resources/employers/client/requests/ListBenefitPlanYearsEmployersRequest.d.mts +2 -0
  59. package/dist/esm/api/resources/employers/client/requests/ListEmployeesEmployersRequest.d.mts +2 -0
  60. package/dist/esm/api/resources/employers/client/requests/ListEmployersRequest.d.mts +2 -0
  61. package/dist/esm/api/resources/employers/client/requests/ListHrisProvidersEmployersRequest.d.mts +9 -0
  62. package/dist/esm/api/resources/employers/client/requests/ListHrisProvidersEmployersRequest.mjs +2 -0
  63. package/dist/esm/api/resources/employers/client/requests/ListInvoicesEmployersRequest.d.mts +2 -0
  64. package/dist/esm/api/resources/employers/client/requests/ListPayrollDeductionStatementsEmployersRequest.d.mts +2 -0
  65. package/dist/esm/api/resources/employers/client/requests/SubmitPayrollAccessSetupRequest.d.mts +2 -0
  66. package/dist/esm/api/resources/employers/client/requests/UpdateEmployerRequest.d.mts +2 -0
  67. package/dist/esm/api/resources/employers/client/requests/UpdateEmployerSettingsRequest.d.mts +2 -0
  68. package/dist/esm/api/resources/employers/client/requests/index.d.mts +1 -0
  69. package/dist/esm/api/resources/enrollments/client/Client.mjs +7 -7
  70. package/dist/esm/api/resources/enrollments/client/requests/GetEnrollmentsRequest.d.mts +2 -0
  71. package/dist/esm/api/resources/enrollments/client/requests/ReissueEnrollmentRequest.d.mts +2 -0
  72. package/dist/esm/api/resources/enrollments/client/requests/TerminateEnrollmentRequest.d.mts +2 -0
  73. package/dist/esm/api/resources/members/client/Client.mjs +17 -17
  74. package/dist/esm/api/resources/members/client/requests/GetHouseholdMembersRequest.d.mts +2 -0
  75. package/dist/esm/api/resources/members/client/requests/GetMembersRequest.d.mts +2 -0
  76. package/dist/esm/api/resources/members/client/requests/ListDependentsMembersRequest.d.mts +2 -0
  77. package/dist/esm/api/resources/members/client/requests/ListEmploymentsMembersRequest.d.mts +2 -0
  78. package/dist/esm/api/resources/members/client/requests/ListEnrollmentsMembersRequest.d.mts +2 -0
  79. package/dist/esm/api/resources/members/client/requests/ListIdCardsMembersRequest.d.mts +2 -0
  80. package/dist/esm/api/resources/members/client/requests/ListMembersRequest.d.mts +2 -0
  81. package/dist/esm/api/resources/members/client/requests/ListQualifyingLifeEventsMembersRequest.d.mts +2 -0
  82. package/dist/esm/api/resources/organizations/client/Client.d.mts +1 -1
  83. package/dist/esm/api/resources/organizations/client/Client.mjs +1 -1
  84. package/dist/esm/api/types/GroupMemberSyncFailure.d.mts +1 -1
  85. package/dist/esm/api/types/GroupMemberSyncFailureOperation.d.mts +9 -0
  86. package/dist/esm/api/types/{Operation.mjs → GroupMemberSyncFailureOperation.mjs} +1 -1
  87. package/dist/esm/api/types/XVitableOrganization.d.mts +4 -0
  88. package/dist/esm/api/types/XVitableOrganization.mjs +2 -0
  89. package/dist/esm/api/types/index.d.mts +2 -1
  90. package/dist/esm/api/types/index.mjs +2 -1
  91. package/dist/esm/version.d.mts +1 -1
  92. package/dist/esm/version.mjs +1 -1
  93. package/package.json +1 -1
  94. package/reference.md +10 -2
  95. package/dist/cjs/api/types/Operation.d.ts +0 -9
  96. package/dist/esm/api/types/Operation.d.mts +0 -9
@@ -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.
@@ -3,7 +3,7 @@ export interface GroupMemberSyncFailure {
3
3
  /** Your identifier for the member that failed to sync. */
4
4
  reference_id: string;
5
5
  /** The sync operation that failed for this member. */
6
- operation: VitableConnect.Operation;
6
+ operation: VitableConnect.GroupMemberSyncFailureOperation;
7
7
  /** Human-readable explanation of why the operation failed. */
8
8
  reason: string;
9
9
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * * `add` - add
3
+ * * `remove` - remove
4
+ */
5
+ export declare const GroupMemberSyncFailureOperation: {
6
+ readonly Add: "add";
7
+ readonly Remove: "remove";
8
+ };
9
+ export type GroupMemberSyncFailureOperation = (typeof GroupMemberSyncFailureOperation)[keyof typeof GroupMemberSyncFailureOperation];
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Operation = void 0;
4
+ exports.GroupMemberSyncFailureOperation = void 0;
5
5
  /**
6
6
  * * `add` - add
7
7
  * * `remove` - remove
8
8
  */
9
- exports.Operation = {
9
+ exports.GroupMemberSyncFailureOperation = {
10
10
  Add: "add",
11
11
  Remove: "remove",
12
12
  };
@@ -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 });
@@ -89,6 +89,7 @@ export * from "./GroupId.js";
89
89
  export * from "./GroupListResponse.js";
90
90
  export * from "./GroupMemberSyncDetailResponse.js";
91
91
  export * from "./GroupMemberSyncFailure.js";
92
+ export * from "./GroupMemberSyncFailureOperation.js";
92
93
  export * from "./GroupMemberSyncMemberRequest.js";
93
94
  export * from "./GroupMemberSyncRequestDetail.js";
94
95
  export * from "./GroupMemberSyncRequestDetailResponse.js";
@@ -129,7 +130,6 @@ export * from "./MemberStatus.js";
129
130
  export * from "./MissingEmployeeResolution.js";
130
131
  export * from "./NameSuffix.js";
131
132
  export * from "./Offset.js";
132
- export * from "./Operation.js";
133
133
  export * from "./Organization.js";
134
134
  export * from "./OrganizationEmployer.js";
135
135
  export * from "./OrganizationEmployerListResponse.js";
@@ -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";
@@ -105,6 +105,7 @@ __exportStar(require("./GroupId.js"), exports);
105
105
  __exportStar(require("./GroupListResponse.js"), exports);
106
106
  __exportStar(require("./GroupMemberSyncDetailResponse.js"), exports);
107
107
  __exportStar(require("./GroupMemberSyncFailure.js"), exports);
108
+ __exportStar(require("./GroupMemberSyncFailureOperation.js"), exports);
108
109
  __exportStar(require("./GroupMemberSyncMemberRequest.js"), exports);
109
110
  __exportStar(require("./GroupMemberSyncRequestDetail.js"), exports);
110
111
  __exportStar(require("./GroupMemberSyncRequestDetailResponse.js"), exports);
@@ -145,7 +146,6 @@ __exportStar(require("./MemberStatus.js"), exports);
145
146
  __exportStar(require("./MissingEmployeeResolution.js"), exports);
146
147
  __exportStar(require("./NameSuffix.js"), exports);
147
148
  __exportStar(require("./Offset.js"), exports);
148
- __exportStar(require("./Operation.js"), exports);
149
149
  __exportStar(require("./Organization.js"), exports);
150
150
  __exportStar(require("./OrganizationEmployer.js"), exports);
151
151
  __exportStar(require("./OrganizationEmployerListResponse.js"), exports);
@@ -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 = "1.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 = "1.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": "1.0.0",
11
- "User-Agent": "@vitable-inc/vitable-connect/1.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
  }